Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 4221 4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 4254 4255 4256 4257 4258 4259 4260 4261 4262 4263 4264 4265 4266 4267 4268 4269 4270 4271 4272 4273 4274 4275 4276 4277 4278 4279 4280 4281 4282 4283 4284 4285 4286 4287 4288 4289 4290 4291 4292 4293 4294 4295 4296 4297 4298 4299 4300 4301 4302 4303 4304 4305 4306 4307 4308 4309 4310 4311 4312 4313 4314 4315 4316 4317 4318 4319 4320 4321 4322 4323 4324 4325 4326 4327 4328 4329 4330 4331 4332 4333 4334 4335 4336 4337 4338 4339 4340 4341 4342 4343 4344 4345 4346 4347 4348 4349 4350 4351 4352 4353 4354 4355 4356 4357 4358 4359 4360 4361 4362 4363 4364 4365 4366 4367 4368 4369 4370 4371 4372 4373 4374 4375 4376 4377 4378 4379 4380 4381 4382 4383 4384 4385 4386 4387 4388 4389 4390 4391 4392 4393 4394 4395 4396 4397 4398 4399 4400 4401 4402 4403 4404 4405 4406 4407 4408 4409 4410 4411 4412 4413 4414 4415 4416 4417 4418 4419 4420 4421 4422 4423 4424 4425 4426 4427 4428 4429 4430 4431 4432 4433 4434 4435 4436 4437 4438 4439 4440 4441 4442 4443 4444 4445 4446 4447 4448 4449 4450 4451 4452 4453 4454 4455 4456 4457 4458 4459 4460 4461 4462 4463 4464 4465 4466 4467 4468 4469 4470 4471 4472 4473 4474 4475 4476 4477 4478 4479 4480 4481 4482 4483 4484 4485 4486 4487 4488 4489 4490 4491 4492 4493 4494 4495 4496 4497 4498 4499 4500 4501 4502 4503 4504 4505 4506 4507 4508 4509 4510 4511 4512 4513 4514 4515 4516 4517 4518 4519 4520 4521 4522 4523 4524 4525 4526 4527 4528 4529 4530 4531 4532 4533 4534 4535 4536 4537 4538 4539 4540 4541 4542 4543 4544 4545 4546 4547 4548 4549 4550 4551 4552 4553 4554 4555 4556 4557 4558 4559 4560 4561 4562 4563 4564 4565 4566 4567 4568 4569 4570 4571 4572 4573 4574 4575 4576 4577 4578 4579 4580 4581 4582 4583 4584 4585 4586 4587 4588 4589 4590 4591 4592 4593 4594 4595 4596 4597 4598 4599 4600 4601 4602 4603 4604 4605 4606 4607 4608 4609 4610 4611 4612 4613 4614 4615 4616 4617 4618 4619 4620 4621 4622 4623 4624 4625 4626 4627 4628 4629 4630 4631 4632 4633 4634 4635 4636 4637 4638 4639 4640 4641 4642 4643 4644 4645 4646 4647 4648 4649 4650 4651 4652 4653 4654 4655 4656 4657 4658 4659 4660 4661 4662 4663 4664 4665 4666 4667 4668 4669 4670 4671 4672 4673 4674 4675 4676 4677 4678 4679 4680 4681 4682 4683 4684 4685 4686 4687 4688 4689 4690 4691 4692 4693 4694 4695 4696 4697 4698 4699 4700 4701 4702 4703 4704 4705 4706 4707 4708 4709 4710 4711 4712 4713 4714 4715 4716 4717 4718 4719 4720 4721 4722 4723 4724 4725 4726 4727 4728 4729 4730 4731 4732 4733 4734 4735 4736 4737 4738 4739 4740 4741 4742 4743 4744 4745 4746 4747 4748 4749 4750 4751 4752 4753 4754 4755 4756 4757 4758 4759 4760 4761 4762 4763 4764 4765 4766 4767 4768 4769 4770 4771 4772 4773 4774 4775 4776 4777 4778 4779 4780 4781 4782 4783 4784 4785 4786 4787 4788 4789 4790 4791 4792 4793 4794 4795 4796 4797 4798 4799 4800 4801 4802 4803 4804 4805 4806 4807 4808 4809 4810 4811 4812 4813 4814 4815 4816 4817 4818 4819 4820 4821 4822 4823 4824 4825 4826 4827 4828 4829 4830 4831 4832 4833 4834 4835 4836 4837 4838 4839 4840 4841 4842 4843 4844 4845 4846 4847 4848 4849 4850 4851 4852 4853 4854 4855 4856 4857 4858 4859 4860 4861 4862 4863 4864 4865 4866 4867 4868 4869 4870 4871 4872 4873 4874 4875 4876 4877 4878 4879 4880 4881 4882 4883 4884 4885 4886 4887 4888 4889 4890 4891 4892 4893 4894 4895 4896 4897 4898 4899 4900 4901 4902 4903 4904 4905 4906 4907 4908 4909 4910 4911 4912 4913 4914 4915 4916 4917 4918 4919 4920 4921 4922 4923 4924 4925 4926 4927 4928 4929 4930 4931 4932 4933 4934 4935 4936 4937 4938 4939 4940 4941 4942 4943 4944 4945 4946 4947 4948 4949 4950 4951 4952 4953 4954 4955 4956 4957 4958 4959 4960 4961 4962 4963 4964 4965 4966 4967 4968 4969 4970 4971 4972 4973 4974 4975 4976 4977 4978 4979 4980 4981 4982 4983 4984 4985 4986 4987 4988 4989 4990 4991 4992 4993 4994 4995 4996 4997 4998 4999 5000 5001 5002 5003 5004 5005 5006 5007 5008 5009 5010 5011 5012 5013 5014 5015 5016 5017 5018 5019 5020 5021 5022 5023 5024 5025 5026 5027 5028 5029 5030 5031 5032 5033 5034 5035 5036 5037 5038 5039 5040 5041 5042 5043 5044 5045 5046 5047 5048 5049 5050 5051 5052 5053 5054 5055 5056 5057 5058 5059 5060 5061 5062 5063 5064 5065 5066 5067 5068 5069 5070 5071 5072 5073 5074 5075 5076 5077 5078 5079 5080 5081 5082 5083 5084 5085 5086 5087 5088 5089 5090 5091 5092 5093 5094 5095 5096 5097 5098 5099 5100 5101 5102 5103 5104 5105 5106 5107 5108 5109 5110 5111 5112 5113 5114 5115 5116 5117 5118 5119 5120 5121 5122 5123 5124 5125 5126 5127 5128 5129 5130 5131 5132 5133 5134 5135 5136 5137 5138 5139 5140 5141 5142 5143 5144 5145 5146 5147 5148 5149 5150 5151 5152 5153 5154 5155 5156 5157 5158 5159 5160 5161 5162 5163 5164 5165 5166 5167 5168 5169 5170 5171 5172 5173 5174 5175 5176 5177 5178 5179 5180 5181 5182 5183 5184 5185 5186 5187 5188 5189 5190 5191 5192 5193 5194 5195 5196 5197 5198 5199 5200 5201 5202 5203 5204 5205 5206 5207 5208 5209 5210 5211 5212 5213 5214 5215 5216 5217 5218 5219 5220 5221 5222 5223 5224 5225 5226 5227 5228 5229 5230 5231 5232 5233 5234 5235 5236 5237 5238 5239 5240 5241 5242 5243 5244 5245 5246 5247 5248 5249 5250 5251 5252 5253 5254 5255 5256 5257 5258 5259 5260 5261 5262 5263 5264 5265 5266 5267 5268 5269 5270 5271 5272 5273 5274 5275 5276 5277 5278 5279 5280 5281 5282 5283 5284 5285 5286 5287 5288 5289 5290 5291 5292 5293 5294 5295 5296 5297 5298 5299 5300 5301 5302 5303 5304 5305 5306 5307 5308 5309 5310 5311 5312 5313 5314 5315 5316 5317 5318 5319 5320 5321 5322 5323 5324 5325 5326 5327 5328 5329 5330 5331 5332 5333 5334 5335 5336 5337 5338 5339 5340 5341 5342 5343 5344 5345 5346 5347 5348 5349 5350 5351 5352 5353 5354 5355 5356 5357 5358 5359 5360 5361 5362 5363 5364 5365 5366 5367 5368 5369 5370 5371 5372 5373 5374 5375 5376 5377 5378 5379 5380 5381 5382 5383 5384 5385 5386 5387 5388 5389 5390 5391 5392 5393 5394 5395 5396 5397 5398 5399 5400 5401 5402 5403 5404 5405 5406 5407 5408 5409 5410 5411 5412 5413 5414 5415 5416 5417 5418 5419 5420 5421 5422 5423 5424 5425 5426 5427 5428 5429 5430 5431 5432 5433 5434 5435 5436 5437 5438 5439 5440 5441 5442 5443 5444 5445 5446 5447 5448 5449 5450 5451 5452 5453 5454 5455 5456 5457 5458 5459 5460 5461 5462 5463 5464 5465 5466 5467 5468 5469 5470 5471 5472 5473 5474 5475 5476 5477 5478 5479 5480 5481 5482 5483 5484 5485 5486 5487 5488 5489 5490 5491 5492 5493 5494 5495 5496 5497 5498 5499 5500 5501 5502 5503 5504 5505 5506 5507 5508 5509 5510 5511 5512 5513 5514 5515 5516 5517 5518 5519 5520 5521 5522 5523 5524 5525 5526 5527 5528 5529 5530 5531 5532 5533 5534 5535 5536 5537 5538 5539 5540 5541 5542 5543 5544 5545 5546 5547 5548 5549 5550 5551 5552 5553 5554 5555 5556 5557 5558 5559 5560 5561 5562 5563 5564 5565 5566 5567 5568 5569 5570 5571 5572 5573 5574 5575 5576 5577 5578 5579 5580 5581 5582 5583 5584 5585 5586 5587 5588 5589 5590 5591 5592 5593 5594 5595 5596 5597 5598 5599 5600 5601 5602 5603 5604 5605 5606 5607 5608 5609 5610 5611 5612 5613 5614 5615 5616 5617 5618 5619 5620 5621 5622 5623 5624 5625 5626 5627 5628 5629 5630 5631 5632 5633 5634 5635 5636 5637 5638 5639 5640 5641 5642 5643 5644 5645 5646 5647 5648 5649 5650 5651 5652 5653 5654 5655 5656 5657 5658 5659 5660 5661 5662 5663 5664 5665 5666 5667 5668 5669 5670 5671 5672 5673 5674 5675 5676 5677 5678 5679 5680 5681 5682 5683 5684 5685 5686 5687 5688 5689 5690 5691 5692 5693 5694 5695 5696 5697 5698 5699 5700 5701 5702 5703 5704 5705 5706 5707 5708 5709 5710 5711 5712 5713 5714 5715 5716 5717 5718 5719 5720 5721 5722 5723 5724 5725 5726 5727 5728 5729 5730 5731 5732 5733 5734 5735 5736 5737 5738 5739 5740 5741 5742 5743 5744 5745 5746 5747 5748 5749 5750 5751 5752 5753 5754 5755 5756 5757 5758 5759 5760 5761 5762 5763 5764 5765 5766 5767 5768 5769 5770 5771 5772 5773 5774 5775 5776 5777 5778 5779 5780 5781 5782 5783 5784 5785 5786 5787 5788 5789 5790 5791 5792 5793 5794 5795 5796 5797 5798 5799 5800 5801 5802 5803 5804 5805 5806 5807 5808 5809 5810 5811 5812 5813 5814 5815 5816 5817 5818 5819 5820 5821 5822 5823 5824 5825 5826 5827 5828 5829 5830 5831 5832 5833 5834 5835 5836 5837 5838 5839 5840 5841 5842 5843 5844 5845 5846 5847 5848 5849 5850 5851 5852 5853 5854 5855 5856 5857 5858 5859 5860 5861 5862 5863 5864 5865 5866 5867 5868 5869 5870 5871 5872 5873 5874 5875 5876 5877 5878 5879 5880 5881 5882 5883 5884 5885 5886 5887 5888 5889 5890 5891 5892 5893 5894 5895 5896 5897 5898 5899 5900 5901 5902 5903 5904 5905 5906 5907 5908 5909 5910 5911 5912 5913 5914 5915 5916 5917 5918 5919 5920 5921 5922 5923 5924 5925 5926 5927 5928 5929 5930 5931 5932 5933 5934 5935 5936 5937 5938 5939 5940 5941 5942 5943 5944 5945 5946 5947 5948 5949 5950 5951 5952 5953 5954 5955 5956 5957 5958 5959 5960 5961 5962 5963 5964 5965 5966 5967 5968 5969 5970 5971 5972 5973 5974 5975 5976 5977 5978 5979 5980 5981 5982 5983 5984 5985 5986 5987 5988 5989 5990 5991 5992 5993 5994 5995 5996 5997 5998 5999 6000 6001 6002 6003 6004 6005 6006 6007 6008 6009 6010 6011 6012 6013 6014 6015 6016 6017 6018 6019 6020 6021 6022 6023 6024 6025 6026 6027 6028 6029 6030 6031 6032 6033 6034 6035 6036 6037 6038 6039 6040 6041 6042 6043 6044 6045 6046 6047 6048 6049 6050 6051 6052 6053 6054 6055 6056 6057 6058 6059 6060 6061 6062 6063 6064 6065 6066 6067 6068 6069 6070 6071 6072 6073 6074 6075 6076 6077 6078 6079 6080 6081 6082 6083 6084 6085 6086 6087 6088 6089 6090 6091 6092 6093 6094 6095 6096 6097 6098 6099 6100 6101 6102 6103 6104 6105 6106 6107 6108 6109 6110 6111 6112 6113 6114 6115 6116 6117 6118 6119 6120 6121 6122 6123 6124 6125 6126 6127 6128 6129 6130 6131 6132 6133 6134 6135 6136 6137 6138 6139 6140 6141 6142 6143 6144 6145 6146 6147 6148 6149 6150 6151 6152 6153 6154 6155 6156 6157 6158 6159 6160 6161 6162 6163 6164 6165 6166 6167 6168 6169 6170 6171 6172 6173 6174 6175 6176 6177 6178 6179 6180 6181 6182 6183 6184 6185 6186 6187 6188 6189 6190 6191 6192 6193 6194 6195 6196 6197 6198 6199 6200 6201 6202 6203 6204 6205 6206 6207 6208 6209 6210 6211 6212 6213 6214 6215 6216 6217 6218 6219 6220 6221 6222 6223 6224 6225 6226 6227 6228 6229 6230 6231 6232 6233 6234 6235 6236 6237 6238 6239 6240 6241 6242 6243 6244 6245 6246 6247 6248 6249 6250 6251 6252 6253 6254 6255 6256 6257 6258 6259 6260 6261 6262 6263 6264 6265 6266 6267 6268 6269 6270 6271 6272 6273 6274 6275 6276 6277 6278 6279 6280 6281 6282 6283 6284 6285 6286 6287 6288 6289 6290 6291 6292 6293 6294 6295 6296 6297 6298 6299 6300 6301 6302 6303 6304 6305 6306 6307 6308 6309 6310 6311 6312 6313 6314 6315 6316 6317 6318 6319 6320 6321 6322 6323 6324 6325 6326 6327 6328 6329 6330 6331 6332 6333 6334 6335 6336 6337 6338 6339 6340 6341 6342 6343 6344 6345 6346 6347 6348 6349 6350 6351 6352 6353 6354 6355 6356 6357 6358 6359 6360 6361 6362 6363 6364 6365 6366 6367 6368 6369 6370 6371 6372 6373 6374 6375 6376 6377 6378 6379 6380 6381 6382 6383 6384 6385 6386 6387 6388 6389 6390 6391 6392 6393 6394 6395 6396 6397 6398 6399 6400 6401 6402 6403 6404 6405 6406 6407 6408 6409 6410 6411 6412 6413 6414 6415 6416 6417 6418 6419 6420 6421 6422 6423 6424 6425 6426 6427 6428 6429 6430 6431 6432 6433 6434 6435 6436 6437 6438 6439 6440 6441 6442 6443 6444 6445 6446 6447 6448 6449 6450 6451 6452 6453 6454 6455 6456 6457 6458 6459 6460 6461 6462 6463 6464 6465 6466 6467 6468 6469 6470 6471 6472 6473 6474 6475 6476 6477 6478 6479 6480 6481 6482 6483 6484 6485 6486 6487 6488 6489 6490 6491 6492 6493 6494 6495 6496 6497 6498 6499 6500 6501 6502 6503 6504 6505 6506 6507 6508 6509 6510 6511 6512 6513 6514 6515 6516 6517 6518 6519 6520 6521 6522 6523 6524 6525 6526 6527 6528 6529 6530 6531 6532 6533 6534 6535 6536 6537 6538 6539 6540 6541 6542 6543 6544 6545 6546 6547 6548 6549 6550 6551 6552 6553 6554 6555 6556 6557 6558 6559 6560 6561 6562 6563 6564 6565 6566 6567 6568 6569 6570 6571 6572 6573 6574 6575 6576 6577 6578 6579 6580 6581 6582 6583 6584 6585 6586 6587 6588 6589 6590 6591 6592 6593 6594 6595 6596 6597 6598 6599 6600 6601 6602 6603 6604 6605 6606 6607 6608 6609 6610 6611 6612 6613 6614 6615 6616 6617 6618 6619 6620 6621 6622 6623 6624 6625 6626 6627 6628 6629 6630 6631 6632 6633 6634 6635 6636 6637 6638 6639 6640 6641 6642 6643 6644 6645 6646 6647 6648 6649 6650 6651 6652 6653 6654 6655 6656 6657 6658 6659 6660 6661 6662 6663 6664 6665 6666 6667 6668 6669 6670 6671 6672 6673 6674 6675 6676 6677 6678 6679 6680 6681 6682 6683 6684 6685 6686 6687 6688 6689 6690 6691 6692 6693 6694 6695 6696 6697 6698 6699 6700 6701 6702 6703 6704 6705 6706 6707 6708 6709 6710 6711 6712 6713 6714 6715 6716 6717 6718 6719 6720 6721 6722 6723 6724 6725 6726 6727 6728 6729 6730 6731 6732 6733 6734 6735 6736 6737 6738 6739 6740 6741 6742 6743 6744 6745 6746 6747 6748 6749 6750 6751 6752 6753 6754 6755 6756 6757 6758 6759 6760 6761 6762 6763 6764 6765 6766 6767 6768 6769 6770 6771 6772 6773 6774 6775 6776 6777 6778 6779 6780 6781 6782 6783 6784 6785 6786 6787 6788 6789 6790 6791 6792 6793 6794 6795 6796 6797 6798 6799 6800 6801 6802 6803 6804 6805 6806 6807 6808 6809 6810 6811 6812 6813 6814 6815 6816 6817 6818 6819 6820 6821 6822 6823 6824 6825 6826 6827 6828 6829 6830 6831 6832 6833 6834 6835 6836 6837 6838 6839 6840 6841 6842 6843 6844 6845 6846 6847 6848 6849 6850 6851 6852 6853 6854 6855 6856 6857 6858 6859 6860 6861 6862 6863 6864 6865 6866 6867 6868 6869 6870 6871 6872 6873 6874 6875 6876 6877 6878 6879 6880 6881 6882 6883 6884 6885 6886 6887 6888 6889 6890 6891 6892 6893 6894 6895 6896 6897 6898 6899 6900 6901 6902 6903 6904 6905 6906 6907 6908 6909 6910 6911 6912 6913 6914 6915 6916 6917 6918 6919 6920 6921 6922 6923 6924 6925 6926 6927 6928 6929 6930 6931 6932 6933 6934 6935 6936 6937 6938 6939 6940 6941 6942 6943 6944 6945 6946 6947 6948 6949 6950 6951 6952 6953 6954 6955 6956 6957 6958 6959 6960 6961 6962 6963 6964 6965 6966 6967 6968 6969 6970 6971 6972 6973 6974 6975 6976 6977 6978 6979 6980 6981 6982 6983 6984 6985 6986 6987 6988 6989 6990 6991 6992 6993 6994 6995 6996 6997 6998 6999 7000 7001 7002 7003 7004 7005 7006 7007 7008 7009 7010 7011 7012 7013 7014 7015 7016 7017 7018 7019 7020 7021 7022 7023 7024 7025 7026 7027 7028 7029 7030 7031 7032 7033 7034 7035 7036 7037 7038 7039 7040 7041 7042 7043 7044 7045 7046 7047 7048 7049 7050 7051 7052 7053 7054 7055 7056 7057 7058 7059 7060 7061 7062 7063 7064 7065 7066 7067 7068 7069 7070 7071 7072 7073 7074 7075 7076 7077 7078 7079 7080 7081 7082 7083 7084 7085 7086 7087 7088 7089 7090 7091 7092 7093 7094 7095 7096 7097 7098 7099 7100 7101 7102 7103 7104 7105 7106 7107 7108 7109 7110 7111 7112 7113 7114 7115 7116 7117 7118 7119 7120 7121 7122 7123 7124 7125 7126 7127 7128 7129 7130 7131 7132 7133 7134 7135 7136 7137 7138 7139 7140 7141 7142 7143 7144 7145 7146 7147 7148 7149 7150 7151 7152 7153 7154 7155 7156 7157 7158 7159 7160 7161 7162 7163 7164 7165 7166 7167 7168 7169 7170 7171 7172 7173 7174 7175 7176 7177 7178 7179 7180 7181 7182 7183 7184 7185 7186 7187 7188 7189 7190 7191 7192 7193 7194 7195 7196 7197 7198 7199 7200 7201 7202 7203 7204 7205 7206 7207 7208 7209 7210 7211 7212 7213 7214 7215 7216 7217 7218 7219 7220 7221 7222 7223 7224 7225 7226 7227 7228 7229 7230 7231 7232 7233 7234 7235 7236 7237 7238 7239 7240 7241 7242 7243 7244 7245 7246 7247 7248 7249 7250 7251 7252 7253 7254 7255 7256 7257 7258 7259 7260 7261 7262 7263 7264 7265 7266 7267 7268 7269 7270 7271 7272 7273 7274 7275 7276 7277 7278 7279 7280 7281 7282 7283 7284 7285 7286 7287 7288 7289 7290 7291 7292 7293 7294 7295 7296 7297 7298 7299 7300 7301 7302 7303 7304 7305 7306 7307 7308 7309 7310 7311 7312 7313 7314 7315 7316 7317 7318 7319 7320 7321 7322 7323 7324 7325 7326 7327 7328 7329 7330 7331 7332 7333 7334 7335 7336 7337 7338 7339 7340 7341 7342 7343 7344 7345 7346 7347 7348 7349 7350 7351 7352 7353 7354 7355 7356 7357 7358 7359 7360 7361 7362 7363 7364 7365 7366 7367 7368 7369 7370 7371 7372 7373 7374 7375 7376 7377 7378 7379 7380 7381 7382 7383 7384 7385 7386 7387 7388 7389 7390 7391 7392 7393 7394 7395 7396 7397 7398 7399 7400 7401 7402 7403 7404 7405 7406 7407 7408 7409 7410 7411 7412 7413 7414 7415 7416 7417 7418 7419 7420 7421 7422 7423 7424 7425 7426 7427 7428 7429 7430 7431 7432 7433 7434 7435 7436 7437 7438 7439 7440 7441 7442 7443 7444 7445 7446 7447 7448 7449 7450 7451 7452 7453 7454 7455 7456 7457 7458 7459 7460 7461 7462 7463 7464 7465 7466 7467 7468 7469 7470 7471 7472 7473 7474 7475 7476 7477 7478 7479 7480 7481 7482 7483 7484 7485 7486 7487 7488 7489 7490 7491 7492 7493 7494 7495 7496 7497 7498 7499 7500 7501 7502 7503 7504 7505 7506 7507 7508 7509 7510 7511 7512 7513 7514 7515 7516 7517 7518 7519 7520 7521 7522 7523 7524 7525 7526 7527 7528 7529 7530 7531 7532 7533 7534 7535 7536 7537 7538 7539 7540 7541 7542 7543 7544 7545 7546 7547 7548 7549 7550 7551 7552 7553 7554 7555 7556 7557 7558 7559 7560 7561 7562 7563 7564 7565 7566 7567 7568 7569 7570 7571 7572 7573 7574 7575 7576 7577 7578 7579 7580 7581 7582 7583 7584 7585 7586 7587 7588 7589 7590 7591 7592 7593 7594 7595 7596 7597 7598 7599 7600 7601 7602 7603 7604 7605 7606 7607 7608 7609 7610 7611 7612 7613 7614 7615 7616 7617 7618 7619 7620 7621 7622 7623 7624 7625 7626 7627 7628 7629 7630 7631 7632 7633 7634 7635 7636 7637 7638 7639 7640 7641 7642 7643 7644 7645 7646 7647 7648 7649 7650 7651 7652 7653 7654 7655 7656 7657 7658 7659 7660 7661 7662 7663 7664 7665 7666 7667 7668 7669 7670 7671 7672 7673 7674 7675 7676 7677 7678 7679 7680 7681 7682 7683 7684 7685 7686 7687 7688 7689 7690 7691 7692 7693 7694 7695 7696 7697 7698 7699 7700 7701 7702 7703 7704 7705 7706 7707 7708 7709 7710 7711 7712 7713 7714 7715 7716 7717 7718 7719 7720 7721 7722 7723 7724 7725 7726 7727 7728 7729 7730 7731 7732 7733 7734 7735 7736 7737 7738 7739 7740 7741 7742 7743 7744 7745 7746 7747 7748 7749 7750 7751 7752 7753 7754 7755 7756 7757 7758 7759 7760 7761 7762 7763 7764 7765 7766 7767 7768 7769 7770 7771 7772 7773 7774 7775 7776 7777 7778 7779 7780 7781 7782 7783 7784 7785 7786 7787 7788 7789 7790 7791 7792 7793 7794 7795 7796 7797 7798 7799 7800 7801 7802 7803 7804 7805 7806 7807 7808 7809 7810 7811 7812 7813 7814 7815 7816 7817 7818 7819 7820 7821 7822 7823 7824 7825 7826 7827 7828 7829 7830 7831 7832 7833 7834 7835 7836 7837 7838 7839 7840 7841 7842 7843 7844 7845 7846 7847 7848 7849 7850 7851 7852 7853 7854 7855 7856 7857 7858 7859 7860 7861 7862 7863 7864 7865 7866 7867 7868 7869 7870 7871 7872 7873 7874 7875 7876 7877 7878 7879 7880 7881 7882 7883 7884 7885 7886 7887 7888 7889 7890 7891 7892 7893 7894 7895 7896 7897 7898 7899 7900 7901 7902 7903 7904 7905 7906 7907 7908 7909 7910 7911 7912 7913 7914 7915 7916 7917 7918 7919 7920 7921 7922 7923 7924 7925 7926 7927 7928 7929 7930 7931 7932 7933 7934 7935 7936 7937 7938 7939 7940 7941 7942 7943 7944 7945 7946 7947 7948 7949 7950 7951 7952 7953 7954 7955 7956 7957 7958 7959 7960 7961 7962 7963 7964 7965 7966 7967 7968 7969 7970 7971 7972 7973 7974 7975 7976 7977 7978 7979 7980 7981 7982 7983 7984 7985 7986 7987 7988 7989 7990 7991 7992 7993 7994 7995 7996 7997 7998 7999 8000 8001 8002 8003 8004 8005 8006 8007 8008 8009 8010 8011 8012 8013 8014 8015 8016 8017 8018 8019 8020 8021 8022 8023 8024 8025 8026 8027 8028 8029 8030 8031 8032 8033 8034 8035 8036 8037 8038 8039 8040 8041 8042 8043 8044 8045 8046 8047 8048 8049 8050 8051 8052 8053 8054 8055 8056 8057 8058 8059 8060 8061 8062 8063 8064 8065 8066 8067 8068 8069 8070 8071 8072 8073 8074 8075 8076 8077 8078 8079 8080 8081 8082 8083 8084 8085 8086 8087 8088 8089 8090 8091 8092 8093 8094 8095 8096 8097 8098 8099 8100 8101 8102 8103 8104 8105 8106 8107 8108 8109 8110 8111 8112 8113 8114 8115 8116 8117 8118 8119 8120 8121 8122 8123 8124 8125 8126 8127 8128 8129 8130 8131 8132 8133 8134 8135 8136 8137 8138 8139 8140 8141 8142 8143 8144 8145 8146 8147 8148 8149 8150 8151 8152 8153 8154 8155 8156 8157 8158 8159 8160 8161 8162 8163 8164 8165 8166 8167 8168 8169 8170 8171 8172 8173 8174 8175 8176 8177 8178 8179 8180 8181 8182 8183 8184 8185 8186 8187 8188 8189 8190 8191 8192 8193 8194 8195 8196 8197 8198 8199 8200 8201 8202 8203 8204 8205 8206 8207 8208 8209 8210 8211 8212 8213 8214 8215 8216 8217 8218 8219 8220 8221 8222 8223 8224 8225 8226 8227 8228 8229 8230 8231 8232 8233 8234 8235 8236 8237 8238 8239 8240 8241 8242 8243 8244 8245 8246 8247 8248 8249 8250 8251 8252 8253 8254 8255 8256 8257 8258 8259 8260 8261 8262 8263 8264 8265 8266 8267 8268 8269 8270 8271 8272 8273 8274 8275 8276 8277 8278 8279 8280 8281 8282 8283 8284 8285 8286 8287 8288 8289 8290 8291 8292 8293 8294 8295 8296 8297 8298 8299 8300 8301 8302 8303 8304 8305 8306 8307 8308 8309 8310 8311 8312 8313 8314 8315 8316 8317 8318 8319 8320 8321 8322 8323 8324 8325 8326 8327 8328 8329 8330 8331 8332 8333 8334 8335 8336 8337 8338 8339 8340 8341 8342 8343 8344 8345 8346 8347 8348 8349 8350 8351 8352 8353 8354 8355 8356 8357 8358 8359 8360 8361 8362 8363 8364 8365 8366 8367 8368 8369 8370 8371 8372 8373 8374 8375 8376 8377 8378 8379 8380 8381 8382 8383 8384 8385 8386 8387 8388 8389 8390 8391 8392 8393 8394 8395 8396 8397 8398 8399 8400 8401 8402 8403 8404 8405 8406 8407 8408 8409 8410 8411 8412 8413 8414 8415 8416 8417 8418 8419 8420 8421 8422 8423 8424 8425 8426 8427 8428 8429 8430 8431 8432 8433 8434 8435 8436 8437 8438 8439 8440 8441 8442 8443 8444 8445 8446 8447 8448 8449 8450 8451 8452 8453 8454 8455 8456 8457 8458 8459 8460 8461 8462 8463 8464 8465 8466 8467 8468 8469 8470 8471 8472 8473 8474 8475 8476 8477 8478 8479 8480 8481 8482 8483 8484 8485 8486 8487 8488 8489 8490 8491 8492 8493 8494 8495 8496 8497 8498 8499 8500 8501 8502 8503 8504 8505 8506 8507 8508 8509 8510 8511 8512 8513 8514 8515 8516 8517 8518 8519 8520 8521 8522 8523 8524 8525 8526 8527 8528 8529 8530 8531 8532 8533 8534 8535 8536 8537 8538 8539 8540 8541 8542 8543 8544 8545 8546 8547 8548 8549 8550 8551 8552 8553 8554 8555 8556 8557 8558 8559 8560 8561 8562 8563 8564 8565 8566 8567 8568 8569 8570 8571 8572 8573 8574 8575 8576 8577 8578 8579 8580 8581 8582 8583 8584 8585 8586 8587 8588 8589 8590 8591 8592 8593 8594 8595 8596 8597 8598 8599 8600 8601 8602 8603 8604 8605 8606 8607 8608 8609 8610 8611 8612 8613 8614 8615 8616 8617 8618 8619 8620 8621 8622 8623 8624 8625 8626 8627 8628 8629 8630 8631 8632 8633 8634 8635 8636 8637 8638 8639 8640 8641 8642 8643 8644 8645 8646 8647 8648 8649 8650 8651 8652 8653 8654 8655 8656 8657 8658 8659 8660 8661 8662 8663 8664 8665 8666 8667 8668 8669 8670 8671 8672 8673 8674 8675 8676 8677 8678 8679 8680 8681 8682 8683 8684 8685 8686 8687 8688 8689 8690 8691 8692 8693 8694 8695 8696 8697 8698 8699 8700 8701 8702 8703 8704 8705 8706 8707 8708 8709 8710 8711 8712 8713 8714 8715 8716 8717 8718 8719 8720 8721 8722 8723 8724 8725 8726 8727 8728 8729 8730 8731 8732 8733 8734 8735 8736 8737 8738 8739 8740 8741 8742 8743 8744 8745 8746 8747 8748 8749 8750 8751 8752 8753 8754 8755 8756 8757 8758 8759 8760 8761 8762 8763 8764 8765 8766 8767 8768 8769 8770 8771 8772 8773 8774 8775 8776 8777 8778 8779 8780 8781 8782 8783 8784 8785 8786 8787 8788 8789 8790 8791 8792 8793 8794 8795 8796 8797 8798 8799 8800 8801 8802 8803 8804 8805 8806 8807 8808 8809 8810 8811 8812 8813 8814 8815 8816 8817 8818 8819 8820 8821 8822 8823 8824 8825 8826 8827 8828 8829 8830 8831 8832 8833 8834 8835 8836 8837 8838 8839 8840 8841 8842 8843 8844 8845 8846 8847 8848 8849 8850 8851 8852 8853 8854 8855 8856 8857 8858 8859 8860 8861 8862 8863 8864 8865 8866 8867 8868 8869 8870 8871 8872 8873 8874 8875 8876 8877 8878 8879 8880 8881 8882 8883 8884 8885 8886 8887 8888 8889 8890 8891 8892 8893 8894 8895 8896 8897 8898 8899 8900 8901 8902 8903 8904 8905 8906 8907 8908 8909 8910 8911 8912 8913 8914 8915 8916 8917 8918 8919 8920 8921 8922 8923 8924 8925 8926 8927 8928 8929 8930 8931 8932 8933 8934 8935 8936 8937 8938 8939 8940 8941 8942 8943 8944 8945 8946 8947 8948 8949 8950 8951 8952 8953 8954 8955 8956 8957 8958 8959 8960 8961 8962 8963 8964 8965 8966 8967 8968 8969 8970 8971 8972 8973 8974 8975 8976 8977 8978 8979 8980 8981 8982 8983 8984 8985 8986 8987 8988 8989 8990 8991 8992 8993 8994 8995 8996 8997 8998 8999 9000 9001 9002 9003 9004 9005 9006 9007 9008 9009 9010 9011 9012 9013 9014 9015 9016 9017 9018 9019 9020 9021 9022 9023 9024 9025 9026 9027 9028 9029 9030 9031 9032 9033 9034 9035 9036 9037 9038 9039 9040 9041 9042 9043 9044 9045 9046 9047 9048 9049 9050 9051 9052 9053 9054 9055 9056 9057 9058 9059 9060 9061 9062 9063 9064 9065 9066 9067 9068 9069 9070 9071 9072 9073 9074 9075 9076 9077 9078 9079 9080 9081 9082 9083 9084 9085 9086 9087 9088 9089 9090 9091 9092 9093 9094 9095 9096 9097 9098 9099 9100 9101 9102 9103 9104 9105 9106 9107 9108 9109 9110 9111 9112 9113 9114 9115 9116 9117 9118 9119 9120 9121 9122 9123 9124 9125 9126 9127 9128 9129 9130 9131 9132 9133 9134 9135 9136 9137 9138 9139 9140 9141 9142 9143 9144 9145 9146 9147 9148 9149 9150 9151 9152 9153 9154 9155 9156 9157 9158 9159 9160 9161 9162 9163 9164 9165 9166 9167 9168 9169 9170 9171 9172 9173 9174 9175 9176 9177 9178 9179 9180 9181 9182 9183 9184 9185 9186 9187 9188 9189 9190 9191 9192 9193 9194 9195 9196 9197 9198 9199 9200 9201 9202 9203 9204 9205 9206 9207 9208 9209 9210 9211 9212 9213 9214 9215 9216 9217 9218 9219 9220 9221 9222 9223 9224 9225 9226 9227 9228 9229 9230 9231 9232 9233 9234 9235 9236 9237 9238 9239 9240 9241 9242 9243 9244 9245 9246 9247 9248 9249 9250 9251 9252 9253 9254 9255 9256 9257 9258 9259 9260 9261 9262 9263 9264 9265 9266 9267 9268 9269 9270 9271 9272 9273 9274 9275 9276 9277 9278 9279 9280 9281 9282 9283 9284 9285 9286 9287 9288 9289 9290 9291 9292 9293 9294 9295 9296 9297 9298 9299 9300 9301 9302 9303 9304 9305 9306 9307 9308 9309 9310 9311 9312 9313 9314 9315 9316 9317 9318 9319 9320 9321 9322 9323 9324 9325 9326 9327 9328 9329 9330 9331 9332 9333 9334 9335 9336 9337 9338 9339 9340 9341 9342 9343 9344 9345 9346 9347 9348 9349 9350 9351 9352 9353 9354 9355 9356 9357 9358 9359 9360 9361 9362 9363 9364 9365 9366 9367 9368 9369 9370 9371 9372 9373 9374 9375 9376 9377 9378 9379 9380 9381 9382 9383 9384 9385 9386 9387 9388 9389 9390 9391 9392 9393 9394 9395 9396 9397 9398 9399 9400 9401 9402 9403 9404 9405 9406 9407 9408 9409 9410 9411 9412 9413 9414 9415 9416 9417 9418 9419 9420 9421 9422 9423 9424 9425 9426 9427 9428 9429 9430 9431 9432 9433 9434 9435 9436 9437 9438 9439 9440 9441 9442 9443 9444 9445 9446 9447 9448 9449 9450 9451 9452 9453 9454 9455 9456 9457 9458 9459 9460 9461 9462 9463 9464 9465 9466 9467 9468 9469 9470 9471 9472 9473 9474 9475 9476 9477 9478 9479 9480 9481 9482 9483 9484 9485 9486 9487 9488 9489 9490 9491 9492 9493 9494 9495 9496 9497 9498 9499 9500 9501 9502 9503 9504 9505 9506 9507 9508 9509 9510 9511 9512 9513 9514 9515 9516 9517 9518 9519 9520 9521 9522 9523 9524 9525 9526 9527 9528 9529 9530 9531 9532 9533 9534 9535 9536 9537 9538 9539 9540 9541 9542 9543 9544 9545 9546 9547 9548 9549 9550 9551 9552 9553 9554 9555 9556 9557 9558 9559 9560 9561 9562 9563 9564 9565 9566 9567 9568 9569 9570 9571 9572 9573 9574 9575 9576 9577 9578 9579 9580 9581 9582 9583 9584 9585 9586 9587 9588 9589 9590 9591 9592 9593 9594 9595 9596 9597 9598 9599 9600 9601 9602 9603 9604 9605 9606 9607 9608 9609 9610 9611 9612 9613 9614 9615 9616 9617 9618 9619 9620 9621 9622 9623 9624 9625 9626 9627 9628 9629 9630 9631 9632 9633 9634 9635 9636 9637 9638 9639 9640 9641 9642 9643 9644 9645 9646 9647 9648 9649 9650 9651 9652 9653 9654 9655 9656 9657 9658 9659 9660 9661 9662 9663 9664 9665 9666 9667 9668 9669 9670 9671 9672 9673 9674 9675 9676 9677 9678 9679 9680 9681 9682 9683 9684 9685 9686 9687 9688 9689 9690 9691 9692 9693 9694 9695 9696 9697 9698 9699 9700 9701 9702 9703 9704 9705 9706 9707 9708 9709 9710 9711 9712 9713 9714 9715 9716 9717 9718 9719 9720 9721 9722 9723 9724 9725 9726 9727 9728 9729 9730 9731 9732 9733 9734 9735 9736 9737 9738 9739 9740 9741 9742 9743 9744 9745 9746 9747 9748 9749 9750 9751 9752 9753 9754 9755 9756 9757 9758 9759 9760 9761 9762 9763 9764 9765 9766 9767 9768 9769 9770 9771 9772 9773 9774 9775 9776 9777 9778 9779 9780 9781 9782 9783 9784 9785 9786 9787 9788 9789 9790 9791 9792 9793 9794 9795 9796 9797 9798 9799 9800 9801 9802 9803 9804 9805 9806 9807 9808 9809 9810 9811 9812 9813 9814 9815 9816 9817 9818 9819 9820 9821 9822 9823 9824 9825 9826 9827 9828 9829 9830 9831 9832 9833 9834 9835 9836 9837 9838 9839 9840 9841 9842 9843 9844 9845 9846 9847 9848 9849 9850 9851 9852 9853 9854 9855 9856 9857 9858 9859 9860 9861 9862 9863 9864 9865 9866 9867 9868 9869 9870 9871 9872 9873 9874 9875 9876 9877 9878 9879 9880 9881 9882 9883 9884 9885 9886 9887 9888 9889 9890 9891 9892 9893 9894 9895 9896 9897 9898 9899 9900 9901 9902 9903 9904 9905 9906 9907 9908 9909 9910 9911 9912 9913 9914 9915 9916 9917 9918 9919 9920 9921 9922 9923 9924 9925 9926 9927 9928 9929 9930 9931 9932 9933 9934 9935 9936 9937 9938 9939 9940 9941 9942 9943 9944 9945 9946 9947 9948 9949 9950 9951 9952 9953 9954 9955 9956 9957 9958 9959 9960 9961 9962 9963 9964 9965 9966 9967 9968 9969 9970 9971 9972 9973 9974 9975 9976 9977 9978 9979 9980 9981 9982 9983 9984 9985 9986 9987 9988 9989 9990 9991 9992 9993 9994 9995 9996 9997 9998 9999 10000 10001 10002 10003 10004 10005 10006 10007 10008 10009 10010 10011 10012 10013 10014 10015 10016 10017 10018 10019 10020 10021 10022 10023 10024 10025 10026 10027 10028 10029 10030 10031 10032 10033 10034 10035 10036 10037 10038 10039 10040 10041 10042 10043 10044 10045 10046 10047 10048 10049 10050 10051 10052 10053 10054 10055 10056 10057 10058 10059 10060 10061 10062 10063 10064 10065 10066 10067 10068 10069 10070 10071 10072 10073 10074 10075 10076 10077 10078 10079 10080 10081 10082 10083 10084 10085 10086 10087 10088 10089 10090 10091 10092 10093 10094 10095 10096 10097 10098 10099 10100 10101 10102 10103 10104 10105 10106 10107 10108 10109 10110 10111 10112 10113 10114 10115 10116 10117 10118 10119 10120 10121 10122 10123 10124 10125 10126 10127 10128 10129 10130 10131 10132 10133 10134 10135 10136 10137 10138 10139 10140 10141 10142 10143 10144 10145 10146 10147 10148 10149 10150 10151 10152 10153 10154 10155 10156 10157 10158 10159 10160 10161 10162 10163 10164 10165 10166 10167 10168 10169 10170 10171 10172 10173 10174 10175 10176 10177 10178 10179 10180 10181 10182 10183 10184 10185 10186 10187 10188 10189 10190 10191 10192 10193 10194 10195 10196 10197 10198 10199 10200 10201 10202 10203 10204 10205 10206 10207 10208 10209 10210 10211 10212 10213 10214 10215 10216 10217 10218 10219 10220 10221 10222 10223 10224 10225 10226 10227 10228 10229 10230 10231 10232 10233 10234 10235 10236 10237 10238 10239 10240 10241 10242 10243 10244 10245 10246 10247 10248 10249 10250 10251 10252 10253 10254 10255 10256 10257 10258 10259 10260 10261 10262 10263 10264 10265 10266 10267 10268 10269 10270 10271 10272 10273 10274 10275 10276 10277 10278 10279 10280 10281 10282 10283 10284 10285 10286 10287 10288 10289 10290 10291 10292 10293 10294 10295 10296 10297 10298 10299 10300 10301 10302 10303 10304 10305 10306 10307 10308 10309 10310 10311 10312 10313 10314 10315 10316 10317 10318 10319 10320 10321 10322 10323 10324 10325 10326 10327 10328 10329 10330 10331 10332 10333 10334 10335 10336 10337 10338 10339 10340 10341 10342 10343 10344 10345 10346 10347 10348 10349 10350 10351 10352 10353 10354 10355 10356 10357 10358 10359 10360 10361 10362 10363 10364 10365 10366 10367 10368 10369 10370 10371 10372 10373 10374 10375 10376 10377 10378 10379 10380 10381 10382 10383 10384 10385 10386 10387 10388 10389 10390 10391 10392 10393 10394 10395 10396 10397 10398 10399 10400 10401 10402 10403 10404 10405 10406 10407 10408 10409 10410 10411 10412 10413 10414 10415 10416 10417 10418 10419 10420 10421 10422 10423 10424 10425 10426 10427 10428 10429 10430 10431 10432 10433 10434 10435 10436 10437 10438 10439 10440 10441 10442 10443 10444 10445 10446 10447 10448 10449 10450 10451 10452 10453 10454 10455 10456 10457 10458 10459 10460 10461 10462 10463 10464 10465 10466 10467 10468 10469 10470 10471 10472 10473 10474 10475 10476 10477 10478 10479 10480 10481 10482 10483 10484 10485 10486 10487 10488 10489 10490 10491 10492 10493 10494 10495 10496 10497 10498 10499 10500 10501 10502 10503 10504 10505 10506 10507 10508 10509 10510 10511 10512 10513 10514 10515 10516 10517 10518 10519 10520 10521 10522 10523 10524 10525 10526 10527 10528 10529 10530 10531 10532 10533 10534 10535 10536 10537 10538 10539 10540 10541 10542 10543 10544 10545 10546 10547 10548 10549 10550 10551 10552 10553 10554 10555 10556 10557 10558 10559 10560 10561 10562 10563 10564 10565 10566 10567 10568 10569 10570 10571 10572 10573 10574 10575 10576 10577 10578 10579 10580 10581 10582 10583 10584 10585 10586 10587 10588 10589 10590 10591 10592 10593 10594 10595 10596 10597 10598 10599 10600 10601 10602 10603 10604 10605 10606 10607 10608 10609 10610 10611 10612 10613 10614 10615 10616 10617 10618 10619 10620 10621 10622 10623 10624 10625 10626 10627 10628 10629 10630 10631 10632 10633 10634 10635 10636 10637 10638 10639 10640 10641 10642 10643 10644 10645 10646 10647 10648 10649 10650 10651 10652 10653 10654 10655 10656 10657 10658 10659 10660 10661 10662 10663 10664 10665 10666 10667 10668 10669 10670 10671 10672 10673 10674 10675 10676 10677 10678 10679 10680 10681 10682 10683 10684 10685 10686 10687 10688 10689 10690 10691 10692 10693 10694 10695 10696 10697 10698 10699 10700 10701 10702 10703 10704 10705 10706 10707 10708 10709 10710 10711 10712 10713 10714 10715 10716 10717 10718 10719 10720 10721 10722 10723 10724 10725 10726 10727 10728 10729 10730 10731 10732 10733 10734 10735 10736 10737 10738 10739 10740 10741 10742 10743 10744 10745 10746 10747 10748 10749 10750 10751 10752 10753 10754 10755 10756 10757 10758 10759 10760 10761 10762 10763 10764 10765 10766 10767 10768 10769 10770 10771 10772 10773 10774 10775 10776 10777 10778 10779 10780 10781 10782 10783 10784 10785 10786 10787 10788 10789 10790 10791 10792 10793 10794 10795 10796 10797 10798 10799 10800 10801 10802 10803 10804 10805 10806 10807 10808 10809 10810 10811 10812 10813 10814 10815 10816 10817 10818 10819 10820 10821 10822 10823 10824 10825 10826 10827 10828 10829 10830 10831 10832 10833 10834 10835 10836 10837 10838 10839 10840 10841 10842 10843 10844 10845 10846 10847 10848 10849 10850 10851 10852 10853 10854 10855 10856 10857 10858 10859 10860 10861 10862 10863 10864 10865 10866 10867 10868 10869 10870 10871 10872 10873 10874 10875 10876 10877 10878 10879 10880 10881 10882 10883 10884 10885 10886 10887 10888 10889 10890 10891 10892 10893 10894 10895 10896 10897 10898 10899 10900 10901 10902 10903 10904 10905 10906 10907 10908 10909 10910 10911 10912 10913 10914 10915 10916 10917 10918 10919 10920 10921 10922 10923 10924 10925 10926 10927 10928 10929 10930 10931 10932 10933 10934 10935 10936 10937 10938 10939 10940 10941 10942 10943 10944 10945 10946 10947 10948 10949 10950 10951 10952 10953 10954 10955 10956 10957 10958 10959 10960 10961 10962 10963 10964 10965 10966 10967 10968 10969 10970 10971 10972 10973 10974 10975 10976 10977 10978 10979 10980 10981 10982 10983 10984 10985 10986 10987 10988 10989 10990 10991 10992 10993 10994 10995 10996 10997 10998 10999 11000 11001 11002 11003 11004 11005 11006 11007 11008 11009 11010 11011 11012 11013 11014 11015 11016 11017 11018 11019 11020 11021 11022 11023 11024 11025 11026 11027 11028 11029 11030 11031 11032 11033 11034 11035 11036 11037 11038 11039 11040 11041 11042 11043 11044 11045 11046 11047 11048 11049 11050 11051 11052 11053 11054 11055 11056 11057 11058 11059 11060 11061 11062 11063 11064 11065 11066 11067 11068 11069 11070 11071 11072 11073 11074 11075 11076 11077 11078 11079 11080 11081 11082 11083 11084 11085 11086 11087 11088 11089 11090 11091 11092 11093 11094 11095 11096 11097 11098 11099 11100 11101 11102 11103 11104 11105 11106 11107 11108 11109 11110 11111 11112 11113 11114 11115 11116 11117 11118 11119 11120 11121 11122 11123 11124 11125 11126 11127 11128 11129 11130 11131 11132 11133 11134 11135 11136 11137 11138 11139 11140 11141 11142 11143 11144 11145 11146 11147 11148 11149 11150 11151 11152 11153 11154 11155 11156 11157 11158 11159 11160 11161 11162 11163 11164 11165 11166 11167 11168 11169 11170 11171 11172 11173 11174 11175 11176 11177 11178 11179 11180 11181 11182 11183 11184 11185 11186 11187 11188 11189 11190 11191 11192 11193 11194 11195 11196 11197 11198 11199 11200 11201 11202 11203 11204 11205 11206 11207 11208 11209 11210 11211 11212 11213 11214 11215 11216 11217 11218 11219 11220 11221 11222 11223 11224 11225 11226 11227 11228 11229 11230 11231 11232 11233 11234 11235 11236 11237 11238 11239 11240 11241 11242 11243 11244 11245 11246 11247 11248 11249 11250 11251 11252 11253 11254 11255 11256 11257 11258 11259 11260 11261 11262 11263 11264 11265 11266 11267 11268 11269 11270 11271 11272 11273 11274 11275 11276 11277 11278 11279 11280 11281 11282 11283 11284 11285 11286 11287 11288 11289 11290 11291 11292 11293 11294 11295 11296 11297 11298 11299 11300 11301 11302 11303 11304 11305 11306 11307 11308 11309 11310 11311 11312 11313 11314 11315 11316 11317 11318 11319 11320 11321 11322 11323 11324 11325 11326 11327 11328 11329 11330 11331 11332 11333 11334 11335 11336 11337 11338 11339 11340 11341 11342 11343 11344 11345 11346 11347 11348 11349 11350 11351 11352 11353 11354 11355 11356 11357 11358 11359 11360 11361 11362 11363 11364 11365 11366 11367 11368 11369 11370 11371 11372 11373 11374 11375 11376 11377 11378 11379 11380 11381 11382 11383 11384 11385 11386 11387 11388 11389 11390 11391 11392 11393 11394 11395 11396 11397 11398 11399 11400 11401 11402 11403 11404 11405 11406 11407 11408 11409 11410 11411 11412 11413 11414 11415 11416 11417 11418 11419 11420 11421 11422 11423 11424 11425 11426 11427 11428 11429 11430 11431 11432 11433 11434 11435 11436 11437 11438 11439 11440 11441 11442 11443 11444 11445 11446 11447 11448 11449 11450 11451 11452 11453 11454 11455 11456 11457 11458 11459 11460 11461 11462 11463 11464 11465 11466 11467 11468 11469 11470 11471 11472 11473 11474 11475 11476 11477 11478 11479 11480 11481 11482 11483 11484 11485 11486 11487 11488 11489 11490 11491 11492 11493 11494 11495 11496 11497 11498 11499 11500 11501 11502 11503 11504 11505 11506 11507 11508 11509 11510 11511 11512 11513 11514 11515 11516 11517 11518 11519 11520 11521 11522 11523 11524 11525 11526 11527 11528 11529 11530 11531 11532 11533 11534 11535 11536 11537 11538 11539 11540 11541 11542 11543 11544 11545 11546 11547 11548 11549 11550 11551 11552 11553 11554 11555 11556 11557 11558 11559 11560 11561 11562 11563 11564 11565 11566 11567 11568 11569 11570 11571 11572 11573 11574 11575 11576 11577 11578 11579 11580 11581 11582 11583 11584 11585 11586 11587 11588 11589 11590 11591 11592 11593 11594 11595 11596 11597 11598 11599 11600 11601 11602 11603 11604 11605 11606 11607 11608 11609 11610 11611 11612 11613 11614 11615 11616 11617 11618 11619 11620 11621 11622 11623 11624 11625 11626 11627 11628 11629 11630 11631 11632 11633 11634 11635 11636 11637 11638 11639 11640 11641 11642 11643 11644 11645 11646 11647 11648 11649 11650 11651 11652 11653 11654 11655 11656 11657 11658 11659 11660 11661 11662 11663 11664 11665 11666 11667 11668 11669 11670 11671 11672 11673 11674 11675 11676 11677 11678 11679 11680 11681 11682 11683 11684 11685 11686 11687 11688 11689 11690 11691 11692 11693 11694 11695 11696 11697 11698 11699 11700 11701 11702 11703 11704 11705 11706 11707 11708 11709 11710 11711 11712 11713 11714 11715 11716 11717 11718 11719 11720 11721 11722 11723 11724 11725 11726 11727 11728 11729 11730 11731 11732 11733 11734 11735 11736 11737 11738 11739 11740 11741 11742 11743 11744 11745 11746 11747 11748 11749 11750 11751 11752 11753 11754 11755 11756 11757 11758 11759 11760 11761 11762 11763 11764 11765 11766 11767 11768 11769 11770 11771 11772 11773 11774 11775 11776 11777 11778 11779 11780 11781 11782 11783 11784 11785 11786 11787 11788 11789 11790 11791 11792 11793 11794 11795 11796 11797 11798 11799 11800 11801 11802 11803 11804 11805 11806 11807 11808 11809 11810 11811 11812 11813 11814 11815 11816 11817 11818 11819 11820 11821 11822 11823 11824 11825 11826 11827 11828 11829 11830 11831 11832 11833 11834 11835 11836 11837 11838 11839 11840 11841 11842 11843 11844 11845 11846 11847 11848 11849 11850 11851 11852 11853 11854 11855 11856 11857 11858 11859 11860 11861 11862 11863 11864 11865 11866 11867 11868 11869 11870 11871 11872 11873 11874 11875 11876 11877 11878 11879 11880 11881 11882 11883 11884 11885 11886 11887 11888 11889 11890 11891 11892 11893 11894 11895 11896 11897 11898 11899 11900 11901 11902 11903 11904 11905 11906 11907 11908 11909 11910 11911 11912 11913 11914 11915 11916 11917 11918 11919 11920 11921 11922 11923 11924 11925 11926 11927 11928 11929 11930 11931 11932 11933 11934 11935 11936 11937 11938 11939 11940 11941 11942 11943 11944 11945 11946 11947 11948 11949 11950 11951 11952 11953 11954 11955 11956 11957 11958 11959 11960 11961 11962 11963 11964 11965 11966 11967 11968 11969 11970 11971 11972 11973 11974 11975 11976 11977 11978 11979 11980 11981 11982 11983 11984 11985 11986 11987 11988 11989 11990 11991 11992 11993 11994 11995 11996 11997 11998 11999 12000 12001 12002 12003 12004 12005 12006 12007 12008 12009 12010 12011 12012 12013 12014 12015 12016 12017 12018 12019 12020 12021 12022 12023 12024 12025 12026 12027 12028 12029 12030 12031 12032 12033 12034 12035 12036 12037 12038 12039 12040 12041 12042 12043 12044 12045 12046 12047 12048 12049 12050 12051 12052 12053 12054 12055 12056 12057 12058 12059 12060 12061 12062 12063 12064 12065 12066 12067 12068 12069 12070 12071 12072 12073 12074 12075 12076 12077 12078 12079 12080 12081 12082 12083 12084 12085 12086 12087 12088 12089 12090 12091 12092 12093 12094 12095 12096 12097 12098 12099 12100 12101 12102 12103 12104 12105 12106 12107 12108 12109 12110 12111 12112 12113 12114 12115 12116 12117 12118 12119 12120 12121 12122 12123 12124 12125 12126 12127 12128 12129 12130 12131 12132 12133 12134 12135 12136 12137 12138 12139 12140 12141 12142 12143 12144 12145 12146 12147 12148 12149 12150 12151 12152 12153 12154 12155 12156 12157 12158 12159 12160 12161 12162 12163 12164 12165 12166 12167 12168 12169 12170 12171 12172 12173 12174 12175 12176 12177 12178 12179 12180 12181 12182 12183 12184 12185 12186 12187 12188 12189 12190 12191 12192 12193 12194 12195 12196 12197 12198 12199 12200 12201 12202 12203 12204 12205 12206 12207 12208 12209 12210 12211 12212 12213 12214 12215 12216 12217 12218 12219 12220 12221 12222 12223 12224 12225 12226 12227 12228 12229 12230 12231 12232 12233 12234 12235 12236 12237 12238 12239 12240 12241 12242 12243 12244 12245 12246 12247 12248 12249 12250 12251 12252 12253 12254 12255 12256 12257 12258 12259 12260 12261 12262 12263 12264 12265 12266 12267 12268 12269 12270 12271 12272 12273 12274 12275 12276 12277 12278 12279 12280 12281 12282 12283 12284 12285 12286 12287 12288 12289 12290 12291 12292 12293 12294 12295 12296 12297 12298 12299 12300 12301 12302 12303 12304 12305 12306 12307 12308 12309 12310 12311 12312 12313 12314 12315 12316 12317 12318 12319 12320 12321 12322 12323 12324 12325 12326 12327 12328 12329 12330 12331 12332 12333 12334 12335 12336 12337 12338 12339 12340 12341 12342 12343 12344 12345 12346 12347 12348 12349 12350 12351 12352 12353 12354 12355 12356 12357 12358 12359 12360 12361 12362 12363 12364 12365 12366 12367 12368 12369 12370 12371 12372 12373 12374 12375 12376 12377 12378 12379 12380 12381 12382 12383 12384 12385 12386 12387 12388 12389 12390 12391 12392 12393 12394 12395 12396 12397 12398 12399 12400 12401 12402 12403 12404 12405 12406 12407 12408 12409 12410 12411 12412 12413 12414 12415 12416 12417 12418 12419 12420 12421 12422 12423 12424 12425 12426 12427 12428 12429 12430 12431 12432 12433 12434 12435 12436 12437 12438 12439 12440 12441 12442 12443 12444 12445 12446 12447 12448 12449 12450 12451 12452 12453 12454 12455 12456 12457 12458 12459 12460 12461 12462 12463 12464 12465 12466 12467 12468 12469 12470 12471 12472 12473 12474 12475 12476 12477 12478 12479 12480 12481 12482 12483 12484 12485 12486 12487 12488 12489 12490 12491 12492 12493 12494 12495 12496 12497 12498 12499 12500 12501 12502 12503 12504 12505 12506 12507 12508 12509 12510 12511 12512 12513 12514 12515 12516 12517 12518 12519 12520 12521 12522 12523 12524 12525 12526 12527 12528 12529 12530 12531 12532 12533 12534 12535 12536 12537 12538 12539 12540 12541 12542 12543 12544 12545 12546 12547 12548 12549 12550 12551 12552 12553 12554 12555 12556 12557 12558 12559 12560 12561 12562 12563 12564 12565 12566 12567 12568 12569 12570 12571 12572 12573 12574 12575 12576 12577 12578 12579 12580 12581 12582 12583 12584 12585 12586 12587 12588 12589 12590 12591 12592 12593 12594 12595 12596 12597 12598 12599 12600 12601 12602 12603 12604 12605 12606 12607 12608 12609 12610 12611 12612 12613 12614 12615 12616 12617 12618 12619 12620 12621 12622 12623 12624 12625 12626 12627 12628 12629 12630 12631 12632 12633 12634 12635 12636 12637 12638 12639 12640 12641 12642 12643 12644 12645 12646 12647 12648 12649 12650 12651 12652 12653 12654 12655 12656 12657 12658 12659 12660 12661 12662 12663 12664 12665 12666 12667 12668 12669 12670 12671 12672 12673 12674 12675 12676 12677 12678 12679 12680 12681 12682 12683 12684 12685 12686 12687 12688 12689 12690 12691 12692 12693 12694 12695 12696 12697 12698 12699 12700 12701 12702 12703 12704 12705 12706 12707 12708 12709 12710 12711 12712 12713 12714 12715 12716 12717 12718 12719 12720 12721 12722 12723 12724 12725 12726 12727 12728 12729 12730 12731 12732 12733 12734 12735 12736 12737 12738 12739 12740 12741 12742 12743 12744 12745 12746 12747 12748 12749 12750 12751 12752 12753 12754 12755 12756 12757 12758 12759 12760 12761 12762 12763 12764 12765 12766 12767 12768 12769 12770 12771 12772 12773 12774 12775 12776 12777 12778 12779 12780 12781 12782 12783 12784 12785 12786 12787 12788 12789 12790 12791 12792 12793 12794 12795 12796 12797 12798 12799 12800 12801 12802 12803 12804 12805 12806 12807 12808 12809 12810 12811 12812 12813 12814 12815 12816 12817 12818 12819 12820 12821 12822 12823 12824 12825 12826 12827 12828 12829 12830 12831 12832 12833 12834 12835 12836 12837 12838 12839 12840 12841 12842 12843 12844 12845 12846 12847 12848 12849 12850 12851 12852 12853 12854 12855 12856 12857 12858 12859 12860 12861 12862 12863 12864 12865 12866 12867 12868 12869 12870 12871 12872 12873 12874 12875 12876 12877 12878 12879 12880 12881 12882 12883 12884 12885 12886 12887 12888 12889 12890 12891 12892 12893 12894 12895 12896 12897 12898 12899 12900 12901 12902 12903 12904 12905 12906 12907 12908 12909 12910 12911 12912 12913 12914 12915 12916 12917 12918 12919 12920 12921 12922 12923 12924 12925 12926 12927 12928 12929 12930 12931 12932 12933 12934 12935 12936 12937 12938 12939 12940 12941 12942 12943 12944 12945 12946 12947 12948 12949 12950 12951 12952 12953 12954 12955 12956 12957 12958 12959 12960 12961 12962 12963 12964 12965 12966 12967 12968 12969 12970 12971 12972 12973 12974 12975 12976 12977 12978 12979 12980 12981 12982 12983 12984 12985 12986 12987 12988 12989 12990 12991 12992 12993 12994 12995 12996 12997 12998 12999 13000 13001 13002 13003 13004 13005 13006 13007 13008 13009 13010 13011 13012 13013 13014 13015 13016 13017 13018 13019 13020 13021 13022 13023 13024 13025 13026 13027 13028 13029 13030 13031 13032 13033 13034 13035 13036 13037 13038 13039 13040 13041 13042 13043 13044 13045 13046 13047 13048 13049 13050 13051 13052 13053 13054 13055 13056 13057 13058 13059 13060 13061 13062 13063 13064 13065 13066 13067 13068 13069 13070 13071 13072 13073 13074 13075 13076 13077 13078 13079 13080 13081 13082 13083 13084 13085 13086 13087 13088 13089 13090 13091 13092 13093 13094 13095 13096 13097 13098 13099 13100 13101 13102 13103 13104 13105 13106 13107 13108 13109 13110 13111 13112 13113 13114 13115 13116 13117 13118 13119 13120 13121 13122 13123 13124 13125 13126 13127 13128 13129 13130 13131 13132 13133 13134 13135 13136 13137 13138 13139 13140 13141 13142 13143 13144 13145 13146 13147 13148 13149 13150 13151 13152 13153 13154 13155 13156 13157 13158 13159 13160 13161 13162 13163 13164 13165 13166 13167 13168 13169 13170 13171 13172 13173 13174 13175 13176 13177 13178 13179 13180 13181 13182 13183 13184 13185 13186 13187 13188 13189 13190 13191 13192 13193 13194 13195 13196 13197 13198 13199 13200 13201 13202 13203 13204 13205 13206 13207 13208 13209 13210 13211 13212 13213 13214 13215 13216 13217 13218 13219 13220 13221 13222 13223 13224 13225 13226 13227 13228 13229 13230 13231 13232 13233 13234 13235 13236 13237 13238 13239 13240 13241 13242 13243 13244 13245 13246 13247 13248 13249 13250 13251 13252 13253 13254 13255 13256 13257 13258 13259 13260 13261 13262 13263 13264 13265 13266 13267 13268 13269 13270 13271 13272 13273 13274 13275 13276 13277 13278 13279 13280 13281 13282 13283 13284 13285 13286 13287 13288 13289 13290 13291 13292 13293 13294 13295 13296 13297 13298 13299 13300 13301 13302 13303 13304 13305 13306 13307 13308 13309 13310 13311 13312 13313 13314 13315 13316 13317 13318 13319 13320 13321 13322 13323 13324 13325 13326 13327 13328 13329 13330 13331 13332 13333 13334 13335 13336 13337 13338 13339 13340 13341 13342 13343 13344 13345 13346 13347 13348 13349 13350 13351 13352 13353 13354 13355 13356 13357 13358 13359 13360 13361 13362 13363 13364 13365 13366 13367 13368 13369 13370 13371 13372 13373 13374 13375 13376 13377 13378 13379 13380 13381 13382 13383 13384 13385 13386 13387 13388 13389 13390 13391 13392 13393 13394 13395 13396 13397 13398 13399 13400 13401 13402 13403 13404 13405 13406 13407 13408 13409 13410 13411 13412 13413 13414 13415 13416 13417 13418 13419 13420 13421 13422 13423 13424 13425 13426 13427 13428 13429 13430 13431 13432 13433 13434 13435 13436 13437 13438 13439 13440 13441 13442 13443 13444 13445 13446 13447 13448 13449 13450 13451 13452 13453 13454 13455 13456 13457 13458 13459 13460 13461 13462 13463 13464 13465 13466 13467 13468 13469 13470 13471 13472 13473 13474 13475 13476 13477 13478 13479 13480 13481 13482 13483 13484 13485 13486 13487 13488 13489 13490 13491 13492 13493 13494 13495 13496 13497 13498 13499 13500 13501 13502 13503 13504 13505 13506 13507 13508 13509 13510 13511 13512 13513 13514 13515 13516 13517 13518 13519 13520 13521 13522 13523 13524 13525 13526 13527 13528 13529 13530 13531 13532 13533 13534 13535 13536 13537 13538 13539 13540 13541 13542 13543 13544 13545 13546 13547 13548 13549 13550 13551 13552 13553 13554 13555 13556 13557 13558 13559 13560 13561 13562 13563 13564 13565 13566 13567 13568 13569 13570 13571 13572 13573 13574 13575 13576 13577 13578 13579 13580 13581 13582 13583 13584 13585 13586 13587 13588 13589 13590 13591 13592 13593 13594 13595 13596 13597 13598 13599 13600 13601 13602 13603 13604 13605 13606 13607 13608 13609 13610 13611 13612 13613 13614 13615 13616 13617 13618 13619 13620 13621 13622 13623 13624 13625 13626 13627 13628 13629 13630 13631 13632 13633 13634 13635 13636 13637 13638 13639 13640 13641 13642 13643 13644 13645 13646 13647 13648 13649 13650 13651 13652 13653 13654 13655 13656 13657 13658 13659 13660 13661 13662 13663 13664 13665 13666 13667 13668 13669 13670 13671 13672 13673 13674 13675 13676 13677 13678 13679 13680 13681 13682 13683 13684 13685 13686 13687 13688 13689 13690 13691 13692 13693 13694 13695 13696 13697 13698 13699 13700 13701 13702 13703 13704 13705 13706 13707 13708 13709 13710 13711 13712 13713 13714 13715 13716 13717 13718 13719 13720 13721 13722 13723 13724 13725 13726 13727 13728 13729 13730 13731 13732 13733 13734 13735 13736 13737 13738 13739 13740 13741 13742 13743 13744 13745 13746 13747 13748 13749 13750 13751 13752 13753 13754 13755 13756 13757 13758 13759 13760 13761 13762 13763 13764 13765 13766 13767 13768 13769 13770 13771 13772 13773 13774 13775 13776 13777 13778 13779 13780 13781 13782 13783 13784 13785 13786 13787 13788 13789 13790 13791 13792 13793 13794 13795 13796 13797 13798 13799 13800 13801 13802 13803 13804 13805 13806 13807 13808 13809 13810 13811 13812 13813 13814 13815 13816 13817 13818 13819 13820 13821 13822 13823 13824 13825 13826 13827 13828 13829 13830 13831 13832 13833 13834 13835 13836 13837 13838 13839 13840 13841 13842 13843 13844 13845 13846 13847 13848 13849 13850 13851 13852 13853 13854 13855 13856 13857 13858 13859 13860 13861 13862 13863 13864 13865 13866 13867 13868 13869 13870 13871 13872 13873 13874 13875 13876 13877 13878 13879 13880 13881 13882 13883 13884 13885 13886 13887 13888 13889 13890 13891 13892 13893 13894 13895 13896 13897 13898 13899 13900 13901 13902 13903 13904 13905 13906 13907 13908 13909 13910 13911 13912 13913 13914 13915 13916 13917 13918 13919 13920 13921 13922 13923 13924 13925 13926 13927 13928 13929 13930 13931 13932 13933 13934 13935 13936 13937 13938 13939 13940 13941 13942 13943 13944 13945 13946 13947 13948 13949 13950 13951 13952 13953 13954 13955 13956 13957 13958 13959 13960 13961 13962 13963 13964 13965 13966 13967 13968 13969 13970 13971 13972 13973 13974 13975 13976 13977 13978 13979 13980 13981 13982 13983 13984 13985 13986 13987 13988 13989 13990 13991 13992 13993 13994 13995 13996 13997 13998 13999 14000 14001 14002 14003 14004 14005 14006 14007 14008 14009 14010 14011 14012 14013 14014 14015 14016 14017 14018 14019 14020 14021 14022 14023 14024 14025 14026 14027 14028 14029 14030 14031 14032 14033 14034 14035 14036 14037 14038 14039 14040 14041 14042 14043 14044 14045 14046 14047 14048 14049 14050 14051 14052 14053 14054 14055 14056 14057 14058 14059 14060 14061 14062 14063 14064 14065 14066 14067 14068 14069 14070 14071 14072 14073 14074 14075 14076 14077 14078 14079 14080 14081 14082 14083 14084 14085 14086 14087 14088 14089 14090 14091 14092 14093 14094 14095 14096 14097 14098 14099 14100 14101 14102 14103 14104 14105 14106 14107 14108 14109 14110 14111 14112 14113 14114 14115 14116 14117 14118 14119 14120 14121 14122 14123 14124 14125 14126 14127 14128 14129 14130 14131 14132 14133 14134 14135 14136 14137 14138 14139 14140 14141 14142 14143 14144 14145 14146 14147 14148 14149 14150 14151 14152 14153 14154 14155 14156 14157 14158 14159 14160 14161 14162 14163 14164 14165 14166 14167 14168 14169 14170 14171 14172 14173 14174 14175 14176 14177 14178 14179 14180 14181 14182 14183 14184 14185 14186 14187 14188 14189 14190 14191 14192 14193 14194 14195 14196 14197 14198 14199 14200 14201 14202 14203 14204 14205 14206 14207 14208 14209 14210 14211 14212 14213 14214 14215 14216 14217 14218 14219 14220 14221 14222 14223 14224 14225 14226 14227 14228 14229 14230 14231 14232 14233 14234 14235 14236 14237 14238 14239 14240 14241 14242 14243 14244 14245 14246 14247 14248 14249 14250 14251 14252 14253 14254 14255 14256 14257 14258 14259 14260 14261 14262 14263 14264 14265 14266 14267 14268 14269 14270 14271 14272 14273 14274 14275 14276 14277 14278 14279 14280 14281 14282 14283 14284 14285 14286 14287 14288 14289 14290 14291 14292 14293 14294 14295 14296 14297 14298 14299 14300 14301 14302 14303 14304 14305 14306 14307 14308 14309 14310 14311 14312 14313 14314 14315 14316 14317 14318 14319 14320 14321 14322 14323 14324 14325 14326 14327 14328 14329 14330 14331 14332 14333 14334 14335 14336 14337 14338 14339 14340 14341 14342 14343 14344 14345 14346 14347 14348 14349 14350 14351 14352 14353 14354 14355 14356 14357 14358 14359 14360 14361 14362 14363 14364 14365 14366 14367 14368 14369 14370 14371 14372 14373 14374 14375 14376 14377 14378 14379 14380 14381 14382 14383 14384 14385 14386 14387 14388 14389 14390 14391 14392 14393 14394 14395 14396 14397 14398 14399 14400 14401 14402 14403 14404 14405 14406 14407 14408 14409 14410 14411 14412 14413 14414 14415 14416 14417 14418 14419 14420 14421 14422 14423 14424 14425 14426 14427 14428 14429 14430 14431 14432 14433 14434 14435 14436 14437 14438 14439 14440 14441 14442 14443 14444 14445 14446 14447 14448 14449 14450 14451 14452 14453 14454 14455 14456 14457 14458 14459 14460 14461 14462 14463 14464 14465 14466 14467 14468 14469 14470 14471 14472 14473 14474 14475 14476 14477 14478 14479 14480 14481 14482 14483 14484 14485 14486 14487 14488 14489 14490 14491 14492 14493 14494 14495 14496 14497 14498 14499 14500 14501 14502 14503 14504 14505 14506 14507 14508 14509 14510 14511 14512 14513 14514 14515 14516 14517 14518 14519 14520 14521 14522 14523 14524 14525 14526 14527 14528 14529 14530 14531 14532 14533 14534 14535 14536 14537 14538 14539 14540 14541 14542 14543 14544 14545 14546 14547 14548 14549 14550 14551 14552 14553 14554 14555 14556 14557 14558 14559 14560 14561 14562 14563 14564 14565 14566 14567 14568 14569 14570 14571 14572 14573 14574 14575 14576 14577 14578 14579 14580 14581 14582 14583 14584 14585 14586 14587 14588 14589 14590 14591 14592 14593 14594 14595 14596 14597 14598 14599 14600 14601 14602 14603 14604 14605 14606 14607 14608 14609 14610 14611 14612 14613 14614 14615 14616 14617 14618 14619 14620 14621 14622 14623 14624 14625 14626 14627 14628 14629 14630 14631 14632 14633 14634 14635 14636 14637 14638 14639 14640 14641 14642 14643 14644 14645 14646 14647 14648 14649 14650 14651 14652 14653 14654 14655 14656 14657 14658 14659 14660 14661 14662 14663 14664 14665 14666 14667 14668 14669 14670 14671 14672 14673 14674 14675 14676 14677 14678 14679 14680 14681 14682 14683 14684 14685 14686 14687 14688 14689 14690 14691 14692 14693 14694 14695 14696 14697 14698 14699 14700 14701 14702 14703 14704 14705 14706 14707 14708 14709 14710 14711 14712 14713 14714 14715 14716 14717 14718 14719 14720 14721 14722 14723 14724 14725 14726 14727 14728 14729 14730 14731 14732 14733 14734 14735 14736 14737 14738 14739 14740 14741 14742 14743 14744 14745 14746 14747 14748 14749 14750 14751 14752 14753 14754 14755 14756 14757 14758 14759 14760 14761 14762 14763 14764 14765 14766 14767 14768 14769 14770 14771 14772 14773 14774 14775 14776 14777 14778 14779 14780 14781 14782 14783 14784 14785 14786 14787 14788 14789 14790 14791 14792 14793 14794 14795 14796 14797 14798 14799 14800 14801 14802 14803 14804 14805 14806 14807 14808 14809 14810 14811 14812 14813 14814 14815 14816 14817 14818 14819 14820 14821 14822 14823 14824 14825 14826 14827 14828 14829 14830 14831 14832 14833 14834 14835 14836 14837 14838 14839 14840 14841 14842 14843 14844 14845 14846 14847 14848 14849 14850 14851 14852 14853 14854 14855 14856 14857 14858 14859 14860 14861 14862 14863 14864 14865 14866 14867 14868 14869 14870 14871 14872 14873 14874 14875 14876 14877 14878 14879 14880 14881 14882 14883 14884 14885 14886 14887 14888 14889 14890 14891 14892 14893 14894 14895 14896 14897 14898 14899 14900 14901 14902 14903 14904 14905 14906 14907 14908 14909 14910 14911 14912 14913 14914 14915 14916 14917 14918 14919 14920 14921 14922 14923 14924 14925 14926 14927 14928 14929 14930 14931 14932 14933 14934 14935 14936 14937 14938 14939 14940 14941 14942 14943 14944 14945 14946 14947 14948 14949 14950 14951 14952 14953 14954 14955 14956 14957 14958 14959 14960 14961 14962 14963 14964 14965 14966 14967 14968 14969 14970 14971 14972 14973 14974 14975 14976 14977 14978 14979 14980 14981 14982 14983 14984 14985 14986 14987 14988 14989 14990 14991 14992 14993 14994 14995 14996 14997 14998 14999 15000 15001 15002 15003 15004 15005 15006 15007 15008 15009 15010 15011 15012 15013 15014 15015 15016 15017 15018 15019 15020 15021 15022 15023 15024 15025 15026 15027 15028 15029 15030 15031 15032 15033 15034 15035 15036 15037 15038 15039 15040 15041 15042 15043 15044 15045 15046 15047 15048 15049 15050 15051 15052 15053 15054 | 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x | if(ytcsi){ytcsi.tick("rses_dpj")}
(function(){"use strict";var f,ba=function(a){var b=0;return function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}}},da="function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){a!=Array.prototype&&a!=Object.prototype&&(a[b]=c.value)},ea="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global&&null!=global?global:this,fa=function(){fa=function(){};
ea.Symbol||(ea.Symbol=aaa)},ha=function(a,b){this.$jscomp$symbol$id_=a;
da(this,"description",{configurable:!0,writable:!0,value:b})};
ha.prototype.toString=function(){return this.$jscomp$symbol$id_};
var aaa=function(){function a(c){if(this instanceof a)throw new TypeError("Symbol is not a constructor");return new ha("jscomp_symbol_"+(c||"")+"_"+b++,c)}
var b=0;return a}(),ja=function(){fa();
var a=ea.Symbol.iterator;a||(a=ea.Symbol.iterator=ea.Symbol("Symbol.iterator"));"function"!=typeof Array.prototype[a]&&da(Array.prototype,a,{configurable:!0,writable:!0,value:function(){return ia(ba(this))}});
ja=function(){}},ia=function(a){ja();
a={next:a};a[ea.Symbol.iterator]=function(){return this};
return a},k=function(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];
return b?b.call(a):{next:ba(a)}},ka=function(a){if(!(a instanceof Array)){a=k(a);
for(var b,c=[];!(b=a.next()).done;)c.push(b.value);a=c}return a},la="function"==typeof Object.create?Object.create:function(a){var b=function(){};
b.prototype=a;return new b},na;
if("function"==typeof Object.setPrototypeOf)na=Object.setPrototypeOf;else{var oa;a:{var baa={a:!0},pa={};try{pa.__proto__=baa;oa=pa.a;break a}catch(a){}oa=!1}na=oa?function(a,b){a.__proto__=b;if(a.__proto__!==b)throw new TypeError(a+" is not extensible");return a}:null}var qa=na,l=function(a,b){a.prototype=la(b.prototype);
a.prototype.constructor=a;if(qa)qa(a,b);else for(var c in b)if("prototype"!=c)if(Object.defineProperties){var d=Object.getOwnPropertyDescriptor(b,c);d&&Object.defineProperty(a,c,d)}else a[c]=b[c];a.superClass_=b.prototype},ra=function(a){if(!(a instanceof Object))throw new TypeError("Iterator result "+a+" is not an object");
},sa=function(){this.isRunning_=!1;
this.yieldAllIterator_=null;this.yieldResult=void 0;this.nextAddress=1;this.finallyAddress_=this.catchAddress_=0;this.finallyContexts_=this.abruptCompletion_=null};
f=sa.prototype;f.start_=function(){if(this.isRunning_)throw new TypeError("Generator is already running");this.isRunning_=!0};
f.next_=function(a){this.yieldResult=a};
f.throw_=function(a){this.abruptCompletion_={exception:a,isException:!0};this.nextAddress=this.catchAddress_||this.finallyAddress_};
f.return=function(a){this.abruptCompletion_={return:a};this.nextAddress=this.finallyAddress_};
f.jumpThroughFinallyBlocks=function(a){this.abruptCompletion_={jumpTo:a};this.nextAddress=this.finallyAddress_};
var ta=function(a,b,c){a.nextAddress=c;return{value:b}};
sa.prototype.yieldAll=function(a,b){a=k(a);var c=a.next();ra(c);if(c.done)this.yieldResult=c.value,this.nextAddress=b;else return this.yieldAllIterator_=a,ta(this,c.value,b)};
sa.prototype.jumpTo=function(a){this.nextAddress=a};
var ua=function(a){a.nextAddress=0};
f=sa.prototype;f.setCatchFinallyBlocks=function(a,b){this.catchAddress_=a;void 0!=b&&(this.finallyAddress_=b)};
f.setFinallyBlock=function(a){this.catchAddress_=0;this.finallyAddress_=a||0};
f.leaveTryBlock=function(a,b){this.nextAddress=a;this.catchAddress_=b||0};
f.enterCatchBlock=function(a){this.catchAddress_=a||0;a=this.abruptCompletion_.exception;this.abruptCompletion_=null;return a};
f.enterFinallyBlock=function(a,b,c){c?this.finallyContexts_[c]=this.abruptCompletion_:this.finallyContexts_=[this.abruptCompletion_];this.catchAddress_=a||0;this.finallyAddress_=b||0};
f.leaveFinallyBlock=function(a,b){b=this.finallyContexts_.splice(b||0)[0];(b=this.abruptCompletion_=this.abruptCompletion_||b)?b.isException?this.nextAddress=this.catchAddress_||this.finallyAddress_:void 0!=b.jumpTo&&this.finallyAddress_<b.jumpTo?(this.nextAddress=b.jumpTo,this.abruptCompletion_=null):this.nextAddress=this.finallyAddress_:this.nextAddress=a};
f.forIn=function(a){return new va(a)};
var va=function(a){this.object_=a;this.properties_=[];for(var b in a)this.properties_.push(b);this.properties_.reverse()};
va.prototype.getNext=function(){for(;0<this.properties_.length;){var a=this.properties_.pop();if(a in this.object_)return a}return null};
var wa=function(a){this.context_=new sa;this.program_=a};
wa.prototype.next_=function(a){this.context_.start_();if(this.context_.yieldAllIterator_)return xa(this,this.context_.yieldAllIterator_.next,a,this.context_.next_);this.context_.next_(a);return ya(this)};
var caa=function(a,b){a.context_.start_();var c=a.context_.yieldAllIterator_;if(c)return xa(a,"return"in c?c["return"]:function(d){return{value:d,done:!0}},b,a.context_.return);
a.context_.return(b);return ya(a)};
wa.prototype.throw_=function(a){this.context_.start_();if(this.context_.yieldAllIterator_)return xa(this,this.context_.yieldAllIterator_["throw"],a,this.context_.next_);this.context_.throw_(a);return ya(this)};
var xa=function(a,b,c,d){try{var e=b.call(a.context_.yieldAllIterator_,c);ra(e);if(!e.done)return a.context_.isRunning_=!1,e;var g=e.value}catch(h){return a.context_.yieldAllIterator_=null,a.context_.throw_(h),ya(a)}a.context_.yieldAllIterator_=null;d.call(a.context_,g);return ya(a)},ya=function(a){for(;a.context_.nextAddress;)try{var b=a.program_(a.context_);
if(b)return a.context_.isRunning_=!1,{value:b.value,done:!1}}catch(c){a.context_.yieldResult=void 0,a.context_.throw_(c)}a.context_.isRunning_=!1;if(a.context_.abruptCompletion_){b=a.context_.abruptCompletion_;a.context_.abruptCompletion_=null;if(b.isException)throw b.exception;return{value:b.return,done:!0}}return{value:void 0,done:!0}},za=function(a){this.next=function(b){return a.next_(b)};
this.throw=function(b){return a.throw_(b)};
this.return=function(b){return caa(a,b)};
ja();this[Symbol.iterator]=function(){return this}},Aa=function(a,b){b=new za(new wa(b));
qa&&qa(b,a.prototype);return b},Ba=function(a,b){if(b){var c=ea;
a=a.split(".");for(var d=0;d<a.length-1;d++){var e=a[d];e in c||(c[e]={});c=c[e]}a=a[a.length-1];d=c[a];b=b(d);b!=d&&null!=b&&da(c,a,{configurable:!0,writable:!0,value:b})}};
Ba("Promise",function(a){function b(){this.batch_=null}
function c(h){return h instanceof e?h:new e(function(m){m(h)})}
if(a)return a;b.prototype.asyncExecute=function(h){if(null==this.batch_){this.batch_=[];var m=this;this.asyncExecuteFunction(function(){m.executeBatch_()})}this.batch_.push(h)};
var d=ea.setTimeout;b.prototype.asyncExecuteFunction=function(h){d(h,0)};
b.prototype.executeBatch_=function(){for(;this.batch_&&this.batch_.length;){var h=this.batch_;this.batch_=[];for(var m=0;m<h.length;++m){var n=h[m];h[m]=null;try{n()}catch(p){this.asyncThrow_(p)}}}this.batch_=null};
b.prototype.asyncThrow_=function(h){this.asyncExecuteFunction(function(){throw h})};
var e=function(h){this.state_=0;this.result_=void 0;this.onSettledCallbacks_=[];var m=this.createResolveAndReject_();try{h(m.resolve,m.reject)}catch(n){m.reject(n)}};
e.prototype.createResolveAndReject_=function(){function h(p){return function(x){n||(n=!0,p.call(m,x))}}
var m=this,n=!1;return{resolve:h(this.resolveTo_),reject:h(this.reject_)}};
e.prototype.resolveTo_=function(h){if(h===this)this.reject_(new TypeError("A Promise cannot resolve to itself"));else if(h instanceof e)this.settleSameAsPromise_(h);else{a:switch(typeof h){case"object":var m=null!=h;break a;case"function":m=!0;break a;default:m=!1;}m?this.resolveToNonPromiseObj_(h):this.fulfill_(h)}};
e.prototype.resolveToNonPromiseObj_=function(h){var m=void 0;try{m=h.then}catch(n){this.reject_(n);return}"function"==typeof m?this.settleSameAsThenable_(m,h):this.fulfill_(h)};
e.prototype.reject_=function(h){this.settle_(2,h)};
e.prototype.fulfill_=function(h){this.settle_(1,h)};
e.prototype.settle_=function(h,m){if(0!=this.state_)throw Error("Cannot settle("+h+", "+m+"): Promise already settled in state"+this.state_);this.state_=h;this.result_=m;this.executeOnSettledCallbacks_()};
e.prototype.executeOnSettledCallbacks_=function(){if(null!=this.onSettledCallbacks_){for(var h=0;h<this.onSettledCallbacks_.length;++h)g.asyncExecute(this.onSettledCallbacks_[h]);this.onSettledCallbacks_=null}};
var g=new b;e.prototype.settleSameAsPromise_=function(h){var m=this.createResolveAndReject_();h.callWhenSettled_(m.resolve,m.reject)};
e.prototype.settleSameAsThenable_=function(h,m){var n=this.createResolveAndReject_();try{h.call(m,n.resolve,n.reject)}catch(p){n.reject(p)}};
e.prototype.then=function(h,m){function n(B,G){return"function"==typeof B?function(P){try{p(B(P))}catch(S){x(S)}}:G}
var p,x,y=new e(function(B,G){p=B;x=G});
this.callWhenSettled_(n(h,p),n(m,x));return y};
e.prototype.catch=function(h){return this.then(void 0,h)};
e.prototype.callWhenSettled_=function(h,m){function n(){switch(p.state_){case 1:h(p.result_);break;case 2:m(p.result_);break;default:throw Error("Unexpected state: "+p.state_);}}
var p=this;null==this.onSettledCallbacks_?g.asyncExecute(n):this.onSettledCallbacks_.push(n)};
e.resolve=c;e.reject=function(h){return new e(function(m,n){n(h)})};
e.race=function(h){return new e(function(m,n){for(var p=k(h),x=p.next();!x.done;x=p.next())c(x.value).callWhenSettled_(m,n)})};
e.all=function(h){var m=k(h),n=m.next();return n.done?c([]):new e(function(p,x){function y(P){return function(S){B[P]=S;G--;0==G&&p(B)}}
var B=[],G=0;do B.push(void 0),G++,c(n.value).callWhenSettled_(y(B.length-1),x),n=m.next();while(!n.done)})};
return e});
Ba("Promise.prototype.finally",function(a){return a?a:function(b){return this.then(function(c){return Promise.resolve(b()).then(function(){return c})},function(c){return Promise.resolve(b()).then(function(){throw c;
})})}});
var daa=function(a){function b(d){return a.next(d)}
function c(d){return a.throw(d)}
return new Promise(function(d,e){function g(h){h.done?d(h.value):Promise.resolve(h.value).then(b,c).then(g,e)}
g(a.next())})},Ca=function(a){return daa(new za(new wa(a)))},Da=function(a,b,c){a instanceof String&&(a=String(a));
for(var d=a.length,e=0;e<d;e++){var g=a[e];if(b.call(c,g,e,a))return{i:e,v:g}}return{i:-1,v:void 0}};
Ba("Array.prototype.findIndex",function(a){return a?a:function(b,c){return Da(this,b,c).i}});
var Ea=function(a,b,c){if(null==a)throw new TypeError("The 'this' value for String.prototype."+c+" must not be null or undefined");if(b instanceof RegExp)throw new TypeError("First argument to String.prototype."+c+" must not be a regular expression");return a+""};
Ba("String.prototype.endsWith",function(a){return a?a:function(b,c){var d=Ea(this,b,"endsWith");b+="";void 0===c&&(c=d.length);c=Math.max(0,Math.min(c|0,d.length));for(var e=b.length;0<e&&0<c;)if(d[--c]!=b[--e])return!1;return 0>=e}});
Ba("Array.prototype.find",function(a){return a?a:function(b,c){return Da(this,b,c).v}});
Ba("String.prototype.startsWith",function(a){return a?a:function(b,c){var d=Ea(this,b,"startsWith");b+="";var e=d.length,g=b.length;c=Math.max(0,Math.min(c|0,d.length));for(var h=0;h<g&&c<e;)if(d[c++]!=b[h++])return!1;return h>=g}});
Ba("String.prototype.repeat",function(a){return a?a:function(b){var c=Ea(this,null,"repeat");if(0>b||1342177279<b)throw new RangeError("Invalid count value");b|=0;for(var d="";b;)if(b&1&&(d+=c),b>>>=1)c+=c;return d}});
Ba("Object.setPrototypeOf",function(a){return a||qa});
var Fa=function(a,b){return Object.prototype.hasOwnProperty.call(a,b)},eaa="function"==typeof Object.assign?Object.assign:function(a,b){for(var c=1;c<arguments.length;c++){var d=arguments[c];
if(d)for(var e in d)Fa(d,e)&&(a[e]=d[e])}return a};
Ba("Object.assign",function(a){return a||eaa});
var faa=function(){function a(){function c(){}
new c;Reflect.construct(c,[],function(){});
return new c instanceof c}
if("undefined"!=typeof Reflect&&Reflect.construct){if(a())return Reflect.construct;var b=Reflect.construct;return function(c,d,e){c=b(c,d);e&&Reflect.setPrototypeOf(c,e.prototype);return c}}return function(c,d,e){void 0===e&&(e=c);
e=la(e.prototype||Object.prototype);return Function.prototype.apply.call(c,e,d)||e}}();
Ba("Reflect.construct",function(){return faa});
var Ga=function(a,b){ja();a instanceof String&&(a+="");var c=0,d={next:function(){if(c<a.length){var e=c++;return{value:b(e,a[e]),done:!1}}d.next=function(){return{done:!0,value:void 0}};
return d.next()}};
d[Symbol.iterator]=function(){return d};
return d};
Ba("Array.prototype.keys",function(a){return a?a:function(){return Ga(this,function(b){return b})}});
Ba("Array.prototype.values",function(a){return a?a:function(){return Ga(this,function(b,c){return c})}});
Ba("Object.getOwnPropertySymbols",function(a){return a?a:function(){return[]}});
Ba("Reflect.ownKeys",function(a){return a?a:function(b){var c=[],d=Object.getOwnPropertyNames(b);b=Object.getOwnPropertySymbols(b);for(var e=0;e<d.length;e++)("jscomp_symbol_"==d[e].substring(0,14)?b:c).push(d[e]);return c.concat(b)}});
Ba("Object.getOwnPropertyDescriptors",function(a){return a?a:function(b){for(var c={},d=Reflect.ownKeys(b),e=0;e<d.length;e++)c[d[e]]=Object.getOwnPropertyDescriptor(b,d[e]);return c}});
Ba("Object.entries",function(a){return a?a:function(b){var c=[],d;for(d in b)Fa(b,d)&&c.push([d,b[d]]);return c}});
Ba("Array.prototype.fill",function(a){return a?a:function(b,c,d){var e=this.length||0;0>c&&(c=Math.max(0,e+c));if(null==d||d>e)d=e;d=Number(d);0>d&&(d=Math.max(0,e+d));for(c=Number(c||0);c<d;c++)this[c]=b;return this}});
Ba("WeakMap",function(a){function b(){}
function c(n){var p=typeof n;return"object"===p&&null!==n||"function"===p}
function d(n){if(!Fa(n,g)){var p=new b;da(n,g,{value:p})}}
function e(n){var p=Object[n];p&&(Object[n]=function(x){if(x instanceof b)return x;d(x);return p(x)})}
if(function(){if(!a||!Object.seal)return!1;try{var n=Object.seal({}),p=Object.seal({}),x=new a([[n,2],[p,3]]);if(2!=x.get(n)||3!=x.get(p))return!1;x.delete(n);x.set(p,4);return!x.has(n)&&4==x.get(p)}catch(y){return!1}}())return a;
var g="$jscomp_hidden_"+Math.random();e("freeze");e("preventExtensions");e("seal");var h=0,m=function(n){this.id_=(h+=Math.random()+1).toString();if(n){n=k(n);for(var p;!(p=n.next()).done;)p=p.value,this.set(p[0],p[1])}};
m.prototype.set=function(n,p){if(!c(n))throw Error("Invalid WeakMap key");d(n);if(!Fa(n,g))throw Error("WeakMap key fail: "+n);n[g][this.id_]=p;return this};
m.prototype.get=function(n){return c(n)&&Fa(n,g)?n[g][this.id_]:void 0};
m.prototype.has=function(n){return c(n)&&Fa(n,g)&&Fa(n[g],this.id_)};
m.prototype.delete=function(n){return c(n)&&Fa(n,g)&&Fa(n[g],this.id_)?delete n[g][this.id_]:!1};
return m});
Ba("Map",function(a){if(function(){if(!a||"function"!=typeof a||!a.prototype.entries||"function"!=typeof Object.seal)return!1;try{var m=Object.seal({x:4}),n=new a(k([[m,"s"]]));if("s"!=n.get(m)||1!=n.size||n.get({x:4})||n.set({x:4},"t")!=n||2!=n.size)return!1;var p=n.entries(),x=p.next();if(x.done||x.value[0]!=m||"s"!=x.value[1])return!1;x=p.next();return x.done||4!=x.value[0].x||"t"!=x.value[1]||!p.next().done?!1:!0}catch(y){return!1}}())return a;
ja();var b=new WeakMap,c=function(m){this.data_={};this.head_=g();this.size=0;if(m){m=k(m);for(var n;!(n=m.next()).done;)n=n.value,this.set(n[0],n[1])}};
c.prototype.set=function(m,n){m=0===m?0:m;var p=d(this,m);p.list||(p.list=this.data_[p.id]=[]);p.entry?p.entry.value=n:(p.entry={next:this.head_,previous:this.head_.previous,head:this.head_,key:m,value:n},p.list.push(p.entry),this.head_.previous.next=p.entry,this.head_.previous=p.entry,this.size++);return this};
c.prototype.delete=function(m){m=d(this,m);return m.entry&&m.list?(m.list.splice(m.index,1),m.list.length||delete this.data_[m.id],m.entry.previous.next=m.entry.next,m.entry.next.previous=m.entry.previous,m.entry.head=null,this.size--,!0):!1};
c.prototype.clear=function(){this.data_={};this.head_=this.head_.previous=g();this.size=0};
c.prototype.has=function(m){return!!d(this,m).entry};
c.prototype.get=function(m){return(m=d(this,m).entry)&&m.value};
c.prototype.entries=function(){return e(this,function(m){return[m.key,m.value]})};
c.prototype.keys=function(){return e(this,function(m){return m.key})};
c.prototype.values=function(){return e(this,function(m){return m.value})};
c.prototype.forEach=function(m,n){for(var p=this.entries(),x;!(x=p.next()).done;)x=x.value,m.call(n,x[1],x[0],this)};
c.prototype[Symbol.iterator]=c.prototype.entries;var d=function(m,n){var p=n&&typeof n;"object"==p||"function"==p?b.has(n)?p=b.get(n):(p=""+ ++h,b.set(n,p)):p="p_"+n;var x=m.data_[p];if(x&&Fa(m.data_,p))for(m=0;m<x.length;m++){var y=x[m];if(n!==n&&y.key!==y.key||n===y.key)return{id:p,list:x,index:m,entry:y}}return{id:p,list:x,index:-1,entry:void 0}},e=function(m,n){var p=m.head_;
return ia(function(){if(p){for(;p.head!=m.head_;)p=p.previous;for(;p.next!=p.head;)return p=p.next,{done:!1,value:n(p)};p=null}return{done:!0,value:void 0}})},g=function(){var m={};
return m.previous=m.next=m.head=m},h=0;
return c});
Ba("Array.from",function(a){return a?a:function(b,c,d){c=null!=c?c:function(m){return m};
var e=[],g="undefined"!=typeof Symbol&&Symbol.iterator&&b[Symbol.iterator];if("function"==typeof g){b=g.call(b);for(var h=0;!(g=b.next()).done;)e.push(c.call(d,g.value,h++))}else for(g=b.length,h=0;h<g;h++)e.push(c.call(d,b[h],h));return e}});
Ba("Array.prototype.entries",function(a){return a?a:function(){return Ga(this,function(b,c){return[b,c]})}});
Ba("Set",function(a){if(function(){if(!a||"function"!=typeof a||!a.prototype.entries||"function"!=typeof Object.seal)return!1;try{var c=Object.seal({x:4}),d=new a(k([c]));if(!d.has(c)||1!=d.size||d.add(c)!=d||1!=d.size||d.add({x:4})!=d||2!=d.size)return!1;var e=d.entries(),g=e.next();if(g.done||g.value[0]!=c||g.value[1]!=c)return!1;g=e.next();return g.done||g.value[0]==c||4!=g.value[0].x||g.value[1]!=g.value[0]?!1:e.next().done}catch(h){return!1}}())return a;
ja();var b=function(c){this.map_=new Map;if(c){c=k(c);for(var d;!(d=c.next()).done;)this.add(d.value)}this.size=this.map_.size};
b.prototype.add=function(c){c=0===c?0:c;this.map_.set(c,c);this.size=this.map_.size;return this};
b.prototype.delete=function(c){c=this.map_.delete(c);this.size=this.map_.size;return c};
b.prototype.clear=function(){this.map_.clear();this.size=0};
b.prototype.has=function(c){return this.map_.has(c)};
b.prototype.entries=function(){return this.map_.entries()};
b.prototype.values=function(){return this.map_.values()};
b.prototype.keys=b.prototype.values;b.prototype[Symbol.iterator]=b.prototype.values;b.prototype.forEach=function(c,d){var e=this;this.map_.forEach(function(g){return c.call(d,g,g,e)})};
return b});
Ba("Object.is",function(a){return a?a:function(b,c){return b===c?0!==b||1/b===1/c:b!==b&&c!==c}});
Ba("Array.prototype.includes",function(a){return a?a:function(b,c){var d=this;d instanceof String&&(d=String(d));var e=d.length;c=c||0;for(0>c&&(c=Math.max(c+e,0));c<e;c++){var g=d[c];if(g===b||Object.is(g,b))return!0}return!1}});
Ba("String.prototype.includes",function(a){return a?a:function(b,c){return-1!==Ea(this,b,"includes").indexOf(b,c||0)}});
Ba("Math.trunc",function(a){return a?a:function(b){b=Number(b);if(isNaN(b)||Infinity===b||-Infinity===b||0===b)return b;var c=Math.floor(Math.abs(b));return 0>b?-c:c}});
Ba("Object.values",function(a){return a?a:function(b){var c=[],d;for(d in b)Fa(b,d)&&c.push(b[d]);return c}});
Ba("WeakSet",function(a){if(function(){if(!a||!Object.seal)return!1;try{var c=Object.seal({}),d=Object.seal({}),e=new a([c]);if(!e.has(c)||e.has(d))return!1;e.delete(c);e.add(d);return!e.has(c)&&e.has(d)}catch(g){return!1}}())return a;
var b=function(c){this.map_=new WeakMap;if(c){c=k(c);for(var d;!(d=c.next()).done;)this.add(d.value)}};
b.prototype.add=function(c){this.map_.set(c,!0);return this};
b.prototype.has=function(c){return this.map_.has(c)};
b.prototype.delete=function(c){return this.map_.delete(c)};
return b});
var Ha=Ha||{},q=this||self,Ia=function(a){return void 0!==a},Ka=function(a){return"string"==typeof a},La=function(a){return"boolean"==typeof a},Ma=function(a){return"number"==typeof a},Na=function(a,b,c){a=a.split(".");
c=c||q;a[0]in c||"undefined"==typeof c.execScript||c.execScript("var "+a[0]);for(var d;a.length&&(d=a.shift());)!a.length&&Ia(b)?c[d]=b:c=c[d]&&c[d]!==Object.prototype[d]?c[d]:c[d]={}},Ra=function(a){if(a&&a!=q)return Oa(a.document);
null===Qa&&(Qa=Oa(q.document));return Qa},gaa=/^[\w+/_-]+[=]{0,2}$/,Qa=null,Oa=function(a){return(a=a.querySelector&&a.querySelector("script[nonce]"))&&(a=a.nonce||a.getAttribute("nonce"))&&gaa.test(a)?a:""},Sa=function(a,b){a=a.split(".");
b=b||q;for(var c=0;c<a.length;c++)if(b=b[a[c]],null==b)return null;return b},Ta=function(){},Ua=function(a){a.instance_=void 0;
a.getInstance=function(){return a.instance_?a.instance_:a.instance_=new a}},Va=function(a){var b=typeof a;
if("object"==b){if(a){if(a instanceof Array)return"array";if(a instanceof Object)return b;var c=Object.prototype.toString.call(a);if("[object Window]"==c)return"object";if("[object Array]"==c||"number"==typeof a.length&&"undefined"!=typeof a.splice&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("splice"))return"array";if("[object Function]"==c||"undefined"!=typeof a.call&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("call"))return"function"}else return"null";}else
if("function"==b&&"undefined"==typeof a.call)return"object";return b},Wa=function(a){return"array"==Va(a)},Xa=function(a){var b=Va(a);
return"array"==b||"object"==b&&"number"==typeof a.length},Za=function(a){return"function"==Va(a)},$a=function(a){var b=typeof a;
return"object"==b&&null!=a||"function"==b},bb=function(a){return a[ab]||(a[ab]=++haa)},ab="closure_uid_"+(1E9*Math.random()>>>0),haa=0,cb=function(a){var b=Va(a);
if("object"==b||"array"==b){if("function"===typeof a.clone)return a.clone();b="array"==b?[]:{};for(var c in a)b[c]=cb(a[c]);return b}return a},iaa=function(a,b,c){return a.call.apply(a.bind,arguments)},jaa=function(a,b,c){if(!a)throw Error();
if(2<arguments.length){var d=Array.prototype.slice.call(arguments,2);return function(){var e=Array.prototype.slice.call(arguments);Array.prototype.unshift.apply(e,d);return a.apply(b,e)}}return function(){return a.apply(b,arguments)}},r=function(a,b,c){r=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?iaa:jaa;
return r.apply(null,arguments)},db=function(a,b){var c=Array.prototype.slice.call(arguments,1);
return function(){var d=c.slice();d.push.apply(d,arguments);return a.apply(this,d)}},eb=function(a,b){for(var c in b)a[c]=b[c]},fb=Date.now||function(){return+new Date},t=function(a,b){function c(){}
c.prototype=b.prototype;a.superClass_=b.prototype;a.prototype=new c;a.prototype.constructor=a;a.base=function(d,e,g){for(var h=Array(arguments.length-2),m=2;m<arguments.length;m++)h[m-2]=arguments[m];return b.prototype[e].apply(d,h)}};var gb={},hb=function(a){if(Error.captureStackTrace)Error.captureStackTrace(this,hb);else{var b=Error().stack;b&&(this.stack=b)}a&&(this.message=String(a));this.reportErrorToServer=!0};
t(hb,Error);hb.prototype.name="CustomError";var ib;var jb=function(a,b){hb.call(this,kaa(a,b));this.messagePattern=a};
t(jb,hb);jb.prototype.name="AssertionError";var kaa=function(a,b){a=a.split("%s");for(var c="",d=a.length-1,e=0;e<d;e++)c+=a[e]+(e<b.length?b[e]:"%s");return c+a[d]};var kb=function(a){return a[a.length-1]},lb=function(a,b){return Array.prototype.indexOf.call(a,b,void 0)},mb=function(a,b,c){Array.prototype.forEach.call(a,b,c)},nb=function(a,b,c){return Array.prototype.filter.call(a,b,c)},pb=function(a,b,c){return Array.prototype.map.call(a,b,c)},qb=function(a,b,c){return Array.prototype.reduce.call(a,b,c)},rb=function(a,b,c){return Array.prototype.some.call(a,b,c)},sb=function(a,b,c){return Array.prototype.every.call(a,b,c)},laa=function(a,b){var c=0;
mb(a,function(d,e,g){b.call(void 0,d,e,g)&&++c},void 0);
return c},ub=function(a,b,c){b=tb(a,b,c);
return 0>b?null:Ka(a)?a.charAt(b):a[b]},tb=function(a,b,c){for(var d=a.length,e=Ka(a)?a.split(""):a,g=0;g<d;g++)if(g in e&&b.call(c,e[g],g,a))return g;
return-1},vb=function(a,b){var c=a.length,d=Ka(a)?a.split(""):a;
for(--c;0<=c;c--)if(c in d&&b.call(void 0,d[c],c,a))return c;return-1},wb=function(a,b){return 0<=lb(a,b)},xb=function(a,b){wb(a,b)||a.push(b)},zb=function(a,b){b=lb(a,b);
var c;(c=0<=b)&&yb(a,b);return c},yb=function(a,b){Array.prototype.splice.call(a,b,1)},Ab=function(a,b){b=tb(a,b,void 0);
0<=b&&yb(a,b)},Bb=function(a){return Array.prototype.concat.apply([],arguments)},Cb=function(a){var b=a.length;
if(0<b){for(var c=Array(b),d=0;d<b;d++)c[d]=a[d];return c}return[]},Db=function(a,b){for(var c=1;c<arguments.length;c++){var d=arguments[c];
if(Xa(d)){var e=a.length||0,g=d.length||0;a.length=e+g;for(var h=0;h<g;h++)a[e+h]=d[h]}else a.push(d)}},Fb=function(a,b,c,d){Array.prototype.splice.apply(a,Eb(arguments,1))},Eb=function(a,b,c){return 2>=arguments.length?Array.prototype.slice.call(a,b):Array.prototype.slice.call(a,b,c)},Hb=function(a,b){a.sort(b||Gb)},Ib=function(a,b){if(!Xa(a)||!Xa(b)||a.length!=b.length)return!1;
for(var c=a.length,d=maa,e=0;e<c;e++)if(!d(a[e],b[e]))return!1;return!0},Gb=function(a,b){return a>b?1:a<b?-1:0},maa=function(a,b){return a===b},naa=function(a){for(var b=[],c=0;c<a;c++)b[c]="";
return b},Jb=function(a){for(var b=[],c=0;c<arguments.length;c++){var d=arguments[c];
if(Wa(d))for(var e=0;e<d.length;e+=8192)for(var g=Jb.apply(null,Eb(d,e,e+8192)),h=0;h<g.length;h++)b.push(g[h]);else b.push(d)}return b},Kb=function(a,b,c){b=Array.prototype.splice.call(a,b,1);
Array.prototype.splice.call(a,c,0,b[0])},oaa=function(a){if(!arguments.length)return[];
for(var b=[],c=arguments[0].length,d=1;d<arguments.length;d++)arguments[d].length<c&&(c=arguments[d].length);for(d=0;d<c;d++){for(var e=[],g=0;g<arguments.length;g++)e.push(arguments[g][d]);b.push(e)}return b},paa=function(a){for(var b=Math.random,c=a.length-1;0<c;c--){var d=Math.floor(b()*(c+1)),e=a[c];
a[c]=a[d];a[d]=e}},qaa=function(a,b){return Bb.apply([],pb(a,b,void 0))};var raa=function(){return function(){return""}},Lb=function(a){return a},saa=function(a){var b=b||0;
return function(){return a.apply(this,Array.prototype.slice.call(arguments,0,b))}},Nb=function(a){var b=!1,c;
return function(){b||(c=a(),b=!0);return c}};var u={is:function(a,b){return a===b?0!==a||1/a===1/b:a!==a&&b!==b},
forEach:function(a,b,c){for(var d in a)b.call(c,a[d],d,a)},
filter:function(a,b,c){var d={},e;for(e in a)b.call(c,a[e],e,a)&&(d[e]=a[e]);return d},
map:function(a,b,c){var d={},e;for(e in a)d[e]=b.call(c,a[e],e,a);return d},
some:function(a,b,c){for(var d in a)if(b.call(c,a[d],d,a))return!0;return!1},
every:function(a,b,c){for(var d in a)if(!b.call(c,a[d],d,a))return!1;return!0},
getCount:function(a){var b=0,c;for(c in a)b++;return b},
getAnyKey:function(a){for(var b in a)return b},
getAnyValue:function(a){for(var b in a)return a[b]},
contains:function(a,b){return u.containsValue(a,b)},
getValues:function(a){var b=[],c=0,d;for(d in a)b[c++]=a[d];return b},
getKeys:function(a){var b=[],c=0,d;for(d in a)b[c++]=d;return b},
getValueByKeys:function(a,b){var c=Xa(b),d=c?b:arguments;for(c=c?0:1;c<d.length;c++){if(null==a)return;a=a[d[c]]}return a},
containsKey:function(a,b){return null!==a&&b in a},
containsValue:function(a,b){for(var c in a)if(a[c]==b)return!0;return!1},
findKey:function(a,b,c){for(var d in a)if(b.call(c,a[d],d,a))return d},
findValue:function(a,b,c){return(b=u.findKey(a,b,c))&&a[b]},
isEmpty:function(a){for(var b in a)return!1;return!0},
clear:function(a){for(var b in a)delete a[b]},
remove:function(a,b){var c;(c=b in a)&&delete a[b];return c},
add:function(a,b,c){if(null!==a&&b in a)throw Error("The object already contains the key \""+b+"\"");u.set(a,b,c)},
get:function(a,b,c){return null!==a&&b in a?a[b]:c},
set:function(a,b,c){a[b]=c},
setIfUndefined:function(a,b,c){return b in a?a[b]:a[b]=c},
setWithReturnValueIfNotSet:function(a,b,c){if(b in a)return a[b];c=c();return a[b]=c},
equals:function(a,b){for(var c in a)if(!(c in b)||a[c]!==b[c])return!1;for(var d in b)if(!(d in a))return!1;return!0},
clone:function(a){var b={},c;for(c in a)b[c]=a[c];return b},
unsafeClone:function(a){var b=Va(a);if("object"==b||"array"==b){if(Za(a.clone))return a.clone();b="array"==b?[]:{};for(var c in a)b[c]=u.unsafeClone(a[c]);return b}return a},
transpose:function(a){var b={},c;for(c in a)b[a[c]]=c;return b},
PROTOTYPE_FIELDS_:"constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" "),extend:function(a,b){for(var c,d,e=1;e<arguments.length;e++){d=arguments[e];for(c in d)a[c]=d[c];for(var g=0;g<u.PROTOTYPE_FIELDS_.length;g++)c=u.PROTOTYPE_FIELDS_[g],Object.prototype.hasOwnProperty.call(d,c)&&(a[c]=d[c])}},
create:function(a){var b=arguments.length;if(1==b&&Wa(arguments[0]))return u.create.apply(null,arguments[0]);if(b%2)throw Error("Uneven number of arguments");for(var c={},d=0;d<b;d+=2)c[arguments[d]]=arguments[d+1];return c},
createSet:function(a){var b=arguments.length;if(1==b&&Wa(arguments[0]))return u.createSet.apply(null,arguments[0]);for(var c={},d=0;d<b;d++)c[arguments[d]]=!0;return c},
createImmutableView:function(a){var b=a;Object.isFrozen&&!Object.isFrozen(a)&&(b=Object.create(a),Object.freeze(b));return b},
isImmutableView:function(a){return!!Object.isFrozen&&Object.isFrozen(a)},
getAllPropertyNames:function(a,b,c){if(!a)return[];if(!Object.getOwnPropertyNames||!Object.getPrototypeOf)return u.getKeys(a);for(var d={};a&&(a!==Object.prototype||b)&&(a!==Function.prototype||c);){for(var e=Object.getOwnPropertyNames(a),g=0;g<e.length;g++)d[e[g]]=!0;a=Object.getPrototypeOf(a)}return u.getKeys(d)},
getSuperClass:function(a){return(a=Object.getPrototypeOf(a.prototype))&&a.constructor}};var taa=u.createSet("area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr");var Qb=function(a,b){this.stringConstValueWithSecurityContract__googStringSecurityPrivate_=a===Ob&&b||"";this.STRING_CONST_TYPE_MARKER__GOOG_STRING_SECURITY_PRIVATE_=Pb};
Qb.prototype.implementsGoogStringTypedString=!0;Qb.prototype.getTypedStringValue=function(){return this.stringConstValueWithSecurityContract__googStringSecurityPrivate_};
Qb.prototype.toString=function(){return"Const{"+this.stringConstValueWithSecurityContract__googStringSecurityPrivate_+"}"};
var Rb=function(a){return a instanceof Qb&&a.constructor===Qb&&a.STRING_CONST_TYPE_MARKER__GOOG_STRING_SECURITY_PRIVATE_===Pb?a.stringConstValueWithSecurityContract__googStringSecurityPrivate_:"type_error:Const"},Sb=function(a){return new Qb(Ob,a)},Pb={},Ob={},uaa=Sb("");var Ub=function(){this.privateDoNotAccessOrElseSafeScriptWrappedValue_="";this.SAFE_SCRIPT_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_=Tb};
Ub.prototype.implementsGoogStringTypedString=!0;var Tb={};Ub.prototype.getTypedStringValue=function(){return this.privateDoNotAccessOrElseSafeScriptWrappedValue_.toString()};
Ub.prototype.initSecurityPrivateDoNotAccessOrElse_=function(a){this.privateDoNotAccessOrElseSafeScriptWrappedValue_=a;return this};
new Ub().initSecurityPrivateDoNotAccessOrElse_("");var Xb=function(){this.privateDoNotAccessOrElseTrustedResourceUrlWrappedValue_="";this.trustedURL_=null;this.TRUSTED_RESOURCE_URL_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_=Wb};
f=Xb.prototype;f.implementsGoogStringTypedString=!0;f.getTypedStringValue=function(){return this.privateDoNotAccessOrElseTrustedResourceUrlWrappedValue_.toString()};
f.implementsGoogI18nBidiDirectionalString=!0;f.getDirection=function(){return 1};
f.cloneWithParams=function(a,b){var c=Zb(this);c=vaa.exec(c);var d=c[3]||"";return $b(c[1]+ac("?",c[2]||"",a)+ac("#",d,b))};
var Zb=function(a){return bc(a).toString()},bc=function(a){if(a instanceof Xb&&a.constructor===Xb&&a.TRUSTED_RESOURCE_URL_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_===Wb)return a.privateDoNotAccessOrElseTrustedResourceUrlWrappedValue_;
Va(a);return"type_error:TrustedResourceUrl"},cc=function(a,b){var c=Rb(a);
if(!waa.test(c))throw Error("Invalid TrustedResourceUrl format: "+c);a=c.replace(xaa,function(d,e){if(!Object.prototype.hasOwnProperty.call(b,e))throw Error("Found marker, \""+e+"\", in format string, \""+c+"\", but no valid label mapping found in args: "+JSON.stringify(b));d=b[e];return d instanceof Qb?Rb(d):encodeURIComponent(String(d))});
return $b(a)},xaa=/%{(\w+)}/g,waa=/^((https:)?\/\/[0-9a-z.:[\]-]+\/|\/[^/\\]|[^:/\\%]+\/|[^:/\\%]*[?#]|about:blank#)/i,vaa=/^([^?#]*)(\?[^#]*)?(#[\s\S]*)?/,dc=function(a){return $b(Rb(a))},Wb={},$b=function(a){var b=new Xb;
b.privateDoNotAccessOrElseTrustedResourceUrlWrappedValue_=a;return b},ac=function(a,b,c){if(null==c)return b;
if(Ka(c))return c?a+encodeURIComponent(c):"";for(var d in c){var e=c[d];e=Wa(e)?e:[e];for(var g=0;g<e.length;g++){var h=e[g];null!=h&&(b||(b=a),b+=(b.length>a.length?"&":"")+encodeURIComponent(d)+"="+encodeURIComponent(String(h)))}}return b};var ec=function(a,b){return 0==a.lastIndexOf(b,0)},fc=function(a,b){var c=a.length-b.length;
return 0<=c&&a.indexOf(b,c)==c},gc=function(a){return /^[\s\xa0]*$/.test(a)},hc=String.prototype.trim?function(a){return a.trim()}:function(a){return /^[\s\xa0]*([\s\S]*?)[\s\xa0]*$/.exec(a)[1]},oc=function(a,b){if(b)a=a.replace(ic,"&").replace(jc,"<").replace(kc,">").replace(lc,""").replace(mc,"'").replace(nc,"�");else
{if(!yaa.test(a))return a;-1!=a.indexOf("&")&&(a=a.replace(ic,"&"));-1!=a.indexOf("<")&&(a=a.replace(jc,"<"));-1!=a.indexOf(">")&&(a=a.replace(kc,">"));-1!=a.indexOf("\"")&&(a=a.replace(lc,"""));-1!=a.indexOf("'")&&(a=a.replace(mc,"'"));-1!=a.indexOf("\0")&&(a=a.replace(nc,"�"))}return a},ic=/&/g,jc=/</g,kc=/>/g,lc=/"/g,mc=/'/g,nc=/\x00/g,yaa=/[\x00&<>"']/,pc=function(a,b){return-1!=a.indexOf(b)},qc=function(a,b){return pc(a.toLowerCase(),b.toLowerCase())},sc=function(a,
b){var c=0;
a=hc(String(a)).split(".");b=hc(String(b)).split(".");for(var d=Math.max(a.length,b.length),e=0;0==c&&e<d;e++){var g=a[e]||"",h=b[e]||"";do{g=/(\d*)(\D*)(.*)/.exec(g)||["","","",""];h=/(\d*)(\D*)(.*)/.exec(h)||["","","",""];if(0==g[0].length&&0==h[0].length)break;c=rc(0==g[1].length?0:parseInt(g[1],10),0==h[1].length?0:parseInt(h[1],10))||rc(0==g[2].length,0==h[2].length)||rc(g[2],h[2]);g=g[3];h=h[3]}while(0==c)}return c},rc=function(a,b){return a<b?-1:a>b?1:0};var uc=function(){this.privateDoNotAccessOrElseSafeUrlWrappedValue_="";this.SAFE_URL_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_=tc};
uc.prototype.implementsGoogStringTypedString=!0;uc.prototype.getTypedStringValue=function(){return this.privateDoNotAccessOrElseSafeUrlWrappedValue_.toString()};
uc.prototype.implementsGoogI18nBidiDirectionalString=!0;uc.prototype.getDirection=function(){return 1};
var wc=function(a){return vc(a).toString()},vc=function(a){if(a instanceof uc&&a.constructor===uc&&a.SAFE_URL_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_===tc)return a.privateDoNotAccessOrElseSafeUrlWrappedValue_;
Va(a);return"type_error:SafeUrl"},zaa=/^(?:audio\/(?:3gpp2|3gpp|aac|L16|midi|mp3|mp4|mpeg|oga|ogg|opus|x-m4a|x-wav|wav|webm)|image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp|x-icon)|text\/csv|video\/(?:mpeg|mp4|ogg|webm|quicktime))(?:;\w+=(?:\w+|"[\w;=]+"))*$/i,Aaa=/^data:([^,]*);base64,[a-z0-9+\/]+=*$/i,yc=function(a){a=a.replace(/(%0A|%0D)/g,"");
var b=a.match(Aaa);b=b&&zaa.test(b[1]);return xc(b?a:"about:invalid#zClosurez")},zc=/^(?:(?:https?|mailto|ftp):|[^:/?#]*(?:[/?#]|$))/i,Ac=function(a){if(a instanceof uc)return a;
a="object"==typeof a&&a.implementsGoogStringTypedString?a.getTypedStringValue():String(a);zc.test(a)||(a="about:invalid#zClosurez");return xc(a)},Bc=function(a,b){if(a instanceof uc)return a;
a="object"==typeof a&&a.implementsGoogStringTypedString?a.getTypedStringValue():String(a);if(b&&/^data:/i.test(a)&&(b=yc(a),b.getTypedStringValue()==a))return b;zc.test(a)||(a="about:invalid#zClosurez");return xc(a)},tc={},xc=function(a){var b=new uc;
b.privateDoNotAccessOrElseSafeUrlWrappedValue_=a;return b};
xc("about:blank");var Dc=function(){this.privateDoNotAccessOrElseSafeStyleWrappedValue_="";this.SAFE_STYLE_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_=Cc};
Dc.prototype.implementsGoogStringTypedString=!0;var Cc={};Dc.prototype.getTypedStringValue=function(){return this.privateDoNotAccessOrElseSafeStyleWrappedValue_};
var Ec=function(a){if(a instanceof Dc&&a.constructor===Dc&&a.SAFE_STYLE_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_===Cc)return a.privateDoNotAccessOrElseSafeStyleWrappedValue_;Va(a);return"type_error:SafeStyle"};
Dc.prototype.initSecurityPrivateDoNotAccessOrElse_=function(a){this.privateDoNotAccessOrElseSafeStyleWrappedValue_=a;return this};
var Baa=new Dc().initSecurityPrivateDoNotAccessOrElse_(""),Fc=function(a){if(a instanceof uc)return"url(\""+wc(a).replace(/</g,"%3c").replace(/[\\"]/g,"\\$&")+"\")";a=a instanceof Qb?Rb(a):Caa(String(a));if(/[{;}]/.test(a))throw new jb("Value does not allow [{;}], got: %s.",[a]);return a},Caa=function(a){var b=a.replace(Gc,"$1").replace(Gc,"$1").replace(Hc,"url");
if(Daa.test(b)){if(Eaa.test(a))return"zClosurez";for(var c=b=!0,d=0;d<a.length;d++){var e=a.charAt(d);"'"==e&&c?b=!b:"\""==e&&b&&(c=!c)}if(!b||!c||!Faa(a))return"zClosurez"}else return"zClosurez";return Gaa(a)},Faa=function(a){for(var b=!0,c=/^[-_a-zA-Z0-9]$/,d=0;d<a.length;d++){var e=a.charAt(d);
if("]"==e){if(b)return!1;b=!0}else if("["==e){if(!b)return!1;b=!1}else if(!b&&!c.test(e))return!1}return b},Daa=/^[-,."'%_!# a-zA-Z0-9\[\]]+$/,Hc=/\b(url\([ \t\n]*)('[ -&(-\[\]-~]*'|"[ !#-\[\]-~]*"|[!#-&*-\[\]-~]*)([ \t\n]*\))/g,Gc=/\b(hsl|hsla|rgb|rgba|matrix|calc|minmax|fit-content|repeat|(rotate|scale|translate)(X|Y|Z|3d)?)\([-+*/0-9a-z.%\[\], ]+\)/g,Eaa=/\/\*/,Gaa=function(a){return a.replace(Hc,function(b,c,d,e){var g="";
d=d.replace(/^(['"])(.*)\1$/,function(h,m,n){g=m;return n});
b=Ac(d).getTypedStringValue();return c+g+b+g+e})};var Jc=function(){this.privateDoNotAccessOrElseSafeStyleSheetWrappedValue_="";this.SAFE_STYLE_SHEET_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_=Ic};
Jc.prototype.implementsGoogStringTypedString=!0;var Ic={};Jc.prototype.getTypedStringValue=function(){return this.privateDoNotAccessOrElseSafeStyleSheetWrappedValue_};
Jc.prototype.initSecurityPrivateDoNotAccessOrElse_=function(a){this.privateDoNotAccessOrElseSafeStyleSheetWrappedValue_=a;return this};
var Haa=new Jc().initSecurityPrivateDoNotAccessOrElse_("");var Kc;a:{var Lc=q.navigator;if(Lc){var Mc=Lc.userAgent;if(Mc){Kc=Mc;break a}}Kc=""}var Nc=function(a){return pc(Kc,a)},Iaa=function(a){for(var b=/(\w[\w ]+)\/([^\s]+)\s*(?:\((.*?)\))?/g,c=[],d;d=b.exec(a);)c.push([d[1],
d[2],d[3]||void 0]);return c};var Oc=function(){return Nc("Trident")||Nc("MSIE")},Pc=function(){return Nc("Firefox")||Nc("FxiOS")},Rc=function(){return Nc("Safari")&&!(Qc()||Nc("Coast")||Nc("Opera")||Nc("Edge")||Nc("Edg/")||Nc("OPR")||Pc()||Nc("Silk")||Nc("Android"))},Qc=function(){return(Nc("Chrome")||Nc("CriOS"))&&!Nc("Edge")},Sc=function(){return Nc("Android")&&!(Qc()||Pc()||Nc("Opera")||Nc("Silk"))},Kaa=function(){function a(e){e=ub(e,d);
return c[e]||""}
var b=Kc;if(Oc())return Jaa(b);b=Iaa(b);var c={};mb(b,function(e){c[e[0]]=e[1]});
var d=db(u.containsKey,c);return Nc("Opera")?a(["Version","Opera"]):Nc("Edge")?a(["Edge"]):Nc("Edg/")?a(["Edg"]):Qc()?a(["Chrome","CriOS"]):(b=b[2])&&b[1]||""},Jaa=function(a){var b=/rv: *([\d\.]*)/.exec(a);
if(b&&b[1])return b[1];b="";var c=/MSIE +([\d\.]+)/.exec(a);if(c&&c[1])if(a=/Trident\/(\d.\d)/.exec(a),"7.0"==c[1]){if(a&&a[1])switch(a[1]){case"4.0":b="8.0";break;case"5.0":b="9.0";break;case"6.0":b="10.0";break;case"7.0":b="11.0";}else b="7.0";}else b=c[1];return b};var Uc=function(){this.privateDoNotAccessOrElseSafeHtmlWrappedValue_="";this.SAFE_HTML_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_=Tc;this.dir_=null};
Uc.prototype.implementsGoogI18nBidiDirectionalString=!0;Uc.prototype.getDirection=function(){return this.dir_};
Uc.prototype.implementsGoogStringTypedString=!0;Uc.prototype.getTypedStringValue=function(){return this.privateDoNotAccessOrElseSafeHtmlWrappedValue_.toString()};
var Wc=function(a){return Vc(a).toString()},Vc=function(a){if(a instanceof Uc&&a.constructor===Uc&&a.SAFE_HTML_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_===Tc)return a.privateDoNotAccessOrElseSafeHtmlWrappedValue_;
Va(a);return"type_error:SafeHtml"},Yc=function(a){if(a instanceof Uc)return a;
var b="object"==typeof a,c=null;b&&a.implementsGoogI18nBidiDirectionalString&&(c=a.getDirection());return Xc(oc(b&&a.implementsGoogStringTypedString?a.getTypedStringValue():String(a)),c)},Zc=/^[a-zA-Z0-9-]+$/,Laa=u.createSet("action","cite","data","formaction","href","manifest","poster","src"),Maa=u.createSet("APPLET","BASE","EMBED","IFRAME","LINK","MATH","META","OBJECT","SCRIPT","STYLE","SVG","TEMPLATE"),ad=function(a,b,c){var d=String(a);
if(!Zc.test(d))throw Error("Invalid tag name <"+d+">.");if(d.toUpperCase()in Maa)throw Error("Tag name <"+d+"> is not allowed for SafeHtml.");a=String(a);d=null;var e="<"+a,g="";if(b)for(y in b){if(!Zc.test(y))throw Error("Invalid attribute name \""+y+"\".");var h=b[y];if(null!=h){var m=a;var n=y;var p=h;if(p instanceof Qb)p=Rb(p);else if("style"==n.toLowerCase()){h=void 0;m=p;if(!$a(m))throw Error("The \"style\" attribute requires goog.html.SafeStyle or map of style properties, "+typeof m+" given: "+
m);if(!(m instanceof Dc)){p="";for(h in m){if(!/^[-_a-zA-Z0-9]+$/.test(h))throw Error("Name allows only [-_a-zA-Z0-9], got: "+h);var x=m[h];null!=x&&(x=Wa(x)?pb(x,Fc).join(" "):Fc(x),p+=h+":"+x+";")}m=p?new Dc().initSecurityPrivateDoNotAccessOrElse_(p):Baa}p=Ec(m)}else{if(/^on/i.test(n))throw Error("Attribute \""+n+"\" requires goog.string.Const value, \""+p+"\" given.");if(n.toLowerCase()in Laa)if(p instanceof Xb)p=Zb(p);else if(p instanceof uc)p=wc(p);else if(Ka(p))p=Ac(p).getTypedStringValue();else throw Error("Attribute \""+
n+"\" on tag \""+m+"\" requires goog.html.SafeUrl, goog.string.Const, or string, value \""+p+"\" given.")}p.implementsGoogStringTypedString&&(p=p.getTypedStringValue());n=n+"=\""+oc(String(p))+"\"";g+=" "+n}}var y=e+g;null!=c?Wa(c)||(c=[c]):c=[];!0===taa[a.toLowerCase()]?y+=">":(c=$c(c),y+=">"+Wc(c)+"</"+a+">",d=c.getDirection());(b=b&&b.dir)&&(d=/^(ltr|rtl|auto)$/i.test(b)?0:null);return Xc(y,d)},Naa=function(a){var b=Yc(bd),c=b.getDirection(),d=[],e=function(g){Wa(g)?mb(g,e):(g=Yc(g),d.push(Wc(g)),g=
g.getDirection(),0==c?c=g:0!=g&&c!=g&&(c=null))};
mb(a,e);return Xc(d.join(Wc(b)),c)},$c=function(a){return Naa(Array.prototype.slice.call(arguments))},Tc={},Xc=function(a,b){return new Uc().initSecurityPrivateDoNotAccessOrElse_(a,b)};
Uc.prototype.initSecurityPrivateDoNotAccessOrElse_=function(a,b){this.privateDoNotAccessOrElseSafeHtmlWrappedValue_=a;this.dir_=b;return this};
Xc("<!DOCTYPE html>",0);var bd=Xc("",0),Oaa=Xc("<br>",0);var cd=function(a,b){return Xc(a,b||null)};var Paa=Nb(function(){var a=document.createElement("div"),b=document.createElement("div");b.appendChild(document.createElement("div"));a.appendChild(b);b=a.firstChild.firstChild;a.innerHTML=Vc(bd);return!b.parentElement}),dd=function(a,b){if(Paa())for(;a.lastChild;)a.removeChild(a.lastChild);
a.innerHTML=Vc(b)},Qaa=function(a,b){dd(a,b)},ed=function(a,b){b=b instanceof uc?b:Bc(b);
a.action=vc(b)},fd=function(a,b){b=b instanceof uc?b:Bc(b);
a.href=vc(b)},gd=function(a,b){b=b instanceof uc?b:Bc(b,/^data:image\//i.test(b));
a.src=vc(b)},hd=function(a,b){a.src=b.trustedURL_?b.trustedURL_:Zb(b)},id=function(a,b,c){a.rel=c;
qc(c,"stylesheet")?a.href=b.trustedURL_?b.trustedURL_:Zb(b):a.href=b instanceof Xb?b.trustedURL_?b.trustedURL_:Zb(b):b instanceof uc?vc(b):vc(Bc(b))},jd=function(a,b){a.src=bc(b);
(b=Ra())&&a.setAttribute("nonce",b)},kd=function(a,b,c,d){a=a instanceof uc?a:Bc(a);
return(b||q).open(vc(a),c?Rb(c):"",d,void 0)};var ld=function(a,b){for(var c=a.split("%s"),d="",e=Array.prototype.slice.call(arguments,1);e.length&&1<c.length;)d+=c.shift()+e.shift();return d+c.join("%s")},md=function(a){return encodeURIComponent(String(a))},nd=function(a){return decodeURIComponent(a.replace(/\+/g," "))},od=function(a,b){return a=oc(a,b)},pd=function(a){return pc(a,"&")?"document"in q?Raa(a):Saa(a):a},Raa=function(a){var b={"&":"&",
"<":"<",">":">",""":"\""};var c=q.document.createElement("div");return a.replace(Taa,function(d,e){var g=b[d];if(g)return g;"#"==e.charAt(0)&&(e=Number("0"+e.substr(1)),isNaN(e)||(g=String.fromCharCode(e)));g||(g=cd(d+" "),dd(c,g),g=c.firstChild.nodeValue.slice(0,-1));return b[d]=g})},Saa=function(a){return a.replace(/&([^;]+);/g,function(b,c){switch(c){case"amp":return"&";
case"lt":return"<";case"gt":return">";case"quot":return"\"";default:return"#"!=c.charAt(0)||(c=Number("0"+c.substr(1)),isNaN(c))?b:String.fromCharCode(c);}})},Taa=/&([^;\s<&]+);?/g,qd={"\0":"\\0",
"\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\x0B","\"":"\\\"","\\":"\\\\","<":"\\u003C"},rd={"'":"\\'"},td=function(a){a=String(a);for(var b=["\""],c=0;c<a.length;c++){var d=a.charAt(c),e=d.charCodeAt(0);b[c+1]=qd[d]||(31<e&&127>e?d:sd(d))}b.push("\"");return b.join("")},sd=function(a){if(a in rd)return rd[a];
if(a in qd)return rd[a]=qd[a];var b=a.charCodeAt(0);if(31<b&&127>b)var c=a;else{if(256>b){if(c="\\x",16>b||256<b)c+="0"}else c="\\u",4096>b&&(c+="0");c+=b.toString(16).toUpperCase()}return rd[a]=c},ud=function(a){return String(a).replace(/([-()\[\]{}+?*.$\^|,:#<!\\])/g,"\\$1").replace(/\x08/g,"\\x08")},vd=String.prototype.repeat?function(a,b){return a.repeat(b)}:function(a,b){return Array(b+1).join(a)},wd=function(a,b){a=Ia(void 0)?a.toFixed(void 0):String(a);
var c=a.indexOf(".");-1==c&&(c=a.length);return vd("0",Math.max(0,b-c))+a},xd=function(a){return null==a?"":String(a)},yd=function(a){return Array.prototype.join.call(arguments,"")},zd=function(){return Math.floor(2147483648*Math.random()).toString(36)+Math.abs(Math.floor(2147483648*Math.random())^fb()).toString(36)},Ad=function(a){for(var b=0,c=0;c<a.length;++c)b=31*b+a.charCodeAt(c)>>>0;
return b},Bd=2147483648*Math.random()|0,Cd=function(a){return String(a).replace(/\-([a-z])/g,function(b,c){return c.toUpperCase()})},Dd=function(a){return String(a).replace(/([A-Z])/g,"-$1").toLowerCase()},Uaa=function(a){var b=Ka(void 0)?ud(void 0):"\\s";
return a.replace(new RegExp("(^"+(b?"|["+b+"]+":"")+")([a-z])","g"),function(c,d,e){return d+e.toUpperCase()})},Ed=function(a){isFinite(a)&&(a=String(a));
return Ka(a)?/^\s*-?0x/i.test(a)?parseInt(a,16):parseInt(a,10):NaN},Vaa=function(a){var b=1;
a=a.split(":");for(var c=[];0<b&&a.length;)c.push(a.shift()),b--;a.length&&c.push(a.join(":"));return c};/*
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
*/
var v=function(a,b,c,d){var e=arguments.length,g=3>e?b:null===d?d=Object.getOwnPropertyDescriptor(b,c):d,h;if("object"===typeof Reflect&&Reflect&&"function"===typeof Reflect.decorate)g=Reflect.decorate(a,b,c,d);else for(var m=a.length-1;0<=m;m--)if(h=a[m])g=(3>e?h(g):3<e?h(b,c,g):h(b,c))||g;return 3<e&&g&&Object.defineProperty(b,c,g),g},w=function(a,b){if("object"===typeof Reflect&&Reflect&&"function"===typeof Reflect.metadata)return Reflect.metadata(a,b)},Fd=function(a,b){var c=void 0,d=void 0;
return new(d||(d=Promise))(function(e,g){function h(p){try{n(b.next(p))}catch(x){g(x)}}
function m(p){try{n(b["throw"](p))}catch(x){g(x)}}
function n(p){p.done?e(p.value):new d(function(x){x(p.value)}).then(h,m)}
n((b=b.apply(a,c)).next())})};var Waa=!/^\s*class\s*\{\s*\}\s*$/.test(function(){}.toString());/*
Copyright (c) 2016 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/
(function(){if(Waa&&!HTMLElement.es5Shimmed&&void 0!==window.Reflect&&void 0!==window.customElements&&!window.customElements.polyfillWrapFlushCallback){var a=HTMLElement;window.HTMLElement=function(){return Reflect.construct(a,[],this.constructor)};
HTMLElement.prototype=a.prototype;HTMLElement.prototype.constructor=HTMLElement;HTMLElement.es5Shimmed=!0;Object.setPrototypeOf(HTMLElement,a)}})();/*
Copyright (c) 2019 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at
http://polymer.github.io/LICENSE.txt The complete set of authors may be found at
http://polymer.github.io/AUTHORS.txt The complete set of contributors may be
found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
part of the polymer project is also subject to an additional IP rights grant
found at http://polymer.github.io/PATENTS.txt
*/
window.COMPILED=window.COMPILED||!1;/*
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/
window.JSCompiler_renameProperty=function(a){return a};var Xaa=/(url\()([^)]*)(\))/g,Yaa=/(^\/[^\/])|(^#)|(^[\w-\d]*:)/,Gd,Hd;
function Id(a,b){if(a&&Yaa.test(a)||"//"===a)return a;if(void 0===Gd){Gd=!1;try{var c=new URL("b","http://a");c.pathname="c%20d";Gd="http://a/c%20d"===c.href}catch(d){}}b||(b=document.baseURI||window.location.href);if(Gd)try{return new URL(a,b).href}catch(d){return a}Hd||(Hd=document.implementation.createHTMLDocument("temp"),Hd.base=Hd.createElement("base"),Hd.head.appendChild(Hd.base),Hd.anchor=Hd.createElement("a"),Hd.body.appendChild(Hd.anchor));Hd.base.href=b;Hd.anchor.href=a;return Hd.anchor.href||
a}
function Jd(a,b){return a.replace(Xaa,function(c,d,e,g){return d+"'"+Id(e.replace(/["']/g,""),b)+"'"+g})}
function Kd(a){return a.substring(0,a.lastIndexOf("/")+1)}
;var Md=!window.ShadyDOM,Zaa=!(window.ShadyCSS&&!window.ShadyCSS.nativeCss),$aa=!window.customElements.polyfillWrapFlushCallback,Nd=window.Polymer&&window.Polymer.rootPath||Kd(document.baseURI||window.location.href),Od=window.Polymer&&window.Polymer.sanitizeDOMValue||void 0,Pd=window.Polymer&&window.Polymer.setPassiveTouchGestures||!1,Qd=window.Polymer&&window.Polymer.strictTemplatePolicy||!1,Rd=window.Polymer&&window.Polymer.allowTemplateFromDomModule||!1,Sd=window.Polymer&&window.Polymer.legacyOptimizations||
!1,Td=window.Polymer&&window.Polymer.legacyWarnings||!1,Ud=window.Polymer&&window.Polymer.syncInitialRender||!1,Vd=window.Polymer&&window.Polymer.legacyUndefined||!1,Wd=window.Polymer&&window.Polymer.legacyNoBatch||!1,Xd=window.Polymer&&window.Polymer.legacyNotifyOrder||!1,Yd=window.Polymer&&window.Polymer.orderedComputed||!1,Zd=window.Polymer&&window.Polymer.removeNestedTemplates||!1,$d=window.Polymer&&window.Polymer.fastDomIf||!1;/*
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at
http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at
http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at
http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at
http://polymer.github.io/PATENTS.txt
*/
var aba={align:1,alt:1,"aria-activedescendant":10,"aria-atomic":1,"aria-autocomplete":1,"aria-busy":1,"aria-checked":1,"aria-disabled":1,"aria-dropeffect":1,"aria-expanded":1,"aria-haspopup":1,"aria-hidden":1,"aria-invalid":1,"aria-label":1,"aria-level":1,"aria-live":1,"aria-multiline":1,"aria-multiselectable":1,"aria-orientation":1,"aria-posinset":1,"aria-pressed":1,"aria-readonly":1,"aria-relevant":1,"aria-required":1,"aria-selected":1,"aria-setsize":1,"aria-sort":1,"aria-valuemax":1,"aria-valuemin":1,
"aria-valuenow":1,"aria-valuetext":1,async:8,autocapitalize:1,autocomplete:1,autocorrect:1,autofocus:1,bgcolor:1,border:1,checked:1,"class":1,color:1,cols:1,colspan:1,contenteditable:1,dir:8,disabled:1,draggable:1,enctype:1,face:1,"for":10,formenctype:1,frameborder:1,height:1,hidden:1,href:4,hreflang:1,id:10,ismap:1,itemid:1,itemprop:1,itemref:1,itemscope:1,itemtype:1,label:1,lang:1,list:10,loop:1,max:1,maxlength:1,min:1,multiple:1,muted:1,name:10,placeholder:1,preload:1,rel:1,required:1,reversed:1,
role:1,rows:1,rowspan:1,selected:1,shape:1,size:1,sizes:1,span:1,spellcheck:1,src:4,start:1,step:1,style:5,summary:1,tabindex:1,target:8,title:1,translate:1,valign:1,value:1,width:1,wrap:1},ae={a:{href:[{contract:3}]},area:{href:[{contract:3}]},audio:{src:[{contract:3}]},blockquote:{cite:[{contract:3}]},button:{formaction:[{contract:3}],formmethod:[{contract:1}],type:[{contract:1}]},command:{type:[{contract:1}]},content:{select:[{contract:1}]},del:{cite:[{contract:3}]},details:{open:[{contract:1}]},
form:{action:[{contract:3}],method:[{contract:1}]},iframe:{srcdoc:[{contract:2}]},img:{src:[{contract:3}],srcset:[{contract:11}]},input:{formaction:[{contract:3}],formmethod:[{contract:1}],pattern:[{contract:1}],readonly:[{contract:1}],src:[{contract:3}],type:[{contract:1}]},ins:{cite:[{contract:3}]},li:{type:[{contract:1}]},link:{href:[{contract:3,contingentAttribute:"rel",requiredValue:"alternate"},{contract:3,contingentAttribute:"rel",requiredValue:"author"},{contract:3,contingentAttribute:"rel",
requiredValue:"bookmark"},{contract:3,contingentAttribute:"rel",requiredValue:"canonical"},{contract:3,contingentAttribute:"rel",requiredValue:"cite"},{contract:3,contingentAttribute:"rel",requiredValue:"help"},{contract:3,contingentAttribute:"rel",requiredValue:"icon"},{contract:3,contingentAttribute:"rel",requiredValue:"license"},{contract:3,contingentAttribute:"rel",requiredValue:"next"},{contract:3,contingentAttribute:"rel",requiredValue:"prefetch"},{contract:3,contingentAttribute:"rel",requiredValue:"dns-prefetch"},
{contract:3,contingentAttribute:"rel",requiredValue:"prerender"},{contract:3,contingentAttribute:"rel",requiredValue:"preconnect"},{contract:3,contingentAttribute:"rel",requiredValue:"preload"},{contract:3,contingentAttribute:"rel",requiredValue:"prev"},{contract:3,contingentAttribute:"rel",requiredValue:"search"},{contract:3,contingentAttribute:"rel",requiredValue:"subresource"}],media:[{contract:1}],nonce:[{contract:1}],type:[{contract:1}]},menuitem:{icon:[{contract:3}]},ol:{type:[{contract:1}]},
q:{cite:[{contract:3}]},script:{nonce:[{contract:1}],type:[{contract:1}]},source:{media:[{contract:1}],src:[{contract:3}],srcset:[{contract:11}]},style:{media:[{contract:1}],nonce:[{contract:1}]},table:{cellpadding:[{contract:1}],cellspacing:[{contract:1}]},textarea:{readonly:[{contract:1}]},time:{datetime:[{contract:1}]},video:{autoplay:[{contract:1}],controls:[{contract:1}],poster:[{contract:3}],src:[{contract:3}]}},be={a:1,abbr:1,address:1,applet:4,area:5,article:1,aside:1,audio:1,b:1,base:4,bdi:1,
bdo:1,blockquote:1,body:1,br:5,button:1,canvas:1,caption:1,cite:1,code:1,col:5,colgroup:1,command:1,content:1,data:1,datalist:1,dd:1,del:1,details:1,dfn:1,dialog:1,div:1,dl:1,dt:1,em:1,embed:4,fieldset:1,figcaption:1,figure:1,font:1,footer:1,form:1,frame:1,frameset:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,head:1,header:1,hr:5,html:1,i:1,iframe:1,img:5,input:5,ins:1,kbd:1,keygen:5,label:1,legend:1,li:1,link:5,main:1,map:1,mark:1,math:4,menu:1,menuitem:1,meta:4,meter:1,nav:1,noscript:1,object:4,ol:1,optgroup:1,
option:1,output:1,p:1,param:5,picture:1,pre:1,progress:1,q:1,rb:1,rp:1,rt:1,rtc:1,ruby:1,s:1,samp:1,script:3,section:1,select:1,slot:1,small:1,source:5,span:1,strong:1,style:2,sub:1,summary:1,sup:1,svg:4,table:1,tbody:1,td:1,template:4,textarea:6,tfoot:1,th:1,thead:1,time:1,title:6,tr:1,track:5,u:1,ul:1,"var":1,video:1,wbr:5},bba=[{auto:!0,ltr:!0,rtl:!0},{async:!0},{_self:!0,_blank:!0}],ce={"*":{async:1,dir:0,target:2}};var ge=function(){if(!de){de=u.clone(cba);for(var a=0,b=fe.length;a<b;++a){var c=fe[a];de[c.toLowerCase()]=c}}return de},fe="aLink accessKey allowFullscreen bgColor cellPadding cellSpacing codeBase codeType contentEditable crossOrigin dateTime dirName formAction formEnctype formMethod formNoValidate formTarget frameBorder innerHTML innerText inputMode isMap longDesc marginHeight marginWidth maxLength mediaGroup minLength noHref noResize noShade noValidate noWrap nodeValue outerHTML outerText readOnly tabIndex textContent trueSpeed useMap vAlign vLink valueAsDate valueAsNumber valueType".split(" "),
cba={accept_charset:"acceptCharset",
"char":"ch",charoff:"chOff",checked:"defaultChecked","class":"className","for":"htmlFor",http_equiv:"httpEquiv",muted:"defaultMuted",selected:"defaultSelected",value:"defaultValue"},de=null,he=null;var ie={},je=!1,ke=0,dba=/^(?!(?:annotation-xml|color-profile|font-face|font-face(?:-(?:src|uri|format|name))?|missing-glyph)$)[a-z][a-z.0-9_\u00b7\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u037d\u200c\u200d\u203f-\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\udfff\uf900-\ufdcf\ufdf0-\ufffd]*-[\-a-z.0-9_\u00b7\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u037d\u200c\u200d\u203f-\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\udfff\uf900-\ufdcf\ufdf0-\ufffd]*$/,le=function(a,b){var c=window.customElements;if(je){for(var d=window.Polymer.telemetry.registrations,
e=d.length,g=ke;g<e;++g)ie[d[g].is]=ie;ke=e}return c&&c.get(a)||ie[a]===ie?2:"HTMLUnknownElement"===b.name?1:"HTMLElement"===b.name&&dba.test(a)?3:0};/*
Copyright (c) 2018 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at
http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at
http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at
http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at
http://polymer.github.io/PATENTS.txt
*/
var me=function(a){return a&&a.implementsGoogStringTypedString?a.getTypedStringValue():a},eba={CONSTANT:{typeToUnwrap:Qb,
unwrap:Rb},JAVASCRIPT:{typeToUnwrap:Ub,unwrap:function(a){a instanceof Ub&&a.constructor===Ub&&a.SAFE_SCRIPT_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_===Tb?a=a.privateDoNotAccessOrElseSafeScriptWrappedValue_:(Va(a),a="type_error:SafeScript");return a.toString()}},
HTML:{typeToUnwrap:Uc,unwrap:Wc},RESOURCE_URL:{typeToUnwrap:Xb,unwrap:Zb},STRING:{typeToUnwrap:Object,unwrap:me},STYLE:{typeToUnwrap:Dc,unwrap:Ec},URL:{typeToUnwrap:uc,unwrap:wc}},ne=function(a,b){return b},fba={CONSTANT:ne,
JAVASCRIPT:ne,HTML:od,RESOURCE_URL:ne,STRING:String,STYLE:ne,URL:function(a,b){a=Ac(a).getTypedStringValue();return"about:invalid#zClosurez"===a?b:a}};var gba=/(?!,)([^\t\n\f\r ]+)(?:[\t\n\f\r ]+([.0-9+\-]+[a-z]?))?/gi,hba=/[\t\n\f\r ]+/,oe=/[\t\n\f\r ,]+/g,iba=function(a){return(a=a.split(hba,2))?{url:a[0],metadata:a[1]}:null},jba=function(a){var b=String(a.url).replace(oe,encodeURIComponent);
if(a=a.metadata){oe.lastIndex=0;if(oe.test(a))return null;b+=" "+a}return b},kba=function(a,b,c){return c},pe=function(a){function b(y){var B=this.getAttribute(y);
return!B||/[\[\{]/.test(y)?null:B}
var c=a.reportHandler||void 0,d=a.safeTypesBridge||kba,e=/^$/;if(a=a.allowedIdentifierPrefixes)for(var g=0,h=a.length;g<h;++g)e=new RegExp(e.source+"|^"+ud(a[g]));c&&c(!1,"initResin");var m={},n=[,{filterRaw:null,filterString:function(y,B,G){return G},
safeReplacement:null,safeType:null},{filterRaw:null,filterString:null,safeReplacement:null,safeType:"HTML"},{filterRaw:null,filterString:null,safeReplacement:"about:invalid#zClosurez",safeType:"URL"},{filterRaw:null,filterString:null,safeReplacement:"about:invalid#zClosurez",safeType:"RESOURCE_URL"},{filterRaw:null,filterString:null,safeReplacement:"zClosurez",safeType:"STYLE"},,{filterRaw:null,filterString:null,safeReplacement:" /*zClosurez*/ ",safeType:"JAVASCRIPT"},{filterRaw:null,filterString:function(y,
B,G){G=String(G).toLowerCase();a:{var P=null;(y=ce[y])&&(P=y[B]);if("number"!==typeof P&&((y=ce["*"])&&(P=y[B]),"number"!==typeof P)){B=!1;break a}B=!0===bba[P][String(G).toLowerCase()]}return B?G:"zClosurez"},
safeReplacement:"zClosurez",safeType:null},{filterRaw:null,filterString:null,safeReplacement:"zClosurez",safeType:"CONSTANT"},{filterRaw:null,filterString:function(y,B,G){return e.test(G)?G:"zClosurez"},
safeReplacement:"zClosurez",safeType:"CONSTANT"},{filterRaw:function(y,B,G){var P=G;"string"===typeof P&&(P=(P=P.match(gba))?P.map(iba).filter(Boolean):[]);if(!Array.isArray(P))return"about:invalid#zClosurez";var S=P;P=[];var ca=[],Ja={};if(Array.isArray(S))for(var Ya=0,Mb=S.length;Ya<Mb;++Ya){var Vb=S[Ya],Y=Vb&&Vb.url;if(Y){var aa=d(Y,"URL",Ja);if(aa){var Z=aa!==Ja;(Z?P:ca).push({url:Z?aa:Y,metadata:Vb.metadata})}}}else ca.push(S);S=ca.length?JSON.stringify(ca):null;ca=m;if(P.length){if(!Array.isArray(P))throw Error();
ca=P.map(jba).filter(Boolean).join(" , ")||m}S&&c&&c(!0,"Failed to sanitize attribute value of <%s>: <%s %s=\"%O\">: %s",y,y,B,G,S);return ca===m?"about:invalid#zClosurez":ca},
filterString:null,safeReplacement:null,safeType:null}],p={},x=document.createElement("polyresinuncustomized");return function(y,B,G,P){if(!P&&P!==document.all)return P;var S=y.nodeType;if(S!==Node.ELEMENT_NODE){if(S===Node.TEXT_NODE){S=y.parentElement;B=!S;if(S&&S.nodeType===Node.ELEMENT_NODE)switch(G=S.localName,le(G,S.constructor)){case 0:case 1:S=Object.hasOwnProperty.call(be,G)?be[G]:null;B=1===S||6===S;break;case 3:case 2:B=!0;}if(B)return""+d(P,"STRING",P)}c&&c(!0,"Failed to sanitize %s %s%s node to value %O",
y.parentElement&&y.parentElement.nodeName,"#text","",P);return"zClosurez"}S=y.localName;var ca=y.localName;if(y.getAttribute("is")||2!==le(ca,y.constructor)){var Ja=p[ca];Ja||(Ja=p[ca]=document.createElement(ca));ca=Ja}else ca=x;switch(G){case"attribute":Ja=String(B).toLowerCase();var Ya=ge()[Ja];if(("string"===typeof Ya?Ya:Cd(Ja))in ca)break;return P;case"property":if(B in ca)break;Ja=B.toLowerCase();Ja=ge()[Ja];if((Ja="string"===typeof Ja?Ja:null)&&Ja in ca)break;return P;default:throw Error(G+
": "+typeof G);}"attribute"==G?B=B.toLowerCase():(G=he,G||(G=ge(),G=he=u.transpose(G)),G=G[B],B="string"===typeof G?G:Dd(B));a:{y=r(b,y);if(Object.hasOwnProperty.call(ae,S)&&(G=ae[S],Object.hasOwnProperty.call(G,B)&&(G=G[B],G instanceof Array))){ca=null;Ja=!1;Ya=0;for(var Mb=G.length;Ya<Mb;++Ya){var Vb=G[Ya],Y=Vb.contingentAttribute;if(!Y){ca=Vb.contract;break a}null===ca&&(ca={});Y=Object.hasOwnProperty.call(ca,Y)?ca[Y]:ca[Y]=y(Y);if(Y===Vb.requiredValue){ca=Vb.contract;break a}null==Y&&(Ja=!0)}if(Ja){ca=
null;break a}}y=aba[B];ca="number"===typeof y?y:null}G=m;y=null;null!=ca&&(ca=n[ca],Ja=ca.safeType,y=ca.safeReplacement,Ja&&(G=d(P,Ja,m)),G===m&&(ca.filterString?(G=""+d(P,"STRING",P),G=ca.filterString(S,B,G)):ca.filterRaw&&(G=ca.filterRaw(S,B,P)),G===y&&(G=m)));G===m&&(G=y||"zClosurez",c&&c(!0,"Failed to sanitize attribute of <%s>: <%s %s=\"%O\">",S,S,B,P));return G}},mba=function(){var a=Od,b=pe(lba);
return function(c,d,e,g){c=a?a(c,d,e,g):c;return g?b(g,d,e,c):"zClosurez"}};var qe=window.yt&&window.yt.config_||window.ytcfg&&window.ytcfg.data_||{};Na("yt.config_",qe,void 0);function re(a){var b=arguments;1<b.length?qe[b[0]]=b[1]:1===b.length&&Object.assign(qe,b[0])}
function z(a,b){return a in qe?qe[a]:b}
function se(a,b){return!!z(a,b)}
function te(a){var b=qe.EXPERIMENT_FLAGS;return b?b[a]:void 0}
;var ue={};function ve(a){return a&&window.yterr?function(){try{return a.apply(this,arguments)}catch(b){we(b)}}:a}
function we(a,b,c,d,e){var g=Sa("yt.logging.errors.log");g?g(a,b,c,d,e):(g=z("ERRORS",[]),g.push([a,b,c,d,e]),re("ERRORS",g))}
function xe(a,b){we(a,"WARNING",b,void 0,void 0)}
function ye(a){a instanceof Error?we(a):(a=$a(a)?JSON.stringify(a):String(a),xe(ze(a,"RejectedPromiseError")))}
function ze(a,b){a=Error(a);a.name=b;return a}
;var lba={allowedIdentifierPrefixes:[""],reportHandler:function(a,b){if(a){var c=2;a=b.replace(/%\w/g,function(){return arguments[c++]});
try{throw Error(a)}catch(d){we(d)}}},
safeTypesBridge:function(a,b,c){var d=eba[b];return a instanceof d.typeToUnwrap&&(d=d.unwrap(a,c),d!==c)?d:(0,fba[b])(""+me(a),c)}};function A(a){return!!Ae(a)}
function Be(a,b){a=Ae(a);return void 0===a&&void 0!==b?b:Number(a||0)}
function nba(a){a=Ae(a);return Wa(a)?pb(a,function(b){return Number(b||0)}):[Number(a||0)]}
function Ce(a){return String(Ae(a)||"")}
function De(a){a=Ae(a);return Wa(a)?pb(a,function(b){return String(b||"")}):[String(a||"")]}
function Ae(a){return z("EXPERIMENT_FLAGS",{})[a]}
;if(A("enable_polymer_resin")){var Ee=mba();Od=Ee;if(Od!==Ee)throw Error("Cannot install sanitizeDOMValue. Is Polymer frozen?")};var Fe=document,Ge=window;var He=function(a){for(var b=[],c=0,d=0;d<a.length;d++){var e=a.charCodeAt(d);255<e&&(b[c++]=e&255,e>>=8);b[c++]=e}return b},oba=function(a){if(8192>=a.length)return String.fromCharCode.apply(null,a);
for(var b="",c=0;c<a.length;c+=8192)b+=String.fromCharCode.apply(null,Eb(a,c,c+8192));return b};var Ie=function(){return Nc("iPhone")&&!Nc("iPod")&&!Nc("iPad")},Je=function(){return Ie()||Nc("iPad")||Nc("iPod")};var Ke=function(a){Ke[" "](a);return a};
Ke[" "]=Ta;var Le=function(a,b){try{return Ke(a[b]),!0}catch(c){}return!1},qba=function(a,b){var c=pba;
return Object.prototype.hasOwnProperty.call(c,a)?c[a]:c[a]=b(a)};var Me=Nc("Opera"),Ne=Oc(),Oe=Nc("Edge"),Pe=Oe||Ne,Qe=Nc("Gecko")&&!(qc(Kc,"WebKit")&&!Nc("Edge"))&&!(Nc("Trident")||Nc("MSIE"))&&!Nc("Edge"),Re=qc(Kc,"WebKit")&&!Nc("Edge"),rba=Re&&Nc("Mobile"),Se=Nc("Macintosh"),sba=Nc("Windows"),tba=Nc("Linux")||Nc("CrOS"),Te=q.navigator||null;Te&&pc(Te.appVersion||"","X11");var uba=Nc("Android"),vba=Ie(),wba=Nc("iPad"),xba=Nc("iPod"),yba=Je();qc(Kc,"KaiOS");qc(Kc,"GAFP");var Ue=function(){var a=q.document;return a?a.documentMode:void 0},Ve;
a:{var We="",Xe=function(){var a=Kc;if(Qe)return /rv:([^\);]+)(\)|;)/.exec(a);if(Oe)return /Edge\/([\d\.]+)/.exec(a);if(Ne)return /\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(a);if(Re)return /WebKit\/(\S+)/.exec(a);if(Me)return /(?:Version)[ \/]?(\S+)/.exec(a)}();
Xe&&(We=Xe?Xe[1]:"");if(Ne){var Ye=Ue();if(null!=Ye&&Ye>parseFloat(We)){Ve=String(Ye);break a}}Ve=We}var Ze=Ve,pba={},$e=function(a){return qba(a,function(){return 0<=sc(Ze,a)})},af=function(a){return Number(zba)>=a},bf;
bf=q.document&&Ne?Ue():void 0;var zba=bf;var cf=Pc(),Aba=Ie()||Nc("iPod"),Bba=Nc("iPad"),Cba=Sc(),df=Qc(),ef=Rc()&&!Je();var ff={},gf=null,Dba=Qe||Re&&!ef||Me||"function"==typeof q.btoa,jf=function(a,b){void 0===b&&(b=0);hf();b=ff[b];for(var c=[],d=0;d<a.length;d+=3){var e=a[d],g=d+1<a.length,h=g?a[d+1]:0,m=d+2<a.length,n=m?a[d+2]:0,p=e>>2;e=(e&3)<<4|h>>4;h=(h&15)<<2|n>>6;n&=63;m||(n=64,g||(h=64));c.push(b[p],b[e],b[h]||"",b[n]||"")}return c.join("")},kf=function(a,b){return Dba&&!b?q.btoa(a):jf(He(a),b)},lf=function(a){var b=a.length,c=3*b/4;
c%3?c=Math.floor(c):pc("=.",a[b-1])&&(c=pc("=.",a[b-2])?c-2:c-1);var d=new Uint8Array(c),e=0;Eba(a,function(g){d[e++]=g});
return d.subarray(0,e)},Eba=function(a,b){function c(n){for(;d<a.length;){var p=a.charAt(d++),x=gf[p];
if(null!=x)return x;if(!gc(p))throw Error("Unknown base64 encoding at char: "+p)}return n}
hf();for(var d=0;;){var e=c(-1),g=c(0),h=c(64),m=c(64);if(64===m&&-1===e)break;b(e<<2|g>>4);64!=h&&(b(g<<4&240|h>>2),64!=m&&b(h<<6&192|m))}},hf=function(){if(!gf){gf={};
for(var a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""),b=["+/=","+/","-_=","-_.","-_"],c=0;5>c;c++){var d=a.concat(b[c].split(""));ff[c]=d;for(var e=0;e<d.length;e++){var g=d[e];void 0===gf[g]&&(gf[g]=e)}}}};var mf=0,nf=0,of=function(a){var b=a>>>0;a=Math.floor((a-b)/4294967296)>>>0;mf=b;nf=a},pf=function(a){var b=0>a;
a=Math.abs(a);var c=a>>>0;a=Math.floor((a-c)/4294967296);a>>>=0;b&&(a=~a>>>0,c=(~c>>>0)+1,4294967295<c&&(c=0,a++,4294967295<a&&(a=0)));mf=c;nf=a},qf=function(a){var b=0>a;
a=2*Math.abs(a);of(a);a=mf;var c=nf;b&&(0==a?0==c?c=a=4294967295:(c--,a=4294967295):a--);mf=a;nf=c},rf=function(a){var b=a.charCodeAt(4),c=a.charCodeAt(5),d=a.charCodeAt(6),e=a.charCodeAt(7);
mf=a.charCodeAt(0)+(a.charCodeAt(1)<<8)+(a.charCodeAt(2)<<16)+(a.charCodeAt(3)<<24)>>>0;nf=b+(c<<8)+(d<<16)+(e<<24)>>>0},sf=function(a,b,c){var d=b>>31;
c(a<<1^d,(b<<1|a>>>31)^d)},tf=function(a){function b(h,m){for(var n=0;8>n&&(1!==h||0<m);n++)m=h*e[n]+m,e[n]=m&255,m>>>=8}
function c(){for(var h=0;8>h;h++)e[h]=~e[h]&255}
var d=!1;"-"===a[0]&&(d=!0,a=a.slice(1));for(var e=[0,0,0,0,0,0,0,0],g=0;g<a.length;g++)b(10,a.charCodeAt(g)-48);d&&(c(),b(1,1));return oba(e)};var uf=function(a,b){this.lo=a;this.hi=b};
uf.prototype.cmp=function(a){return this.hi<a.hi||this.hi==a.hi&&this.lo<a.lo?-1:this.hi==a.hi&&this.lo==a.lo?0:1};
var vf=function(a){return new uf((a.lo>>>1|(a.hi&1)<<31)>>>0,a.hi>>>1>>>0)},xf=function(a){return new uf(a.lo<<1>>>0,(a.hi<<1|a.lo>>>31)>>>0)};
uf.prototype.lsb=function(){return!!(this.lo&1)};
uf.prototype.add=function(a){return new uf((this.lo+a.lo&4294967295)>>>0>>>0,((this.hi+a.hi&4294967295)>>>0)+(4294967296<=this.lo+a.lo?1:0)>>>0)};
uf.prototype.sub=function(a){return new uf((this.lo-a.lo&4294967295)>>>0>>>0,((this.hi-a.hi&4294967295)>>>0)-(0>this.lo-a.lo?1:0)>>>0)};
var yf=function(a){var b=a&65535,c=a>>>16;a=10*b+65536*(0*b&65535)+65536*(10*c&65535);for(b=0*c+(0*b>>>16)+(10*c>>>16);4294967296<=a;)a-=4294967296,b+=1;return new uf(a>>>0,b>>>0)};
uf.prototype.div=function(a){if(0==a)return[];for(var b=new uf(0,0),c=new uf(this.lo,this.hi),d=new uf(a,0),e=new uf(1,0);!(d.hi&2147483648);)d=xf(d),e=xf(e);for(;0!=e.lo||0!=e.hi;)0>=d.cmp(c)&&(b=b.add(e),c=c.sub(d)),d=vf(d),e=vf(e);return[b,c]};
uf.prototype.toString=function(){for(var a="",b=this;0!=b.lo||0!=b.hi;){b=b.div(10);var c=b[0];a=b[1].lo+a;b=c}""==a&&(a="0");return a};
var zf=function(a){for(var b=new uf(0,0),c=new uf(0,0),d=0;d<a.length;d++){if("0">a[d]||"9"<a[d])return null;c.lo=parseInt(a[d],10);var e=yf(b.lo);b=yf(b.hi);b.hi=b.lo;b.lo=0;b=e.add(b).add(c)}return b};
uf.prototype.clone=function(){return new uf(this.lo,this.hi)};
var Af=function(a,b){this.lo=a;this.hi=b};
Af.prototype.add=function(a){return new Af((this.lo+a.lo&4294967295)>>>0>>>0,((this.hi+a.hi&4294967295)>>>0)+(4294967296<=this.lo+a.lo?1:0)>>>0)};
Af.prototype.sub=function(a){return new Af((this.lo-a.lo&4294967295)>>>0>>>0,((this.hi-a.hi&4294967295)>>>0)-(0>this.lo-a.lo?1:0)>>>0)};
Af.prototype.clone=function(){return new Af(this.lo,this.hi)};
Af.prototype.toString=function(){var a=0!=(this.hi&2147483648),b=new uf(this.lo,this.hi);a&&(b=new uf(0,0).sub(b));return(a?"-":"")+b.toString()};
var Bf=function(a){var b=0<a.length&&"-"==a[0];b&&(a=a.substring(1));a=zf(a);if(null===a)return null;b&&(a=new uf(0,0).sub(a));return new Af(a.lo,a.hi)};var Cf=function(){this.buffer_=[]};
Cf.prototype.length=function(){return this.buffer_.length};
Cf.prototype.end=function(){var a=this.buffer_;this.buffer_=[];return a};
Cf.prototype.writeSplitVarint64=function(a,b){for(;0<b||127<a;)this.buffer_.push(a&127|128),a=(a>>>7|b<<25)>>>0,b>>>=7;this.buffer_.push(a)};
Cf.prototype.writeSplitFixed64=function(a,b){this.writeUint32(a);this.writeUint32(b)};
var Df=function(a,b){for(;127<b;)a.buffer_.push(b&127|128),b>>>=7;a.buffer_.push(b)},Ef=function(a,b){if(0<=b)Df(a,b);else
{for(var c=0;9>c;c++)a.buffer_.push(b&127|128),b>>=7;a.buffer_.push(1)}},Ff=function(a,b){Df(a,(b<<1^b>>31)>>>0)},Gf=function(a,b){rf(b);
sf(mf,nf,function(c,d){a.writeSplitVarint64(c>>>0,d>>>0)})};
f=Cf.prototype;f.writeUint8=function(a){this.buffer_.push(a>>>0&255)};
f.writeUint16=function(a){this.buffer_.push(a>>>0&255);this.buffer_.push(a>>>8&255)};
f.writeUint32=function(a){this.buffer_.push(a>>>0&255);this.buffer_.push(a>>>8&255);this.buffer_.push(a>>>16&255);this.buffer_.push(a>>>24&255)};
f.writeUint64=function(a){of(a);this.writeUint32(mf);this.writeUint32(nf)};
f.writeInt8=function(a){this.buffer_.push(a>>>0&255)};
f.writeInt16=function(a){this.buffer_.push(a>>>0&255);this.buffer_.push(a>>>8&255)};
f.writeInt32=function(a){this.buffer_.push(a>>>0&255);this.buffer_.push(a>>>8&255);this.buffer_.push(a>>>16&255);this.buffer_.push(a>>>24&255)};
f.writeInt64=function(a){pf(a);this.writeSplitFixed64(mf,nf)};
f.writeInt64String=function(a){rf(tf(a));this.writeSplitFixed64(mf,nf)};
f.writeFloat=function(a){var b=a;b=(a=0>b?1:0)?-b:b;if(0===b)0<1/b?mf=nf=0:(nf=0,mf=2147483648);else if(isNaN(b))nf=0,mf=2147483647;else if(3.4028234663852886E38<b)nf=0,mf=(a<<31|2139095040)>>>0;else if(1.1754943508222875e-38>b)b=Math.round(b/Math.pow(2,-149)),nf=0,mf=(a<<31|b)>>>0;else{var c=Math.floor(Math.log(b)/Math.LN2);b*=Math.pow(2,-c);b=Math.round(8388608*b)&8388607;nf=0;mf=(a<<31|c+127<<23|b)>>>0}this.writeUint32(mf)};
f.writeDouble=function(a){var b=a;b=(a=0>b?1:0)?-b:b;if(0===b)nf=0<1/b?0:2147483648,mf=0;else if(isNaN(b))nf=2147483647,mf=4294967295;else if(1.7976931348623157E308<b)nf=(a<<31|2146435072)>>>0,mf=0;else if(2.2250738585072014e-308>b)b/=Math.pow(2,-1074),nf=(a<<31|b/4294967296)>>>0,mf=b>>>0;else{var c=b,d=0;if(2<=c)for(;2<=c&&1023>d;)d++,c/=2;else for(;1>c&&-1022<d;)c*=2,d--;b*=Math.pow(2,-d);nf=(a<<31|d+1023<<20|1048576*b&1048575)>>>0;mf=4503599627370496*b>>>0}this.writeUint32(mf);this.writeUint32(nf)};
f.writeBool=function(a){this.buffer_.push(a?1:0)};
f.writeEnum=function(a){Ef(this,a)};
f.writeBytes=function(a){this.buffer_.push.apply(this.buffer_,a)};
f.writeVarintHash64=function(a){rf(a);this.writeSplitVarint64(mf,nf)};
f.writeFixedHash64=function(a){rf(a);this.writeUint32(mf);this.writeUint32(nf)};
f.writeString=function(a){for(var b=this.buffer_.length,c=0;c<a.length;c++){var d=a.charCodeAt(c);if(128>d)this.buffer_.push(d);else if(2048>d)this.buffer_.push(d>>6|192),this.buffer_.push(d&63|128);else if(65536>d)if(55296<=d&&56319>=d&&c+1<a.length){var e=a.charCodeAt(c+1);56320<=e&&57343>=e&&(d=1024*(d-55296)+e-56320+65536,this.buffer_.push(d>>18|240),this.buffer_.push(d>>12&63|128),this.buffer_.push(d>>6&63|128),this.buffer_.push(d&63|128),c++)}else this.buffer_.push(d>>12|224),this.buffer_.push(d>>
6&63|128),this.buffer_.push(d&63|128)}return this.buffer_.length-b};var Hf=function(){this.blocks_=[];this.totalLength_=0;this.encoder_=new Cf;this.bookmarks_=[]},If=function(a,b){var c=a.encoder_.end();
a.blocks_.push(c);a.blocks_.push(b);a.totalLength_+=c.length+b.length},Kf=function(a,b){Jf(a,b,2);
b=a.encoder_.end();a.blocks_.push(b);a.totalLength_+=b.length;b.push(a.totalLength_);return b},Lf=function(a,b){var c=b.pop();
for(c=a.totalLength_+a.encoder_.length()-c;127<c;)b.push(c&127|128),c>>>=7,a.totalLength_++;b.push(c);a.totalLength_++};
Hf.prototype.maybeWriteSerializedMessage=function(a,b,c){null!=a&&null!=b&&null!=c&&If(this,a.subarray(b,c))};
Hf.prototype.reset=function(){this.blocks_=[];this.encoder_.end();this.totalLength_=0;this.bookmarks_=[]};
var Nf=function(a){for(var b=new Uint8Array(a.totalLength_+a.encoder_.length()),c=a.blocks_,d=c.length,e=0,g=0;g<d;g++){var h=c[g];b.set(h,e);e+=h.length}c=a.encoder_.end();b.set(c,e);a.blocks_=[b];return b};
Hf.prototype.getResultBase64String=function(a){return jf(Nf(this),a)};
var Jf=function(a,b,c){Df(a.encoder_,8*b+c)};
Hf.prototype.writeAny=function(a,b,c){switch(a){case 1:this.writeDouble(b,c);break;case 2:this.writeFloat(b,c);break;case 3:this.writeInt64(b,c);break;case 4:this.writeUint64(b,c);break;case 5:this.writeInt32(b,c);break;case 6:Of(this,b,c);break;case 7:null!=c&&(Jf(this,b,5),this.encoder_.writeUint32(c));break;case 8:this.writeBool(b,c);break;case 9:this.writeString(b,c);break;case 12:this.writeBytes(b,c);break;case 13:this.writeUint32(b,c);break;case 14:this.writeEnum(b,c);break;case 15:null!=c&&(
Jf(this,b,5),this.encoder_.writeInt32(c));break;case 16:null!=c&&(Jf(this,b,1),this.encoder_.writeInt64(c));break;case 17:null!=c&&null!=c&&(Jf(this,b,0),Ff(this.encoder_,c));break;case 18:null!=c&&null!=c&&(Jf(this,b,0),a=this.encoder_,qf(c),a.writeSplitVarint64(mf,nf));break;case 30:this.writeFixedHash64(b,c);break;case 31:this.writeVarintHash64(b,c);}};
var Pf=function(a,b,c){null!=c&&(Jf(a,b,0),Df(a.encoder_,c))},Qf=function(a,b,c){null!=c&&(Jf(a,b,0),Ef(a.encoder_,c))};
f=Hf.prototype;f.writeInt32=function(a,b){null!=b&&Qf(this,a,b)};
f.writeInt64=function(a,b){null!=b&&null!=b&&(Jf(this,a,0),a=this.encoder_,pf(b),a.writeSplitVarint64(mf,nf))};
f.writeInt64String=function(a,b){null!=b&&(b=Bf(b),Jf(this,a,0),this.encoder_.writeSplitVarint64(b.lo,b.hi))};
f.writeUint32=function(a,b){null!=b&&Pf(this,a,b)};
f.writeUint64=function(a,b){null!=b&&null!=b&&(Jf(this,a,0),a=this.encoder_,pf(b),a.writeSplitVarint64(mf,nf))};
f.writeSintHash64=function(a,b){null!=b&&null!=b&&(Jf(this,a,0),Gf(this.encoder_,b))};
f.writeSint64String=function(a,b){null!=b&&null!=b&&(Jf(this,a,0),Gf(this.encoder_,tf(b)))};
var Of=function(a,b,c){null!=c&&(Jf(a,b,1),a.encoder_.writeUint64(c))};
f=Hf.prototype;f.writeFloat=function(a,b){null!=b&&(Jf(this,a,5),this.encoder_.writeFloat(b))};
f.writeDouble=function(a,b){null!=b&&(Jf(this,a,1),this.encoder_.writeDouble(b))};
f.writeBool=function(a,b){null!=b&&(Jf(this,a,0),this.encoder_.writeBool(b))};
f.writeEnum=function(a,b){null!=b&&(Jf(this,a,0),Ef(this.encoder_,b))};
f.writeString=function(a,b){null!=b&&(a=Kf(this,a),this.encoder_.writeString(b),Lf(this,a))};
f.writeBytes=function(a,b){null!=b&&(b=b.constructor===Uint8Array?b:b.constructor===ArrayBuffer?new Uint8Array(b):b.constructor===Array?new Uint8Array(b):b.constructor===String?lf(b):new Uint8Array(0),Jf(this,a,2),Df(this.encoder_,b.length),If(this,b))};
var Rf=function(a,b,c,d){null!=c&&(b=Kf(a,b),d(c,a),Lf(a,b))};
f=Hf.prototype;f.writeMessageSet=function(a,b,c){null!=b&&(Jf(this,1,3),Jf(this,2,0),Ef(this.encoder_,a),a=Kf(this,3),c(b,this),Lf(this,a),Jf(this,1,4))};
f.writeGroup=function(a,b,c){null!=b&&(Jf(this,a,3),c(b,this),Jf(this,a,4))};
f.writeFixedHash64=function(a,b){null!=b&&(Jf(this,a,1),this.encoder_.writeFixedHash64(b))};
f.writeVarintHash64=function(a,b){null!=b&&(Jf(this,a,0),this.encoder_.writeVarintHash64(b))};
f.writeSplitFixed64=function(a,b,c){Jf(this,a,1);this.encoder_.writeSplitFixed64(b,c)};
f.writeSplitVarint64=function(a,b,c){Jf(this,a,0);this.encoder_.writeSplitVarint64(b,c)};
var Fba=function(a,b,c,d){Jf(a,b,0);var e=a.encoder_;sf(c,d,function(g,h){e.writeSplitVarint64(g>>>0,h>>>0)})};
f=Hf.prototype;f.writeRepeatedInt32=function(a,b){if(null!=b)for(var c=0;c<b.length;c++)Qf(this,a,b[c])};
f.writeRepeatedInt32String=function(a,b){if(null!=b)for(var c=0;c<b.length;c++){var d=b[c];null!=d&&Qf(this,a,parseInt(d,10))}};
f.writeRepeatedInt64=function(a,b){if(null!=b)for(var c=0;c<b.length;c++){var d=b[c];if(null!=d){Jf(this,a,0);var e=this.encoder_;pf(d);e.writeSplitVarint64(mf,nf)}}};
f.writeRepeatedSplitFixed64=function(a,b,c,d){if(null!=b)for(var e=0;e<b.length;e++)this.writeSplitFixed64(a,c(b[e]),d(b[e]))};
f.writeRepeatedSplitVarint64=function(a,b,c,d){if(null!=b)for(var e=0;e<b.length;e++)this.writeSplitVarint64(a,c(b[e]),d(b[e]))};
f.writeRepeatedSplitZigzagVarint64=function(a,b,c,d){if(null!=b)for(var e=0;e<b.length;e++)Fba(this,a,c(b[e]),d(b[e]))};
f.writeRepeatedInt64String=function(a,b){if(null!=b)for(var c=0;c<b.length;c++)this.writeInt64String(a,b[c])};
f.writeRepeatedUint32=function(a,b){if(null!=b)for(var c=0;c<b.length;c++)Pf(this,a,b[c])};
f.writeRepeatedUint32String=function(a,b){if(null!=b)for(var c=0;c<b.length;c++){var d=b[c];null!=d&&Pf(this,a,parseInt(d,10))}};
f.writeRepeatedUint64=function(a,b){if(null!=b)for(var c=0;c<b.length;c++){var d=b[c];if(null!=d){Jf(this,a,0);var e=this.encoder_;pf(d);e.writeSplitVarint64(mf,nf)}}};
f.writeRepeatedUint64String=function(a,b){if(null!=b)for(var c=0;c<b.length;c++){var d=a,e=b[c];null!=e&&(e=zf(e),Jf(this,d,0),this.encoder_.writeSplitVarint64(e.lo,e.hi))}};
f.writeRepeatedSint32=function(a,b){if(null!=b)for(var c=0;c<b.length;c++){var d=b[c];null!=d&&(Jf(this,a,0),Ff(this.encoder_,d))}};
f.writeRepeatedSint64=function(a,b){if(null!=b)for(var c=0;c<b.length;c++){var d=b[c];if(null!=d){Jf(this,a,0);var e=this.encoder_;qf(d);e.writeSplitVarint64(mf,nf)}}};
f.writeRepeatedSint64String=function(a,b){if(null!=b)for(var c=0;c<b.length;c++){var d=b[c];null!=d&&(Jf(this,a,0),Gf(this.encoder_,tf(d)))}};
f.writeRepeatedSintHash64=function(a,b){if(null!=b)for(var c=0;c<b.length;c++){var d=b[c];null!=d&&(Jf(this,a,0),Gf(this.encoder_,d))}};
f.writeRepeatedFixed32=function(a,b){if(null!=b)for(var c=0;c<b.length;c++){var d=b[c];null!=d&&(Jf(this,a,5),this.encoder_.writeUint32(d))}};
f.writeRepeatedFixed64String=function(a,b){if(null!=b)for(var c=0;c<b.length;c++){var d=a,e=b[c];null!=e&&(e=zf(e),Jf(this,d,1),this.encoder_.writeSplitFixed64(e.lo,e.hi))}};
f.writeRepeatedSfixed32=function(a,b){if(null!=b)for(var c=0;c<b.length;c++){var d=b[c];null!=d&&(Jf(this,a,5),this.encoder_.writeInt32(d))}};
f.writeRepeatedSfixed64=function(a,b){if(null!=b)for(var c=0;c<b.length;c++){var d=b[c];null!=d&&(Jf(this,a,1),this.encoder_.writeInt64(d))}};
f.writeRepeatedSfixed64String=function(a,b){if(null!=b)for(var c=0;c<b.length;c++){var d=a,e=b[c];null!=e&&(e=Bf(e),Jf(this,d,1),this.encoder_.writeSplitFixed64(e.lo,e.hi))}};
f.writeRepeatedFloat=function(a,b){if(null!=b)for(var c=0;c<b.length;c++)this.writeFloat(a,b[c])};
f.writeRepeatedDouble=function(a,b){if(null!=b)for(var c=0;c<b.length;c++)this.writeDouble(a,b[c])};
f.writeRepeatedBool=function(a,b){if(null!=b)for(var c=0;c<b.length;c++)this.writeBool(a,b[c])};
f.writeRepeatedEnum=function(a,b){if(null!=b)for(var c=0;c<b.length;c++)this.writeEnum(a,b[c])};
var Sf=function(a,b,c){if(null!=c)for(var d=0;d<c.length;d++)a.writeString(b,c[d])};
Hf.prototype.writeRepeatedBytes=function(a,b){if(null!=b)for(var c=0;c<b.length;c++)this.writeBytes(a,b[c])};
var Tf=function(a,b,c,d){if(null!=c)for(var e=0;e<c.length;e++){var g=Kf(a,b);d(c[e],a);Lf(a,g)}};
f=Hf.prototype;f.writeRepeatedGroup=function(a,b,c){if(null!=b)for(var d=0;d<b.length;d++)Jf(this,a,3),c(b[d],this),Jf(this,a,4)};
f.writeRepeatedFixedHash64=function(a,b){if(null!=b)for(var c=0;c<b.length;c++)this.writeFixedHash64(a,b[c])};
f.writeRepeatedVarintHash64=function(a,b){if(null!=b)for(var c=0;c<b.length;c++)this.writeVarintHash64(a,b[c])};
f.writePackedInt32=function(a,b){if(null!=b&&b.length){a=Kf(this,a);for(var c=0;c<b.length;c++)Ef(this.encoder_,b[c]);Lf(this,a)}};
f.writePackedInt32String=function(a,b){if(null!=b&&b.length){a=Kf(this,a);for(var c=0;c<b.length;c++)Ef(this.encoder_,parseInt(b[c],10));Lf(this,a)}};
f.writePackedInt64=function(a,b){if(null!=b&&b.length){a=Kf(this,a);for(var c=0;c<b.length;c++){var d=this.encoder_;pf(b[c]);d.writeSplitVarint64(mf,nf)}Lf(this,a)}};
f.writePackedSplitFixed64=function(a,b,c,d){if(null!=b){a=Kf(this,a);for(var e=0;e<b.length;e++)this.encoder_.writeSplitFixed64(c(b[e]),d(b[e]));Lf(this,a)}};
f.writePackedSplitVarint64=function(a,b,c,d){if(null!=b){a=Kf(this,a);for(var e=0;e<b.length;e++)this.encoder_.writeSplitVarint64(c(b[e]),d(b[e]));Lf(this,a)}};
f.writePackedSplitZigzagVarint64=function(a,b,c,d){if(null!=b){a=Kf(this,a);for(var e=this.encoder_,g=0;g<b.length;g++)sf(c(b[g]),d(b[g]),function(h,m){e.writeSplitVarint64(h>>>0,m>>>0)});
Lf(this,a)}};
f.writePackedInt64String=function(a,b){if(null!=b&&b.length){a=Kf(this,a);for(var c=0;c<b.length;c++){var d=Bf(b[c]);this.encoder_.writeSplitVarint64(d.lo,d.hi)}Lf(this,a)}};
f.writePackedUint32=function(a,b){if(null!=b&&b.length){a=Kf(this,a);for(var c=0;c<b.length;c++)Df(this.encoder_,b[c]);Lf(this,a)}};
f.writePackedUint32String=function(a,b){if(null!=b&&b.length){a=Kf(this,a);for(var c=0;c<b.length;c++)Df(this.encoder_,parseInt(b[c],10));Lf(this,a)}};
f.writePackedUint64=function(a,b){if(null!=b&&b.length){a=Kf(this,a);for(var c=0;c<b.length;c++){var d=this.encoder_;pf(b[c]);d.writeSplitVarint64(mf,nf)}Lf(this,a)}};
f.writePackedUint64String=function(a,b){if(null!=b&&b.length){a=Kf(this,a);for(var c=0;c<b.length;c++){var d=zf(b[c]);this.encoder_.writeSplitVarint64(d.lo,d.hi)}Lf(this,a)}};
f.writePackedSint32=function(a,b){if(null!=b&&b.length){a=Kf(this,a);for(var c=0;c<b.length;c++)Ff(this.encoder_,b[c]);Lf(this,a)}};
f.writePackedSint64=function(a,b){if(null!=b&&b.length){a=Kf(this,a);for(var c=0;c<b.length;c++){var d=this.encoder_;qf(b[c]);d.writeSplitVarint64(mf,nf)}Lf(this,a)}};
f.writePackedSint64String=function(a,b){if(null!=b&&b.length){a=Kf(this,a);for(var c=0;c<b.length;c++)Gf(this.encoder_,tf(b[c]));Lf(this,a)}};
f.writePackedSintHash64=function(a,b){if(null!=b&&b.length){a=Kf(this,a);for(var c=0;c<b.length;c++)Gf(this.encoder_,b[c]);Lf(this,a)}};
f.writePackedFixed32=function(a,b){if(null!=b&&b.length)for(Jf(this,a,2),Df(this.encoder_,4*b.length),a=0;a<b.length;a++)this.encoder_.writeUint32(b[a])};
f.writePackedFixed64=function(a,b){if(null!=b&&b.length)for(Jf(this,a,2),Df(this.encoder_,8*b.length),a=0;a<b.length;a++)this.encoder_.writeUint64(b[a])};
f.writePackedFixed64String=function(a,b){if(null!=b&&b.length)for(Jf(this,a,2),Df(this.encoder_,8*b.length),a=0;a<b.length;a++){var c=zf(b[a]);this.encoder_.writeSplitFixed64(c.lo,c.hi)}};
f.writePackedSfixed32=function(a,b){if(null!=b&&b.length)for(Jf(this,a,2),Df(this.encoder_,4*b.length),a=0;a<b.length;a++)this.encoder_.writeInt32(b[a])};
f.writePackedSfixed64=function(a,b){if(null!=b&&b.length)for(Jf(this,a,2),Df(this.encoder_,8*b.length),a=0;a<b.length;a++)this.encoder_.writeInt64(b[a])};
f.writePackedSfixed64String=function(a,b){if(null!=b&&b.length)for(Jf(this,a,2),Df(this.encoder_,8*b.length),a=0;a<b.length;a++)this.encoder_.writeInt64String(b[a])};
f.writePackedFloat=function(a,b){if(null!=b&&b.length)for(Jf(this,a,2),Df(this.encoder_,4*b.length),a=0;a<b.length;a++)this.encoder_.writeFloat(b[a])};
f.writePackedDouble=function(a,b){if(null!=b&&b.length)for(Jf(this,a,2),Df(this.encoder_,8*b.length),a=0;a<b.length;a++)this.encoder_.writeDouble(b[a])};
f.writePackedBool=function(a,b){if(null!=b&&b.length)for(Jf(this,a,2),Df(this.encoder_,b.length),a=0;a<b.length;a++)this.encoder_.writeBool(b[a])};
var Uf=function(a,b,c){if(null!=c&&c.length){b=Kf(a,b);for(var d=0;d<c.length;d++)a.encoder_.writeEnum(c[d]);Lf(a,b)}};
Hf.prototype.writePackedFixedHash64=function(a,b){if(null!=b&&b.length)for(Jf(this,a,2),Df(this.encoder_,8*b.length),a=0;a<b.length;a++)this.encoder_.writeFixedHash64(b[a])};
Hf.prototype.writePackedVarintHash64=function(a,b){if(null!=b&&b.length){a=Kf(this,a);for(var c=0;c<b.length;c++)this.encoder_.writeVarintHash64(b[c]);Lf(this,a)}};var Wf=function(a){this.arr_=a;this.valueCtor_=null;this.map_={};this.arrClean=!0;if(0<this.arr_.length){for(a=0;a<this.arr_.length;a++){var b=this.arr_[a],c=b[0];this.map_[c.toString()]=new Vf(c,b[1])}this.arrClean=!0}};
Wf.prototype.toArray=function(){if(this.arrClean){if(this.valueCtor_){var a=this.map_,b;for(b in a)if(Object.prototype.hasOwnProperty.call(a,b)){var c=a[b].valueWrapper;c&&c.toArray()}}}else{this.arr_.length=0;a=Xf(this);a.sort();for(b=0;b<a.length;b++){var d=this.map_[a[b]];(c=d.valueWrapper)&&c.toArray();this.arr_.push([d.key,d.value])}this.arrClean=!0}return this.arr_};
Wf.prototype.toObject=function(a,b){for(var c=this.toArray(),d=[],e=0;e<c.length;e++){var g=this.map_[c[e][0].toString()];Yf(this,g);var h=g.valueWrapper;h?d.push([g.key,b(a,h)]):d.push([g.key,g.value])}return d};
var Zf=function(a){this.idx_=0;this.arr_=a};
Zf.prototype.next=function(){return this.idx_<this.arr_.length?{done:!1,value:this.arr_[this.idx_++]}:{done:!0,value:void 0}};
"undefined"!=typeof Symbol&&(Zf.prototype[Symbol.iterator]=function(){return this});
f=Wf.prototype;f.getLength=function(){return Xf(this).length};
f.clear=function(){this.map_={};this.arrClean=!1};
f.del=function(a){a=a.toString();var b=this.map_.hasOwnProperty(a);delete this.map_[a];this.arrClean=!1;return b};
f.getEntryList=function(){var a=[],b=Xf(this);b.sort();for(var c=0;c<b.length;c++){var d=this.map_[b[c]];a.push([d.key,d.value])}return a};
f.entries=function(){var a=[],b=Xf(this);b.sort();for(var c=0;c<b.length;c++){var d=this.map_[b[c]];a.push([d.key,Yf(this,d)])}return new Zf(a)};
f.keys=function(){var a=[],b=Xf(this);b.sort();for(var c=0;c<b.length;c++)a.push(this.map_[b[c]].key);return new Zf(a)};
f.values=function(){var a=[],b=Xf(this);b.sort();for(var c=0;c<b.length;c++)a.push(Yf(this,this.map_[b[c]]));return new Zf(a)};
f.forEach=function(a,b){var c=Xf(this);c.sort();for(var d=0;d<c.length;d++){var e=this.map_[c[d]];a.call(b,Yf(this,e),e.key,this)}};
f.set=function(a,b){var c=new Vf(a);this.valueCtor_?(c.valueWrapper=b,c.value=b.toArray()):c.value=b;this.map_[a.toString()]=c;this.arrClean=!1;return this};
var Yf=function(a,b){return a.valueCtor_?(b.valueWrapper||(b.valueWrapper=new a.valueCtor_(b.value)),b.valueWrapper):b.value};
Wf.prototype.get=function(a){if(a=this.map_[a.toString()])return Yf(this,a)};
Wf.prototype.has=function(a){return a.toString()in this.map_};
Wf.prototype.serializeBinary=function(a,b,c,d){var e=Xf(this);e.sort();for(var g=0;g<e.length;g++){var h=this.map_[e[g]];b.bookmarks_.push(Kf(b,a));c.call(b,1,h.key);this.valueCtor_?d.call(b,2,Yf(this,h),void 0):d.call(b,2,h.value);Lf(b,b.bookmarks_.pop())}};
var Xf=function(a){a=a.map_;var b=[],c;for(c in a)Object.prototype.hasOwnProperty.call(a,c)&&b.push(c);return b},Vf=function(a,b){this.key=a;
this.value=b;this.valueWrapper=void 0};var $f=function(){},ag="function"==typeof Uint8Array;
$f.prototype.getJsPbMessageId=function(){return this.messageId_};
var eg=function(a,b,c,d,e){a.wrappers_=null;b||(b=c?[c]:[]);a.messageId_=c?String(c):void 0;a.arrayIndexOffset_=0===c?-1:0;a.array=b;a:{if(b=a.array.length)if(--b,c=a.array[b],!(null===c||"object"!=typeof c||Wa(c)||ag&&c instanceof Uint8Array)){a.pivot_=b-a.arrayIndexOffset_;a.extensionObject_=c;break a}a.pivot_=Number.MAX_VALUE}a.convertedPrimitiveFields_={};if(d)for(b=0;b<d.length;b++)c=d[b],c<a.pivot_?(c+=a.arrayIndexOffset_,a.array[c]=a.array[c]||bg):(cg(a),a.extensionObject_[c]=a.extensionObject_[c]||
bg);if(e&&e.length)for(b=0;b<e.length;b++)dg(a,e[b])},bg=[],cg=function(a){var b=a.pivot_+a.arrayIndexOffset_;
a.array[b]||(a.extensionObject_=a.array[b]={})},fg=function(a,b,c){for(var d=[],e=0;e<a.length;e++)d[e]=b.call(a[e],c,a[e]);
return d},C=function(a,b){if(b<a.pivot_){b+=a.arrayIndexOffset_;
var c=a.array[b];return c===bg?a.array[b]=[]:c}if(a.extensionObject_)return c=a.extensionObject_[b],c===bg?a.extensionObject_[b]=[]:c},gg=function(a,b){a=C(a,b);
return null==a?a:+a},hg=function(a,b){a=C(a,b);
return null==a?a:!!a},ig=function(a){if(null==a||Ka(a))return a;
if(ag&&a instanceof Uint8Array)return jf(a);Va(a);return null},jg=function(a){if(null==a||a instanceof Uint8Array)return a;
if(Ka(a))return lf(a);Va(a);return null},D=function(a,b,c){a=C(a,b);
return null==a?c:a},kg=function(a,b){a=hg(a,b);
return null==a?!1:a},lg=function(a,b){a=gg(a,b);
return null==a?0:a},ng=function(a,b){a.wrappers_||(a.wrappers_={});
if(2 in a.wrappers_)return a.wrappers_[2];var c=C(a,2);if(!c){if(b)return;c=[];mg(a,2,c)}return a.wrappers_[2]=new Wf(c)},mg=function(a,b,c){b<a.pivot_?a.array[b+a.arrayIndexOffset_]=c:(cg(a),a.extensionObject_[b]=c);
return a},pg=function(a,b,c){return og(a,b,c,0)},qg=function(a,b,c){return og(a,b,c,!1)},rg=function(a,b,c){return og(a,b,c,"")},sg=function(a,b,c){return og(a,b,c,0)},og=function(a,b,c,d){c!==d?mg(a,b,c):a.array[b+a.arrayIndexOffset_]=null;
return a},tg=function(a,b,c,d){b=C(a,b);
void 0!=d?b.splice(d,0,c):b.push(c);return a},ug=function(a,b,c,d){(c=dg(a,c))&&c!==b&&void 0!==d&&(a.wrappers_&&c in a.wrappers_&&(a.wrappers_[c]=void 0),mg(a,c,void 0));
return mg(a,b,d)},dg=function(a,b){for(var c,d,e=0;e<b.length;e++){var g=b[e],h=C(a,g);
null!=h&&(c=g,d=h,mg(a,g,void 0))}return c?(mg(a,c,d),c):0},E=function(a,b,c){a.wrappers_||(a.wrappers_={});
if(!a.wrappers_[c]){var d=C(a,c);d&&(a.wrappers_[c]=new b(d))}return a.wrappers_[c]},wg=function(a,b,c){vg(a,b,c);
b=a.wrappers_[c];b==bg&&(b=a.wrappers_[c]=[]);return b},vg=function(a,b,c){a.wrappers_||(a.wrappers_={});
if(!a.wrappers_[c]){for(var d=C(a,c),e=[],g=0;g<d.length;g++)e[g]=new b(d[g]);a.wrappers_[c]=e}},xg=function(a,b,c){a.wrappers_||(a.wrappers_={});
var d=c?c.toArray():c;a.wrappers_[b]=c;return mg(a,b,d)},yg=function(a,b,c,d){a.wrappers_||(a.wrappers_={});
var e=d?d.toArray():d;a.wrappers_[b]=d;return ug(a,b,c,e)},zg=function(a,b,c){a.wrappers_||(a.wrappers_={});
c=c||[];for(var d=[],e=0;e<c.length;e++)d[e]=c[e].toArray();a.wrappers_[b]=c;return mg(a,b,d)},Ag=function(a,b,c,d,e){vg(a,d,b);
var g=a.wrappers_[b];g||(g=a.wrappers_[b]=[]);c=c?c:new d;a=C(a,b);void 0!=e?(g.splice(e,0,c),a.splice(e,0,c.toArray())):(g.push(c),a.push(c.toArray()));return c},Bg=function(a){if(a.wrappers_)for(var b in a.wrappers_){var c=a.wrappers_[b];
if(Wa(c))for(var d=0;d<c.length;d++)c[d]&&c[d].toArray();else c&&c.toArray()}};
$f.prototype.toArray=function(){Bg(this);return this.array};
$f.prototype.serialize=ag?function(){var a=Uint8Array.prototype.toJSON;Uint8Array.prototype.toJSON=function(){return jf(this)};
try{return JSON.stringify(this.array&&this.toArray(),Cg)}finally{Uint8Array.prototype.toJSON=a}}:function(){return JSON.stringify(this.array&&this.toArray(),Cg)};
var Cg=function(a,b){return Ma(b)&&(isNaN(b)||Infinity===b||-Infinity===b)?String(b):b},Dg=function(a,b){return new a(b?JSON.parse(b):null)};
f=$f.prototype;f.toString=function(){Bg(this);return this.array.toString()};
f.getExtension=function(a){if(this.extensionObject_){this.wrappers_||(this.wrappers_={});var b=a.fieldIndex;if(a.isRepeated){if(a.isMessageType())return this.wrappers_[b]||(this.wrappers_[b]=pb(this.extensionObject_[b]||[],function(c){return new a.ctor(c)})),this.wrappers_[b]}else if(a.isMessageType())return!this.wrappers_[b]&&this.extensionObject_[b]&&(this.wrappers_[b]=new a.ctor(this.extensionObject_[b])),this.wrappers_[b];
return this.extensionObject_[b]}};
f.setExtension=function(a,b){this.wrappers_||(this.wrappers_={});cg(this);var c=a.fieldIndex;a.isRepeated?(b=b||[],a.isMessageType()?(this.wrappers_[c]=b,this.extensionObject_[c]=pb(b,function(d){return d.toArray()})):this.extensionObject_[c]=b):a.isMessageType()?(this.wrappers_[c]=b,this.extensionObject_[c]=b?b.toArray():b):this.extensionObject_[c]=b;
return this};
f.cloneMessage=function(){return new this.constructor(Eg(this.toArray()))};
f.clone=function(){return new this.constructor(Eg(this.toArray()))};
var Eg=function(a){if(Wa(a)){for(var b=Array(a.length),c=0;c<a.length;c++){var d=a[c];null!=d&&(b[c]="object"==typeof d?Eg(d):d)}return b}if(ag&&a instanceof Uint8Array)return new Uint8Array(a);b={};for(c in a)d=a[c],null!=d&&(b[c]="object"==typeof d?Eg(d):d);return b};var Fg=function(a){this.document_=a||{cookie:""}};
f=Fg.prototype;f.isEnabled=function(){return navigator.cookieEnabled};
f.set=function(a,b,c,d,e,g){if(/[;=\s]/.test(a))throw Error("Invalid cookie name \""+a+"\"");if(/[;\r\n]/.test(b))throw Error("Invalid cookie value \""+b+"\"");Ia(c)||(c=-1);e=e?";domain="+e:"";d=d?";path="+d:"";g=g?";secure":"";c=0>c?"":0==c?";expires="+new Date(1970,1,1).toUTCString():";expires="+new Date(fb()+1E3*c).toUTCString();this.document_.cookie=a+"="+b+e+d+c+g};
f.get=function(a,b){for(var c=a+"=",d=(this.document_.cookie||"").split(";"),e=0,g;e<d.length;e++){g=hc(d[e]);if(0==g.lastIndexOf(c,0))return g.substr(c.length);if(g==a)return""}return b};
f.remove=function(a,b,c){var d=this.containsKey(a);this.set(a,"",0,b,c);return d};
f.getKeys=function(){return Gg(this).keys};
f.getValues=function(){return Gg(this).values};
f.isEmpty=function(){return!this.document_.cookie};
f.getCount=function(){return this.document_.cookie?(this.document_.cookie||"").split(";").length:0};
f.containsKey=function(a){return Ia(this.get(a))};
f.containsValue=function(a){for(var b=Gg(this).values,c=0;c<b.length;c++)if(b[c]==a)return!0;return!1};
f.clear=function(){for(var a=Gg(this).keys,b=a.length-1;0<=b;b--)this.remove(a[b])};
var Gg=function(a){a=(a.document_.cookie||"").split(";");for(var b=[],c=[],d,e,g=0;g<a.length;g++)e=hc(a[g]),d=e.indexOf("="),-1==d?(b.push(""),c.push(e)):(b.push(e.substring(0,d)),c.push(e.substring(d+1)));return{keys:b,values:c}},Ig=new Fg("undefined"==typeof document?null:document);var Gba=function(a){var b=Sa("window.location.href");null==a&&(a="Unknown Error of type \"null/undefined\"");if(Ka(a))return{message:a,name:"Unknown error",lineNumber:"Not available",fileName:b,stack:"Not available"};var c=!1;try{var d=a.lineNumber||a.line||"Not available"}catch(g){d="Not available",c=!0}try{var e=a.fileName||a.filename||a.sourceURL||q.$googDebugFname||b}catch(g){e="Not available",c=!0}return!c&&a.lineNumber&&a.fileName&&a.stack&&a.message&&a.name?a:(b=a.message,null==b&&(a.constructor&&
a.constructor instanceof Function?(a.constructor.name?b=a.constructor.name:(b=a.constructor,Jg[b]?b=Jg[b]:(b=String(b),Jg[b]||(c=/function\s+([^\(]+)/m.exec(b),Jg[b]=c?c[1]:"[Anonymous]"),b=Jg[b])),b="Unknown Error of type \""+b+"\""):b="Unknown Error of unknown type"),{message:b,name:a.name||"UnknownError",lineNumber:d,fileName:e,stack:a.stack||"Not available"})},Jg={};var Kg={ERAS:["BC","AD"],ERANAMES:["Before Christ","Anno Domini"],NARROWMONTHS:"JFMAMJJASOND".split(""),STANDALONENARROWMONTHS:"JFMAMJJASOND".split(""),MONTHS:"January February March April May June July August September October November December".split(" "),STANDALONEMONTHS:"January February March April May June July August September October November December".split(" "),SHORTMONTHS:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),STANDALONESHORTMONTHS:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),
WEEKDAYS:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),STANDALONEWEEKDAYS:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),SHORTWEEKDAYS:"Sun Mon Tue Wed Thu Fri Sat".split(" "),STANDALONESHORTWEEKDAYS:"Sun Mon Tue Wed Thu Fri Sat".split(" "),NARROWWEEKDAYS:"SMTWTFS".split(""),STANDALONENARROWWEEKDAYS:"SMTWTFS".split(""),SHORTQUARTERS:["Q1","Q2","Q3","Q4"],QUARTERS:["1st quarter","2nd quarter","3rd quarter","4th quarter"],AMPMS:["AM","PM"],DATEFORMATS:["EEEE, MMMM d, y",
"MMMM d, y","MMM d, y","M/d/yy"],TIMEFORMATS:["h:mm:ss a zzzz","h:mm:ss a z","h:mm:ss a","h:mm a"],DATETIMEFORMATS:["{1} 'at' {0}","{1} 'at' {0}","{1}, {0}","{1}, {0}"],FIRSTDAYOFWEEK:6,WEEKENDRANGE:[5,6],FIRSTWEEKCUTOFFDAY:5},Lg=Kg;Lg=Kg;var Hba=/^(\d{4})(?:(?:-?(\d{2})(?:-?(\d{2}))?)|(?:-?(\d{3}))|(?:-?W(\d{2})(?:-?([1-7]))?))?$/,Iba=/^(\d{2})(?::?(\d{2})(?::?(\d{2})(\.\d+)?)?)?$/,Jba=/Z|(?:([-+])(\d{2})(?::?(\d{2}))?)$/,Mg=function(a,b){switch(b){case 1:return 0!=a%4||0==a%100&&0!=a%400?28:29;case 5:case 8:case 10:case 3:return 30;}return 31},Ng=function(a,b,c,d,e){a=new Date(a,b,c);
e=e||0;return a.valueOf()+864E5*(((Ia(d)?d:3)-e+7)%7-((a.getDay()+6)%7-e+7)%7)},Og=function(a,b,c,d,e,g){Ka(a)?(this.years="y"==a?b:0,this.months="m"==a?b:0,this.days="d"==a?b:0,this.hours="h"==a?b:0,this.minutes="n"==a?b:0,this.seconds="s"==a?b:0):(this.years=a||0,this.months=b||0,this.days=c||0,this.hours=d||0,this.minutes=e||0,this.seconds=g||0)};
f=Og.prototype;
f.toIsoString=function(a){var b=Math.min(this.years,this.months,this.days,this.hours,this.minutes,this.seconds),c=Math.max(this.years,this.months,this.days,this.hours,this.minutes,this.seconds);if(0>b&&0<c)return null;if(!a&&0==b&&0==c)return"PT0S";c=[];0>b&&c.push("-");c.push("P");(this.years||a)&&c.push(Math.abs(this.years)+"Y");(this.months||a)&&c.push(Math.abs(this.months)+"M");(this.days||a)&&c.push(Math.abs(this.days)+"D");if(this.hours||this.minutes||this.seconds||a)c.push("T"),(this.hours||
a)&&c.push(Math.abs(this.hours)+"H"),(this.minutes||a)&&c.push(Math.abs(this.minutes)+"M"),(this.seconds||a)&&c.push(Math.abs(this.seconds)+"S");return c.join("")};
f.equals=function(a){return a.years==this.years&&a.months==this.months&&a.days==this.days&&a.hours==this.hours&&a.minutes==this.minutes&&a.seconds==this.seconds};
f.clone=function(){return new Og(this.years,this.months,this.days,this.hours,this.minutes,this.seconds)};
f.isZero=function(){return 0==this.years&&0==this.months&&0==this.days&&0==this.hours&&0==this.minutes&&0==this.seconds};
f.getInverse=function(){return this.times(-1)};
f.times=function(a){return new Og(this.years*a,this.months*a,this.days*a,this.hours*a,this.minutes*a,this.seconds*a)};
f.getTotalSeconds=function(){return 60*(60*(24*this.days+this.hours)+this.minutes)+this.seconds};
f.add=function(a){this.years+=a.years;this.months+=a.months;this.days+=a.days;this.hours+=a.hours;this.minutes+=a.minutes;this.seconds+=a.seconds};
var Rg=function(a,b,c){Ma(a)?(this.date=Pg(a,b||0,c||1),Qg(this,c||1)):$a(a)?(this.date=Pg(a.getFullYear(),a.getMonth(),a.getDate()),Qg(this,a.getDate())):(this.date=new Date(fb()),a=this.date.getDate(),this.date.setHours(0),this.date.setMinutes(0),this.date.setSeconds(0),this.date.setMilliseconds(0),Qg(this,a))},Pg=function(a,b,c){b=new Date(a,b,c);
0<=a&&100>a&&b.setFullYear(b.getFullYear()-1900);return b};
f=Rg.prototype;f.firstDayOfWeek_=Lg.FIRSTDAYOFWEEK;f.firstWeekCutOffDay_=Lg.FIRSTWEEKCUTOFFDAY;f.clone=function(){var a=new Rg(this.date);a.firstDayOfWeek_=this.firstDayOfWeek_;a.firstWeekCutOffDay_=this.firstWeekCutOffDay_;return a};
f.getFullYear=function(){return this.date.getFullYear()};
f.getYear=function(){return this.getFullYear()};
f.getMonth=function(){return this.date.getMonth()};
f.getDate=function(){return this.date.getDate()};
f.getTime=function(){return this.date.getTime()};
f.getDay=function(){return this.date.getDay()};
f.getWeekday=function(){return((this.getDay()+6)%7-this.firstDayOfWeek_+7)%7};
f.getUTCFullYear=function(){return this.date.getUTCFullYear()};
f.getUTCMonth=function(){return this.date.getUTCMonth()};
f.getUTCDate=function(){return this.date.getUTCDate()};
f.getUTCDay=function(){return this.date.getDay()};
f.getUTCHours=function(){return this.date.getUTCHours()};
f.getUTCMinutes=function(){return this.date.getUTCMinutes()};
f.getUTCWeekday=function(){return((this.date.getUTCDay()+6)%7-this.firstDayOfWeek_+7)%7};
f.getNumberOfDaysInMonth=function(){return Mg(this.getFullYear(),this.getMonth())};
f.getWeekNumber=function(){var a=Ng(this.getFullYear(),this.getMonth(),this.getDate(),this.firstWeekCutOffDay_,this.firstDayOfWeek_);return Math.floor(Math.round((a-new Date(new Date(a).getFullYear(),0,1).valueOf())/864E5)/7)+1};
f.getYearOfWeek=function(){return new Date(Ng(this.getFullYear(),this.getMonth(),this.getDate(),this.firstWeekCutOffDay_,this.firstDayOfWeek_)).getFullYear()};
f.getDayOfYear=function(){for(var a=this.getDate(),b=this.getFullYear(),c=this.getMonth()-1;0<=c;c--)a+=Mg(b,c);return a};
f.getTimezoneOffset=function(){return this.date.getTimezoneOffset()};
f.set=function(a){this.date=new Date(a.getFullYear(),a.getMonth(),a.getDate())};
f.setFullYear=function(a){this.date.setFullYear(a)};
f.setYear=function(a){this.setFullYear(a)};
f.setMonth=function(a){this.date.setMonth(a)};
f.setDate=function(a){this.date.setDate(a)};
f.setTime=function(a){this.date.setTime(a)};
f.setUTCFullYear=function(a){this.date.setUTCFullYear(a)};
f.setUTCMonth=function(a){this.date.setUTCMonth(a)};
f.setUTCDate=function(a){this.date.setUTCDate(a)};
f.add=function(a){if(a.years||a.months){var b=this.getMonth()+a.months+12*a.years,c=this.getYear()+Math.floor(b/12);b%=12;0>b&&(b+=12);var d=Math.min(Mg(c,b),this.getDate());this.setDate(1);this.setFullYear(c);this.setMonth(b);this.setDate(d)}a.days&&(a=new Date(new Date(this.getYear(),this.getMonth(),this.getDate(),12).getTime()+864E5*a.days),this.setDate(1),this.setFullYear(a.getFullYear()),this.setMonth(a.getMonth()),this.setDate(a.getDate()),Qg(this,a.getDate()))};
f.toIsoString=function(a){return[this.getFullYear(),wd(this.getMonth()+1,2),wd(this.getDate(),2)].join(a?"-":"")+""};
f.toUTCIsoString=function(a){return[this.getUTCFullYear(),wd(this.getUTCMonth()+1,2),wd(this.getUTCDate(),2)].join(a?"-":"")+""};
f.equals=function(a){return!(!a||this.getYear()!=a.getYear()||this.getMonth()!=a.getMonth()||this.getDate()!=a.getDate())};
f.toString=function(){return this.toIsoString()};
var Qg=function(a,b){a.getDate()!=b&&a.date.setUTCHours(a.date.getUTCHours()+(a.getDate()<b?1:-1))};
Rg.prototype.valueOf=function(){return this.date.valueOf()};
var Sg=function(a,b,c,d,e,g,h){this.date=Ma(a)?new Date(a,b||0,c||1,d||0,e||0,g||0,h||0):new Date(a&&a.getTime?a.getTime():fb())};
t(Sg,Rg);f=Sg.prototype;f.getHours=function(){return this.date.getHours()};
f.getMinutes=function(){return this.date.getMinutes()};
f.getSeconds=function(){return this.date.getSeconds()};
f.getMilliseconds=function(){return this.date.getMilliseconds()};
f.getUTCDay=function(){return this.date.getUTCDay()};
f.getUTCHours=function(){return this.date.getUTCHours()};
f.getUTCMinutes=function(){return this.date.getUTCMinutes()};
f.getUTCSeconds=function(){return this.date.getUTCSeconds()};
f.getUTCMilliseconds=function(){return this.date.getUTCMilliseconds()};
f.setHours=function(a){this.date.setHours(a)};
f.setMinutes=function(a){this.date.setMinutes(a)};
f.setSeconds=function(a){this.date.setSeconds(a)};
f.setMilliseconds=function(a){this.date.setMilliseconds(a)};
f.setUTCHours=function(a){this.date.setUTCHours(a)};
f.setUTCMinutes=function(a){this.date.setUTCMinutes(a)};
f.setUTCSeconds=function(a){this.date.setUTCSeconds(a)};
f.setUTCMilliseconds=function(a){this.date.setUTCMilliseconds(a)};
f.isMidnight=function(){return 0==this.getHours()&&0==this.getMinutes()&&0==this.getSeconds()&&0==this.getMilliseconds()};
f.add=function(a){Rg.prototype.add.call(this,a);a.hours&&this.setUTCHours(this.date.getUTCHours()+a.hours);a.minutes&&this.setUTCMinutes(this.date.getUTCMinutes()+a.minutes);a.seconds&&this.setUTCSeconds(this.date.getUTCSeconds()+a.seconds)};
f.toIsoString=function(a){var b=Rg.prototype.toIsoString.call(this,a);return a?b+" "+wd(this.getHours(),2)+":"+wd(this.getMinutes(),2)+":"+wd(this.getSeconds(),2):b+"T"+wd(this.getHours(),2)+wd(this.getMinutes(),2)+wd(this.getSeconds(),2)};
f.toXmlDateTime=function(a){var b=Rg.prototype.toIsoString.call(this,!0)+"T"+wd(this.getHours(),2)+":"+wd(this.getMinutes(),2)+":"+wd(this.getSeconds(),2);if(a){if(a=this.getTimezoneOffset(),0==a)a="Z";else{var c=Math.abs(a)/60,d=Math.floor(c);c=60*(c-d);a=(0<a?"-":"+")+wd(d,2)+":"+wd(c,2)}}else a="";return b+a};
f.toUTCIsoString=function(a){var b=Rg.prototype.toUTCIsoString.call(this,a);return a?b+" "+wd(this.getUTCHours(),2)+":"+wd(this.getUTCMinutes(),2)+":"+wd(this.getUTCSeconds(),2):b+"T"+wd(this.getUTCHours(),2)+wd(this.getUTCMinutes(),2)+wd(this.getUTCSeconds(),2)};
f.toUTCRfc3339String=function(){var a=this.toUTCIsoString(!0).replace(" ","T"),b=this.getUTCMilliseconds();return(b?a+"."+wd(b,3):a)+"Z"};
f.equals=function(a){return this.getTime()==a.getTime()};
f.toString=function(){return this.toIsoString()};
f.toUsTimeString=function(a,b,c){var d=this.getHours();Ia(b)||(b=!0);var e=12==d;12<d&&(d-=12,e=!0);0==d&&b&&(d=12);a=a?wd(d,2):String(d);d=this.getMinutes();if(!c||0<d)a+=":"+wd(d,2);b&&(a+=e?" PM":" AM");return a};
f.toIsoTimeString=function(a){var b=wd(this.getHours(),2)+":"+wd(this.getMinutes(),2);if(!Ia(a)||a)b+=":"+wd(this.getSeconds(),2);return b};
f.clone=function(){var a=new Sg(this.date);a.firstDayOfWeek_=this.firstDayOfWeek_;a.firstWeekCutOffDay_=this.firstWeekCutOffDay_;return a};try{new self.OffscreenCanvas(0,0).getContext("2d")}catch(a){}var Kba=!Ne||af(9),Lba=!Qe&&!Ne||Ne&&af(9)||Qe&&$e("1.9.1"),Tg=Ne&&!$e("9"),Mba=Ne||Me||Re,Nba=Ne&&!af(9);var Ug=function(a,b,c){return Math.min(Math.max(a,b),c)},Vg=function(a,b,c){return a+c*(b-a)};var Wg=function(a,b){this.x=Ia(a)?a:0;this.y=Ia(b)?b:0};
Wg.prototype.clone=function(){return new Wg(this.x,this.y)};
Wg.prototype.equals=function(a){return a instanceof Wg&&(this==a?!0:this&&a?this.x==a.x&&this.y==a.y:!1)};
var Xg=function(a,b){return new Wg(a.x-b.x,a.y-b.y)};
f=Wg.prototype;f.ceil=function(){this.x=Math.ceil(this.x);this.y=Math.ceil(this.y);return this};
f.floor=function(){this.x=Math.floor(this.x);this.y=Math.floor(this.y);return this};
f.round=function(){this.x=Math.round(this.x);this.y=Math.round(this.y);return this};
f.translate=function(a,b){a instanceof Wg?(this.x+=a.x,this.y+=a.y):(this.x+=Number(a),Ma(b)&&(this.y+=b));return this};
f.scale=function(a,b){b=Ma(b)?b:a;this.x*=a;this.y*=b;return this};
f.rotateDegrees=function(a,b){a=a*Math.PI/180;b=b||new Wg(0,0);var c=this.x,d=this.y,e=Math.cos(a);a=Math.sin(a);this.x=(c-b.x)*e-(d-b.y)*a+b.x;this.y=(c-b.x)*a+(d-b.y)*e+b.y};var Yg=function(a,b){this.width=a;this.height=b};
f=Yg.prototype;f.clone=function(){return new Yg(this.width,this.height)};
f.getLongest=function(){return Math.max(this.width,this.height)};
f.getShortest=function(){return Math.min(this.width,this.height)};
f.perimeter=function(){return 2*(this.width+this.height)};
f.aspectRatio=function(){return this.width/this.height};
f.isEmpty=function(){return!(this.width*this.height)};
f.ceil=function(){this.width=Math.ceil(this.width);this.height=Math.ceil(this.height);return this};
f.fitsInside=function(a){return this.width<=a.width&&this.height<=a.height};
f.floor=function(){this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this};
f.round=function(){this.width=Math.round(this.width);this.height=Math.round(this.height);return this};
f.scale=function(a,b){b=Ma(b)?b:a;this.width*=a;this.height*=b;return this};
f.scaleToCover=function(a){a=this.aspectRatio()<=a.aspectRatio()?a.width/this.width:a.height/this.height;return this.scale(a)};
f.scaleToFit=function(a){a=this.aspectRatio()>a.aspectRatio()?a.width/this.width:a.height/this.height;return this.scale(a)};var ah=function(a){return a?new Zg($g(a)):ib||(ib=new Zg)},bh=function(a,b){return Ka(b)?a.getElementById(b):b},ch=function(a,b){return(b||document).getElementsByTagName(String(a))},eh=function(a,b){var c=b||document;
return c.querySelectorAll&&c.querySelector?c.querySelectorAll("."+a):dh(document,"*",a,b)},gh=function(a,b){var c=b||document;
return(c.getElementsByClassName?c.getElementsByClassName(a)[0]:fh(document,"*",a,b))||null},dh=function(a,b,c,d){a=d||a;
b=b&&"*"!=b?String(b).toUpperCase():"";if(a.querySelectorAll&&a.querySelector&&(b||c))return a.querySelectorAll(b+(c?"."+c:""));if(c&&a.getElementsByClassName){a=a.getElementsByClassName(c);if(b){d={};for(var e=0,g=0,h;h=a[g];g++)b==h.nodeName&&(d[e++]=h);d.length=e;return d}return a}a=a.getElementsByTagName(b||"*");if(c){d={};for(g=e=0;h=a[g];g++)b=h.className,"function"==typeof b.split&&wb(b.split(/\s+/),c)&&(d[e++]=h);d.length=e;return d}return a},fh=function(a,b,c,d){var e=d||a,g=b&&"*"!=b?String(b).toUpperCase():
"";
return e.querySelectorAll&&e.querySelector&&(g||c)?e.querySelector(g+(c?"."+c:"")):dh(a,b,c,d)[0]||null},ih=function(a,b){u.forEach(b,function(c,d){c&&"object"==typeof c&&c.implementsGoogStringTypedString&&(c=c.getTypedStringValue());
"style"==d?a.style.cssText=c:"class"==d?a.className=c:"for"==d?a.htmlFor=c:hh.hasOwnProperty(d)?a.setAttribute(hh[d],c):ec(d,"aria-")||ec(d,"data-")?a.setAttribute(d,c):a[d]=c})},hh={cellpadding:"cellPadding",
cellspacing:"cellSpacing",colspan:"colSpan",frameborder:"frameBorder",height:"height",maxlength:"maxLength",nonce:"nonce",role:"role",rowspan:"rowSpan",type:"type",usemap:"useMap",valign:"vAlign",width:"width"},kh=function(a){return jh(a||window)},jh=function(a){a=a.document;
a=lh(a)?a.documentElement:a.body;return new Yg(a.clientWidth,a.clientHeight)},oh=function(a){var b=nh(a);
a=a.parentWindow||a.defaultView;return Ne&&$e("10")&&a.pageYOffset!=b.scrollTop?new Wg(b.scrollLeft,b.scrollTop):new Wg(a.pageXOffset||b.scrollLeft,a.pageYOffset||b.scrollTop)},nh=function(a){return a.scrollingElement?a.scrollingElement:!Re&&lh(a)?a.documentElement:a.body||a.documentElement},ph=function(a){return a?a.parentWindow||a.defaultView:window},rh=function(a,b,c){return qh(document,arguments)},qh=function(a,b){var c=String(b[0]),d=b[1];
if(!Kba&&d&&(d.name||d.type)){c=["<",c];d.name&&c.push(" name=\"",od(d.name),"\"");if(d.type){c.push(" type=\"",od(d.type),"\"");var e={};u.extend(e,d);delete e.type;d=e}c.push(">");c=c.join("")}c=a.createElement(c);d&&(Ka(d)?c.className=d:Wa(d)?c.className=d.join(" "):ih(c,d));2<b.length&&sh(a,c,b,2);return c},sh=function(a,b,c,d){function e(h){h&&b.appendChild(Ka(h)?a.createTextNode(h):h)}
for(;d<c.length;d++){var g=c[d];Xa(g)&&!th(g)?mb(uh(g)?Cb(g):g,e):e(g)}},vh=function(a){return document.createElement(String(a))},wh=function(a,b){var c=a.createElement("DIV");
Ne?(b=$c(Oaa,b),dd(c,b),c.removeChild(c.firstChild)):dd(c,b);if(1==c.childNodes.length)c=c.removeChild(c.firstChild);else{for(a=a.createDocumentFragment();c.firstChild;)a.appendChild(c.firstChild);c=a}return c},lh=function(a){return"CSS1Compat"==a.compatMode},xh=function(a){if(1!=a.nodeType)return!1;
switch(a.tagName){case"APPLET":case"AREA":case"BASE":case"BR":case"COL":case"COMMAND":case"EMBED":case"FRAME":case"HR":case"IMG":case"INPUT":case"IFRAME":case"ISINDEX":case"KEYGEN":case"LINK":case"NOFRAMES":case"NOSCRIPT":case"META":case"OBJECT":case"PARAM":case"SCRIPT":case"SOURCE":case"STYLE":case"TRACK":case"WBR":return!1;}return!0},yh=function(a,b){sh($g(a),a,arguments,1)},zh=function(a){for(var b;b=a.firstChild;)a.removeChild(b)},Ah=function(a,b){b.parentNode&&b.parentNode.insertBefore(a,
b)},Bh=function(a,b){b.parentNode&&b.parentNode.insertBefore(a,b.nextSibling)},Ch=function(a,b,c){a.insertBefore(b,a.childNodes[c]||null)},Dh=function(a){return a&&a.parentNode?a.parentNode.removeChild(a):null},Eh=function(a){return Lba&&void 0!=a.children?a.children:nb(a.childNodes,function(b){return 1==b.nodeType})},Gh=function(a){return Ia(a.firstElementChild)?a.firstElementChild:Fh(a.firstChild,!0)},Hh=function(a){return Ia(a.nextElementSibling)?a.nextElementSibling:Fh(a.nextSibling,!0)},Fh=function(a,
b){for(;a&&1!=a.nodeType;)a=b?a.nextSibling:a.previousSibling;
return a},th=function(a){return $a(a)&&0<a.nodeType},Ih=function(a){return $a(a)&&1==a.nodeType},Jh=function(a){var b;
if(Mba&&!(Ne&&$e("9")&&!$e("10")&&q.SVGElement&&a instanceof q.SVGElement)&&(b=a.parentElement))return b;b=a.parentNode;return Ih(b)?b:null},Kh=function(a,b){if(!a||!b)return!1;
if(a.contains&&1==b.nodeType)return a==b||a.contains(b);if("undefined"!=typeof a.compareDocumentPosition)return a==b||!!(a.compareDocumentPosition(b)&16);for(;b&&a!=b;)b=b.parentNode;return b==a},Nh=function(a,b){if(a==b)return 0;
if(a.compareDocumentPosition)return a.compareDocumentPosition(b)&2?1:-1;if(Ne&&!af(9)){if(9==a.nodeType)return-1;if(9==b.nodeType)return 1}if("sourceIndex"in a||a.parentNode&&"sourceIndex"in a.parentNode){var c=1==a.nodeType,d=1==b.nodeType;if(c&&d)return a.sourceIndex-b.sourceIndex;var e=a.parentNode,g=b.parentNode;return e==g?Lh(a,b):!c&&Kh(e,b)?-1*Mh(a,b):!d&&Kh(g,a)?Mh(b,a):(c?a.sourceIndex:e.sourceIndex)-(d?b.sourceIndex:g.sourceIndex)}d=$g(a);c=d.createRange();c.selectNode(a);c.collapse(!0);
a=d.createRange();a.selectNode(b);a.collapse(!0);return c.compareBoundaryPoints(q.Range.START_TO_END,a)},Mh=function(a,b){var c=a.parentNode;
if(c==b)return-1;for(;b.parentNode!=c;)b=b.parentNode;return Lh(b,a)},Lh=function(a,b){for(;b=b.previousSibling;)if(b==a)return-1;
return 1},Oh=function(a){var b,c=arguments.length;
if(!c)return null;if(1==c)return arguments[0];var d=[],e=Infinity;for(b=0;b<c;b++){for(var g=[],h=arguments[b];h;)g.unshift(h),h=h.parentNode;d.push(g);e=Math.min(e,g.length)}g=null;for(b=0;b<e;b++){h=d[0][b];for(var m=1;m<c;m++)if(h!=d[m][b])return g;g=h}return g},$g=function(a){return 9==a.nodeType?a:a.ownerDocument||a.document},Ph=function(a){return a.contentDocument||a.contentWindow.document},Qh=function(a){try{return a.contentWindow||(a.contentDocument?ph(a.contentDocument):null)}catch(b){}return null},
Rh=function(a,b){if("textContent"in a)a.textContent=b;else
if(3==a.nodeType)a.data=String(b);else if(a.firstChild&&3==a.firstChild.nodeType){for(;a.lastChild!=a.firstChild;)a.removeChild(a.lastChild);a.firstChild.data=String(b)}else zh(a),a.appendChild($g(a).createTextNode(String(b)))},Sh=function(a){if("outerHTML"in a)return a.outerHTML;
var b=$g(a).createElement("DIV");b.appendChild(a.cloneNode(!0));return b.innerHTML},Uh=function(a,b){var c=[];
return Th(a,b,c,!0)?c[0]:void 0},Th=function(a,b,c,d){if(null!=a)for(a=a.firstChild;a;){if(b(a)&&(c.push(a),d)||Th(a,b,c,d))return!0;
a=a.nextSibling}return!1},Vh={SCRIPT:1,
STYLE:1,HEAD:1,IFRAME:1,OBJECT:1},Wh={IMG:" ",BR:"\n"},Zh=function(a){return Xh(a)&&Yh(a)},$h=function(a,b){b?a.tabIndex=0:(a.tabIndex=-1,a.removeAttribute("tabIndex"))},ai=function(a){var b;
(b="A"==a.tagName&&a.hasAttribute("href")||"INPUT"==a.tagName||"TEXTAREA"==a.tagName||"SELECT"==a.tagName||"BUTTON"==a.tagName?!a.disabled&&(!Xh(a)||Yh(a)):Zh(a))&&Ne?(a=!Za(a.getBoundingClientRect)||Ne&&null==a.parentElement?{height:a.offsetHeight,width:a.offsetWidth}:a.getBoundingClientRect(),a=null!=a&&0<a.height&&0<a.width):a=b;return a},Xh=function(a){return Ne&&!$e("9")?(a=a.getAttributeNode("tabindex"),null!=a&&a.specified):a.hasAttribute("tabindex")},Yh=function(a){a=a.tabIndex;
return Ma(a)&&0<=a&&32768>a},ci=function(a){if(Tg&&null!==a&&"innerText"in a)a=a.innerText.replace(/(\r\n|\r|\n)/g,"\n");else
{var b=[];bi(a,b,!0);a=b.join("")}a=a.replace(/ \xAD /g," ").replace(/\xAD/g,"");a=a.replace(/\u200B/g,"");Tg||(a=a.replace(/ +/g," "));" "!=a&&(a=a.replace(/^\s*/,""));return a},di=function(a){var b=[];
bi(a,b,!1);return b.join("")},bi=function(a,b,c){if(!(a.nodeName in Vh))if(3==a.nodeType)c?b.push(String(a.nodeValue).replace(/(\r\n|\r|\n)/g,"")):b.push(a.nodeValue);else
if(a.nodeName in Wh)b.push(Wh[a.nodeName]);else for(a=a.firstChild;a;)bi(a,b,c),a=a.nextSibling},uh=function(a){if(a&&"number"==typeof a.length){if($a(a))return"function"==typeof a.item||"string"==typeof a.item;
if(Za(a))return"function"==typeof a.item}return!1},fi=function(a,b,c,d){if(!b&&!c)return null;
var e=b?String(b).toUpperCase():null;return ei(a,function(g){return(!e||g.nodeName==e)&&(!c||Ka(g.className)&&wb(g.className.split(/\s+/),c))},!0,d)},ei=function(a,b,c,d){a&&!c&&(a=a.parentNode);
for(c=0;a&&(null==d||c<=d);){if(b(a))return a;a=a.parentNode;c++}return null},Zg=function(a){this.document_=a||q.document||document};
f=Zg.prototype;f.getDomHelper=ah;f.setDocument=function(a){this.document_=a};
f.getDocument=function(){return this.document_};
f.getElement=function(a){return bh(this.document_,a)};
f.getRequiredElement=function(a){return bh(this.document_,a)};
f.$=Zg.prototype.getElement;f.getElementsByTagName=function(a,b){return(b||this.document_).getElementsByTagName(String(a))};
f.getElementsByTagNameAndClass=function(a,b,c){return dh(this.document_,a,b,c)};
f.getElementByTagNameAndClass=function(a,b,c){return fh(this.document_,a,b,c)};
f.getElementsByClass=function(a,b){return eh(a,b||this.document_)};
f.getElementByClass=function(a,b){return gh(a,b||this.document_)};
f.getRequiredElementByClass=function(a,b){return gh(a,b||this.document_)};
f.$$=Zg.prototype.getElementsByTagNameAndClass;f.setProperties=ih;f.getDocumentHeight=function(){var a=this.getWindow(),b=a.document;var c=0;if(b){c=b.body;var d=b.documentElement;if(d&&c){if(a=jh(a).height,lh(b)&&d.scrollHeight)c=d.scrollHeight!=a?d.scrollHeight:d.offsetHeight;else{b=d.scrollHeight;var e=d.offsetHeight;d.clientHeight!=e&&(b=c.scrollHeight,e=c.offsetHeight);c=b>a?b>e?b:e:b<e?b:e}}else c=0}return c};
f.createDom=function(a,b,c){return qh(this.document_,arguments)};
f.$dom=Zg.prototype.createDom;f.createElement=function(a){return this.document_.createElement(String(a))};
f.createTextNode=function(a){return this.document_.createTextNode(String(a))};
f.createTable=function(a,b,c){var d=this.document_;c=!!c;for(var e=d.createElement("TABLE"),g=e.appendChild(d.createElement("TBODY")),h=0;h<a;h++){for(var m=d.createElement("TR"),n=0;n<b;n++){var p=d.createElement("TD");c&&Rh(p,"\xA0");m.appendChild(p)}g.appendChild(m)}return e};
f.safeHtmlToNode=function(a){return wh(this.document_,a)};
f.getWindow=function(){var a=this.document_;return a.parentWindow||a.defaultView};
f.getActiveElement=function(a){a=a||this.document_;try{var b=a&&a.activeElement;var c=b&&b.nodeName?b:null}catch(d){c=null}return c};
f.appendChild=function(a,b){a.appendChild(b)};
f.append=yh;f.canHaveChildren=xh;f.removeChildren=zh;f.insertSiblingBefore=Ah;f.insertSiblingAfter=Bh;f.insertChildAt=Ch;f.removeNode=Dh;f.replaceNode=function(a,b){var c=b.parentNode;c&&c.replaceChild(a,b)};
f.getChildren=Eh;f.getFirstElementChild=Gh;f.getLastElementChild=function(a){return Ia(a.lastElementChild)?a.lastElementChild:Fh(a.lastChild,!1)};
f.getNextElementSibling=Hh;f.getPreviousElementSibling=function(a){return Ia(a.previousElementSibling)?a.previousElementSibling:Fh(a.previousSibling,!1)};
f.getNextNode=function(a){if(!a)return null;if(a.firstChild)return a.firstChild;for(;a&&!a.nextSibling;)a=a.parentNode;return a?a.nextSibling:null};
f.getPreviousNode=function(a){if(!a)return null;if(!a.previousSibling)return a.parentNode;for(a=a.previousSibling;a&&a.lastChild;)a=a.lastChild;return a};
f.isNodeLike=th;f.isElement=Ih;f.isWindow=function(a){return $a(a)&&a.window==a};
f.getParentElement=Jh;f.contains=Kh;f.compareNodeOrder=Nh;f.findCommonAncestor=Oh;f.getOwnerDocument=$g;f.getFrameContentDocument=Ph;f.getFrameContentWindow=Qh;f.setTextContent=Rh;f.getOuterHtml=Sh;f.findNode=Uh;f.findNodes=function(a,b){var c=[];Th(a,b,c,!1);return c};
f.isFocusableTabIndex=Zh;f.setFocusableTabIndex=$h;f.isFocusable=ai;f.getTextContent=ci;f.getNodeTextLength=function(a){return ci(a).length};
f.getNodeTextOffset=function(a,b){b=b||$g(a).body;for(var c=[];a&&a!=b;){for(var d=a;d=d.previousSibling;)c.unshift(ci(d));a=a.parentNode}return c.join("").replace(/^[\s\xa0]+/,"").replace(/ +/g," ").length};
f.getNodeAtOffset=function(a,b,c){a=[a];for(var d=0,e=null;0<a.length&&d<b;)if(e=a.pop(),!(e.nodeName in Vh))if(3==e.nodeType){var g=e.nodeValue.replace(/(\r\n|\r|\n)/g,"").replace(/ +/g," ");d+=g.length}else if(e.nodeName in Wh)d+=Wh[e.nodeName].length;else for(g=e.childNodes.length-1;0<=g;g--)a.push(e.childNodes[g]);$a(c)&&(c.remainder=e?e.nodeValue.length+b-d-1:0,c.node=e);return e};
f.isNodeList=uh;f.getAncestorByTagNameAndClass=fi;f.getAncestorByClass=function(a,b,c){return fi(a,null,b,c)};
f.getAncestor=ei;f.getCanvasContext2D=function(a){return a.getContext("2d")};var hi=function(a){gi();return $b(a)},gi=Ta;var ji=function(){return!ii()&&(Nc("iPod")||Nc("iPhone")||Nc("Android")||Nc("IEMobile"))},ii=function(){return Nc("iPad")||Nc("Android")&&!Nc("Mobile")||Nc("Silk")};var ki=function(a,b,c,d,e,g,h){var m="";a&&(m+=a+":");c&&(m+="//",b&&(m+=b+"@"),m+=c,d&&(m+=":"+d));e&&(m+=e);g&&(m+="?"+g);h&&(m+="#"+h);return m},li=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#([\s\S]*))?$/,mi=function(a){return a?decodeURI(a):a},ni=function(a,b){return b.match(li)[a]||null},oi=function(a){return mi(ni(3,a))},Oba=function(a){var b=a.indexOf("#");
return 0>b?null:a.substr(b+1)},pi=function(a){a=a.match(li);
return ki(a[1],a[2],a[3],a[4])},qi=function(a){a=a.match(li);
return ki(null,null,null,null,a[5],a[6],a[7])},ri=function(a){var b=a.indexOf("#");
return 0>b?a:a.substr(0,b)},si=function(a,b){a=a.match(li);
b=b.match(li);return a[3]==b[3]&&a[1]==b[1]&&a[4]==b[4]},ti=function(a,b){if(a){a=a.split("&");
for(var c=0;c<a.length;c++){var d=a[c].indexOf("="),e=null;if(0<=d){var g=a[c].substring(0,d);e=a[c].substring(d+1)}else g=a[c];b(g,e?nd(e):"")}}},ui=function(a,b){if(!b)return a;
var c=a.indexOf("#");0>c&&(c=a.length);var d=a.indexOf("?");if(0>d||d>c){d=c;var e=""}else e=a.substring(d+1,c);a=[a.substr(0,d),e,a.substr(c)];c=a[1];a[1]=b?c?c+"&"+b:b:c;return a[0]+(a[1]?"?"+a[1]:"")+a[2]},vi=function(a,b,c){if(Wa(b))for(var d=0;d<b.length;d++)vi(a,String(b[d]),c);else
null!=b&&c.push(a+(""===b?"":"="+md(b)))},wi=function(a,b){var c=[];
for(b=b||0;b<a.length;b+=2)vi(a[b],a[b+1],c);return c.join("&")},xi=function(a){var b=[],c;
for(c in a)vi(c,a[c],b);return b.join("&")},yi=function(a,b){var c=2==arguments.length?wi(arguments[1],0):wi(arguments,1);
return ui(a,c)},Ai=function(a,b){b=xi(b);
return ui(a,b)},Bi=function(a,b,c){c=null!=c?"="+md(c):"";
return ui(a,b+c)},Ci=function(a,b,c,d){for(var e=c.length;0<=(b=a.indexOf(c,b))&&b<d;){var g=a.charCodeAt(b-1);
if(38==g||63==g)if(g=a.charCodeAt(b+e),!g||61==g||38==g||35==g)return b;b+=e+1}return-1},Di=/#|$/,Ei=function(a,b){var c=a.search(Di),d=Ci(a,0,b,c);
if(0>d)return null;var e=a.indexOf("&",d);if(0>e||e>c)e=c;d+=b.length+1;return nd(a.substr(d,e-d))},Pba=/[?&]($|#)/,Fi=function(a,b){for(var c=a.search(Di),d=0,e,g=[];0<=(e=Ci(a,d,b,c));)g.push(a.substring(d,e)),d=Math.min(a.indexOf("&",e)+1||c,c);
g.push(a.substr(d));return g.join("").replace(Pba,"$1")},Gi=function(a,b,c){return Bi(Fi(a,b),b,c)},Hi=function(a,b){fc(a,"/")&&(a=a.substr(0,a.length-1));
ec(b,"/")&&(b=b.substr(1));return yd(a,"/",b)};var Ii=function(a){try{return!!a&&null!=a.location.href&&Le(a,"foo")}catch(b){return!1}},Qba=function(){if(!q.crypto)return Math.random();
try{var a=new Uint32Array(1);q.crypto.getRandomValues(a);return a[0]/65536/65536}catch(b){return Math.random()}},Ji=function(a,b,c){if(a)for(var d in a)Object.prototype.hasOwnProperty.call(a,d)&&b.call(c,a[d],d,a)},Ki=function(a){var b=[];
Ji(a,function(c,d){b.push(d)});
return b},Li=function(a){var b=[];
Ji(a,function(c){b.push(c)});
return b},Mi=function(a){var b=a.length;
if(0==b)return 0;for(var c=305419896,d=0;d<b;d++)c^=(c<<5)+(c>>2)+a.charCodeAt(d)&4294967295;return 0<c?c:4294967296+c},Rba=Nb(function(){return pc(Kc,"Google Web Preview")||1E-4>Math.random()}),Sba=Nb(function(){return pc(Kc,"MSIE")}),Tba=/https?:\/\/[^\/]+/,Uba=function(a){return(a=Tba.exec(a))&&a[0]||""},Vba=function(){var a=Ni;
if(!a)return"";var b=/.*[&#?]google_debug(=[^&]*)?(&.*)?$/;try{var c=b.exec(decodeURIComponent(a));if(c)return c[1]&&1<c[1].length?c[1].substring(1):"true"}catch(d){}return""},Wba={ALLOW_FORMS:"allow-forms",
ALLOW_MODALS:"allow-modals",ALLOW_ORIENTATION_LOCK:"allow-orientation-lock",ALLOW_POINTER_LOCK:"allow-pointer-lock",ALLOW_POPUPS:"allow-popups",ALLOW_POPUPS_TO_ESCAPE_SANDBOX:"allow-popups-to-escape-sandbox",ALLOW_PRESENTATION:"allow-presentation",ALLOW_SAME_ORIGIN:"allow-same-origin",ALLOW_SCRIPTS:"allow-scripts",ALLOW_TOP_NAVIGATION:"allow-top-navigation",ALLOW_TOP_NAVIGATION_BY_USER_ACTIVATION:"allow-top-navigation-by-user-activation"},Xba=Nb(function(){return Li(Wba)}),Yba=function(){var a=vh("IFRAME").sandbox,
b=a&&a.supports;
if(!b)return{};var c={};mb(Xba(),function(d){b.call(a,d)&&(c[d]=!0)});
return c};var Zba=Nb(function(){var a=!1;try{var b=Object.defineProperty({},"passive",{get:function(){a=!0}});
q.addEventListener("test",null,b)}catch(c){}return a});
function Oi(a){return a?a.passive&&Zba()?a:a.capture||!1:!1}
var Pi=function(a,b,c,d){return a.addEventListener?(a.addEventListener(b,c,Oi(d)),!0):!1},Qi=function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,Oi(void 0))};var Ri=function(a,b,c,d){a.google_image_requests||(a.google_image_requests=[]);var e=a.document.createElement("img");if(c){var g=function(h){c&&c(h);Qi(e,"load",g);Qi(e,"error",g)};
Pi(e,"load",g);Pi(e,"error",g)}d&&(e.referrerPolicy="no-referrer");e.src=b;a.google_image_requests.push(e)},$ba=Nb(function(){return"referrerPolicy"in q.document.createElement("img")});var aca=function(){var a=Si(Ge),b=Ti();this.topWin=a;this.pubWin=b;this.slotVars=(this.iframeWin=Ge)||{};this.innerInsElement=b.document.getElementById(this.slotVars.google_async_iframe_id+"_anchor");this.expandableAdsEligibility=-1;this.adsAreDeferred=!1;this.originalBaseUrl="";this.featuresUsed=0;this.isDelayedFetch=!1;this.consentStatus=this.intersectionObserver=null;this.oseId=0;this.onIdentityManagerDone=null;this.showAdsImplStartTime=0};var bca={POSITION:1,VISIBILITY:2,MONITOR_VISIBILITY:3};var Ui=function(a,b,c,d){this.top=a;this.right=b;this.bottom=c;this.left=d};
f=Ui.prototype;f.getWidth=function(){return this.right-this.left};
f.getHeight=function(){return this.bottom-this.top};
f.clone=function(){return new Ui(this.top,this.right,this.bottom,this.left)};
f.contains=function(a){return this&&a?a instanceof Ui?a.left>=this.left&&a.right<=this.right&&a.top>=this.top&&a.bottom<=this.bottom:a.x>=this.left&&a.x<=this.right&&a.y>=this.top&&a.y<=this.bottom:!1};
f.expand=function(a,b,c,d){$a(a)?(this.top-=a.top,this.right+=a.right,this.bottom+=a.bottom,this.left-=a.left):(this.top-=a,this.right+=Number(b),this.bottom+=Number(c),this.left-=Number(d));return this};
f.expandToInclude=function(a){this.left=Math.min(this.left,a.left);this.top=Math.min(this.top,a.top);this.right=Math.max(this.right,a.right);this.bottom=Math.max(this.bottom,a.bottom)};
f.expandToIncludeCoordinate=function(a){this.top=Math.min(this.top,a.y);this.right=Math.max(this.right,a.x);this.bottom=Math.max(this.bottom,a.y);this.left=Math.min(this.left,a.x)};
var Vi=function(a,b){return a==b?!0:a&&b?a.top==b.top&&a.right==b.right&&a.bottom==b.bottom&&a.left==b.left:!1};
f=Ui.prototype;f.ceil=function(){this.top=Math.ceil(this.top);this.right=Math.ceil(this.right);this.bottom=Math.ceil(this.bottom);this.left=Math.ceil(this.left);return this};
f.floor=function(){this.top=Math.floor(this.top);this.right=Math.floor(this.right);this.bottom=Math.floor(this.bottom);this.left=Math.floor(this.left);return this};
f.round=function(){this.top=Math.round(this.top);this.right=Math.round(this.right);this.bottom=Math.round(this.bottom);this.left=Math.round(this.left);return this};
f.translate=function(a,b){a instanceof Wg?(this.left+=a.x,this.right+=a.x,this.top+=a.y,this.bottom+=a.y):(this.left+=a,this.right+=a,Ma(b)&&(this.top+=b,this.bottom+=b));return this};
f.scale=function(a,b){b=Ma(b)?b:a;this.left*=a;this.right*=a;this.top*=b;this.bottom*=b;return this};var Wi=function(a,b,c,d){this.left=a;this.top=b;this.width=c;this.height=d};
Wi.prototype.clone=function(){return new Wi(this.left,this.top,this.width,this.height)};
Wi.prototype.toBox=function(){return new Ui(this.top,this.left+this.width,this.top+this.height,this.left)};
Wi.prototype.intersection=function(a){var b=Math.max(this.left,a.left),c=Math.min(this.left+this.width,a.left+a.width);if(b<=c){var d=Math.max(this.top,a.top);a=Math.min(this.top+this.height,a.top+a.height);d<=a&&(this.left=b,this.top=d,this.width=c-b,this.height=a-d)}};
var Xi=function(a,b){var c=Math.max(a.left,b.left),d=Math.min(a.left+a.width,b.left+b.width);if(c<=d){var e=Math.max(a.top,b.top);a=Math.min(a.top+a.height,b.top+b.height);if(e<=a)return new Wi(c,e,d-c,a-e)}return null},Yi=function(a,b){return a.left<=b.left+b.width&&b.left<=a.left+a.width&&a.top<=b.top+b.height&&b.top<=a.top+a.height};
f=Wi.prototype;f.intersects=function(a){return Yi(this,a)};
f.difference=function(a){var b=Xi(this,a);if(b&&b.height&&b.width){b=[];var c=this.top,d=this.height,e=this.left+this.width,g=this.top+this.height,h=a.left+a.width,m=a.top+a.height;a.top>this.top&&(b.push(new Wi(this.left,this.top,this.width,a.top-this.top)),c=a.top,d-=a.top-this.top);m<g&&(b.push(new Wi(this.left,m,this.width,g-m)),d=m-c);a.left>this.left&&b.push(new Wi(this.left,c,a.left-this.left,d));h<e&&b.push(new Wi(h,c,e-h,d));a=b}else a=[this.clone()];return a};
f.boundingRect=function(a){var b=Math.max(this.left+this.width,a.left+a.width),c=Math.max(this.top+this.height,a.top+a.height);this.left=Math.min(this.left,a.left);this.top=Math.min(this.top,a.top);this.width=b-this.left;this.height=c-this.top};
f.contains=function(a){return a instanceof Wg?a.x>=this.left&&a.x<=this.left+this.width&&a.y>=this.top&&a.y<=this.top+this.height:this.left<=a.left&&this.left+this.width>=a.left+a.width&&this.top<=a.top&&this.top+this.height>=a.top+a.height};
f.distance=function(a){var b=a.x<this.left?this.left-a.x:Math.max(a.x-(this.left+this.width),0);a=a.y<this.top?this.top-a.y:Math.max(a.y-(this.top+this.height),0);return Math.sqrt(b*b+a*a)};
f.getCenter=function(){return new Wg(this.left+this.width/2,this.top+this.height/2)};
f.getBottomRight=function(){return new Wg(this.left+this.width,this.top+this.height)};
f.ceil=function(){this.left=Math.ceil(this.left);this.top=Math.ceil(this.top);this.width=Math.ceil(this.width);this.height=Math.ceil(this.height);return this};
f.floor=function(){this.left=Math.floor(this.left);this.top=Math.floor(this.top);this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this};
f.round=function(){this.left=Math.round(this.left);this.top=Math.round(this.top);this.width=Math.round(this.width);this.height=Math.round(this.height);return this};
f.translate=function(a,b){a instanceof Wg?(this.left+=a.x,this.top+=a.y):(this.left+=a,Ma(b)&&(this.top+=b));return this};
f.scale=function(a,b){b=Ma(b)?b:a;this.left*=a;this.width*=a;this.top*=b;this.height*=b;return this};var $i=function(a,b,c){if(Ka(b))(b=Zi(a,b))&&(a.style[b]=c);else for(var d in b){c=a;var e=b[d],g=Zi(c,d);g&&(c.style[g]=e)}},aj={},Zi=function(a,b){var c=aj[b];
if(!c){var d=Cd(b);c=d;void 0===a.style[d]&&(d=(Re?"Webkit":Qe?"Moz":Ne?"ms":Me?"O":null)+Uaa(d),void 0!==a.style[d]&&(c=d));aj[b]=c}return c},bj=function(a,b){var c=$g(a);
return c.defaultView&&c.defaultView.getComputedStyle&&(a=c.defaultView.getComputedStyle(a,null))?a[b]||a.getPropertyValue(b)||"":""},cj=function(a,b){return bj(a,b)||(a.currentStyle?a.currentStyle[b]:null)||a.style&&a.style[b]},dj=function(a){return cj(a,"position")},fj=function(a,b,c){if(b instanceof Wg){var d=b.x;
b=b.y}else d=b,b=c;a.style.left=ej(d,!1);a.style.top=ej(b,!1)},gj=function(a){try{var b=a.getBoundingClientRect()}catch(c){return{left:0,
top:0,right:0,bottom:0}}Ne&&a.ownerDocument.body&&(a=a.ownerDocument,b.left-=a.documentElement.clientLeft+a.body.clientLeft,b.top-=a.documentElement.clientTop+a.body.clientTop);return b},cca=function(a){if(Ne&&!af(8))return a.offsetParent;
var b=$g(a),c=cj(a,"position"),d="fixed"==c||"absolute"==c;for(a=a.parentNode;a&&a!=b;a=a.parentNode)if(11==a.nodeType&&a.host&&(a=a.host),c=cj(a,"position"),d=d&&"static"==c&&a!=b.documentElement&&a!=b.body,!d&&(a.scrollWidth>a.clientWidth||a.scrollHeight>a.clientHeight||"fixed"==c||"absolute"==c||"relative"==c))return a;return null},ij=function(a){for(var b=new Ui(0,Infinity,Infinity,0),c=ah(a),d=c.getDocument().body,e=c.getDocument().documentElement,g=nh(c.document_);a=cca(a);)if(!(Ne&&0==a.clientWidth||
Re&&0==a.clientHeight&&a==d)&&a!=d&&a!=e&&"visible"!=cj(a,"overflow")){var h=hj(a),m=new Wg(a.clientLeft,a.clientTop);
h.x+=m.x;h.y+=m.y;b.top=Math.max(b.top,h.y);b.right=Math.min(b.right,h.x+a.clientWidth);b.bottom=Math.min(b.bottom,h.y+a.clientHeight);b.left=Math.max(b.left,h.x)}d=g.scrollLeft;g=g.scrollTop;b.left=Math.max(b.left,d);b.top=Math.max(b.top,g);c=kh(c.getWindow());b.right=Math.min(b.right,d+c.width);b.bottom=Math.min(b.bottom,g+c.height);return 0<=b.top&&0<=b.left&&b.bottom>b.top&&b.right>b.left?b:null},hj=function(a){var b=$g(a),c=new Wg(0,0);
var d=b?$g(b):document;d=!Ne||af(9)||lh(ah(d).document_)?d.documentElement:d.body;if(a==d)return c;a=gj(a);b=oh(ah(b).document_);c.x=a.left+b.x;c.y=a.top+b.y;return c},kj=function(a,b){var c=new Wg(0,0),d=ph($g(a));
if(!Le(d,"parent"))return c;do{var e=d==b?hj(a):jj(a);c.x+=e.x;c.y+=e.y}while(d&&d!=b&&d!=d.parent&&(a=d.frameElement)&&(d=d.parent));return c},jj=function(a){a=gj(a);
return new Wg(a.left,a.top)},lj=function(a){if(1==a.nodeType)return jj(a);
a=a.changedTouches?a.changedTouches[0]:a;return new Wg(a.clientX,a.clientY)},mj=function(a,b,c){if(b instanceof Yg)c=b.height,b=b.width;else
if(void 0==c)throw Error("missing height argument");a.style.width=ej(b,!0);a.style.height=ej(c,!0)},ej=function(a,b){"number"==typeof a&&(a=(b?Math.round(a):a)+"px");
return a},oj=function(a){var b=nj;
if("none"!=cj(a,"display"))return b(a);var c=a.style,d=c.display,e=c.visibility,g=c.position;c.visibility="hidden";c.position="absolute";c.display="inline";a=b(a);c.display=d;c.position=g;c.visibility=e;return a},nj=function(a){var b=a.offsetWidth,c=a.offsetHeight,d=Re&&!b&&!c;
return Ia(b)&&!d||!a.getBoundingClientRect?new Yg(b,c):(a=gj(a),new Yg(a.right-a.left,a.bottom-a.top))},pj=function(a){var b=hj(a);
a=oj(a);return new Wi(b.x,b.y,a.width,a.height)},qj=function(a,b){a=a.style;
"opacity"in a?a.opacity=b:"MozOpacity"in a?a.MozOpacity=b:"filter"in a&&(a.filter=""===b?"":"alpha(opacity="+100*Number(b)+")")},rj=function(a,b){a.style.display=b?"":"none"},tj=function(a){var b=sj;
b instanceof Jc&&b.constructor===Jc&&b.SAFE_STYLE_SHEET_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_===Ic?b=b.privateDoNotAccessOrElseSafeStyleSheetWrappedValue_:(Va(b),b="type_error:SafeStyleSheet");Ne&&Ia(a.cssText)?a.cssText=b:a.innerHTML=b},uj=function(a){return"rtl"==cj(a,"direction")},vj=function(a,b){if(/^\d+px?$/.test(b))return parseInt(b,10);
var c=a.style.left,d=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;a.style.left=b;b=a.style.pixelLeft;a.style.left=c;a.runtimeStyle.left=d;return+b},wj=function(a,b){return(b=a.currentStyle?a.currentStyle[b]:null)?vj(a,b):0},xj=function(a,b){if(Ne){var c=wj(a,b+"Left"),d=wj(a,b+"Right"),e=wj(a,b+"Top");
a=wj(a,b+"Bottom");return new Ui(e,d,a,c)}c=bj(a,b+"Left");d=bj(a,b+"Right");e=bj(a,b+"Top");a=bj(a,b+"Bottom");return new Ui(parseFloat(e),parseFloat(d),parseFloat(a),parseFloat(c))},yj={thin:2,
medium:4,thick:6},zj=function(a,b){if("none"==(a.currentStyle?a.currentStyle[b+"Style"]:null))return 0;b=a.currentStyle?a.currentStyle[b+"Width"]:null;return b in yj?yj[b]:vj(a,b)},Aj=function(a){if(Ne&&!af(9)){var b=zj(a,"borderLeft"),c=zj(a,"borderRight"),d=zj(a,"borderTop");
a=zj(a,"borderBottom");return new Ui(d,c,a,b)}b=bj(a,"borderLeftWidth");c=bj(a,"borderRightWidth");d=bj(a,"borderTopWidth");a=bj(a,"borderBottomWidth");return new Ui(parseFloat(d),parseFloat(c),parseFloat(a),parseFloat(b))};var Bj=function(a){this.methodName=a},dca=new Bj(5),eca=new Bj(6),fca=new Bj(7),gca=new Bj(8),Cj=function(a,b){return b[a.methodName]||function(){}};var Dj=function(){this.getBooleanFlag=function(){return!1};
this.getNumberFlag=function(){return 0};
this.getStringFlag=function(){return""};
this.getStringListFlag=function(){return[]}};
Dj.prototype.initMethods=function(a){this.getBooleanFlag=Cj(dca,a);this.getNumberFlag=Cj(eca,a);this.getStringFlag=Cj(fca,a);this.getStringListFlag=Cj(gca,a)};
Ua(Dj);var hca={"AMP-CAROUSEL":"ac","AMP-FX-FLYING-CARPET":"fc","AMP-LIGHTBOX":"lb","AMP-STICKY-AD":"sa"},Ej=function(a){a=void 0===a?q:a;var b=a.context||a.AMP_CONTEXT_DATA;if(!b)try{b=a.parent.context||a.parent.AMP_CONTEXT_DATA}catch(c){}try{if(b&&b.pageViewId&&b.canonicalUrl)return b}catch(c){}return null};var Fj=function(a,b){return typeof a===b},ica=function(a){return Fj(a,"object")},Gj=function(a){return Fj(a,"function")},Hj=function(a,b){for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&b.call(void 0,a[c],c,a)},Ij=function(a){return!(!a||!a.call)&&Gj(a)},Jj=function(a,b){if(a.filter)return a.filter(b,void 0);
for(var c=[],d=0;d<a.length;d++)b.call(void 0,a[d],d,a)&&c.push(a[d]);return c},jca=function(a,b){var c=b.slice(-1),d="?"===c||"#"===c?"":"&",e=[b];
Hj(a,function(g,h){if(g||0===g||!1===g)Fj(g,"boolean")&&(g=g?1:0),e.push(d),e.push(h),e.push("="),e.push(encodeURIComponent(String(g))),d="&"});
return e.join("")},Kj=function(){var a=void 0===a?Ge:a;
try{return a.history.length}catch(b){return 0}},Lj=function(a){a.u_tz=-new Date().getTimezoneOffset();
a.u_his=Kj();a.u_java=!!Ge.navigator&&!Fj(Ge.navigator.javaEnabled,"unknown")&&!!Ge.navigator.javaEnabled&&Ge.navigator.javaEnabled();Ge.screen&&(a.u_h=Ge.screen.height,a.u_w=Ge.screen.width,a.u_ah=Ge.screen.availHeight,a.u_aw=Ge.screen.availWidth,a.u_cd=Ge.screen.colorDepth);Ge.navigator&&Ge.navigator.plugins&&(a.u_nplug=Ge.navigator.plugins.length);Ge.navigator&&Ge.navigator.mimeTypes&&(a.u_nmime=Ge.navigator.mimeTypes.length)},Mj=!!window.google_async_iframe_id,Nj=Mj&&window.parent||window,Ti=
function(){if(Mj&&!Ii(Nj)){var a="."+Fe.domain;
try{for(;2<a.split(".").length&&!Ii(Nj);)Fe.domain=a=a.substr(a.indexOf(".")+1),Nj=window.parent}catch(b){}Ii(Nj)||(Nj=window)}return Nj},kca=function(){var a,b=window.ActiveXObject;
if(navigator.plugins&&navigator.mimeTypes.length){if((a=navigator.plugins["Shockwave Flash"])&&a.description)return a.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s)+r/,".")}else{if(navigator.userAgent&&0<=navigator.userAgent.indexOf("Windows CE")){var c=3;for(a=1;a;)try{a=new b("ShockwaveFlash.ShockwaveFlash."+(c+1)),c++}catch(d){a=null}return c.toString()}if(Oc()){a=null;try{a=new b("ShockwaveFlash.ShockwaveFlash.7")}catch(d){c=0;try{a=new b("ShockwaveFlash.ShockwaveFlash.6"),c=6,a.AllowScriptAccess=
"always"}catch(e){if(6===c)return c.toString()}try{a=new b("ShockwaveFlash.ShockwaveFlash")}catch(e){}}if(a)return c=a.GetVariable("$version").split(" ")[1],c.replace(/,/g,".")}}return"0"},Si=function(a){a=a.top;
return Ii(a)?a:null};var Oj=function(a){return null!==a&&a!=a.top},Pj=function(a,b,c){a&&Oj(b)&&(b=b.top);
try{return(void 0===c?0:c)?new Yg(b.innerWidth,b.innerHeight).round():kh(b).round()}catch(d){return new Yg(-12245933,-12245933)}},Qj=function(a,b,c){try{a&&(b=b.top);
var d=Pj(a,b,void 0===c?!1:c),e=oh(ah(b.document).document_);if(-12245933==d.width){var g=d.width;var h=new Ui(g,g,g,g)}else h=new Ui(e.y,e.x+d.width,e.y+d.height,e.x);return h}catch(m){return new Ui(-12245933,-12245933,-12245933,-12245933)}};var Rj=new Date().getTime();var Sj=function(a){try{var b=a.screenX;var c=a.screenY}catch(m){}try{var d=a.outerWidth;var e=a.outerHeight}catch(m){}try{var g=a.innerWidth;var h=a.innerHeight}catch(m){}return[a.screenLeft,a.screenTop,b,c,a.screen?a.screen.availWidth:void 0,a.screen?a.screen.availTop:void 0,d,e,g,h]};var Tj=function(a){if(!a)return"";a=a.split("#")[0].split("?")[0];a=a.toLowerCase();0==a.indexOf("//")&&(a=window.location.protocol+a);/^[\w\-]*:\/\//.test(a)||(a=window.location.href);var b=a.substring(a.indexOf("://")+3),c=b.indexOf("/");-1!=c&&(b=b.substring(0,c));a=a.substring(0,a.indexOf("://"));if("http"!==a&&"https"!==a&&"chrome-extension"!==a&&"file"!==a&&"android-app"!==a&&"chrome-search"!==a&&"app"!==a)throw Error("Invalid URI scheme in origin: "+a);c="";var d=b.indexOf(":");if(-1!=d){var e=
b.substring(d+1);b=b.substring(0,d);if("http"===a&&"80"!==e||"https"===a&&"443"!==e)c=":"+e}return a+"://"+b+c};var lca=function(){function a(){e[0]=1732584193;e[1]=4023233417;e[2]=2562383102;e[3]=271733878;e[4]=3285377520;x=p=0}
function b(y){for(var B=h,G=0;64>G;G+=4)B[G/4]=y[G]<<24|y[G+1]<<16|y[G+2]<<8|y[G+3];for(G=16;80>G;G++)y=B[G-3]^B[G-8]^B[G-14]^B[G-16],B[G]=(y<<1|y>>>31)&4294967295;y=e[0];var P=e[1],S=e[2],ca=e[3],Ja=e[4];for(G=0;80>G;G++){if(40>G){if(20>G){var Ya=ca^P&(S^ca);var Mb=1518500249}else Ya=P^S^ca,Mb=1859775393;}else 60>G?(Ya=P&S|ca&(P|S),Mb=2400959708):(Ya=P^S^ca,Mb=3395469782);Ya=((y<<5|y>>>27)&4294967295)+Ya+Ja+Mb+B[G]&4294967295;Ja=ca;ca=S;S=(P<<30|P>>>2)&4294967295;P=y;y=Ya}e[0]=e[0]+y&4294967295;e[1]=
e[1]+P&4294967295;e[2]=e[2]+S&4294967295;e[3]=e[3]+ca&4294967295;e[4]=e[4]+Ja&4294967295}
function c(y,B){if("string"===typeof y){y=unescape(encodeURIComponent(y));for(var G=[],P=0,S=y.length;P<S;++P)G.push(y.charCodeAt(P));y=G}B||(B=y.length);G=0;if(0==p)for(;G+64<B;)b(y.slice(G,G+64)),G+=64,x+=64;for(;G<B;)if(g[p++]=y[G++],x++,64==p)for(p=0,b(g);G+64<B;)b(y.slice(G,G+64)),G+=64,x+=64}
function d(){var y=[],B=8*x;56>p?c(m,56-p):c(m,64-(p-56));for(var G=63;56<=G;G--)g[G]=B&255,B>>>=8;b(g);for(G=B=0;5>G;G++)for(var P=24;0<=P;P-=8)y[B++]=e[G]>>P&255;return y}
for(var e=[],g=[],h=[],m=[128],n=1;64>n;++n)m[n]=0;var p,x;a();return{reset:a,update:c,digest:d,digestString:function(){for(var y=d(),B="",G=0;G<y.length;G++)B+="0123456789ABCDEF".charAt(Math.floor(y[G]/16))+"0123456789ABCDEF".charAt(y[G]%16);return B}}};var mca=function(a,b,c){var d=[],e=[];if(1==(Wa(c)?2:1))return e=[b,a],mb(d,function(m){e.push(m)}),Uj(e.join(" "));
var g=[],h=[];mb(c,function(m){h.push(m.key);g.push(m.value)});
c=Math.floor(new Date().getTime()/1E3);e=0==g.length?[c,b,a]:[g.join(":"),c,b,a];mb(d,function(m){e.push(m)});
a=Uj(e.join(" "));a=[c,a];0==h.length||a.push(h.join(""));return a.join("_")},Uj=function(a){var b=lca();
b.update(a);return b.digestString().toLowerCase()};var Vj=function(a){var b=Tj(String(q.location.href)),c=q.__OVERRIDE_SID;null==c&&(c=new Fg(document).get("SID"));if(c&&(b=(c=0==b.indexOf("https:")||0==b.indexOf("chrome-extension:"))?q.__SAPISID:q.__APISID,null==b&&(b=new Fg(document).get(c?"SAPISID":"APISID")),b)){c=c?"SAPISIDHASH":"APISIDHASH";var d=String(q.location.href);return d&&b&&c?[c,mca(Tj(d),b,a||null)].join(" "):null}return null};var Wj=function(a,b){this.limit_=100;this.create_=a;this.reset_=b;this.occupants_=0;this.head_=null};
Wj.prototype.get=function(){if(0<this.occupants_){this.occupants_--;var a=this.head_;this.head_=a.next;a.next=null}else a=this.create_();return a};
Wj.prototype.put=function(a){this.reset_(a);this.occupants_<this.limit_&&(this.occupants_++,a.next=this.head_,this.head_=a)};
Wj.prototype.occupants=function(){return this.occupants_};var Xj=function(a){q.setTimeout(function(){throw a},0)},ak=function(a){a=nca(a);
!Za(q.setImmediate)||q.Window&&q.Window.prototype&&!Nc("Edge")&&q.Window.prototype.setImmediate==q.setImmediate?(Yj||(Yj=oca()),Yj(a)):q.setImmediate(a)},Yj,oca=function(){var a=q.MessageChannel;
"undefined"===typeof a&&"undefined"!==typeof window&&window.postMessage&&window.addEventListener&&!Nc("Presto")&&(a=function(){var e=document.createElement("IFRAME");e.style.display="none";hd(e,dc(uaa));document.documentElement.appendChild(e);var g=e.contentWindow;e=g.document;e.open();e.write(Vc(bd));e.close();var h="callImmediate"+Math.random(),m="file:"==g.location.protocol?"*":g.location.protocol+"//"+g.location.host;e=r(function(n){if(("*"==m||n.origin==m)&&n.data==h)this.port1.onmessage()},
this);
g.addEventListener("message",e,!1);this.port1={};this.port2={postMessage:function(){g.postMessage(h,m)}}});
if("undefined"!==typeof a&&!Oc()){var b=new a,c={},d=c;b.port1.onmessage=function(){if(Ia(c.next)){c=c.next;var e=c.cb;c.cb=null;e()}};
return function(e){d.next={cb:e};d=d.next;b.port2.postMessage(0)}}return"undefined"!==typeof document&&"onreadystatechange"in document.createElement("SCRIPT")?function(e){var g=document.createElement("SCRIPT");
g.onreadystatechange=function(){g.onreadystatechange=null;g.parentNode.removeChild(g);g=null;e();e=null};
document.documentElement.appendChild(g)}:function(e){q.setTimeout(e,0)}},nca=Lb;var bk=function(){this.workTail_=this.workHead_=null},dk=new Wj(function(){return new ck},function(a){a.reset()});
bk.prototype.add=function(a,b){var c=dk.get();c.set(a,b);this.workTail_?this.workTail_.next=c:this.workHead_=c;this.workTail_=c};
bk.prototype.remove=function(){var a=null;this.workHead_&&(a=this.workHead_,this.workHead_=this.workHead_.next,this.workHead_||(this.workTail_=null),a.next=null);return a};
var ck=function(){this.next=this.scope=this.fn=null};
ck.prototype.set=function(a,b){this.fn=a;this.scope=b;this.next=null};
ck.prototype.reset=function(){this.next=this.scope=this.fn=null};var hk=function(a,b){ek||pca();fk||(ek(),fk=!0);gk.add(a,b)},ek,pca=function(){if(q.Promise&&q.Promise.resolve){var a=q.Promise.resolve(void 0);
ek=function(){a.then(ik)}}else ek=function(){ak(ik)}},fk=!1,gk=new bk,ik=function(){for(var a;a=gk.remove();){try{a.fn.call(a.scope)}catch(b){Xj(b)}dk.put(a)}fk=!1};var qca=function(){this.blockSize=-1};var jk=function(){this.blockSize=-1;this.blockSize=64;this.chain_=[];this.buf_=[];this.W_=[];this.pad_=[];this.pad_[0]=128;for(var a=1;a<this.blockSize;++a)this.pad_[a]=0;this.total_=this.inbuf_=0;this.reset()};
t(jk,qca);jk.prototype.reset=function(){this.chain_[0]=1732584193;this.chain_[1]=4023233417;this.chain_[2]=2562383102;this.chain_[3]=271733878;this.chain_[4]=3285377520;this.total_=this.inbuf_=0};
var kk=function(a,b,c){c||(c=0);var d=a.W_;if(Ka(b))for(var e=0;16>e;e++)d[e]=b.charCodeAt(c)<<24|b.charCodeAt(c+1)<<16|b.charCodeAt(c+2)<<8|b.charCodeAt(c+3),c+=4;else for(e=0;16>e;e++)d[e]=b[c]<<24|b[c+1]<<16|b[c+2]<<8|b[c+3],c+=4;for(e=16;80>e;e++){var g=d[e-3]^d[e-8]^d[e-14]^d[e-16];d[e]=(g<<1|g>>>31)&4294967295}b=a.chain_[0];c=a.chain_[1];var h=a.chain_[2],m=a.chain_[3],n=a.chain_[4];for(e=0;80>e;e++){if(40>e){if(20>e){g=m^c&(h^m);var p=1518500249}else g=c^h^m,p=1859775393;}else 60>e?(g=c&h|m&(
c|h),p=2400959708):(g=c^h^m,p=3395469782);g=(b<<5|b>>>27)+g+n+p+d[e]&4294967295;n=m;m=h;h=(c<<30|c>>>2)&4294967295;c=b;b=g}a.chain_[0]=a.chain_[0]+b&4294967295;a.chain_[1]=a.chain_[1]+c&4294967295;a.chain_[2]=a.chain_[2]+h&4294967295;a.chain_[3]=a.chain_[3]+m&4294967295;a.chain_[4]=a.chain_[4]+n&4294967295};
jk.prototype.update=function(a,b){if(null!=a){Ia(b)||(b=a.length);for(var c=b-this.blockSize,d=0,e=this.buf_,g=this.inbuf_;d<b;){if(0==g)for(;d<=c;)kk(this,a,d),d+=this.blockSize;if(Ka(a))for(;d<b;){if(e[g]=a.charCodeAt(d),++g,++d,g==this.blockSize){kk(this,e);g=0;break}}else for(;d<b;)if(e[g]=a[d],++g,++d,g==this.blockSize){kk(this,e);g=0;break}}this.inbuf_=g;this.total_+=b}};
jk.prototype.digest=function(){var a=[],b=8*this.total_;56>this.inbuf_?this.update(this.pad_,56-this.inbuf_):this.update(this.pad_,this.blockSize-(this.inbuf_-56));for(var c=this.blockSize-1;56<=c;c--)this.buf_[c]=b&255,b/=256;kk(this,this.buf_);for(c=b=0;5>c;c++)for(var d=24;0<=d;d-=8)a[b]=this.chain_[c]>>d&255,++b;return a};var lk=function(){this.disposed_=this.disposed_;this.onDisposeCallbacks_=this.onDisposeCallbacks_};
lk.prototype.disposed_=!1;lk.prototype.isDisposed=function(){return this.disposed_};
lk.prototype.getDisposed=lk.prototype.isDisposed;lk.prototype.dispose=function(){this.disposed_||(this.disposed_=!0,this.disposeInternal())};
var ok=function(a,b){mk(a,db(nk,b))},mk=function(a,b){a.disposed_?Ia(void 0)?b.call(void 0):b():(a.onDisposeCallbacks_||(a.onDisposeCallbacks_=[]),a.onDisposeCallbacks_.push(Ia(void 0)?r(b,void 0):b))};
lk.prototype.disposeInternal=function(){if(this.onDisposeCallbacks_)for(;this.onDisposeCallbacks_.length;)this.onDisposeCallbacks_.shift()()};
var nk=function(a){a&&"function"==typeof a.dispose&&a.dispose()};var pk=function(a){if(a.classList)return a.classList;a=a.className;return Ka(a)&&a.match(/\S+/g)||[]},qk=function(a,b){return a.classList?a.classList.contains(b):wb(pk(a),b)},rk=function(a,b){a.classList?a.classList.add(b):qk(a,b)||(a.className+=0<a.className.length?" "+b:b)},sk=function(a,b){if(a.classList)mb(b,function(e){rk(a,e)});else
{var c={};mb(pk(a),function(e){c[e]=!0});
mb(b,function(e){c[e]=!0});
a.className="";for(var d in c)a.className+=0<a.className.length?" "+d:d}},tk=function(a,b){a.classList?a.classList.remove(b):qk(a,b)&&(a.className=nb(pk(a),function(c){return c!=b}).join(" "))},uk=function(a,b){a.classList?mb(b,function(c){tk(a,c)}):a.className=nb(pk(a),function(c){return!wb(b,c)}).join(" ")};var vk="StopIteration"in q?q.StopIteration:{message:"StopIteration",stack:""},wk=function(){};
wk.prototype.next=function(){throw vk};
wk.prototype.__iterator__=function(){return this};
var xk=function(a){if(a instanceof wk)return a;if("function"==typeof a.__iterator__)return a.__iterator__(!1);if(Xa(a)){var b=0,c=new wk;c.next=function(){for(;;){if(b>=a.length)throw vk;if(b in a)return a[b++];b++}};
return c}throw Error("Not implemented")},yk=function(a,b,c){if(Xa(a))try{mb(a,b,c)}catch(d){if(d!==vk)throw d;
}else{a=xk(a);try{for(;;)b.call(c,a.next(),void 0,a)}catch(d){if(d!==vk)throw d}}},rca=function(a,b){var c=1;
yk(a,function(d){c=b.call(void 0,c,d)});
return c},sca=function(a,b){var c=xk(a);
a=new wk;a.next=function(){var d=c.next();if(b.call(void 0,d,void 0,c))return d;throw vk};
return a},zk=function(a){if(Xa(a))return Cb(a);
a=xk(a);var b=[];yk(a,function(c){b.push(c)});
return b},tca=function(a){var b=xk(a);
a=new wk;var c=100;a.next=function(){if(0<c--)return b.next();throw vk};
return a};var Ak=function(a,b){this.map_={};this.keys_=[];this.version_=this.count_=0;var c=arguments.length;if(1<c){if(c%2)throw Error("Uneven number of arguments");for(var d=0;d<c;d+=2)this.set(arguments[d],arguments[d+1])}else a&&this.addAll(a)};
f=Ak.prototype;f.getCount=function(){return this.count_};
f.getValues=function(){Bk(this);for(var a=[],b=0;b<this.keys_.length;b++)a.push(this.map_[this.keys_[b]]);return a};
f.getKeys=function(){Bk(this);return this.keys_.concat()};
f.containsKey=function(a){return Dk(this.map_,a)};
f.containsValue=function(a){for(var b=0;b<this.keys_.length;b++){var c=this.keys_[b];if(Dk(this.map_,c)&&this.map_[c]==a)return!0}return!1};
f.equals=function(a,b){if(this===a)return!0;if(this.count_!=a.getCount())return!1;b=b||uca;Bk(this);for(var c,d=0;c=this.keys_[d];d++)if(!b(this.get(c),a.get(c)))return!1;return!0};
var uca=function(a,b){return a===b};
Ak.prototype.isEmpty=function(){return 0==this.count_};
Ak.prototype.clear=function(){this.map_={};this.version_=this.count_=this.keys_.length=0};
Ak.prototype.remove=function(a){return Dk(this.map_,a)?(delete this.map_[a],this.count_--,this.version_++,this.keys_.length>2*this.count_&&Bk(this),!0):!1};
var Bk=function(a){if(a.count_!=a.keys_.length){for(var b=0,c=0;b<a.keys_.length;){var d=a.keys_[b];Dk(a.map_,d)&&(a.keys_[c++]=d);b++}a.keys_.length=c}if(a.count_!=a.keys_.length){var e={};for(c=b=0;b<a.keys_.length;)d=a.keys_[b],Dk(e,d)||(a.keys_[c++]=d,e[d]=1),b++;a.keys_.length=c}};
f=Ak.prototype;f.get=function(a,b){return Dk(this.map_,a)?this.map_[a]:b};
f.set=function(a,b){Dk(this.map_,a)||(this.count_++,this.keys_.push(a),this.version_++);this.map_[a]=b};
f.addAll=function(a){if(a instanceof Ak)for(var b=a.getKeys(),c=0;c<b.length;c++)this.set(b[c],a.get(b[c]));else for(b in a)this.set(b,a[b])};
f.forEach=function(a,b){for(var c=this.getKeys(),d=0;d<c.length;d++){var e=c[d],g=this.get(e);a.call(b,g,e,this)}};
f.clone=function(){return new Ak(this)};
f.transpose=function(){for(var a=new Ak,b=0;b<this.keys_.length;b++){var c=this.keys_[b];a.set(this.map_[c],c)}return a};
f.toObject=function(){Bk(this);for(var a={},b=0;b<this.keys_.length;b++){var c=this.keys_[b];a[c]=this.map_[c]}return a};
f.getKeyIterator=function(){return this.__iterator__(!0)};
f.getValueIterator=function(){return this.__iterator__(!1)};
f.__iterator__=function(a){Bk(this);var b=0,c=this.version_,d=this,e=new wk;e.next=function(){if(c!=d.version_)throw Error("The map has changed since the iterator was created");if(b>=d.keys_.length)throw vk;var g=d.keys_[b++];return a?g:d.map_[g]};
return e};
var Dk=function(a,b){return Object.prototype.hasOwnProperty.call(a,b)};var Ek=function(a){a=String(a);if(/^\s*$/.test(a)?0:/^[\],:{}\s\u2028\u2029]*$/.test(a.replace(/\\["\\\/bfnrtu]/g,"@").replace(/(?:"[^"\\\n\r\u2028\u2029\x00-\x08\x0a-\x1f]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?)[\s\u2028\u2029]*(?=:|,|]|}|$)/g,"]").replace(/(?:^|:|,)(?:[\s\u2028\u2029]*\[)+/g,"")))try{return eval("("+a+")")}catch(b){}throw Error("Invalid JSON string: "+a)},Gk=function(a){return new Fk().serialize(a)},Fk=function(){this.replacer_=void 0};
Fk.prototype.serialize=function(a){var b=[];Hk(this,a,b);return b.join("")};
var Hk=function(a,b,c){if(null==b)c.push("null");else{if("object"==typeof b){if(Wa(b)){var d=b;b=d.length;c.push("[");for(var e="",g=0;g<b;g++)c.push(e),e=d[g],Hk(a,a.replacer_?a.replacer_.call(d,String(g),e):e,c),e=",";c.push("]");return}if(b instanceof String||b instanceof Number||b instanceof Boolean)b=b.valueOf();else{c.push("{");g="";for(d in b)Object.prototype.hasOwnProperty.call(b,d)&&(e=b[d],"function"!=typeof e&&(c.push(g),Ik(d,c),c.push(":"),Hk(a,a.replacer_?a.replacer_.call(b,d,e):e,c),
g=","));c.push("}");return}}switch(typeof b){case"string":Ik(b,c);break;case"number":c.push(isFinite(b)&&!isNaN(b)?String(b):"null");break;case"boolean":c.push(String(b));break;case"function":c.push("null");break;default:throw Error("Unknown type: "+typeof b);}}},Jk={"\"":"\\\"",
"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},vca=/\uffff/.test("\uFFFF")?/[\\"\x00-\x1f\x7f-\uffff]/g:/[\\"\x00-\x1f\x7f-\xff]/g,Ik=function(a,b){b.push("\"",a.replace(vca,function(c){var d=Jk[c];d||(d="\\u"+(c.charCodeAt(0)|65536).toString(16).substr(1),Jk[c]=d);return d}),"\"")};var Kk=function(a){a.prototype.$goog_Thenable=!0},Lk=function(a){if(!a)return!1;
try{return!!a.$goog_Thenable}catch(b){return!1}};var Mk=function(a){lk.call(this);this.key_=1;this.pendingKeys_=[];this.publishDepth_=0;this.subscriptions_=[];this.topics_={};this.async_=!!a};
t(Mk,lk);f=Mk.prototype;f.subscribe=function(a,b,c){var d=this.topics_[a];d||(d=this.topics_[a]=[]);var e=this.key_;this.subscriptions_[e]=a;this.subscriptions_[e+1]=b;this.subscriptions_[e+2]=c;this.key_=e+3;d.push(e);return e};
f.subscribeOnce=function(a,b,c){var d=!1,e=this.subscribe(a,function(g){d||(d=!0,this.unsubscribeByKey(e),b.apply(c,arguments))},this);
return e};
f.unsubscribe=function(a,b,c){if(a=this.topics_[a]){var d=this.subscriptions_;if(a=ub(a,function(e){return d[e+1]==b&&d[e+2]==c}))return this.unsubscribeByKey(a)}return!1};
f.unsubscribeByKey=function(a){var b=this.subscriptions_[a];if(b){var c=this.topics_[b];0!=this.publishDepth_?(this.pendingKeys_.push(a),this.subscriptions_[a+1]=Ta):(c&&zb(c,a),delete this.subscriptions_[a],delete this.subscriptions_[a+1],delete this.subscriptions_[a+2])}return!!b};
f.publish=function(a,b){var c=this.topics_[a];if(c){for(var d=Array(arguments.length-1),e=1,g=arguments.length;e<g;e++)d[e-1]=arguments[e];if(this.async_)for(e=0;e<c.length;e++){var h=c[e];wca(this.subscriptions_[h+1],this.subscriptions_[h+2],d)}else{this.publishDepth_++;try{for(e=0,g=c.length;e<g;e++)h=c[e],this.subscriptions_[h+1].apply(this.subscriptions_[h+2],d)}finally{if(this.publishDepth_--,0<this.pendingKeys_.length&&0==this.publishDepth_)for(;c=this.pendingKeys_.pop();)this.unsubscribeByKey(c)}}return 0!=
e}return!1};
var wca=function(a,b,c){hk(function(){a.apply(b,c)})};
Mk.prototype.clear=function(a){if(a){var b=this.topics_[a];b&&(mb(b,this.unsubscribeByKey,this),delete this.topics_[a])}else this.subscriptions_.length=0,this.topics_={}};
Mk.prototype.getCount=function(a){if(a){var b=this.topics_[a];return b?b.length:0}a=0;for(b in this.topics_)a+=this.getCount(b);return a};
Mk.prototype.disposeInternal=function(){Mk.superClass_.disposeInternal.call(this);this.clear();this.pendingKeys_.length=0};var Nk=function(a){this.mechanism=a};
Nk.prototype.set=function(a,b){Ia(b)?this.mechanism.set(a,Gk(b)):this.mechanism.remove(a)};
Nk.prototype.get=function(a){try{var b=this.mechanism.get(a)}catch(c){return}if(null!==b)try{return JSON.parse(b)}catch(c){throw"Storage: Invalid value was encountered"}};
Nk.prototype.remove=function(a){this.mechanism.remove(a)};var Ok=function(a){this.mechanism=a};
t(Ok,Nk);var Pk=function(a){this.data=a},Qk=function(a){return!Ia(a)||a instanceof Pk?a:new Pk(a)};
Ok.prototype.set=function(a,b){Ok.superClass_.set.call(this,a,Qk(b))};
Ok.prototype.getWrapper=function(a){a=Ok.superClass_.get.call(this,a);if(!Ia(a)||a instanceof Object)return a;throw"Storage: Invalid value was encountered"};
Ok.prototype.get=function(a){if(a=this.getWrapper(a)){if(a=a.data,!Ia(a))throw"Storage: Invalid value was encountered"}else a=void 0;return a};var Rk=function(a){this.mechanism=a};
t(Rk,Ok);var Sk=function(a){var b=a.creation;a=a.expiration;return!!a&&a<fb()||!!b&&b>fb()};
Rk.prototype.set=function(a,b,c){if(b=Qk(b)){if(c){if(c<fb()){Rk.prototype.remove.call(this,a);return}b.expiration=c}b.creation=fb()}Rk.superClass_.set.call(this,a,b)};
Rk.prototype.getWrapper=function(a,b){var c=Rk.superClass_.getWrapper.call(this,a);if(c)if(!b&&Sk(c))Rk.prototype.remove.call(this,a);else return c};var xca=function(){};var Tk=function(){};
t(Tk,xca);Tk.prototype.getCount=function(){var a=0;yk(this.__iterator__(!0),function(){a++});
return a};
Tk.prototype.clear=function(){var a=zk(this.__iterator__(!0)),b=this;mb(a,function(c){b.remove(c)})};var Uk=function(a){this.storage_=a};
t(Uk,Tk);f=Uk.prototype;f.isAvailable=function(){if(!this.storage_)return!1;try{return this.storage_.setItem("__sak","1"),this.storage_.removeItem("__sak"),!0}catch(a){return!1}};
f.set=function(a,b){try{this.storage_.setItem(a,b)}catch(c){if(0==this.storage_.length)throw"Storage mechanism: Storage disabled";throw"Storage mechanism: Quota exceeded"}};
f.get=function(a){a=this.storage_.getItem(a);if(!Ka(a)&&null!==a)throw"Storage mechanism: Invalid value was encountered";return a};
f.remove=function(a){this.storage_.removeItem(a)};
f.getCount=function(){return this.storage_.length};
f.__iterator__=function(a){var b=0,c=this.storage_,d=new wk;d.next=function(){if(b>=c.length)throw vk;var e=c.key(b++);if(a)return e;e=c.getItem(e);if(!Ka(e))throw"Storage mechanism: Invalid value was encountered";return e};
return d};
f.clear=function(){this.storage_.clear()};
f.key=function(a){return this.storage_.key(a)};var Vk=function(){var a=null;try{a=window.localStorage||null}catch(b){}this.storage_=a};
t(Vk,Uk);var Wk=function(){var a=null;try{a=window.sessionStorage||null}catch(b){}this.storage_=a};
t(Wk,Uk);var Yk=function(a,b){this.storageKey_=a;this.storageNode_=null;if(Ne&&!af(9)){Xk||(Xk=new Ak);this.storageNode_=Xk.get(a);this.storageNode_||(b?this.storageNode_=document.getElementById(b):(this.storageNode_=document.createElement("userdata"),this.storageNode_.addBehavior("#default#userData"),document.body.appendChild(this.storageNode_)),Xk.set(a,this.storageNode_));try{this.storageNode_.load(this.storageKey_)}catch(c){this.storageNode_=null}}};
t(Yk,Tk);var yca={".":".2E","!":".21","~":".7E","*":".2A","'":".27","(":".28",")":".29","%":"."},Xk=null,Zk=function(a){return"_"+encodeURIComponent(a).replace(/[.!~*'()%]/g,function(b){return yca[b]})};
f=Yk.prototype;f.isAvailable=function(){return!!this.storageNode_};
f.set=function(a,b){this.storageNode_.setAttribute(Zk(a),b);$k(this)};
f.get=function(a){a=this.storageNode_.getAttribute(Zk(a));if(!Ka(a)&&null!==a)throw"Storage mechanism: Invalid value was encountered";return a};
f.remove=function(a){this.storageNode_.removeAttribute(Zk(a));$k(this)};
f.getCount=function(){return al(this).attributes.length};
f.__iterator__=function(a){var b=0,c=al(this).attributes,d=new wk;d.next=function(){if(b>=c.length)throw vk;var e=c[b++];if(a)return decodeURIComponent(e.nodeName.replace(/\./g,"%")).substr(1);e=e.nodeValue;if(!Ka(e))throw"Storage mechanism: Invalid value was encountered";return e};
return d};
f.clear=function(){for(var a=al(this),b=a.attributes.length;0<b;b--)a.removeAttribute(a.attributes[b-1].nodeName);$k(this)};
var $k=function(a){try{a.storageNode_.save(a.storageKey_)}catch(b){throw"Storage mechanism: Quota exceeded"}},al=function(a){return a.storageNode_.XMLDocument.documentElement};var bl=function(a,b){this.mechanism_=a;this.prefix_=b+"::"};
t(bl,Tk);bl.prototype.set=function(a,b){this.mechanism_.set(this.prefix_+a,b)};
bl.prototype.get=function(a){return this.mechanism_.get(this.prefix_+a)};
bl.prototype.remove=function(a){this.mechanism_.remove(this.prefix_+a)};
bl.prototype.__iterator__=function(a){var b=this.mechanism_.__iterator__(!0),c=this,d=new wk;d.next=function(){for(var e=b.next();e.substr(0,c.prefix_.length)!=c.prefix_;)e=b.next();return a?e.substr(c.prefix_.length):c.mechanism_.get(e)};
return d};var cl=function(a){var b=new Vk;return b.isAvailable()?a?new bl(b,a):b:null};fa();var dl=Symbol("PIECES");function el(a,b,c){zca(a,b);a[b][dl].unshift(c)}
function zca(a,b){if(!a[b]||!a[b][dl]){var c=a[b],d=c?[c]:[];a[b]=function(){for(var e=k(d),g=e.next();!g.done;g=e.next())g.value.apply(this,arguments)};
a[b][dl]=d}}
function fl(a){if(!a)return[];var b=[];a=k(a);for(var c=a.next();!c.done;c=a.next())c=c.value,Array.isArray(c)?b.push.apply(b,ka(fl(c))):b.push(c);return b}
;var gl=window.Polymer,hl=gl&&gl.version&&gl.version.startsWith("1."),il=/\bclass\b/.test(function(){}.toString());
window.PolymerFakeBaseClass=function(){};
var F=function(){return PolymerFakeBaseClass.apply(this,arguments)||this};
l(F,PolymerFakeBaseClass);var jl=function(){return PolymerFakeBaseClass.apply(this,arguments)||this};
l(jl,PolymerFakeBaseClass);function Aca(a){var b={};Object.defineProperties(b,Object.getOwnPropertyDescriptors(a));return b}
fa();var Bca=Symbol("POLYMER_COMPONENT_DEFINITION");
function kl(a){var b="string"!==typeof a?a:{is:a,notifyObserversOnUndefined:!0};void 0===b.fastInit&&(b.fastInit=!0);return function(c){if(Object.getPrototypeOf(c.prototype).constructor!==F)throw Error("Custom elements must inherit directly from PolymerElement.");var d=il&&hl?Aca(c.prototype):c.prototype;d.is=b.is;ll(d,c,b.fastInit);hl&&b.notifyObserversOnUndefined&&el(d,"created",function(){var m=this._propertyEffects;if(m)for(var n=k(Object.keys(m)),p=n.next();!p.done;p=n.next()){p=k(m[p.value]);
for(var x=p.next();!x.done;x=p.next())if(x=x.value,"compute"===x.kind||"complexObserver"===x.kind)x.effect.args=[]}});
if(il)for(var e=k(Object.getOwnPropertyNames(d)),g=e.next();!g.done;g=e.next()){g=g.value;var h=Object.getOwnPropertyDescriptor(d,g);!1===h.enumerable&&(h.enumerable=!0,Object.defineProperty(d,g,h))}void 0!==c.template&&(d._template=c.template);Polymer(d);c[Bca]=d}}
function ml(){var a=void 0===a?{}:a;void 0===a.fastInit&&(a.fastInit=!0);return function(b){if(Object.getPrototypeOf(b.prototype).constructor!==jl)throw Error("Custom behaviors must inherit directly from PolymerBehavior.");ll(b.prototype,b,a.fastInit)}}
function ll(a,b,c){c=void 0===c?!1:c;Cca(b);hl||!c?el(a,"ready",function(){for(var d={},e=k(fl(this.behaviors)),g=e.next();!g.done;g=e.next())g=g.value,g.properties&&Object.assign(d,nl(this,g.properties));Object.assign(d,nl(this,this.properties));ol(b,this);e=k(Object.keys(d));for(g=e.next();!g.done;g=e.next())g=g.value,this[g]=d[g]}):el(a,"created",function(){ol(b,this)})}
function ol(a,b){if(il){a=new a;for(var c=k(Object.getOwnPropertyNames(a)),d=c.next();!d.done;d=c.next())d=d.value,b[d]=a[d];for(c=b;c&&c!==Object.prototype;c=Object.getPrototypeOf(c)){d=k(Object.getOwnPropertyNames(c));for(var e=d.next();!e.done;e=d.next())e=e.value,a.hasOwnProperty(e)||Object.defineProperty(a,e,Dca(b,e))}}else a.apply(b)}
function Dca(a,b){return{get:function(){var c=a[b];return c instanceof Function?c.bind(a):c},
set:function(c){a[b]=c}}}
function nl(a,b){if(!b)return{};for(var c={},d=k(Object.keys(b)),e=d.next();!e.done;e=d.next())if(e=e.value,!b[e].readOnly){var g=a[e];void 0!==g&&(c[e]=g)}return c}
function Cca(a){var b=new a;a=a.prototype.properties||{};for(var c=k(Object.keys(a)),d=c.next();!d.done;d=c.next())if(d=d.value,b.hasOwnProperty(d)){var e=a[d];"function"===typeof e&&(a[d]=e={type:e});null!=b[d]&&e.type===Object&&(e.type=pl(b[d].constructor))}}
var Eca=[Array,Boolean,Date,Number,Object,String];function pl(a){for(var b=k(Eca),c=b.next();!c.done;c=b.next())if(c=c.value,a===c)return c;return Object}
function H(a){return function(b,c){b.behaviors=b.behaviors||[];b.behaviors.push(a||(void 0!==window.Reflect&&void 0!==window.Reflect.getMetadata?Reflect.getMetadata("design:type",b,c).prototype:void 0));Object.defineProperty(b,c,{get:function(){return this},
enumerable:!0,configurable:!0})}}
function I(a){a=void 0===a?{}:a;return function(b,c){b.properties=b.properties||{};a.type||(a.type=void 0!==window.Reflect&&void 0!==window.Reflect.getMetadata?pl(Reflect.getMetadata("design:type",b,c)):String);var d=a,e=b.properties[c];b.properties[c]=e?Object.assign({},e,d):d}}
function ql(a){return function(b,c){b.listeners=b.listeners||{};b.listeners[a]=c}}
function rl(a){for(var b=[],c=0;c<arguments.length;++c)b[c-0]=arguments[c];if(0===b.length)throw Error("Must specify at least one property to observe.");return function(d,e){d.observers=d.observers||[];d.observers.push(e+"("+b.join(",")+")")}}
function sl(a){for(var b=[],c=0;c<arguments.length;++c)b[c-0]=arguments[c];return function(d,e,g){var h="__compute__"+e;Object.defineProperty(d,h,{value:Object.getOwnPropertyDescriptor(d,e).get,enumerable:!0});d.properties=d.properties||{};var m=d.properties[e];m||(m={},d.properties[e]=m);m.computed=h+"("+b.join(",")+")";hl||(g.get=void 0)}}
function tl(a){return function(b,c){Object.defineProperty(b,c,{get:function(){return Polymer.dom(this.root).querySelector(a)},
enumerable:!0,configurable:!0})}}
;/*
*****************************************************************************
Copyright (C) Microsoft. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*****************************************************************************/
var ul=ul||{id:"third_party/javascript/node_modules/reflect_decorators/Reflect.closure.js"},vl;(function(a){function b(Y,aa,Z){var Pa=Vb.get(Y);if(!Pa){if(!Z)return;Pa=new Ja;Vb.set(Y,Pa)}Y=Pa.get(aa);if(!Y){if(!Z)return;Y=new Ja;Pa.set(aa,Y)}return Y}
function c(Y,aa,Z){if(d(Y,aa,Z))return!0;aa=B(aa);return null!==aa?c(Y,aa,Z):!1}
function d(Y,aa,Z){aa=b(aa,Z,!1);return void 0===aa?!1:!!aa.has(Y)}
function e(Y,aa,Z){if(d(Y,aa,Z))return g(Y,aa,Z);aa=B(aa);if(null!==aa)return e(Y,aa,Z)}
function g(Y,aa,Z){aa=b(aa,Z,!1);if(void 0!==aa)return aa.get(Y)}
function h(Y,aa){var Z=m(Y,aa);Y=B(Y);if(null===Y)return Z;var Pa=h(Y,aa);if(0>=Pa.length)return Z;if(0>=Z.length)return Pa;aa=new Ya;Y=[];Z=k(Z);for(var Yb=Z.next();!Yb.done;Yb=Z.next())Yb=Yb.value,aa.has(Yb)||(aa.add(Yb),Y.push(Yb));Z=k(Pa);for(Yb=Z.next();!Yb.done;Yb=Z.next())Pa=Yb.value,aa.has(Pa)||(aa.add(Pa),Y.push(Pa));return Y}
function m(Y,aa){Y=b(Y,aa,!1);var Z=[];Y&&Y.forEach(function(Pa,Yb){return Z.push(Yb)});
return Z}
function n(Y){return void 0===Y}
function p(Y){return"object"===typeof Y?null!==Y:"function"===typeof Y}
function x(Y){return"function"===typeof Y}
function y(Y){return"symbol"===typeof Y?Y:String(Y)}
function B(Y){var aa=Object.getPrototypeOf(Y);if("function"!==typeof Y||Y===ca||aa!==ca)return aa;var Z=Object.getPrototypeOf(Y.prototype);if(null==Z||Z===Object.prototype)return aa;Z=Z.constructor;return"function"!==typeof Z||Z===Y?aa:Z}
function G(){function Y(){this._keys=[];this._values=[];this._cache=aa}
var aa={};Y.prototype={get size(){return this._keys.length},has:function(Z){return Z===this._cache?!0:0<=this._find(Z)?(this._cache=Z,!0):!1},
get:function(Z){var Pa=this._find(Z);if(0<=Pa)return this._cache=Z,this._values[Pa]},
set:function(Z,Pa){this.delete(Z);this._keys.push(Z);this._values.push(Pa);this._cache=Z;return this},
delete:function(Z){Z=this._find(Z);return 0<=Z?(this._keys.splice(Z,1),this._values.splice(Z,1),this._cache=aa,!0):!1},
clear:function(){this._keys.length=0;this._values.length=0;this._cache=aa},
forEach:function(Z){for(var Pa=this.size,Yb=0;Yb<Pa;++Yb){var Ld=this._keys[Yb],Ck=this._values[Yb];this._cache=Ld;Z.call(this,Ck,Ld,this)}},
_find:function(Z){for(var Pa=this._keys,Yb=Pa.length,Ld=0;Ld<Yb;++Ld)if(Pa[Ld]===Z)return Ld;return-1}};
return Y}
function P(){function Y(){this._map=new Ja}
Y.prototype={get size(){return this._map.length},has:function(aa){return this._map.has(aa)},
add:function(aa){this._map.set(aa,aa);return this},
delete:function(aa){return this._map.delete(aa)},
clear:function(){this._map.clear()},
forEach:function(aa,Z){this._map.forEach(aa,Z)}};
return Y}
function S(){function Y(){this._key=Z()}
function aa(ob,Hg){for(var wf=0;wf<Hg;++wf)ob[wf]=255*Math.random()|0}
function Z(){do{if(Yb)var ob=Yb.randomBytes(16);else"function"===typeof Uint8Array?(ob=new Uint8Array(16),"undefined"!==typeof crypto?crypto.getRandomValues(ob):aa(ob,16)):(ob=Array(16),aa(ob,16));ob[6]=ob[6]&79|64;ob[8]=ob[8]&191|128;for(var Hg="",wf=0;16>wf;++wf){var yp=ob[wf];if(4===wf||6===wf||8===wf)Hg+="-";16>yp&&(Hg+="0");Hg+=yp.toString(16).toLowerCase()}ob="@@WeakMap@@"+Hg}while(Ld.call(Ck,ob));Ck[ob]=!0;return ob}
function Pa(ob,Hg){if(!Ld.call(ob,Bm)){if(!Hg)return;Object.defineProperty(ob,Bm,{value:Object.create(null)})}return ob[Bm]}
var Yb="undefined"!==typeof global&&"object"===typeof ul&&"function"===typeof require&&require("crypto"),Ld=Object.prototype.hasOwnProperty,Ck={},Bm=Z();Y.prototype={has:function(ob){return(ob=Pa(ob,!1))?this._key in ob:!1},
get:function(ob){if(ob=Pa(ob,!1))return ob[this._key]},
set:function(ob,Hg){Pa(ob,!0)[this._key]=Hg;return this},
delete:function(ob){return(ob=Pa(ob,!1))&&this._key in ob?delete ob[this._key]:!1},
clear:function(){this._key=Z()}};
return Y}
var ca=Object.getPrototypeOf(Function),Ja="function"===typeof Map?Map:G(),Ya="function"===typeof Set?Set:P(),Mb="function"===typeof WeakMap?WeakMap:S(),Vb=new Mb;a.decorate=function(Y,aa,Z,Pa){if(n(Pa)){if(n(Z)){if(!Array.isArray(Y))throw new TypeError;if(!x(aa))throw new TypeError;for(Z=Y.length-1;0<=Z;--Z)if(Pa=(0,Y[Z])(aa),!n(Pa)){if(!x(Pa))throw new TypeError;aa=Pa}return aa}if(!Array.isArray(Y))throw new TypeError;if(!p(aa))throw new TypeError;Z=y(Z);for(Pa=Y.length-1;0<=Pa;--Pa)(0,Y[Pa])(aa,
Z)}else{if(Array.isArray(Y)){if(p(aa)){if(n(Z))throw new TypeError;if(!p(Pa))throw new TypeError}else throw new TypeError;}else throw new TypeError;Z=y(Z);for(var Yb=Y.length-1;0<=Yb;--Yb){var Ld=(0,Y[Yb])(aa,Z,Pa);if(!n(Ld)){if(!p(Ld))throw new TypeError;Pa=Ld}}return Pa}};
a.metadata=function(Y,aa){return function(Z,Pa){if(n(Pa)){if(!x(Z))throw new TypeError;b(Z,void 0,!0).set(Y,aa)}else{if(!p(Z))throw new TypeError;Pa=y(Pa);b(Z,Pa,!0).set(Y,aa)}}};
a.defineMetadata=function(Y,aa){var Z;if(p(aa))n(Z)||(Z=y(Z));else throw new TypeError;b(aa,Z,!0).set("parameters",Y)};
a.hasMetadata=function(Y,aa,Z){if(p(aa))n(Z)||(Z=y(Z));else throw new TypeError;return c(Y,aa,Z)};
a.hasOwnMetadata=function(Y,aa,Z){if(p(aa))n(Z)||(Z=y(Z));else throw new TypeError;return d(Y,aa,Z)};
a.getMetadata=function(Y,aa,Z){if(p(aa))n(Z)||(Z=y(Z));else throw new TypeError;return e(Y,aa,Z)};
a.getOwnMetadata=function(Y,aa,Z){if(p(aa))n(Z)||(Z=y(Z));else throw new TypeError;return g(Y,aa,Z)};
a.getMetadataKeys=function(Y,aa){if(p(Y))n(aa)||(aa=y(aa));else throw new TypeError;return h(Y,aa)};
a.getOwnMetadataKeys=function(Y,aa){if(p(Y))n(aa)||(aa=y(aa));else throw new TypeError;return m(Y,aa)};
a.deleteMetadata=function(Y,aa,Z){if(p(aa))n(Z)||(Z=y(Z));else throw new TypeError;var Pa=b(aa,Z,!1);if(!n(Pa)){if(!Pa.delete(Y))return!1;if(0<Pa.size)return!0;Y=Vb.get(aa);Y.delete(Z);if(0<Y.size)return!0;Vb.delete(aa);return!0}};
(function(Y){if("undefined"!==typeof Y.Reflect){if(Y.Reflect!==a)for(var aa in a)Y.Reflect[aa]=a[aa]}else Y.Reflect=a})("undefined"!==typeof window?window:"undefined"!==typeof WorkerGlobalScope?self:"undefined"!==typeof global?global:Function("return this;")())})(vl||(vl={}));var wl=function(){this.data_=[];this.cachedPackedInt52_=-1};
wl.prototype.set=function(a,b){b=void 0===b?!0:b;0<=a&&52>a&&0===a%1&&this.data_[a]!=b&&(this.data_[a]=b,this.cachedPackedInt52_=-1)};
wl.prototype.get=function(a){return!!this.data_[a]};
var Fca=function(a){-1==a.cachedPackedInt52_&&(a.cachedPackedInt52_=qb(a.data_,function(b,c,d){return c?b+Math.pow(2,d):b},0));
return a.cachedPackedInt52_};var xl=function(){var a=new wl;q.SVGElement&&q.document.createElementNS&&a.set(0);var b=Yba();b["allow-top-navigation-by-user-activation"]&&a.set(1);b["allow-popups-to-escape-sandbox"]&&a.set(2);q.crypto&&q.crypto.subtle&&a.set(3);q.TextDecoder&&q.TextEncoder&&a.set(4);return Fca(a)};var yl=function(a){return{visible:1,hidden:2,prerender:3,preview:4,unloaded:5}[a.visibilityState||a.webkitVisibilityState||a.mozVisibilityState||""]||0},zl=function(){var a;
Fe.visibilityState?a="visibilitychange":Fe.mozVisibilityState?a="mozvisibilitychange":Fe.webkitVisibilityState&&(a="webkitvisibilitychange");return a};var Gca=function(a){var b=pe(a||{});if(/^1\./.test(Polymer.version)){je=!0;var c=Polymer.Base._computeFinalAnnotationValue;a=function(e,g,h,m){h=c.call(this,e,g,h,m);var n="property";m&&m.propertyName?g=m.propertyName:n=m&&m.kind||"property";return b(e,g,n,h)};
Polymer.Base._computeFinalAnnotationValue=a;if(Polymer.Base._computeFinalAnnotationValue!==a)throw Error("Cannot replace _computeFinalAnnotationValue. Is Polymer frozen?")}else{var d=Polymer.sanitizeDOMValue||Polymer.Settings&&Polymer.Settings.sanitizeDOMValue;a=function(e,g,h,m){e=d?d.call(Polymer,e,g,h,m):e;return m?b(m,g,h,e):"zClosurez"};
if(Polymer.Settings&&Polymer.Settings.setSanitizeDOMValue)Polymer.Settings.setSanitizeDOMValue(a);else if(Polymer.sanitizeDOMValue=a,Polymer.sanitizeDOMValue!==a)throw Error("Cannot install sanitizeDOMValue. Is Polymer frozen?")}};/*
Copyright Google Inc. All Rights Reserved.
Use of this source code is governed by an MIT-style license that can be
found in the LICENSE file at https://angular.io/license
*/
function Al(a,b){function c(e){for(var g=[],h=0;h<arguments.length;++h)g[h-0]=arguments[h];h=function(n,p,x){for(p=Reflect.getMetadata("parameters",n)||[];p.length<=x;)p.push(null);p[x]=p[x]||[];p[x].push(m);Reflect.defineMetadata(p,n);return n};
if(this instanceof c)return d.apply(this,g),this;var m=new(Function.prototype.bind.apply(c,[null].concat(ka(g))));h.annotation=m;return h}
var d=Hca(b);c.prototype.toString=function(){return"@"+a};
return c.annotationCls=c}
function Hca(a){return function(b){for(var c=[],d=0;d<arguments.length;++d)c[d-0]=arguments[d];var e=this;a.forEach(function(g,h){h=c[h];if(Array.isArray(g))e[g[0]]=h&&void 0!==h?h:g[1];else for(var m in g)e[m]=h&&void 0!==h[m]?h[m]:g[m]})}}
;function Bl(a){return void 0!==a&&null!==a}
function Cl(a){if("string"===typeof a)return a;if(void 0===a||null===a)return""+a;if(a.overriddenName)return a.overriddenName;if(a.name)return a.name;a=a.toString();var b=a.indexOf("\n");return-1===b?a:a.substring(0,b)}
;function Dl(a){a.__forward_ref__=Dl;a.toString=function(){return Cl(this())};
return a}
function El(a){return"function"===typeof a&&a.hasOwnProperty("__forward_ref__")&&a.__forward_ref__===Dl?a():a}
;Al("Injectable",[]);var Fl=Al("Inject",[["token",void 0]]),Ica=Al("Optional",[]);Al("Injectable",[]);var Gl=Al("Self",[]),Hl=Al("SkipSelf",[]);Al("Host",[]);var Il={},Jl=function(){};
Jl.prototype.get=function(){throw Error("unimplemented")};var Kl=Function;var Jca=/^function\s+\S+\(\)\s*{\s*("use strict";)?\s*(return\s+)?\S+\.apply\(this,\s*arguments\)/,Ll=function(){this._reflect=window.Reflect};
f=Ll.prototype;f.isReflectionEnabled=function(){return!0};
f.factory=function(a){return function(b){for(var c=[],d=0;d<arguments.length;++d)c[d-0]=arguments[d];return new(Function.prototype.bind.apply(a,[null].concat(ka(c))))}};
f._zipTypesAndAnnotations=function(a,b){var c="undefined"===typeof a?Array(b.length):Array(a.length);for(var d=0;d<c.length;d++)c[d]="undefined"===typeof a?[]:a[d]!=Object?[a[d]]:[],b&&Bl(b[d])&&(c[d]=c[d].concat(b[d]));return c};
f._ownParameters=function(a,b){if(Jca.exec(a.toString()))return null;if(a.parameters&&a.parameters!==b.parameters)return a.parameters;var c=a.ctorParameters;return c&&c!==b.ctorParameters?(b="function"===typeof c?c():c,a=b.map(function(d){return d&&d.type}),b=b.map(function(d){return d&&Ml(d.decorators)}),this._zipTypesAndAnnotations(a,b)):Bl(this._reflect)&&Bl(this._reflect.getOwnMetadata)&&(b=this._reflect.getOwnMetadata("parameters",a),(c=this._reflect.getOwnMetadata("design:paramtypes",a))||b)?
this._zipTypesAndAnnotations(c,b):Array(a.length).fill(void 0)};
f.parameters=function(a){if(!a.prototype)return[];var b=Object.getPrototypeOf(a.prototype).constructor;(a=this._ownParameters(a,b))||b===Object||(a=this.parameters(b));return a||[]};
f._ownAnnotations=function(a,b){if(a.annotations&&a.annotations!==b.annotations)return a=a.annotations,"function"===typeof a&&a.annotations&&(a=a.annotations),a;if(a.decorators&&a.decorators!==b.decorators)return Ml(a.decorators);if(this._reflect&&this._reflect.getOwnMetadata)return this._reflect.getOwnMetadata("annotations",a)};
f.annotations=function(a){var b=Object.getPrototypeOf(a.prototype).constructor;a=this._ownAnnotations(a,b)||[];return(b!==Object?this.annotations(b):[]).concat(a)};
f._ownPropMetadata=function(a,b){if(a.propMetadata&&a.propMetadata!==b.propMetadata)return a=a.propMetadata,"function"===typeof a&&a.propMetadata&&(a=a.propMetadata),a;if(a.propDecorators&&a.propDecorators!==b.propDecorators){var c=a.propDecorators,d={};Object.keys(c).forEach(function(e){d[e]=Ml(c[e])});
return d}if(this._reflect&&this._reflect.getOwnMetadata)return this._reflect.getOwnMetadata("propMetadata",a)};
f.propMetadata=function(a){var b=Object.getPrototypeOf(a.prototype).constructor,c={};if(b!==Object){var d=this.propMetadata(b);Object.keys(d).forEach(function(g){c[g]=d[g]})}var e=this._ownPropMetadata(a,b);
e&&Object.keys(e).forEach(function(g){var h=[];c.hasOwnProperty(g)&&h.push.apply(h,ka(c[g]));h.push.apply(h,ka(e[g]));c[g]=h});
return c};
f.hasLifecycleHook=function(a,b){return a instanceof Kl&&b in a.prototype};
f.getter=function(a){return new Function("o","return o."+a+";")};
f.setter=function(a){return new Function("o","v","return o."+a+" = v;")};
f.method=function(a){return new Function("o","args","if (!o."+a+") throw new Error('\""+a+"\" is undefined');\n return o."+a+".apply(o, args);")};
f.importUri=function(a){return"object"===typeof a&&a.filePath?a.filePath:"./"+Cl(a)};
f.resolveIdentifier=function(a,b,c){return c};
f.resolveEnum=function(a,b){return a[b]};
function Ml(a){return a?a.map(function(b){return new(Function.prototype.bind.apply(b.type.annotationCls,[null].concat(ka(b.args?b.args:[]))))}):[]}
;var Kca=function(){};var Nl=function(a){this.reflectionCapabilities=a};
l(Nl,Kca);f=Nl.prototype;f.updateCapabilities=function(a){this.reflectionCapabilities=a};
f.factory=function(a){return this.reflectionCapabilities.factory(a)};
f.parameters=function(a){return this.reflectionCapabilities.parameters(a)};
f.annotations=function(a){return this.reflectionCapabilities.annotations(a)};
f.propMetadata=function(a){return this.reflectionCapabilities.propMetadata(a)};
f.hasLifecycleHook=function(a,b){return this.reflectionCapabilities.hasLifecycleHook(a,b)};
f.getter=function(a){return this.reflectionCapabilities.getter(a)};
f.setter=function(a){return this.reflectionCapabilities.setter(a)};
f.method=function(a){return this.reflectionCapabilities.method(a)};
f.importUri=function(a){return this.reflectionCapabilities.importUri(a)};
f.resolveIdentifier=function(a,b,c){return this.reflectionCapabilities.resolveIdentifier(a,b,c)};
f.resolveEnum=function(a,b){return this.reflectionCapabilities.resolveEnum(a,b)};var Ol=new Nl(new Ll());function Lca(a){for(var b=[],c=0;c<a.length;++c){if(-1<b.indexOf(a[c])){b.push(a[c]);break}b.push(a[c])}return b}
function Sl(a){return 1<a.length?" ("+Lca(a.slice().reverse()).map(function(b){return Cl(b.token)}).join(" -> ")+")":""}
function Tl(a,b,c,d){if(d){var e=Error(" caused by: "+(d instanceof Error?d.message:d));e.ngOriginalError=d}else e=Error();e.addKey=Mca;e.keys=[b];e.injectors=[a];e.constructResolvingMessage=c;e.message=e.constructResolvingMessage();e.ngOriginalError=d;return e}
function Mca(a,b){this.injectors.push(a);this.keys.push(b);this.message=this.constructResolvingMessage()}
function Nca(a,b){return Tl(a,b,function(){return"No provider for "+Cl(this.keys[0].token)+"!"+Sl(this.keys)})}
function Oca(a,b){return Tl(a,b,function(){return"Cannot instantiate cyclic dependency!"+Sl(this.keys)})}
function Pca(a,b,c){return Tl(a,c,function(){var d=Cl(this.keys[0].token);return this.ngOriginalError.message+": Error during instantiation of "+d+"!"+Sl(this.keys)+"."},b)}
function Ul(a,b){for(var c=[],d=0,e=b.length;d<e;d++){var g=b[d];g&&0!=g.length?c.push(g.map(Cl).join(" ")):c.push("?")}return Error("Cannot resolve all parameters for '"+Cl(a)+"'("+c.join(", ")+"). Make sure that all the parameters are decorated with Inject or have valid type annotations and that '"+Cl(a)+"' is decorated with Injectable.")}
;var Vl=function(a,b){this.token=a;this.id=b;if(void 0===a||null===a)throw Error("Token must be defined!")};
ea.Object.defineProperties(Vl.prototype,{displayName:{configurable:!0,enumerable:!0,get:function(){return Cl(this.token)}}});
ea.Object.defineProperties(Vl,{numberOfKeys:{configurable:!0,enumerable:!0,get:function(){return Wl.numberOfKeys}}});
var Xl=function(){this._allKeys=new Map};
Xl.prototype.get=function(a){if(a instanceof Vl)return a;if(this._allKeys.has(a))return this._allKeys.get(a);var b=new Vl(a,Vl.numberOfKeys);this._allKeys.set(a,b);return b};
ea.Object.defineProperties(Xl.prototype,{numberOfKeys:{configurable:!0,enumerable:!0,get:function(){return this._allKeys.size}}});
var Wl=new Xl;var Yl=function(a,b,c){this.key=a;this.optional=b;this.visibility=c},Qca=[],Zl=function(a,b,c){this.key=a;
this.resolvedFactories=b;this.multiProvider=c};
ea.Object.defineProperties(Zl.prototype,{resolvedFactory:{configurable:!0,enumerable:!0,get:function(){return this.resolvedFactories[0]}}});
var Rca=function(a,b){this.factory=a;this.dependencies=b};
function Sca(a){if(a&&void 0!==a.useClass){var b=El(a.useClass);var c=Ol.factory(b);b=$l(b)}else a&&void 0!==a.useExisting?(c=function(d){return d},b=[new Yl(Wl.get(El(a.useExisting)),!1,null)]):a&&void 0!==a.useFactory?(c=a.useFactory,b=Tca(a.useFactory,a.deps)):(c=function(){return a.useValue},b=Qca);
return new Rca(c,b)}
function am(a){return new Zl(Wl.get(El(a.provide)),[Sca(a)],a.multi)}
function bm(a){a=cm(a,[]).map(am);for(var b=new Map,c=0;c<a.length;c++){var d=a[c],e=b.get(d.key.id);if(e){if(d.multiProvider!==e.multiProvider)throw Error("Cannot mix multi providers and regular providers, got: "+e+" "+d);if(d.multiProvider)for(var g=0;g<d.resolvedFactories.length;g++)e.resolvedFactories.push(d.resolvedFactories[g]);else b.set(d.key.id,d)}else b.set(d.key.id,d.multiProvider?new Zl(d.key,d.resolvedFactories.slice(),d.multiProvider):d)}return Array.from(b.values())}
function cm(a,b){a.forEach(function(c){if(c instanceof Kl)b.push({provide:c,useClass:c});else if(c&&"object"==typeof c&&void 0!==c.provide)b.push(c);else if(c instanceof Array)cm(c,b);else throw Error("Invalid provider - only instances of Provider and Type are allowed, got: "+c)});
return b}
function Tca(a,b){if(b){var c=b.map(function(d){return[d]});
return b.map(function(d){return dm(a,d,c)})}return $l(a)}
function $l(a){var b=Ol.parameters(a);if(!b)return[];if(b.some(function(c){return null==c}))throw Ul(a,b);
return b.map(function(c){return dm(a,c,b)})}
function dm(a,b,c){var d=null,e=!1;if(!Array.isArray(b))return b instanceof Fl?em(b.token,e,null):em(b,e,null);for(var g=null,h=0;h<b.length;++h){var m=b[h];if(m instanceof Kl)d=m;else if(m instanceof Fl)d=m.token;else if(m instanceof Ica)e=!0;else if(m instanceof Gl||m instanceof Hl)g=m}d=El(d);if(null!=d)return em(d,e,g);throw Ul(a,c)}
function em(a,b,c){return new Yl(Wl.get(El(a)),b,c)}
;var fm={},hm=function(a,b){this.constructedKeyIds={};this.providers=[];this.keyIds=[];this.objs=[];this.parent=void 0===b?null:b;a=k(a);for(b=a.next();!b.done;b=a.next())gm(this,b.value)},gm=function(a,b){a.providers.push(b);
a.keyIds.push(b.key.id);a.objs.push(fm)};
f=hm.prototype;f.get=function(a,b){b=void 0===b?Il:b;return this._getByKey(Wl.get(El(a)),null,b)};
f.resolveAndCreateChild=function(a){a=bm(a);a=new hm(a);a.parent=this;return a};
f.resolveAndInstantiate=function(a){a=bm([a])[0];return this._instantiateProvider(a)};
f._new=function(a){if(this.constructedKeyIds[a.key.id])throw Oca(this,a.key);this.constructedKeyIds[a.key.id]=!0;return this._instantiateProvider(a)};
f._getMaxNumberOfObjects=function(){return this.objs.length};
f._instantiateProvider=function(a){if(a.multiProvider){for(var b=Array(a.resolvedFactories.length),c=0;c<a.resolvedFactories.length;++c)b[c]=this._instantiate(a,a.resolvedFactories[c]);return b}return this._instantiate(a,a.resolvedFactories[0])};
f._instantiate=function(a,b){var c=this,d=b.factory;try{var e=b.dependencies.map(function(h){return c._getByReflectiveDependency(h)})}catch(h){throw h.addKey&&h.addKey(this,a.key),h;
}try{var g=d.apply(null,ka(e))}catch(h){throw Pca(this,h,a.key)}return g};
f._getByReflectiveDependency=function(a){return this._getByKey(a.key,a.visibility,a.optional?null:Il)};
f._getByKey=function(a,b,c){return a===Uca?this:b instanceof Gl?this._getByKeySelf(a,c):this._getByKeyDefault(a,c,b)};
f._getObjByKeyId=function(a){for(var b=0;b<this.keyIds.length;b++)if(this.keyIds[b]===a)return this.objs[b]===fm&&(this.objs[b]=this._new(this.providers[b])),this.objs[b];return fm};
f._throwOrNull=function(a,b){if(b!==Il)return b;throw Nca(this,a)};
f._getByKeySelf=function(a,b){var c=this._getObjByKeyId(a.id);return c!==fm?c:this._throwOrNull(a,b)};
f._getByKeyDefault=function(a,b,c){for(var d=c=c instanceof Hl?this.parent:this;c instanceof hm;){var e=c._getObjByKeyId(a.id);if(e!==fm)return e;c=c.parent}e=void 0;if(null!==c)try{var g=c.get(a.token,b);if(g!==fm)return g}catch(h){e=h}if(!(d instanceof hm&&Vca(a.token))){if(e)throw e;return this._throwOrNull(a,b)}for(g=d;g.parent instanceof hm;)g=g.parent;gm(g,am({provide:a.token,useClass:a.token}));return g.get(a.token,b)};
f.toString=function(){return this.displayName};
ea.Object.defineProperties(hm.prototype,{displayName:{configurable:!0,enumerable:!0,get:function(){return"ReflectiveInjector(providers: ["+Wca(this,function(a){return" \""+a.key.displayName+"\" "}).join(", ")+"])"}}});
var Uca=Wl.get(El(Jl));function Wca(a,b){for(var c=Array(a.providers.length),d=0;d<a.providers.length;++d){var e=d;if(0>d||d>=a.providers.length)throw Error("Index "+d+" is out-of-bounds.");c[e]=b(a.providers[d])}return c}
function Vca(a){return"function"===typeof a&&Ol.parameters(a).every(function(b){return!!b})}
;var Xca=function(){var a=im;Sa("yt.ads.biscotti.getId_")||Na("yt.ads.biscotti.getId_",a,void 0)},jm=function(a){Na("yt.ads.biscotti.lastId_",a,void 0)};function km(a){var b=[];u.forEach(a,function(c,d){var e=md(d);c=Wa(c)?c:[c];mb(c,function(g){""==g?b.push(e):b.push(e+"="+md(g))})});
return b.join("&")}
function lm(a){"?"==a.charAt(0)&&(a=a.substr(1));a=a.split("&");for(var b={},c=0,d=a.length;c<d;c++){var e=a[c].split("=");if(1==e.length&&e[0]||2==e.length)try{var g=nd(e[0]||""),h=nd(e[1]||"");g in b?Wa(b[g])?Db(b[g],h):b[g]=[b[g],h]:b[g]=h}catch(n){var m=Error("Error decoding URL component");m.params="key: "+e[0]+", value: "+e[1];"q"==e[0]?xe(m):we(m)}}return b}
function mm(a){return-1!=a.indexOf("?")?(a=(a||"").split("#")[0],a=a.split("?",2),lm(1<a.length?a[1]:a[0])):{}}
function nm(a,b){return om(a,b||{},!0)}
function om(a,b,c){var d=a.split("#",2);a=d[0];d=1<d.length?"#"+d[1]:"";var e=a.split("?",2);a=e[0];e=lm(e[1]||"");for(var g in b)if(c||!u.containsKey(e,g))e[g]=b[g];return Ai(a,e)+d}
function pm(a){if(!b)var b=window.location.href;var c=ni(1,a),d=oi(a);return c&&d?si(a,b):d?oi(b)==d&&(Number(ni(4,b))||null)==(Number(ni(4,a))||null):!0}
;var tm=function(a){var b=qm;a=void 0===a?Sa("yt.ads.biscotti.lastId_")||"":a;b=Object.assign(rm(b),sm(b));b.ca_type="image";a&&(b.bid=a);return b},rm=function(a){var b={};
b.dt=Rj;b.flash="0";a:{try{var c=a.win_.top.location.href}catch(d){a=2;break a}a=c?c===a.doc_.location.href?0:1:2}b=(b.frm=a,b);Lj(b);return b},sm=function(a){var b=Sj(a.win_),c=Pj(!1,a.win_.top),d={};
return d.bc=xl(),d.bih=c.height,d.biw=c.width,d.brdim=b.join(),d.vis=yl(a.doc_),d.wgl=!!Ge.WebGLRenderingContext,d},qm=new function(){var a=window.document;
this.win_=window;this.doc_=a};
Na("yt.ads_.signals_.getAdSignalsString",function(a){return km(tm(a))},void 0);fb();navigator.userAgent.indexOf(" (CrKey ");var Yca=0,Zca=Re?"webkit":Qe?"moz":Ne?"ms":Me?"o":"";function um(){var a=document;if("visibilityState"in a)return a.visibilityState;var b=Zca+"VisibilityState";if(b in a)return a[b]}
function vm(a,b){var c;rb(a,function(d){c=b[d];return!!c});
return c}
function wm(a){var b=$ca(a);b?b.focus():(a.hasAttribute("tabindex")||a.setAttribute("tabindex","-1"),a.focus())}
function $ca(a){return(a=Uh(a,function(b){return Ih(b)?ai(b)&&!!b.offsetParent:!1}))?a:null}
var ada=Sa("ytDomDomGetNextId")||function(){return++Yca};
Na("ytDomDomGetNextId",ada,void 0);var bda={stopImmediatePropagation:1,stopPropagation:1,preventMouseEvent:1,preventManipulation:1,preventDefault:1,layerX:1,layerY:1,screenX:1,screenY:1,scale:1,rotation:1,webkitMovementX:1,webkitMovementY:1},xm=function(a){this.type="";this.state=this.source=this.data=this.currentTarget=this.relatedTarget=this.target=null;this.charCode=this.keyCode=0;this.metaKey=this.shiftKey=this.ctrlKey=this.altKey=!1;this.rotation=this.clientY=this.clientX=0;this.scale=1;this.changedTouches=this.touches=null;try{a=
a||window.event;if(!a)return;this.event=a}catch(c){return}for(var b in a)b in bda||(this[b]=a[b]);this.scale=a.scale;this.rotation=a.rotation;(b=a.target||a.srcElement)&&3==b.nodeType&&(b=b.parentNode);this.target=b;if(b=a.relatedTarget)try{b=b.nodeName?b:null}catch(c){b=null}else"mouseover"==this.type?b=a.fromElement:"mouseout"==this.type&&(b=a.toElement);this.relatedTarget=b;this.clientX=void 0!=a.clientX?a.clientX:a.pageX;this.clientY=void 0!=a.clientY?a.clientY:a.pageY;this.keyCode=a.keyCode?
a.keyCode:a.which;this.charCode=a.charCode||("keypress"==this.type?this.keyCode:0);this.altKey=a.altKey;this.ctrlKey=a.ctrlKey;this.shiftKey=a.shiftKey;this.metaKey=a.metaKey;this.pageX_=a.pageX;this.pageY_=a.pageY},ym=function(a){if(document.body&&document.documentElement){var b=document.body.scrollTop+document.documentElement.scrollTop;
a.pageX_=a.clientX+(document.body.scrollLeft+document.documentElement.scrollLeft);a.pageY_=a.clientY+b}};
f=xm.prototype;f.getScreenX=function(){return this.event?this.event.screenX:0};
f.getScreenY=function(){return this.event?this.event.screenY:0};
f.preventDefault=function(){this.event&&(this.event.returnValue=!1,this.event.preventDefault&&this.event.preventDefault())};
f.isDefaultPrevented=function(){return this.event?!1===this.event.returnValue:!1};
f.stopPropagation=function(){this.event&&(this.event.cancelBubble=!0,this.event.stopPropagation&&this.event.stopPropagation())};
f.stopImmediatePropagation=function(){this.event&&(this.event.cancelBubble=!0,this.event.stopImmediatePropagation&&this.event.stopImmediatePropagation())};
f.hasModifierKey=function(){return this.altKey||this.ctrlKey||this.shiftKey||this.metaKey};var zm=Sa("ytEventsEventsListeners")||{};Na("ytEventsEventsListeners",zm,void 0);var Am=Sa("ytEventsEventsCounter")||{count:0};Na("ytEventsEventsCounter",Am,void 0);
function cda(a,b,c,d){d=void 0===d?{}:d;a.addEventListener&&("mouseenter"!=b||"onmouseenter"in document?"mouseleave"!=b||"onmouseenter"in document?"mousewheel"==b&&"MozBoxSizing"in document.documentElement.style&&(b="MozMousePixelScroll"):b="mouseout":b="mouseover");return u.findKey(zm,function(e){var g=La(e[4])&&e[4]==!!d,h=$a(e[4])&&$a(d)&&u.equals(e[4],d);return!!e.length&&e[0]==a&&e[1]==b&&e[2]==c&&(g||h)})}
function Cm(a,b,c,d){d=void 0===d?{}:d;if(!a||!a.addEventListener&&!a.attachEvent)return"";var e=cda(a,b,c,d);if(e)return e;e=++Am.count+"";var g=!("mouseenter"!=b&&"mouseleave"!=b||!a.addEventListener||"onmouseenter"in document);var h=g?function(m){m=new xm(m);if(!ei(m.relatedTarget,function(n){return n==a},!0))return m.currentTarget=a,m.type=b,c.call(a,m)}:function(m){m=new xm(m);
m.currentTarget=a;return c.call(a,m)};
h=ve(h);a.addEventListener?("mouseenter"==b&&g?b="mouseover":"mouseleave"==b&&g?b="mouseout":"mousewheel"==b&&"MozBoxSizing"in document.documentElement.style&&(b="MozMousePixelScroll"),Dm()||La(d)?a.addEventListener(b,h,d):a.addEventListener(b,h,!!d.capture)):a.attachEvent("on"+b,h);zm[e]=[a,b,c,h,d];return e}
function Em(a){a&&("string"==typeof a&&(a=[a]),mb(a,function(b){if(b in zm){var c=zm[b],d=c[0],e=c[1],g=c[3];c=c[4];d.removeEventListener?Dm()||La(c)?d.removeEventListener(e,g,c):d.removeEventListener(e,g,!!c.capture):d.detachEvent&&d.detachEvent("on"+e,g);delete zm[b]}}))}
function dda(a){a=a||window.event;a.cancelBubble=!0;a.stopPropagation&&a.stopPropagation()}
var Dm=Nb(function(){var a=!1;try{var b=Object.defineProperty({},"capture",{get:function(){a=!0}});
window.addEventListener("test",null,b)}catch(c){}return a}),Fm=function(a,b,c){var d=void 0===d?{}:d;
var e;return e=Cm(a,b,function(){Em(e);c.apply(a,arguments)},d)},Gm=function(a){for(var b in zm)zm[b][0]==a&&Em(b)};var Hm=window.ytcsi&&window.ytcsi.now?window.ytcsi.now:window.performance&&window.performance.timing&&window.performance.now&&window.performance.timing.navigationStart?function(){return window.performance.timing.navigationStart+window.performance.now()}:function(){return new Date().getTime()};function Im(a,b){Za(a)&&(a=ve(a));return window.setTimeout(a,b)}
function Jm(a,b){Za(a)&&(a=ve(a));return window.setInterval(a,b)}
function Km(a){window.clearTimeout(a)}
;var Lm=function(a){this.callback_=a;this.position_=null;this.previousTime_=0;this.previousPosition_=null;this.previousVelocity_=0;this.cycles_=[];for(a=0;4>a;a++)this.cycles_.push(0);this.index_=0;this.mouseListenerKey_=Cm(window,"mousemove",r(this.onMouseMove_,this));this.timerId_=Jm(r(this.checkPosition_,this),25)};
t(Lm,lk);Lm.prototype.onMouseMove_=function(a){Ia(a.pageX_)||ym(a);var b=a.pageX_;Ia(a.pageY_)||ym(a);this.position_=new Wg(b,a.pageY_)};
Lm.prototype.getPosition=function(){return this.position_||new Wg};
Lm.prototype.checkPosition_=function(){if(this.position_){var a=Hm();if(0!=this.previousTime_){var b=this.previousPosition_,c=this.position_,d=b.x-c.x;b=b.y-c.y;d=Math.sqrt(d*d+b*b)/(a-this.previousTime_);this.cycles_[this.index_]=.5<Math.abs((d-this.previousVelocity_)/this.previousVelocity_)?1:0;for(c=b=0;4>c;c++)b+=this.cycles_[c]||0;3<=b&&this.callback_();this.previousVelocity_=d}this.previousTime_=a;this.previousPosition_=this.position_;this.index_=(this.index_+1)%4}};
Lm.prototype.disposeInternal=function(){window.clearInterval(this.timerId_);Em(this.mouseListenerKey_)};var Mm=Ia(XMLHttpRequest)?function(){return new XMLHttpRequest}:Ia(ActiveXObject)?function(){return new ActiveXObject("Microsoft.XMLHTTP")}:null;
function eda(){if(!Mm)return null;var a=Mm();return"open"in a?a:null}
function Nm(a){switch(a&&"status"in a?a.status:-1){case 200:case 201:case 202:case 203:case 204:case 205:case 206:case 304:return!0;default:return!1;}}
;var Om={Authorization:"AUTHORIZATION","X-Goog-Visitor-Id":"SANDBOXED_VISITOR_ID","X-YouTube-Client-Name":"INNERTUBE_CONTEXT_CLIENT_NAME","X-YouTube-Client-Version":"INNERTUBE_CONTEXT_CLIENT_VERSION","X-Youtube-Identity-Token":"ID_TOKEN","X-YouTube-Page-CL":"PAGE_CL","X-YouTube-Page-Label":"PAGE_BUILD_LABEL","X-YouTube-Variants-Checksum":"VARIANTS_CHECKSUM"},fda="app debugcss debugjs expflag force_ad_params force_viral_ad_response_params forced_experiments internalcountrycode internalipoverride absolute_experiments conditional_experiments sbb sr_bns_address".split(" "),
Pm=!1;function Qm(a,b){b=void 0===b?{}:b;var c=pm(a),d=A("web_ajax_ignore_global_headers_if_set"),e;for(e in Om){var g=z(Om[e]);!g||!c&&!Rm(a,e)||d&&void 0!==b[e]||(b[e]=g)}if(c||Rm(a,"X-YouTube-Utc-Offset"))b["X-YouTube-Utc-Offset"]=-new Date().getTimezoneOffset();(A("pass_biscotti_id_in_header_ajax")||A("pass_biscotti_id_in_header_ajax_tv"))&&(c||Rm(a,"X-YouTube-Ad-Signals"))&&(b["X-YouTube-Ad-Signals"]=km(tm(void 0)));return b}
function Sm(a){var b=window.location.search,c=oi(a),d=mi(ni(5,a));d=(c=c&&c.endsWith("youtube.com"))&&d&&d.startsWith("/api/");if(!c||d)return a;var e=lm(b),g={};mb(fda,function(h){e[h]&&(g[h]=e[h])});
return om(a,g||{},!1)}
function Rm(a,b){var c=z("CORS_HEADER_WHITELIST")||{};a=oi(a);return a?(c=c[a])?wb(c,b):!1:!0}
function gda(a,b){if(window.fetch&&"XML"!=b.format){var c={method:b.method||"GET",credentials:"same-origin"};b.headers&&(c.headers=b.headers);a=Tm(a,b);var d=Um(a,b);d&&(c.body=d);b.withCredentials&&(c.credentials="include");var e=!1,g;fetch(a,c).then(function(h){if(!e){e=!0;g&&Km(g);var m=h.ok,n=function(p){p=p||{};var x=b.context||q;m?b.onSuccess&&b.onSuccess.call(x,p,h):b.onError&&b.onError.call(x,p,h);b.onFinish&&b.onFinish.call(x,p,h)};
"JSON"==(b.format||"JSON")&&(m||400<=h.status&&500>h.status)?h.json().then(n,function(){n(null)}):n(null)}});
b.onFetchTimeout&&0<b.timeout&&(g=Im(function(){e||(e=!0,Km(g),b.onFetchTimeout.call(b.context||q))},b.timeout))}else Vm(a,b)}
function Wm(a,b){var c=z("XSRF_FIELD_NAME",void 0),d;b.headers&&(d=b.headers["Content-Type"]);return!b.excludeXsrf&&(!oi(a)||b.withCredentials||oi(a)==document.location.hostname)&&"POST"==b.method&&(!d||"application/x-www-form-urlencoded"==d)&&!(b.postParams&&b.postParams[c])}
function Vm(a,b){var c=b.format||"JSON";a=Tm(a,b);var d=Um(a,b),e=!1,g,h=Xm(a,function(m){if(!e){e=!0;g&&Km(g);var n=Nm(m),p=null,x=400<=m.status&&500>m.status,y=500<=m.status&&600>m.status;if(n||x||y)p=hda(c,m,b.convertToSafeHtml);if(n)a:if(m&&204==m.status)n=!0;else{switch(c){case"XML":n=0==parseInt(p&&p.return_code,10);break a;case"RAW":n=!0;break a;}n=!!p}p=p||{};x=b.context||q;n?b.onSuccess&&b.onSuccess.call(x,m,p):b.onError&&b.onError.call(x,m,p);b.onFinish&&b.onFinish.call(x,m,p)}},b.method,
d,b.headers,b.responseType,b.withCredentials);
b.onTimeout&&0<b.timeout&&(g=Im(function(){e||(e=!0,h.abort(),Km(g),b.onTimeout.call(b.context||q,h))},b.timeout));
return h}
function Tm(a,b){b.includeDomain&&(a=document.location.protocol+"//"+document.location.hostname+(document.location.port?":"+document.location.port:"")+a);var c=z("XSRF_FIELD_NAME",void 0);if(b=b.urlParams)b[c]&&delete b[c],a=nm(a,b);return a}
function Um(a,b){var c=z("XSRF_FIELD_NAME",void 0),d=z("XSRF_TOKEN",void 0),e=b.postBody||"",g=b.postParams;Wm(a,b)&&(g||(g={}),g[c]=d);g&&Ka(e)&&(e=lm(e),u.extend(e,g),e=b.postBodyFormat&&"JSON"==b.postBodyFormat?JSON.stringify(e):xi(e));g=e||g&&!u.isEmpty(g);!Pm&&g&&"POST"!=b.method&&(Pm=!0,we(Error("AJAX request with postData should use POST")));return e}
function hda(a,b,c){var d=null;switch(a){case"JSON":a=b.responseText;b=b.getResponseHeader("Content-Type")||"";a&&0<=b.indexOf("json")&&(d=JSON.parse(a));break;case"XML":if(b=(b=b.responseXML)?ida(b):null)d={},mb(b.getElementsByTagName("*"),function(e){d[e.tagName]=jda(e)});}c&&Ym(d);
return d}
function Ym(a){if($a(a))for(var b in a)"html_content"==b||fc(b,"_html")?a[b]=cd(a[b]):Ym(a[b])}
function ida(a){return a?(a=("responseXML"in a?a.responseXML:a).getElementsByTagName("root"))&&0<a.length?a[0]:null:null}
function jda(a){var b="";mb(a.childNodes,function(c){b+=c.nodeValue});
return b}
var Zm=function(a,b){b.method="POST";b.postParams||(b.postParams={});Vm(a,b)},Xm=function(a,b,c,d,e,g,h){c=void 0===c?"GET":c;
d=void 0===d?"":d;var m=eda();if(!m)return null;var n=function(){4==(m&&"readyState"in m?m.readyState:0)&&b&&ve(b)(m)};
"onloadend"in m?m.addEventListener("loadend",n,!1):m.onreadystatechange=n;A("debug_forward_web_query_parameters")&&(a=Sm(a));m.open(c,a,!0);g&&(m.responseType=g);h&&(m.withCredentials=!0);c="POST"==c&&(void 0===window.FormData||!(d instanceof FormData));if(e=Qm(a,e))for(var p in e)m.setRequestHeader(p,e[p]),"content-type"==p.toLowerCase()&&(c=!1);c&&m.setRequestHeader("Content-Type","application/x-www-form-urlencoded");m.send(d);return m},kda=Wm;var $m={},an=0;
function bn(a,b,c,d,e,g){g=g||{};g.name=c||z("INNERTUBE_CONTEXT_CLIENT_NAME",1);g.version=d||z("INNERTUBE_CONTEXT_CLIENT_VERSION",void 0);b=void 0===b?"ERROR":b;e=void 0===e?!1:e;b=void 0===b?"ERROR":b;e=window&&window.yterr||(void 0===e?!1:e)||!1;if(a&&e&&!(5<=an)){A("console_log_js_exceptions")&&(e=a,c=[],c.push("Name: "+e.name),c.push("Message: "+e.message),e.hasOwnProperty("params")&&c.push("Error Params: "+JSON.stringify(e.params)),c.push("File name: "+e.fileName),c.push("Stacktrace: "+e.stack),
c=c.join("\n"),window.console.log(c,e));e=a.stacktrace;d=a.columnNumber;a.hasOwnProperty("params")&&(c=String(JSON.stringify(a.params)),g.params=c.substr(0,500));a=Gba(a);e=e||a.stack;c=a.lineNumber.toString();isNaN(c)||isNaN(d)||(c=c+":"+d);window.yterr&&Za(window.yterr)&&window.yterr(a);if(d=!$m[a.message])d=e,d=!(0<=d.indexOf("/YouTubeCenter.js")||0<=d.indexOf("/mytube.js"));if(d){b={urlParams:{a:"logerror",t:"jserror",type:a.name,msg:a.message.substr(0,250),line:c,level:b,"client.name":g.name},
postParams:{url:z("PAGE_NAME",window.location.href),file:a.fileName},method:"POST"};g.version&&(b["client.version"]=g.version);e&&(b.postParams.stack=e);for(var h in g)b.postParams["client."+h]=g[h];if(h=z("LATEST_ECATCHER_SERVICE_TRACKING_PARAMS",void 0))for(var m in h)b.postParams[m]=h[m];Vm(z("ECATCHER_REPORT_HOST","")+"/error_204",b);$m[a.message]=!0;an++}}}
function cn(a,b,c){b=void 0===b?"ERROR":b;c=void 0===c?{}:c;var d=Sa("ytbin.polymer.shared.lib.tampering.info");d&&(d=d())&&(c.tamperingInfo=JSON.stringify(d));bn(a,b,void 0,void 0,!0,c)}
;var lda={AUTOPLAY:"atp",SKA_SKIPPABLE_ADS:"ska",QUEUE_SUPPORT:"que",MULTI_USER_SESSIONS:"mus",SINGLE_USER_SESSIONS:"sus",HAS_DISPLAY:"dsp",SCREEN_EXTENDED_QUEUE_SUPPORT:"seq"};var mda=Sa("ytPubsubPubsubInstance")||new Mk;Mk.prototype.subscribe=Mk.prototype.subscribe;Mk.prototype.unsubscribeByKey=Mk.prototype.unsubscribeByKey;Mk.prototype.publish=Mk.prototype.publish;Mk.prototype.clear=Mk.prototype.clear;Na("ytPubsubPubsubInstance",mda,void 0);var dn=Sa("ytPubsubPubsubSubscribedKeys")||{};Na("ytPubsubPubsubSubscribedKeys",dn,void 0);var en=Sa("ytPubsubPubsubTopicToKeys")||{};Na("ytPubsubPubsubTopicToKeys",en,void 0);var fn=Sa("ytPubsubPubsubIsSynchronous")||{};
Na("ytPubsubPubsubIsSynchronous",fn,void 0);function gn(a,b,c){var d=hn();if(d){var e=d.subscribe(a,function(){var g=arguments;var h=function(){dn[e]&&b.apply(c||window,g)};
try{fn[a]?h():Im(h,0)}catch(m){we(m)}},c);
dn[e]=!0;en[a]||(en[a]=[]);en[a].push(e);return e}return 0}
function nda(a,b){var c=gn("dispose",function(d){a.apply(b,arguments);jn(c)},b)}
function jn(a){var b=hn();b&&(Ma(a)?a=[a]:Ka(a)&&(a=[parseInt(a,10)]),mb(a,function(c){b.unsubscribeByKey(c);delete dn[c]}))}
function kn(a,b){var c=hn();c&&c.publish.apply(c,arguments)}
function ln(a,b){fn[a]=!0;var c=hn();c&&c.publish.apply(c,arguments);fn[a]=!1}
function hn(){return Sa("ytPubsubPubsubInstance")}
;var mn=window,nn=mn.ytcsi&&mn.ytcsi.now?mn.ytcsi.now:mn.performance&&mn.performance.timing&&mn.performance.now?function(){return mn.performance.timing.navigationStart+mn.performance.now()}:function(){return new Date().getTime()};var oda=Math.pow(2,16)-1,on=null,pn=0,pda={log_event:"events",log_interaction:"interactions"},qn=Object.create(null);qn.log_event="GENERIC_EVENT_LOGGING";qn.log_interaction="INTERACTION_LOGGING";var qda=new Set(["log_event"]),rn={},sn=0,tn=0,un=Sa("ytLoggingTransportLogPayloadsQueue_")||{};Na("ytLoggingTransportLogPayloadsQueue_",un,void 0);var vn=Sa("ytLoggingTransportTokensToCttTargetIds_")||{};Na("ytLoggingTransportTokensToCttTargetIds_",vn,void 0);
var wn=Sa("ytLoggingTransportDispatchedStats_")||{};Na("ytLoggingTransportDispatchedStats_",wn,void 0);var xn=Sa("ytLoggingTransportCapturedTime_")||{};Na("ytytLoggingTransportCapturedTime_",xn,void 0);function yn(){Km(sn);Km(tn);tn=0;if(!u.isEmpty(un)){for(var a in un){var b=rn[a];b&&(rda(a,b),delete un[a])}u.isEmpty(un)||zn()}}
function sda(){var a=[];for(e in un){var b=wn[e]||{};wn[e]=b;for(var c in un[e]){var d=An(e,c);b.storedEventsCount=b.storedEventsCount||0;b.storedEventsCount+=d.length}}var e=Math.round(nn());for(var g in wn)b=wn[g],b.eventType=g in qn?qn[g]:"UNKNOWN_TYPE",c=xn[g],b.metricIntervalMs=c?e-c:e-NaN,a.push(b),xn[g]=e,delete wn[g];return a}
function zn(){A("web_gel_timeout_cap")&&!tn&&(tn=Im(yn,6E4));Km(sn);sn=Im(yn,z("LOGGING_BATCH_TIMEOUT",Be("web_gel_debounce_ms",1E4)))}
function An(a,b){b=void 0===b?"":b;un[a]=un[a]||{};un[a][b]=un[a][b]||[];return un[a][b]}
function rda(a,b){var c=pda[a],d=wn[a]||{};wn[a]=d;var e=Math.round(nn()),g;for(g in un[a]){var h=u.unsafeClone({context:tda(b.config_)});h[c]=An(a,g);d.dispatchedEventCount=d.dispatchedEventCount||0;d.dispatchedEventCount+=h[c].length;var m=vn[g];if(m)a:{var n=g;if(m.videoId)var p="VIDEO";else if(m.playlistId)p="PLAYLIST";else break a;h.credentialTransferTokenTargetId=m;h.context=h.context||{};h.context.user=h.context.user||{};h.context.user.credentialTransferTokens=[{token:n,scope:p}]}delete vn[g];
h.requestTimeMs=e;if(m=z("EVENT_ID",void 0))p=(z("BATCH_CLIENT_COUNTER",void 0)||0)+1,p>oda&&(p=1),re("BATCH_CLIENT_COUNTER",p),m={serializedEventId:m,clientCounter:p},h.serializedClientEventId=m,on&&pn&&A("log_gel_rtt_web")&&(h.previousBatchInfo={serializedClientEventId:on,roundtripMs:pn}),on=m,pn=0;Bn(b,a,h,{retry:qda.has(a),onSuccess:r(uda,this,nn())})}d.previousDispatchMs&&(a=e-d.previousDispatchMs,b=d.diffCount||0,d.averageTimeBetweenDispatchesMs=b?(d.averageTimeBetweenDispatchesMs*b+a)/(b+1):
a,d.diffCount=b+1);d.previousDispatchMs=e}
function uda(a){pn=Math.round(nn()-a)}
;var Cn=function(){this.cancelDebouncedJobMap_=new WeakMap;this.cancelThrottledJobMap_=new WeakMap},En=function(a,b){return Dn.addJob(a,0,b)},Fn=function(a,b,c){return a.addJob(b,1,c)},Gn=function(a,b,c){return a.addJob(b,2,c)},Hn=function(a,b,c){return a.addJob(b,3,c)},In=function(a,b){return Dn.addJob(a,4,b)},Jn=function(a){var b=Sa("yt.scheduler.instance.addImmediateJob");
b?b(a):a()};
f=Cn.prototype;f.cancelJobList=function(a){for(var b=0,c=a.length;b<c;b++)this.cancelJob(a[b])};
f.debounce=function(a,b,c){var d=this,e=0,g=function(){e&&d.cancelJob(e);e=d.addJob(a,b,c);d.cancelDebouncedJobMap_.set(g,e)};
return g};
f.cancelDebounce=function(a){(a=this.cancelDebouncedJobMap_.get(a))&&this.cancelJob(a)};
f.throttle=function(a,b,c){var d=this,e=0,g=function(){a();e=0},h=function(){e||(e=d.addJob(g,b,c))};
this.cancelThrottledJobMap_.set(h,function(){e&&(d.cancelJob(e),e=0)});
return h};
f.cancelThrottle=function(a){(a=this.cancelThrottledJobMap_.get(a))&&a()};var Kn=function(){Cn.apply(this,arguments)};
l(Kn,Cn);f=Kn.prototype;f.addJob=function(a,b,c){isNaN(c)&&(c=void 0);var d=Sa("yt.scheduler.instance.addJob");return d?d(a,b,c):void 0===c?(a(),NaN):Im(a,c||0)};
f.cancelJob=function(a){if(!isNaN(a)){var b=Sa("yt.scheduler.instance.cancelJob");b?b(a):Km(a)}};
f.cancelAllJobs=function(){Sa("yt.scheduler.instance.cancelAllJobs")()};
f.start=function(){var a=Sa("yt.scheduler.instance.start");a&&a()};
f.pause=function(){var a=Sa("yt.scheduler.instance.pause");a&&a()};
var Ln=function(a){var b=Sa("yt.scheduler.instance.setPriorityThreshold");b&&b(a)},Mn=function(a){var b=Sa("yt.scheduler.instance.enablePriorityThreshold");
b&&b(a)};
f=Kn.prototype;f.enableInputPriorityThreshold=function(){Mn(4)};
f.enableHighPriorityThreshold=function(){Mn(3)};
f.enableMediumPriorityThreshold=function(){Mn(2)};
f.enableLowPriorityThreshold=function(){Mn(1)};
f.enableIdlePriorityThreshold=function(){Mn(0)};
f.setInputPriorityThreshold=function(){Ln(4)};
f.setHighPriorityThreshold=function(){Ln(3)};
f.setMediumPriorityThreshold=function(){Ln(2)};
f.setLowPriorityThreshold=function(){Ln(1)};
f.clearPriorityThreshold=function(){var a=Sa("yt.scheduler.instance.clearPriorityThreshold");a?a():Ln(0)};
Ua(Kn);var Dn=Kn.getInstance();var Nn={};
function On(a){var b=void 0===a?{}:a;a=void 0===b.inferFromNonUserEvents?!0:b.inferFromNonUserEvents;b=void 0===b.preferMobileEvents?!1:b.preferMobileEvents;if(null==Sa("_lact",window)){var c=parseInt(z("LACT"),10);c=isFinite(c)?fb()-Math.max(c,0):-1;Na("_lact",c,window);Na("_fact",c,window);-1==c&&Pn();Cm(document,"keydown",Pn);Cm(document,"keyup",Pn);Cm(document,"mousedown",Pn);Cm(document,"mouseup",Pn);a&&(b?Cm(window,"touchmove",function(){Qn("touchmove",200)},{passive:!0}):(Cm(window,"resize",
function(){Qn("resize",200)}),Cm(window,"scroll",function(){Qn("scroll",200)})));
new Lm(function(){Qn("mouse",100)});
Cm(document,"touchstart",Pn,{passive:!0});Cm(document,"touchend",Pn,{passive:!0})}}
function Qn(a,b){Nn[a]||(Nn[a]=!0,Fn(Dn,function(){Pn();Nn[a]=!1},b))}
function Pn(){null==Sa("_lact",window)&&(On(),Sa("_lact",window));var a=fb();Na("_lact",a,window);-1==Sa("_fact",window)&&Na("_fact",a,window);(a=Sa("ytglobal.ytUtilActivityCallback_"))&&a()}
function Rn(){var a=Sa("_lact",window);return null==a?-1:Math.max(fb()-a,0)}
;var Sn=Sa("ytLoggingGelSequenceIdObj_")||{};Na("ytLoggingGelSequenceIdObj_",Sn,void 0);
function Tn(a,b,c,d){d=void 0===d?{}:d;var e={};e.eventTimeMs=Math.round(d.timestamp||nn());e[a]=b;e.context={lastActivityMs:String(d.timestamp?-1:Rn())};A("log_sequence_info_on_gel_web")&&d.sequenceGroup&&(a=e.context,b=d.sequenceGroup,Sn[b]=b in Sn?Sn[b]+1:0,a.sequence={index:Sn[b],groupKey:b},d.endOfSequence&&delete Sn[d.sequenceGroup]);(d=d.cttAuthInfo)?(a={},d.videoId?a.videoId=d.videoId:d.playlistId&&(a.playlistId=d.playlistId),vn[d.token]=a,d=An("log_event",d.token)):d=An("log_event");d.push(e);
c&&(rn.log_event=new c);d.length>=(Be("web_logging_max_batch")||100)?yn():zn()}
;function tda(a){a={client:{hl:a.innertubeContextHostLanguage,gl:a.innertubeContextGeoLocation,clientName:a.innertubeContextClientName,clientVersion:a.innertubeContextClientVersion,configInfo:a.innertubeContextClientConfigInfo}};var b=window.devicePixelRatio;b&&1!=b&&(a.client.screenDensityFloat=String(b));z("DELEGATED_SESSION_ID")&&!A("pageid_as_header_web")&&(a.user={onBehalfOfUser:z("DELEGATED_SESSION_ID")});return a}
function Un(a,b,c){c=void 0===c?{}:c;var d={"X-Goog-Visitor-Id":c.visitorData||z("VISITOR_DATA","")};if(b&&b.includes("www.youtube-nocookie.com"))return d;(b=c.authorization||z("AUTHORIZATION"))||(b=a?"Bearer "+Sa("gapi.auth.getToken")().access_token:Vj([]));b&&(d.Authorization=b,d["X-Goog-AuthUser"]=z("SESSION_INDEX",0),A("pageid_as_header_web")&&(d["X-Goog-PageId"]=z("DELEGATED_SESSION_ID")));return d}
function Vn(a){a=Object.assign({},a);delete a.Authorization;var b=Vj();if(b){var c=new jk;c.update(z("INNERTUBE_API_KEY",void 0));c.update(b);a.hash=jf(c.digest(),3)}return a}
;function Wn(a,b,c,d){Ig.set(""+a,b,c,"/",void 0===d?"youtube.com":d,!1)}
function Xn(a,b,c){Ig.remove(""+a,void 0===b?"/":b,void 0===c?"youtube.com":c)}
;var Yn=function(a){var b;(b=cl(a))||(a=new Yk(a||"UserDataSharedStore"),b=a.isAvailable()?a:null);this.expiringStorage_=(a=b)?new Rk(a):null;this.domain_=document.domain||window.location.hostname};
f=Yn.prototype;f.set=function(a,b,c,d){c=c||31104E3;this.remove(a);if(this.expiringStorage_)try{this.expiringStorage_.set(a,b,fb()+1E3*c);return}catch(g){}var e="";if(d)try{e=escape(Gk(b))}catch(g){return}else e=escape(b);Wn(a,e,c,this.domain_)};
f.get=function(a,b){var c=void 0,d=!this.expiringStorage_;if(!d)try{c=this.expiringStorage_.get(a)}catch(e){d=!0}if(d&&(c=Ig.get(""+a,void 0))&&(c=unescape(c),b))try{c=JSON.parse(c)}catch(e){this.remove(a),c=void 0}return c};
f.remove=function(a){this.expiringStorage_&&this.expiringStorage_.remove(a);Xn(a,"/",this.domain_)};
f.getCreationTime=function(a){return this.expiringStorage_&&(a=(this.expiringStorage_.getWrapper(a)||{}).creation,Ma(a))?a:null};
f.getExpirationTime=function(a){return this.expiringStorage_&&(a=(this.expiringStorage_.getWrapper(a)||{}).expiration,Ma(a))?a:null};var Zn=new Yn("yt.innertube");function vda(a,b,c,d){if(d)return null;d=Zn.get("nextId",!0)||1;var e=Zn.get("requests",!0)||{};e[d]={method:a,request:b,authState:Vn(c),requestTime:Math.round(nn())};Zn.set("nextId",d+1,86400,!0);Zn.set("requests",e,86400,!0);return d}
function $n(a){var b=Zn.get("requests",!0)||{};delete b[a];Zn.set("requests",b,86400,!0)}
function ao(a){var b=Zn.get("requests",!0);if(b){for(var c in b){var d=b[c];if(!(6E4>Math.round(nn())-d.requestTime)){var e=d.authState,g=Vn(Un(!1));u.equals(e,g)&&(e=d.request,"requestTimeMs"in e&&(e.requestTimeMs=Math.round(nn())),Bn(a,d.method,e,{}));delete b[c]}}Zn.set("requests",b,86400,!0)}}
;var bo=function(a){var b=this;this.config_=a||{innertubeApiKey:z("INNERTUBE_API_KEY",void 0),innertubeApiVersion:z("INNERTUBE_API_VERSION",void 0),innertubeContextClientConfigInfo:z("INNERTUBE_CONTEXT_CLIENT_CONFIG_INFO"),innertubeContextClientName:z("INNERTUBE_CONTEXT_CLIENT_NAME","WEB"),innertubeContextClientVersion:z("INNERTUBE_CONTEXT_CLIENT_VERSION",void 0),innertubeContextHostLanguage:z("INNERTUBE_CONTEXT_HL",void 0),innertubeContextGeoLocation:z("INNERTUBE_CONTEXT_GL",void 0),innertubeHostOverride:z("INNERTUBE_HOST_OVERRIDE",
void 0)||"",innertubeUseThirdPartyAuth:se("INNERTUBE_USE_THIRD_PARTY_AUTH",!1)};En(function(){ao(b)},5E3)},Bn=function(a,b,c,d){!z("VISITOR_DATA")&&.01>Math.random()&&we(Error("Missing VISITOR_DATA when sending innertube request."),"WARNING");
var e={headers:{"Content-Type":"application/json"},method:"POST",postParams:c,postBodyFormat:"JSON",onTimeout:function(){d.onTimeout()},
onFetchTimeout:d.onTimeout,onSuccess:function(B,G){if(d.onSuccess)d.onSuccess(G)},
onFetchSuccess:function(B){if(d.onSuccess)d.onSuccess(B)},
onError:function(B,G){if(d.onError)d.onError(G)},
onFetchError:function(B){if(d.onError)d.onError(B)},
timeout:d.timeout,withCredentials:!0},g="",h=a.config_.innertubeHostOverride;h&&(g=h);h=a.config_.innertubeUseThirdPartyAuth||!1;var m=Un(h,g,d);Object.assign(e.headers,m);e.headers.Authorization&&!g&&(e.headers["x-origin"]=window.location.origin);var n=nm(""+g+("/youtubei/"+a.config_.innertubeApiVersion+"/"+b),{alt:"json",key:a.config_.innertubeApiKey}),p;if(d.retry&&A("retry_web_logging_batches")&&"www.youtube-nocookie.com"!=g&&(p=vda(b,c,m,h))){var x=e.onSuccess,y=e.onFetchSuccess;e.onSuccess=
function(B,G){$n(p);x(B,G)};
c.onFetchSuccess=function(B,G){$n(p);y(B,G)}}try{A("use_fetch_for_op_xhr")?gda(n,e):Zm(n,e)}catch(B){if("InvalidAccessError"==B)p&&($n(p),p=0),we(Error("An extension is blocking network request."),"WARNING");else
throw B}p&&En(function(){ao(a)},5E3)};function co(a,b,c){c=void 0===c?{}:c;var d=bo;se("ytLoggingEventsDefaultDisabled",!1)&&bo==bo&&(d=null);Tn(a,b,d,c)}
function eo(){wda();yn()}
function wda(){A("log_web_meta")&&sda().forEach(function(a){co("delayedEventMetricCaptured",a)})}
;var fo=function(a){this.veData_=a},go=function(a){return new fo({trackingParams:a})},ho=function(a,b,c,d){var e=xda++;
return new fo({veType:a,veCounter:e,elementIndex:c,dataElement:b,youtubeData:d})},io=function(a,b){return new fo({veType:a,
youtubeData:b})},jo=function(a){var b={};
void 0!==a.veData_.trackingParams?b.trackingParams=a.veData_.trackingParams:(b.veType=a.veData_.veType,null!=a.veData_.veCounter&&(b.veCounter=a.veData_.veCounter),null!=a.veData_.elementIndex&&(b.elementIndex=a.veData_.elementIndex));void 0!==a.veData_.dataElement&&(b.dataElement=jo(a.veData_.dataElement));void 0!==a.veData_.youtubeData&&(b.youtubeData=a.veData_.youtubeData);return b};
fo.prototype.toString=function(){return JSON.stringify(jo(this))};
fo.prototype.isClientVe=function(){return!this.veData_.trackingParams&&!!this.veData_.veType};
var xda=1;var ko=function(a,b){this.version=a;this.args=b};
ko.prototype.serialize=function(){return{version:this.version,args:this.args}};var lo=function(a,b){this.topic=a;this.dataClass=b};
lo.prototype.toString=function(){return this.topic};var yda=Sa("ytPubsub2Pubsub2Instance")||new Mk;Mk.prototype.subscribe=Mk.prototype.subscribe;Mk.prototype.unsubscribeByKey=Mk.prototype.unsubscribeByKey;Mk.prototype.publish=Mk.prototype.publish;Mk.prototype.clear=Mk.prototype.clear;Na("ytPubsub2Pubsub2Instance",yda,void 0);var mo=Sa("ytPubsub2Pubsub2SubscribedKeys")||{};Na("ytPubsub2Pubsub2SubscribedKeys",mo,void 0);var no=Sa("ytPubsub2Pubsub2TopicToKeys")||{};Na("ytPubsub2Pubsub2TopicToKeys",no,void 0);var oo=Sa("ytPubsub2Pubsub2IsAsync")||{};
Na("ytPubsub2Pubsub2IsAsync",oo,void 0);Na("ytPubsub2Pubsub2SkipSubKey",null,void 0);function po(a,b){var c=qo();c&&c.publish.call(c,a.toString(),a,b)}
function ro(a,b,c){var d=qo();if(!d)return 0;var e=d.subscribe(a.toString(),function(g,h){var m=Sa("ytPubsub2Pubsub2SkipSubKey");m&&m==e||(m=function(){if(mo[e])try{if(h&&a instanceof lo&&a!=g)try{var n=a.dataClass,p=h;if(!p.args||!p.version)throw Error("yt.pubsub2.Data.deserialize(): serializedData is incomplete.");try{if(!n.version_){var x=new n;n.version_=x.version}var y=n.version_}catch(B){}if(!y||p.version!=y)throw Error("yt.pubsub2.Data.deserialize(): serializedData version is incompatible.");
try{h=Reflect.construct(n,Cb(p.args))}catch(B){throw B.message="yt.pubsub2.Data.deserialize(): "+B.message,B}}catch(B){throw B.message="yt.pubsub2.pubsub2 cross-binary conversion error for "+a.toString()+": "+B.message,B}b.call(c||window,h)}catch(B){we(B)}},oo[a.toString()]?Sa("yt.scheduler.instance")?Fn(Dn,m):Im(m,0):m())});
mo[e]=!0;no[a.toString()]||(no[a.toString()]=[]);no[a.toString()].push(e);return e}
function zda(){var a=Ada,b=ro(so,function(c){a.apply(void 0,arguments);Bda(b)},void 0);
return b}
function Bda(a){var b=qo();b&&(Ma(a)&&(a=[a]),mb(a,function(c){b.unsubscribeByKey(c);delete mo[c]}))}
function qo(){return Sa("ytPubsub2Pubsub2Instance")}
;var to=function(a){ko.call(this,1,arguments);this.csn=a};
l(to,ko);var so=new lo("screen-created",to),uo=[],Dda=Cda,vo=0;function wo(a,b,c,d,e,g){var h=Dda();b={csn:h,pageVe:jo(io(b,g))};c&&(b.implicitGesture={parentCsn:c.clientScreenNonce,gesturedVe:jo(c.visualElement)});d&&(b.cloneCsn=d);Tn("screenCreated",b,a,{cttAuthInfo:e,sequenceGroup:h});po(so,new to(h));return h}
function xo(a,b,c,d,e){c={csn:b,parentVe:jo(c),childVes:pb(d,function(h){return jo(h)})};
d=k(d);for(var g=d.next();!g.done;g=d.next())g=jo(g.value),(u.isEmpty(g)||!g.trackingParams&&!g.veType)&&bn(Error("Child VE logged with no data"),"WARNING");e={cttAuthInfo:e,sequenceGroup:b};"UNDEFINED_CSN"==b?yo("visualElementAttached",c,e):Tn("visualElementAttached",c,a,e)}
function zo(a,b,c,d){c={csn:b,ve:jo(c),eventType:1};d&&(c.clientData=d);d={cttAuthInfo:void 0,sequenceGroup:b};"UNDEFINED_CSN"==b?yo("visualElementShown",c,d):Tn("visualElementShown",c,a,d)}
function Ao(a,b,c){c={csn:b,ve:jo(c),eventType:4};var d={cttAuthInfo:void 0,sequenceGroup:b};"UNDEFINED_CSN"==b?yo("visualElementShown",c,d):Tn("visualElementShown",c,a,d)}
function Bo(a,b,c,d){d=void 0===d?!1:d;c={csn:b,ve:jo(c),eventType:d?16:8};d={cttAuthInfo:void 0,sequenceGroup:b,endOfSequence:d};"UNDEFINED_CSN"==b?yo("visualElementHidden",c,d):Tn("visualElementHidden",c,a,d)}
function Co(a,b,c){Do(a,b,void 0,c,void 0)}
function Do(a,b,c,d,e){b={csn:a,ve:jo(b),gestureType:c||"INTERACTION_LOGGING_GESTURE_TYPE_GENERIC_CLICK"};d&&(b.clientData=d);d={cttAuthInfo:e,sequenceGroup:a};"UNDEFINED_CSN"==a?yo("visualElementGestured",b,d):Tn("visualElementGestured",b,bo,d)}
function Cda(){return kf(Math.random()+"",3)}
function yo(a,b,c){uo.push({payloadName:a,payload:b,options:c});vo||(vo=zda())}
function Ada(a){if(uo){for(var b=k(uo),c=b.next();!c.done;c=b.next())c=c.value,c.payload&&(c.payload.csn=a.csn,Tn(c.payloadName,c.payload,null,c.options));uo.length=0}vo=0}
;var Eo=Sa("ytLoggingLatencyUsageStats_")||{};Na("ytLoggingLatencyUsageStats_",Eo,void 0);var Fo=0;function Go(a,b){var c=Object.keys(a).join("");Ho("info_"+c+"_"+b)||(a.clientActionNonce=b,co("latencyActionInfo",a))}
function Ho(a){Eo[a]=Eo[a]||{count:0};var b=Eo[a];b.count++;b.time=nn();Fo||(Fo=En(Eda,5E3));if(5<b.count){if(6==b.count&&1>1E5*Math.random()){b=0==a.indexOf("info")?"WARNING":"ERROR";var c=Error("CSI data exceeded logging limit with key");c.params=a;bn(c,b)}return!0}return!1}
function Eda(){var a=nn(),b;for(b in Eo)6E4<a-Eo[b].time&&delete Eo[b];Fo=0}
;var Jo=fb().toString();
function Ko(){a:{if(window.crypto&&window.crypto.getRandomValues)try{var a=Array(16),b=new Uint8Array(16);window.crypto.getRandomValues(b);for(var c=0;c<a.length;c++)a[c]=b[c];var d=a;break a}catch(e){}d=Array(16);for(a=0;16>a;a++){b=fb();for(c=0;c<b%23;c++)d[a]=Math.random();d[a]=Math.floor(256*Math.random())}if(Jo)for(a=1,b=0;b<Jo.length;b++)d[a%16]=d[a%16]^d[(a-1)%16]/4^Jo.charCodeAt(b),a++}a=[];for(b=0;b<d.length;b++)a.push("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".charAt(d[b]&63));
return a.join("")}
;var Lo=!1,Fda=[],Mo=Sa("ytLoggingTimeDocumentNonce_")||Ko();Na("ytLoggingTimeDocumentNonce_",Mo,void 0);var No=0,Oo=null,Po=null;function Gda(){if("hidden"==um())var a="FOREGROUND_HEARTBEAT_TRIGGER_ON_BACKGROUND";else"visible"==um()&&(a="FOREGROUND_HEARTBEAT_TRIGGER_ON_FOREGROUND",Oo=null);a&&Qo(a)}
function Qo(a){if("FOREGROUND_HEARTBEAT_TRIGGER_ON_BACKGROUND"==a||"FOREGROUND_HEARTBEAT_TRIGGER_ON_FOREGROUND"==a){if(Po==a)return;Po=a}var b=9E4+2E3*Math.random();if("FOREGROUND_HEARTBEAT_TRIGGER_ON_INTERVAL"!=a||!(Rn()>b)&&"visible"==um()){b=-1;Oo&&(b=Math.round(nn()-Oo));var c=String;var d=Sa("_fact",window);d=null==d||-1==d?-1:Math.max(fb()-d,0);a={firstActivityMs:c(d),clientDocumentNonce:Mo,index:String(No),lastEventDeltaMs:String(b),trigger:a};Tn("foregroundHeartbeat",a,bo);Na("_fact",-1,window);
No++;Oo=nn()}}
function Ro(a){a&&Tn("foregroundHeartbeatScreenAssociated",{clientDocumentNonce:Mo,clientScreenNonce:a},bo)}
;function So(a){a=void 0===a?0:a;return 0==a?"client-screen-nonce":"client-screen-nonce."+a}
function To(a){a=void 0===a?0:a;return 0==a?"ROOT_VE_TYPE":"ROOT_VE_TYPE."+a}
function Uo(a){return z(To(void 0===a?0:a),void 0)}
Na("yt_logging_screen.getRootVeType",Uo,void 0);function Vo(a){return(a=Uo(void 0===a?0:a))?io(a):null}
function Wo(a){a=void 0===a?0:a;var b=z(So(a));b||0!=a||(b=A("kevlar_client_side_screens")?"UNDEFINED_CSN":z("EVENT_ID"));return b?b:null}
Na("yt_logging_screen.getCurrentCsn",Wo,void 0);function Xo(a,b,c){c=void 0===c?0:c;if(a!==z(So(c))||b!==z(To(c)))re(So(c),a),re(To(c),b),0==c&&(b=function(){setTimeout(function(){Ro(a)},0)},"requestAnimationFrame"in window?window.requestAnimationFrame(b):b())}
Na("yt_logging_screen.setCurrentScreen",Xo,void 0);var Yo={},Hda=0;function Zo(a,b,c,d,e){e=void 0===e?"":e;a&&(c&&(c=Kc,c=!(c&&0<=c.toLowerCase().indexOf("cobalt"))),c?a&&(a=wc(Ac(a)),"about:invalid#zClosurez"===a?a="":(a=Wc(Yc(a)),a=md(Gk(a))),gc(a)||(a=rh("IFRAME",{src:"javascript:\"<body><img src=\\\"\"+"+a+"+\"\\\"></body>\"",style:"display:none"}),$g(a).body.appendChild(a))):e?Xm(a,b,"POST",e,d):z("USE_NET_AJAX_FOR_PING_TRANSPORT",!1)||d?Xm(a,b,"GET","",d):Ida(a,b)||Jda(a,b))}
function Ida(a,b){if(!te("web_use_beacon_api_for_ad_click_server_pings"))return!1;var c=mi(ni(5,a));return c&&-1!=c.indexOf("/aclk")&&"1"===Ei(a,"ae")&&"1"===Ei(a,"act")?$o(a)?(b&&b(),!0):!1:!1}
function ap(a){if(a)for(var b=0;b<a.length;b++)Zo(a[b],void 0,void 0)}
function $o(a,b){try{if(window.navigator&&window.navigator.sendBeacon&&window.navigator.sendBeacon(a,void 0===b?"":b))return!0}catch(c){}return!1}
function Jda(a,b){var c=new Image,d=""+Hda++;Yo[d]=c;c.onload=c.onerror=function(){b&&Yo[d]&&b();delete Yo[d]};
c.src=a}
;var dp=function(a,b){for(var c=[],d=1;d<arguments.length;++d)c[d-1]=arguments[d];if(!bp(a)||c.some(function(e){return!bp(e)}))throw Error("Only objects may be merged.");
c=k(c);for(d=c.next();!d.done;d=c.next())cp(a,d.value);return a};
function cp(a,b){for(var c in b)if(bp(b[c])){if(c in a&&!bp(a[c]))throw Error("Cannot merge an object into a non-object.");c in a||(a[c]={});cp(a[c],b[c])}else if(ep(b[c])){if(c in a&&!ep(a[c]))throw Error("Cannot merge an array into a non-array.");c in a||(a[c]=[]);fp(a[c],b[c])}else a[c]=b[c];return a}
function fp(a,b){b=k(b);for(var c=b.next();!c.done;c=b.next())c=c.value,bp(c)?a.push(cp({},c)):ep(c)?a.push(fp([],c)):a.push(c);return a}
var bp=function(a){return"object"===typeof a&&!Array.isArray(a)},ep=function(a){return"object"===typeof a&&Array.isArray(a)};var gp=!1;function hp(){if(!gp){if(Polymer.Base){var a=Polymer.Base.createdCallback;Polymer.Base.createdCallback=function(){try{a.apply(this,arguments)}catch(y){we(y)}};
var b=Polymer.Base.attachedCallback;Polymer.Base.attachedCallback=function(){try{b.apply(this,arguments)}catch(y){we(y)}};
var c=Polymer.Base.detachedCallback;Polymer.Base.detachedCallback=function(){try{c.apply(this,arguments)}catch(y){we(y)}};
var d=Polymer.Base.attributeChangedCallback;Polymer.Base.attributeChangedCallback=function(){try{d.apply(this,arguments)}catch(y){we(y)}};
var e=Polymer.Base._listen,g=new WeakMap;Polymer.Base._listen=function(y,B,G){var P=function(){try{G.apply(this,arguments)}catch(S){we(S)}};
g.set(G,P);e.call(this,y,B,P)};
var h=Polymer.Base._unlisten;Polymer.Base._unlisten=function(y,B,G){h.call(this,y,B,g.get(G))}}if(Polymer.Async){var m=Polymer.Async,n=m._atEndOfMicrotask;
m._atEndOfMicrotask=function(){try{n.apply(m,arguments)}catch(y){we(y)}}}if(Polymer.RenderStatus){var p=Polymer.RenderStatus,x=p.afterNextRender;
p.afterNextRender=function(y,B,G){x.call(p,y,function(){try{B.apply(this,arguments)}catch(P){we(P)}},G)}}gp=!0}}
;var ip=function(){this.isEnabled_=A("enable_signals");this.softSignals_=Object.create(null);this.signals_=Object.create(null);this.compoundSignals_=Object.create(null);this.inProgressSignals_=Object.create(null);this.parkedJobs_=Object.create(null);this.parkedProcessors_=Object.create(null)};
ip.prototype.onAny=function(a){return jp(this,a,2)};
var kp=function(a,b){return jp(a,b,1)};
ip.prototype.parkOrScheduleJob=function(a,b,c,d,e){lp(this,c)?Dn.addJob(a,b,d):(e&&(a=mp(a),this.setTimeout_(a,b,c,e)),(e=this.parkedJobs_[c])||(e=this.parkedJobs_[c]=[]),e.push({job:a,priority:b,delay:d}))};
var Kda=function(a,b,c){var d=u.getKeys(c);if(1==d.length){d=d[0];var e=c.get(d);a.parkOrScheduleJob(b,e,d,void 0,void 0)}else 1<d.length&&(d=a.onAny(d),e=function(){var g=0,h;for(h in c)(np(this)||lp(this,h)||this.inProgressSignals_[h])&&(g=Math.max(g,c[h]));Dn.addJob(b,g,void 0)}.bind(a),a.parkOrScheduleJob(e,10,d))};
ip.prototype.addListener=function(a,b,c){this.isEnabled_&&(c&&(b=mp(b),this.setTimeout_(b,0,a,c)),(c=this.parkedProcessors_[a])||(c=this.parkedProcessors_[a]=[]),c.push(b))};
ip.prototype.processSignal=function(a){if(!lp(this,a)){this.inProgressSignals_[a]=!0;var b=this.parkedJobs_[a];if(b){for(var c=0,d;d=b[c++];)Dn.addJob(d.job,d.priority,d.delay);b.length=0}if(b=this.parkedProcessors_[a]){for(c=0;d=b[c++];)d();b.length=0}this.signals_[a]=!0;this.inProgressSignals_[a]=!1}};
var lp=function(a,b){return np(a)?!0:void 0!==a.signals_[b]},op=function(a,b,c){a.parkOrScheduleJob(c,4,b)},Lda=function(a){var b=ip.getInstance(),c=kp(b,["yt-masthead-ad-renderer",
"ytd-video-masthead-ad-renderer"]);b.parkOrScheduleJob(a,0,c)},np=function(a){return a.isEnabled_&&(se("IS_HOMEPAGE_COLD")||se("IS_RESULTS_PAGE_COLD")||se("IS_WATCH_PAGE_COLD"))?!1:!0},mp=function(a){var b=!1;
return function(){b||(b=!0,a())}};
ip.prototype.setTimeout_=function(a,b,c,d){if(pp(this,c))Dn.addJob(a,b,d);else{var e=this.compoundSignals_[c];if(e){var g=function(){lp(this,c)||(e.isTimeoutConditionSatisfied?Dn.addJob(a,b):e.timeoutConditionObservers.push(function(){Dn.addJob(a,b)}))}.bind(this);
Dn.addJob(g,b,d)}}};
var jp=function(a,b,c){if(!a.isEnabled_)return"n/a";if(1<b.length){for(var d=[],e=Object.create(null),g=0,h;h=b[g++];)e[h]||(d.push(h),e[h]=!0);b=d}if(1==b.length)return b[0];d=b;e="";g=2===c?"|":"&";d.sort();h=0;for(var m;m=d[h++];)e+=m+g;d=e;if(!a.compoundSignals_[d]){e=0;g=[];for(h=0;m=b[h++];)e++,lp(a,m)||g.push(m);(c=2==c)&&e>g.length||!c&&!g.length?a.signals_[d]=!0:Mda(a,d,c,b,g)}return d},Mda=function(a,b,c,d,e){for(var g=e.length,h=function(){c||0==--g?this.processSignal(b):this.evaluateTimeoutCondition_(b)}.bind(a),
m=0,n=void 0;n=e[m++];)a.addListener(n,h);
a.compoundSignals_[b]={signals:d,isOnAny:c,isInitialized:!1,isTimeoutConditionSatisfied:!1,timeoutConditionObservers:[]};a.evaluateTimeoutCondition_(b)};
ip.prototype.evaluateTimeoutCondition_=function(a){if(!lp(this,a)){var b=this.compoundSignals_[a];if(!b.isTimeoutConditionSatisfied){for(var c=!1,d=0,e=0,g=0,h;h=b.signals[g++];){var m=!lp(this,h);pp(this,h)?c=!0:(h=this.compoundSignals_[h])?m&&!h.isTimeoutConditionSatisfied&&(e++,b.isInitialized||(m=this.evaluateTimeoutCondition_.bind(this,a),h.timeoutConditionObservers.push(m))):m&&d++}b.isInitialized=!0;b.isOnAny?c&&(b.isTimeoutConditionSatisfied=!0):0==d&&0==e&&(b.isTimeoutConditionSatisfied=
!0);if(b.isTimeoutConditionSatisfied)for(a=0;c=b.timeoutConditionObservers[a++];)c()}}};
var pp=function(a,b){if(u.isEmpty(a.softSignals_))for(var c=0,d;d=Nda[c++];)a.softSignals_[d]=!0;return a.softSignals_[b]};
ip.prototype.processSignal=ip.prototype.processSignal;ip.prototype.parkOrScheduleJob=ip.prototype.parkOrScheduleJob;ip.prototype.onAny=ip.prototype.onAny;Ua(ip);Na("ytsignals.getInstance",ip.getInstance,void 0);ip.prototype.onAny=ip.prototype.onAny;ip.prototype.parkOrScheduleJob=ip.prototype.parkOrScheduleJob;ip.prototype.processSignal=ip.prototype.processSignal;var Nda=["eop","eocs","dl","pcl"];var qp=function(a,b,c){c=void 0===c?Dn:c;this.priority_=a;this.signal_=b;this.parkedJobs_=null;this.nextJobDescriptor_=0;this.scheduledJobs_=Object.create(null);this.signals_=ip.getInstance();this.scheduler_=c},sp=function(a,b){if(b)if(a.signal_&&!lp(a.signals_,a.signal_)){var c=a.parkedJobs_;
c||(c=a.parkedJobs_=[],a.signals_.addListener(a.signal_,a.processSignal_.bind(a)));c.push(b)}else rp(a,b)},tp=function(a,b){if(b!=a.priority_){a.priority_=b;
for(var c in a.scheduledJobs_){var d=a.scheduledJobs_[c];a.scheduler_.cancelJob(d.jobId);d.jobId=a.scheduler_.addJob(d.jobWrapper,b)}}};
qp.prototype.cancel=function(){for(var a in this.scheduledJobs_)this.scheduler_.cancelJob(this.scheduledJobs_[a].jobId),delete this.scheduledJobs_[a];this.parkedJobs_&&(this.parkedJobs_.length=0)};
qp.prototype.processSignal_=function(){if(this.parkedJobs_){for(var a=0,b;b=this.parkedJobs_[a++];)rp(this,b);this.parkedJobs_.length=0}};
var rp=function(a,b){if(10==a.priority_)Jn(b);else{var c=a.nextJobDescriptor_++,d=function(){b();delete a.scheduledJobs_[c]},e=a.scheduler_.addJob(d,a.priority_);
a.scheduledJobs_[c]={jobWrapper:d,jobId:e}}};var up=window.performance||window.mozPerformance||window.msPerformance||window.webkitPerformance||{};function Oda(a){if(up.getEntriesByType){var b=up.getEntriesByType("paint");if(b=ub(b,function(d){return"first-paint"==d.name}))return Math.round(a.navigationStart+b.startTime)}if(a.msFirstPaint)return Math.max(0,a.msFirstPaint);
if(b=window.chrome)if(b=b.loadTimes,Za(b)){b=b();var c=1E3*Math.min(b.requestTime||Infinity,b.startLoadTime||Infinity);c=Infinity===c?0:a.navigationStart-c;return Math.max(0,Math.round(1E3*b.firstPaintTime+c)||0)}return 0}
;function vp(){var a=z("TIMING_TICK_EXPIRATION");a||(a={},re("TIMING_TICK_EXPIRATION",a));return a}
function wp(){var a=vp(),b;for(b in a)Dn.cancelJob(a[b]);re("TIMING_TICK_EXPIRATION",{})}
;var xp=function(a,b){ko.call(this,1,arguments);this.aft=a;this.timer=b};
l(xp,ko);var zp=function(a,b){ko.call(this,1,arguments);this.aft=a;this.timer=b};
l(zp,ko);var Ap=new lo("aft-recorded",xp),Pda=new lo("timing-sent",zp);function Bp(a){return Sa("ytcsi."+(a||"")+"data_")||Cp(a)}
function Dp(a){var b=Bp(a).nonce;b||(b=Ko(),Bp(a).nonce=b);return b}
function Cp(a){var b={tick:{},info:{}};Na("ytcsi."+(a||"")+"data_",b,void 0);return b}
;var Ep=function(a){a=Error.call(this,a);this.message=a.message;"stack"in a&&(this.stack=a.stack)};
l(Ep,Error);var Fp={},Gp=(Fp.ad_allowed="adTypesAllowed",Fp.yt_abt="adBreakType",Fp.ad_cpn="adClientPlaybackNonce",Fp.ad_docid="adVideoId",Fp.yt_ad_an="adNetworks",Fp.ad_at="adType",Fp.browse_id="browseId",Fp.p="httpProtocol",Fp.t="transportProtocol",Fp.cpn="clientPlaybackNonce",Fp.cseg="creatorInfo.creatorSegment",Fp.csn="clientScreenNonce",Fp.docid="videoId",Fp.GetHome_rid="getHomeRequestId",Fp.is_continuation="isContinuation",Fp.is_nav="isNavigation",Fp.b_p="kabukiInfo.browseParams",Fp.is_prefetch="kabukiInfo.isPrefetch",
Fp.is_secondary_nav="kabukiInfo.isSecondaryNav",Fp.prev_browse_id="kabukiInfo.prevBrowseId",Fp.query_source="kabukiInfo.querySource",Fp.voz_type="kabukiInfo.vozType",Fp.yt_lt="loadType",Fp.mver="creatorInfo.measurementVersion",Fp.yt_ad="isMonetized",Fp.nr="webInfo.navigationReason",Fp.ncnp="webInfo.nonPreloadedNodeCount",Fp.prt="playbackRequiresTap",Fp.pis="playerInfo.playerInitializedState",Fp.paused="playerInfo.isPausedOnLoad",Fp.yt_pt="playerType",Fp.fmt="playerInfo.itag",Fp.yt_pl="watchInfo.isPlaylist",
Fp.yt_pre="playerInfo.preloadType",Fp.yt_ad_pr="prerollAllowed",Fp.pa="previousAction",Fp.yt_red="isRedSubscriber",Fp.st="serverTimeMs",Fp.aq="tvInfo.appQuality",Fp.br_trs="tvInfo.bedrockTriggerState",Fp.label="tvInfo.label",Fp.is_mdx="tvInfo.isMdx",Fp.preloaded="tvInfo.isPreloaded",Fp.query="unpluggedInfo.query",Fp.upg_chip_ids_string="unpluggedInfo.upgChipIdsString",Fp.yt_vst="videoStreamType",Fp.vph="viewportHeight",Fp.vpw="viewportWidth",Fp.yt_vis="isVisible",Fp),Qda="isContinuation isNavigation kabukiInfo.isPrefetch kabukiInfo.isSecondaryNav isMonetized playerInfo.isPausedOnLoad prerollAllowed isRedSubscriber tvInfo.isMdx tvInfo.isPreloaded isVisible watchInfo.isPlaylist playbackRequiresTap".split(" "),
Hp={},Ip=(Hp.mver="MEASUREMENT_VERSION_",Hp.pis="PLAYER_INITIALIZED_STATE_",Hp.yt_pt="LATENCY_PLAYER_",Hp.pa="LATENCY_ACTION_",Hp.yt_vst="VIDEO_STREAM_TYPE_",Hp),Rda="all_vc ap c cver cbrand cmodel cplatform ctheme ei l_an l_mm plid srt yt_fss yt_li vpil vpni vpst yt_eil vpni2 vpil2 icrc icrt pa GetBrowse_rid GetPlayer_rid GetSearch_rid GetWatchNext_rid cmt d_vpct d_vpnfi d_vpni pc pfa pfeh pftr prerender psc rc start tcrt tcrc ssr vpr vps yt_abt yt_fn yt_fs yt_pft yt_pre yt_pt yt_pvis yt_ref yt_sts".split(" ");
function Jp(a){return A("csi_on_gel")||!!Bp(a).useGel}
function Kp(a,b,c){var d=Lp(c);d.gelTicks&&(d.gelTicks["tick_"+a]=!0);c||b||Hm();return Jp(c)?(c=Dp(c),"_start"===a?Ho("baseline_"+c)||co("latencyActionBaselined",{clientActionNonce:c},{timestamp:b}):Ho("tick_"+a+"_"+c)||co("latencyActionTicked",{tickName:a,clientActionNonce:c},{timestamp:b}),!0):!1}
function Mp(a,b,c){c=Lp(c);if(c.gelInfos)c.gelInfos["info_"+a]=!0;else{var d={};c.gelInfos=(d["info_"+a]=!0,d)}if(a in Gp){c=Gp[a];wb(Qda,c)&&(b=!!b);a in Ip&&"string"===typeof b&&(b=Ip[a]+b.toUpperCase());a=b;b=c.split(".");d=c={};for(var e=0;e<b.length-1;e++){var g=b[e];d[g]={};d=d[g]}d[b[b.length-1]]=a;return dp({},c)}wb(Rda,a)||(b=new Ep("Unknown label logged with GEL CSI"),b.params=a,xe(b))}
function Lp(a){a=Bp(a);if(!("gel"in a))a.gel={gelTicks:{},gelInfos:{}};else if(a.gel){var b=a.gel;b.gelInfos||(b.gelInfos={});b.gelTicks||(b.gelTicks={})}return a.gel}
function Np(a){a=Lp(a);"gelInfos"in a||(a.gelInfos={});return a.gelInfos}
;function Op(a,b){Jp(b)&&(dp(Np(b),a),b=Dp(b),Go(a,b))}
;var Pp=0,Qp=null,Sda={vc:!0},Rp={"script[name=\"scheduler/scheduler\"]":"sj","script[name=\"player/base\"]":"pj","link[rel=\"stylesheet\"][name=\"www-player\"]":"pc","link[rel=\"stylesheet\"][name=\"player/www-player\"]":"pc","script[name=\"desktop_polymer/desktop_polymer\"]":"dpj","link[rel=\"import\"][name=\"desktop_polymer\"]":"dph","link[rel=\"import\"][name=\"desktop_polymer_sel_auto_svg_home_v2\"]":"dph","script[name=\"mobile-c3/mobile-c3\"]":"mcj","link[rel=\"stylesheet\"][name=\"mobile-c3\"]":"mcc","script[name=\"player-plasma-ias-phone/base\"]":"mcppj",
"script[name=\"player-plasma-ias-tablet/base\"]":"mcptj","link[rel=\"stylesheet\"][name=\"mobile-polymer-player-ias\"]":"mcpc","script[name=\"mobile_blazer_core_mod\"]":"mbcj","link[rel=\"stylesheet\"][name=\"mobile_blazer_css\"]":"mbc","script[name=\"mobile_blazer_logged_in_users_mod\"]":"mbliuj","script[name=\"mobile_blazer_logged_out_users_mod\"]":"mblouj","script[name=\"mobile_blazer_noncore_mod\"]":"mbnj","#player_css":"mbpc","script[name=\"mobile_blazer_desktopplayer_mod\"]":"mbpj","link[rel=\"stylesheet\"][name=\"mobile_blazer_tablet_css\"]":"mbtc",
"script[name=\"mobile_blazer_watch_mod\"]":"mbwj"},Tda={ad_to_ad:"LATENCY_ACTION_AD_TO_AD",ad_to_video:"LATENCY_ACTION_AD_TO_VIDEO",app_startup:"LATENCY_ACTION_APP_STARTUP","artist.analytics":"LATENCY_ACTION_CREATOR_ARTIST_ANALYTICS","artist.events":"LATENCY_ACTION_CREATOR_ARTIST_CONCERTS","artist.presskit":"LATENCY_ACTION_CREATOR_ARTIST_PROFILE",browse:"LATENCY_ACTION_BROWSE",channels:"LATENCY_ACTION_CHANNELS",channel:"LATENCY_ACTION_CREATOR_CHANNEL_DASHBOARD","channel.analytics":"LATENCY_ACTION_CREATOR_CHANNEL_ANALYTICS",
"channel.comments":"LATENCY_ACTION_CREATOR_CHANNEL_COMMENTS","channel.copyright":"LATENCY_ACTION_CREATOR_CHANNEL_COPYRIGHT","channel.monetization":"LATENCY_ACTION_CREATOR_CHANNEL_MONETIZATION","channel.translations":"LATENCY_ACTION_CREATOR_CHANNEL_TRANSLATIONS","channel.videos":"LATENCY_ACTION_CREATOR_CHANNEL_VIDEOS",chips:"LATENCY_ACTION_CHIPS",embed:"LATENCY_ACTION_EMBED",home:"LATENCY_ACTION_HOME",library:"LATENCY_ACTION_LIBRARY",live:"LATENCY_ACTION_LIVE",prebuffer:"LATENCY_ACTION_PREBUFFER",
prefetch:"LATENCY_ACTION_PREFETCH",results:"LATENCY_ACTION_RESULTS",search:"LATENCY_ACTION_RESULTS",search_ui:"LATENCY_ACTION_SEARCH_UI",search_zero_state:"LATENCY_ACTION_SEARCH_ZERO_STATE",tenx:"LATENCY_ACTION_TENX",video_to_ad:"LATENCY_ACTION_VIDEO_TO_AD",watch:"LATENCY_ACTION_WATCH","watch,watch7":"LATENCY_ACTION_WATCH","watch,watch7_html5":"LATENCY_ACTION_WATCH","watch,watch7ad":"LATENCY_ACTION_WATCH","watch,watch7ad_html5":"LATENCY_ACTION_WATCH",wn_comments:"LATENCY_ACTION_LOAD_COMMENTS",ww_rqs:"LATENCY_ACTION_WHO_IS_WATCHING",
"video.analytics":"LATENCY_ACTION_CREATOR_VIDEO_ANALYTICS","video.comments":"LATENCY_ACTION_CREATOR_VIDEO_COMMENTS","video.edit":"LATENCY_ACTION_CREATOR_VIDEO_EDIT","video.translations":"LATENCY_ACTION_CREATOR_VIDEO_TRANSLATIONS","video.video_editor":"LATENCY_ACTION_CREATOR_VIDEO_VIDEO_EDITOR","video.video_editor_async":"LATENCY_ACTION_CREATOR_VIDEO_VIDEO_EDITOR_ASYNC","video.monetization":"LATENCY_ACTION_CREATOR_VIDEO_MONETIZATION",voice_assistant:"LATENCY_ACTION_VOICE_ASSISTANT"},Sp=!1;
function Tp(a){Cp(a);Uda();Up(!1,a);a||(z("TIMING_ACTION")&&re("PREVIOUS_ACTION",z("TIMING_ACTION")),re("TIMING_ACTION",""))}
function Vp(a,b){re("TIMING_AFT_KEYS",b);re("TIMING_ACTION",a);a=z("TIMING_INFO",{});for(var c in a)Wp(c,a[c]);Wp("is_nav",1);(c=Wo())&&Wp("csn",c);(c=z("PREVIOUS_ACTION",void 0))&&Wp("pa",c);a=Xp();a.p=z("CLIENT_PROTOCOL")||"unknown";a.t=z("CLIENT_TRANSPORT")||"unknown";Wp("yt_vis",Yp());if("cold"==a.yt_lt){c=up.timing||{};c.navigationStart&&(Zp("srt",c.responseStart),1!=a.prerender&&$p("n",c.navigationStart));a=Oda(c);0<a&&Zp("fpt",a);Zp("nreqs",c.requestStart,void 0);Zp("nress",c.responseStart,
void 0);Zp("nrese",c.responseEnd,void 0);0<c.redirectEnd-c.redirectStart&&(Zp("nrs",c.redirectStart,void 0),Zp("nre",c.redirectEnd,void 0));0<c.domainLookupEnd-c.domainLookupStart&&(Zp("ndnss",c.domainLookupStart,void 0),Zp("ndnse",c.domainLookupEnd,void 0));0<c.connectEnd-c.connectStart&&(Zp("ntcps",c.connectStart,void 0),Zp("ntcpe",c.connectEnd,void 0));c.secureConnectionStart>=c.navigationStart&&0<c.connectEnd-c.secureConnectionStart&&(Zp("nstcps",c.secureConnectionStart,void 0),Zp("ntcpe",c.connectEnd,
void 0));up.getEntriesByType&&Vda();c=[];if(document.querySelector&&up&&up.getEntriesByName)for(var d in Rp)a=Rp[d],Wda(d,a)&&c.push(a);c.length&&Wp("rc",c.join(","))}aq();if("cold"==Xp().yt_lt){c=bq();d=Lp();a=d.gelTicks?d.gelTicks:d;for(var e in c)ec(e,"_")||"tick_"+e in a||Kp(e,c[e]);e=Xp();d=d.gelInfos?d.gelInfos:d;for(var g in e)"info_"+g in d||(c=Mp(g,e[g]))&&Op(c)}cq(!0);dq(!1)}
function eq(a){fq(a);Tp();cq(!1);re("TIMING_AFT_KEYS",[]);Wp("yt_lt","warm");Pp=0;re("TIMING_ACTION","");re("TIMING_WAIT",[]);wp();$p(a)}
function Zp(a,b,c){var d=bq(c);if(A("use_first_tick")&&gq(a,c))return d[a];b||"_"==a[0]||hq(a,c);var e=b||Hm();d[a]&&(d["_"+a]=d["_"+a]||[d[a]],d["_"+a].push(e));d[a]=e;e=vp();var g=e[a];g&&(Dn.cancelJob(g),e[a]=0);Kp(a,b,c)||dq(!1,c);return d[a]}
function hq(a,b){up.mark&&(ec(a,"mark_")||(a="mark_"+a),b&&(a+=" ("+b+")"),up.mark(a))}
function $p(a,b,c){Wp("yt_sts",a,c);Zp("_start",b,c)}
function gq(a,b){b=bq(b);return a in b}
function iq(a,b,c){gq(a,c)||Zp(a,b,c)}
function Wp(a,b,c){Xp(c)[a]=b;Jp(c)&&(a=Mp(a,b,c))&&Op(a,c)}
function jq(a){var b=Xp(void 0),c=Np(void 0);return a in b||a in c}
function kq(a){var b=z("TIMING_WAIT");b&&a in b||((b=z("TIMING_WAIT",void 0))?b.push(a):re("TIMING_WAIT",[a]))}
function lq(a){var b=bq(a);if(b.aft)return b.aft;a=z((a||"")+"TIMING_AFT_KEYS",["ol"]);for(var c=a.length,d=0;d<c;d++){var e=b[a[d]];if(e)return e}return NaN}
function dq(a,b){if(!mq(b)){var c=z((b||"")+"TIMING_ACTION",void 0),d=bq(b);if(Sa("ytglobal.timing"+(b||"")+"ready_")&&c&&d._start&&(c=lq(b)))if(Sp||(po(Ap,new xp(Math.round(c-d._start),b)),Sp=!0),a||b)nq(b);else{a=!0;c=z("TIMING_WAIT",[]);if(c.length)for(var e=0,g=c.length;e<g;++e)if(!(c[e]in d)){a=!1;break}a&&nq(b)}}}
function Yp(){switch(um()){case"hidden":return 0;case"visible":return 1;case"prerender":return 2;case"unloaded":return 3;}return-1}
var Xda=window.PerformanceLongTaskTiming&&window.PerformanceObserver?function(){if(!Qp){Qp=new window.PerformanceObserver(function(a){a=a.getEntries();for(var b=0;b<a.length;b++){var c=a[b];if(c.startTime&&c.name&&c.duration){var d=Pp++;if(4<d)break;var e=Math.round(window.performance.timing.navigationStart+c.startTime),g=e+Math.round(c.duration);"same-origin-self"==c.name||"self"==c.name?(c="lts_"+d,d="lte_"+d):(c="lfts_"+d,d="lfts_"+d);Zp(c,e);Zp(d,g)}}});
try{Qp.observe({entryTypes:["longtask"]})}catch(a){}}}:Ta;
function fq(a,b){if(!Jp(b)&&!mq(b)){var c=z("CSI_SERVICE_NAME","youtube");z((b||"")+"TIMING_ACTION",void 0)&&c&&(Zp("aa",void 0,b),Wp("ap",1,b),Wp("yt_fss",a,b),nq(b))}}
var Uda=r(up.clearResourceTimings||up.webkitClearResourceTimings||up.mozClearResourceTimings||up.msClearResourceTimings||up.oClearResourceTimings||Ta,up);function aq(a){if(Jp(a)){var b={};b.actionType=Tda[z((a||"")+"TIMING_ACTION",void 0)]||"LATENCY_ACTION_UNKNOWN";a=Dp(a);Go(b,a)}}
function oq(a){return Math.round(up.timing.navigationStart+a)}
function Vda(){var a=window.location.protocol,b=up.getEntriesByType("resource");b=nb(b,function(c){return 0==c.name.indexOf(a+"//fonts.gstatic.com/s/")});
(b=qb(b,function(c,d){return d.duration>c.duration?d:c},{duration:0}))&&0<b.startTime&&0<b.responseEnd&&(Zp("wffs",oq(b.startTime)),Zp("wffe",oq(b.responseEnd)))}
function Wda(a,b){a=document.querySelector(a);if(!a)return!1;var c="",d=a.nodeName;"SCRIPT"==d?(c=a.src,c||(c=a.getAttribute("data-timing-href"))&&(c=window.location.protocol+c)):"LINK"==d&&(c=a.href);Ra()&&a.setAttribute("nonce",Ra());return c?(a=up.getEntriesByName(c))&&a[0]&&(a=a[0],c=window.performance.timing.navigationStart,Zp("rsf_"+b,c+Math.round(a.fetchStart)),Zp("rse_"+b,c+Math.round(a.responseEnd)),void 0!==a.transferSize&&(jq("rc")||Wp("rc",""),0===a.transferSize))?!0:!1:!1}
function cq(a,b){Na("ytglobal.timing"+(b||"")+"ready_",a,void 0)}
function bq(a){return Bp(a).tick}
function Xp(a){return Bp(a).info}
function mq(a){return!!Sa("yt.timing."+(a||"")+"pingSent_")}
function Up(a,b){Na("yt.timing."+(b||"")+"pingSent_",a,void 0)}
function Yda(a){var b=bq(a),c=b.pbr,d=b.vc;b=b.pbs;return c&&d&&b&&c<d&&d<b&&1==Xp(a).yt_pvis}
var pq=Wp,nq=function(a){wp();if(!Jp(a)){var b=bq(a),c=Xp(a),d=b._start;for(h in b)if(ec(h,"_")&&Wa(b[h])){var e=h.slice(1);if(e in Sda){var g=pb(b[h],function(x){return Math.round(x-d)});
c["all_"+e]=g.join()}delete b[h]}g=z("CSI_SERVICE_NAME","youtube");var h={v:2,s:g,action:z((a||"")+"TIMING_ACTION",void 0)};e=Wp.srt;void 0!==b.srt&&delete c.srt;if(c.h5jse){var m=window.location.protocol+Sa("ytplayer.config.assets.js");(m=up.getEntriesByName?up.getEntriesByName(m)[0]:null)?c.h5jse=Math.round(c.h5jse-m.responseEnd):delete c.h5jse}b.aft=lq(a);Yda(a)&&"youtube"==g&&(Wp("yt_lt","hot_bg",a),g=b.vc,m=b.pbs,delete b.aft,c.aft=Math.round(m-g));for(var n in c)"_"!=n.charAt(0)&&(h[n]=c[n]);
b.ps=Hm();n={};g=[];for(var p in b)"_"!=p.charAt(0)&&(m=Math.round(b[p]-d),n[p]=m,g.push(p+"."+m));h.rt=g.join(",");(b=Sa("ytdebug.logTiming"))&&b(h,n);Zda(h,!!c.ap,a);po(Pda,new zp(n.aft+(e||0),a))}},qq=fq,Zda=function(a,b,c){if(A("debug_csi_data")){var d=Sa("yt.timing.csiData");
d||(d=[],Na("yt.timing.csiData",d,void 0));d.push({page:location.href,time:new Date,args:a})}d="";for(var e in a)d+="&"+e+"="+a[e];a="/csi_204?"+d.substring(1);if(window.navigator&&window.navigator.sendBeacon&&b){var g=void 0===g?"":g;$o(a,g)||Zo(a,void 0,void 0,void 0,g)}else Zo(a);Up(!0,c)},rq=Zp;var sq=function(){this.componentConstructors_=new Map;this.signals_=ip.getInstance()};
sq.prototype.hasConstructor=function(a){return void 0!==this.componentConstructors_.get(a)};
sq.prototype.onConstructor=function(a,b,c){var d=this.componentConstructors_.get(a);d?b(d):(d=function(){b(this.componentConstructors_.get(a))}.bind(this),this.signals_.parkOrScheduleJob(d,c,a))};
Ua(sq);function tq(a,b){a=k(a);for(var c=a.next();!c.done;c=a.next())if(c=c.value,c.constructor===Array)tq(c,b);else{var d=b;d.has(c)||(c.inject&&d.add(c),c.behaviors&&tq(c.behaviors,d))}}
;var uq=!1;function $da(){var a=Polymer,b=a.Base._registerHost;a.Base._registerHost=function(c){b.call(this,c);this.initializeInjection&&this.initializeInjection()}}
function aea(){function a(g,h,m,n){var p=g[h];g[h]=function(){this._host=c.currentHost();this.initializeInjection&&this.initializeInjection();if(p)return p.apply(this,arguments)};
var x=g[m];g[m]=function(){c.push(n?this._host:this);var y=x.apply(this,arguments);c.pop();return y}}
var b=Polymer,c={stack:[],push:function(g){this.stack.push(g)},
pop:function(){this.stack.pop()},
currentHost:function(){if(this.stack.length)return this.stack[this.stack.length-1]}},d=b._polymerFn.Class?b._polymerFn:b,e=d.Class;
d.Class=function(g){g=e(g);a(g.prototype,"created","_stampTemplate",!1);return g};
a(b.DomRepeat.prototype,"_initializeProperties","__stampInstance",!0);a(b.DomIf.prototype,"_initializeProperties","__ensureInstance",!0);b.legacyOptimizations?a(b.Templatizer,"created","stamp",!0):customElements.get("iron-list")&&a(customElements.get("iron-list").prototype,"_initializeProperties","stamp",!0);b.dedupingMixin(function(g){var h=function(){return g.apply(this,arguments)||this};
l(h,g);h.prototype._initializeProperties=function(){this._host=c.currentHost();this.initializeInjection&&this.initializeInjection();g.prototype._initializeProperties.call(this)};
h.prototype._stampTemplate=function(m){for(var n=[],p=0;p<arguments.length;++p)n[p-0]=arguments[p];c.push(this);n=g.prototype._stampTemplate.call.apply(g.prototype._stampTemplate,[this].concat(ka(n)));c.pop();return n};
return h})}
;var vq,wq=[];function xq(a){for(;a=Polymer.Element?a._host:a.dataHost&&a.dataHost._rootDataHost?a.dataHost._rootDataHost:a.dataHost;)if(a.injector)return a.injector}
;var yq={},zq;if(window.hasOwnProperty("Polymer")){var Aq=Polymer;zq=Aq&&Aq.Base}else zq=!1;zq&&!uq&&(Polymer.Element?aea():$da(),uq=!0);
yq.InjectBehavior={initializeInjection:function(){var a=this.isInjectionRoot,b=this.provide,c=vq||xq(this)||wq[wq.length-1];vq=void 0;if(c||a){if(!c||b&&0<b.length)a=b||[],c=void 0===c?null:c,a=bm(a),c=new hm(a,void 0===c?null:c);this.injector=c;a=new Set;tq(this.behaviors||[],a);c={};a=k(a);for(b=a.next();!b.done;b=a.next())b=b.value,b.inject&&Object.assign(c,b.inject);this.inject&&Object.assign(c,this.inject);a=k(Object.keys(c));for(b=a.next();!b.done;b=a.next()){b=b.value;var d=c[b],e=!1;try{this[b]=
this.injector.get(d)}catch(g){if(e)this[b]=void 0;else throw g}}this.tempInjectionInitialized&&this.tempInjectionInitialized()}else throw Error("Inject failed on "+this.tagName.toLocaleLowerCase())}};function Bq(a,b){if(!(b instanceof HTMLElement))return vq=b,document.createElement(a);vq=b.injector||xq(b);a=document.createElement(a);if(vq)throw vq=void 0,Error("Element "+a.tagName.toLowerCase()+" was created with createElementWithInjectionParent but did not use adopting injector. Most likely the element does not include InjectBehavior");return a}
function Cq(a){if("string"===typeof a){var b=Polymer.telemetry.registrations.find(function(c){return c.is===a});
return b?Dq(b.behaviors||[]):(b=customElements&&customElements.get(a))?!!b.prototype.initializeInjection:!1}return!!a.injector}
function Dq(a){return a.some(function(b){return Array.isArray(b)?Dq(b):!!b.initializeInjection})}
;var Eq={};Eq.InjectBehavior=[yq.InjectBehavior];var Gq=function(a,b){var c=Fq.get(a);if(c&&(c=c.pop())){if(b&&Cq(b)&&Cq(c)){if(!c.injector)throw Error("");if(!b.injector)throw Error("");c.injector!==b.injector&&c.initializeInjection&&(vq=b.injector,c.initializeInjection())}bea++;return c}cea++;if(b&&Cq(b))var d=Bq(a,b);else try{d=document.createElement(a)}catch(e){throw a="ElementPool failed to create "+a+".",e.message&&(a+=" Original description: "+e.message),e.params=a,e.message="ElementPool failed to create element",e}return d},Hq=function(a){var b=
a.is;
if(!b)return we(Error("Element pool should only handle custom elements. Element name: "+a.nodeName),"WARNING"),!1;var c=Fq.get(b);c||(c=[],Fq.set(b,c));if(c.length>=((z("ELEMENT_POOL_CONFIG")||{})[b]||z("ELEMENT_POOL_DEFAULT_CAP",0)))return!1;c.push(a);return!0},Fq=new Map,cea=0,bea=0;var dea={home:{"ytd-thumbnail":1,"yt-masthead-ad-renderer":1,"ytd-video-masthead-ad-renderer":1,"ytd-topbar-menu-button-renderer":1,"ytd-item-section-renderer":5,"ytd-shelf-renderer":5,"yt-horizontal-list-renderer":5,"ytd-grid-video-renderer":30,"ytd-button-renderer":11,"paper-icon-button":7,"paper-button":5,"yt-formatted-string":5,"paper-tooltip":2,"yt-next-continuation":1,"~ytd-guide-entry-renderer":17,"~ytd-guide-signin-promo-renderer":1,"~ytd-browse":{count:1,signals:["yt-app-context","aa"]}},
search:{"yt-next-continuation":1,"ytd-button-renderer":2,"ytd-channel-renderer":2,"ytd-item-section-renderer":1,"ytd-video-renderer":20,"ytd-promoted-video-renderer":1,"ytd-search-pyv-renderer":1,"ytd-thumbnail":1,"ytd-thumbnail-overlay-time-status-renderer":20,"ytd-thumbnail-overlay-toggle-button-renderer":20,"ytd-shelf-renderer":1,"ytd-vertical-list-renderer":1,"ytd-thumbnail-overlay-hover-text-renderer":2,"ytd-thumbnail-overlay-side-panel-renderer":2,"yt-formatted-string":3,"iron-icon":1,"paper-button":3,
"paper-tooltip":33,"yt-icon":1,"ytd-playlist-renderer":1,"ytd-playlist-video-thumbnail-renderer":1,"ytd-subscribe-button-renderer":1,"~ytd-artist-watch-card-renderer":1,"~ytd-search":{count:1,signals:["yt-app-context","aa"]}},watch:{"yt-next-continuation":2,"yt-view-count-renderer":1,"ytd-button-renderer":3,"ytd-toggle-button-renderer":2,"ytd-menu-renderer":1,"ytd-compact-autoplay-renderer":1,"ytd-compact-video-renderer":19,"ytd-compact-promoted-video-renderer":1,"ytd-compact-playlist-renderer":1,
"ytd-compact-radio-renderer":1,"ytd-thumbnail":1,"ytd-thumbnail-overlay-time-status-renderer":20,"ytd-thumbnail-overlay-toggle-button-renderer":20,"ytd-player-legacy-desktop-watch-ads-renderer":1,"paper-button":20,"paper-icon-button":20,"paper-tooltip":30,"yt-formatted-string":5}},Iq={home:"eohps",search:"eosps",watch:"eowps"},eea=new Set(["ytd-browse","ytd-search"]),Jq=["watch","search","home"],Kq=function(){this.SKIP_INITIAL_PASS_="~";this.PREFERRED_FRAGMENT_PERIOD_=z("PRECONSTRUCTION_PERIOD",16);
this.WEIGHTED_DECREASE_COEFFICIENT_=z("PRECONSTRUCTION_COEF",.45);this.DEFAULT_DELAY_=z("PRECONSTRUCTION_DELAY",0);this.FILLABLE_COMPONENTS_={"ytd-browse":!0,"ytd-search":!0,"ytd-watch-flexy":!0};this.isInitialized_=!1;this.signals_=ip.getInstance();this.isInitialPass_=!0;this.isSeenDuringInitialPass_={};this.queue_=[];this.index_=0;this.pendingPages_=[];this.blackListedTypes_={};this.averageCreationPeriod_={};this.targetPage_="";this.pagePreparerJobId_=this.fragmentJobId_=0;this.diParent_=null};
Kq.prototype.init=function(a,b){if(this.isInitialized_||!se("ENABLE_ELEMENT_POOL_POPULATOR"))se("ENABLE_ELEMENT_POOL_AUTO_ABORT")&&this.abort();else if(this.isInitialized_=!0,a&&Lq(this,a),b){var c=lp(this.signals_,"pcl")?0:10,d=se("ENABLE_SELECTIVE_REGISTRATION")?"eor":"pcl",e=function(){for(var g=0,h;h=Jq[g++];)h!=a&&h!=b&&this.pendingPages_.push(h);Mq(this)}.bind(this);
this.signals_.parkOrScheduleJob(e,c,d)}};
Kq.prototype.abort=function(){this.fragmentJobId_&&(Dn.cancelJob(this.fragmentJobId_),this.fragmentJobId_=0,se("ENABLE_ELEMENT_POOL_AUTO_ABORT")||this.cleanup_());se("ENABLE_ELEMENT_POOL_AUTO_ABORT")&&this.cleanup_()};
var fea=function(a,b){var c=Jq.indexOf(b);-1<c&&Jq.splice(c,1);a.targetPage_==b?(a.abort(),Mq(a)):Nq(a,b)},Lq=function(a,b){a.isInitialized_&&!a.targetPage_&&(a.targetPage_=b,Oq(a,b),a.isInitialPass_=!1,Oq(a,b),Pq(a))},Mq=function(a){a.pendingPages_.length&&!a.pagePreparerJobId_&&(a.pagePreparerJobId_=En(function(){this.pagePreparerJobId_=0;
this.pendingPages_.length&&!this.targetPage_&&Lq(this,this.pendingPages_.shift())}.bind(a),a.DEFAULT_DELAY_))},Nq=function(a,b){b=a.pendingPages_.indexOf(b);
-1<b&&a.pendingPages_.splice(b,1)},Oq=function(a,b){if(b=dea[b])for(var c in b){var d=!1,e=c;
c.charAt(0)==a.SKIP_INITIAL_PASS_&&(d=!0,e=c.substring(1));var g=b[c];g="object"==typeof g?g:{count:g};b[c]=g;g.componentName=e;0<g.count&&(a.isInitialPass_?d||a.isSeenDuringInitialPass_[e]||(a.queue_.push({componentName:e,count:1,signals:g.signals}),a.isSeenDuringInitialPass_[e]=!0,g.count--):a.queue_.push(g))}},Pq=function(a){for(var b=Hm(),c=!0;a.index_<a.queue_.length;){var d=a.queue_[a.index_],e=d.componentName,g=d.count,h=d.signals;
if(e&&g&&!a.blackListedTypes_[e])if(!lp(a.signals_,e)||h){var m=[e,Iq[a.targetPage_]];h&&(m=m.concat(h));gea(a,e,g,m);d.count=0}else for(h=0;h<g;h++){if(!c&&(c=a.averageCreationPeriod_[e]||0,m=Hm()-b,hea(a,m,c)))return;c=!1;d.count--;if(!Qq(a,e))break}a.index_++}a.signals_.processSignal(Iq[a.targetPage_]);a.cleanup_();Mq(a)},Qq=function(a,b){if(a.blackListedTypes_[b])return!1;
var c=Hm(),d=null;try{if(eea.has(b)&&!A("kevlar_disable_di")){a.diParent_||(a.diParent_=document.querySelector("ytd-app"));var e=a.diParent_}d=e?Bq(b,e):document.createElement(b)}catch(g){return a=Error("Failed to create component"),a.params=b,we(a),!1}if(window.Polymer.Element&&!A("polymer2_element_pool_properties"))try{d._enableProperties()}catch(g){return a=Error("Failed to enable properties on component"),a.params=b,we(a),!1}if(!window.Polymer.Element||A("kevlar_polymer2_filler_data"))try{iea(a,
d,b)}catch(g){return a=Error("Failed to setFillerData on component"),a.params=b,we(a),!1}c=Hm()-c;e=!1;d.is&&Hq(d)&&(e=!0);if(!e)return a.blackListedTypes_[b]=!0,!1;d=a.WEIGHTED_DECREASE_COEFFICIENT_;e=a.averageCreationPeriod_[b];a.averageCreationPeriod_[b]=e?d*c+(1-d)*e:c;return!0},hea=function(a,b,c){return a.PREFERRED_FRAGMENT_PERIOD_-b<c?(a.fragmentJobId_=En(function(){this.fragmentJobId_=0;
Pq(this)}.bind(a),a.DEFAULT_DELAY_),!0):!1};
Kq.prototype.cleanup_=function(){this.queue_.length=0;this.targetPage_="";this.isInitialPass_=!0;this.blackListedTypes_={};this.index_=0;this.signals_.processSignal("eop")};
var iea=function(a,b,c){if(a.FILLABLE_COMPONENTS_[c]){var d;"ytd-watch-flexy"==c||"ytd-watch-fixie"==c?d="watch":"ytd-search"==c?d="search":"ytd-browse"==c&&"home"==a.targetPage_&&(d="home");var e=z("FILLER_DATA",{})[d];e&&e.response&&(a=b._readied,d="",b.is?b._template?b.$||(d="Component has not stamped template"):d="Component has no _template":d="Component is not upgrading during prepopulation",d&&"ytd-search"!==c&&(d=Error(d),d.params=c+", state: "+a,we(d)),b.getReady?b.getReady().then(function(){b.data||(
b.data=e.response)}):(b.data=e.response,a=Error("Component has no getReady function."),a.params=c,xe(a)))}},gea=function(a,b,c,d){d=kp(a.signals_,d);
a.signals_.parkOrScheduleJob(function(){for(var e=0;e<c&&Qq(a,b);e++);},1,d)};
Ua(Kq);var Rq=function(){var a=window.Polymer;this.SYNCHRONOUSLY_REGISTERED_COMPONENTS_=["iron-a11y-announcer","iron-meta","paper-menu-button","yt-app-context","yt-service"];this.LAST_COMPONENT_NAME_="ytd-app";this.signals_=ip.getInstance();this.components_=sq.getInstance();this.rawPolymer_=a;this.synchronouslyRegisteredComponents_=this.isPendingTailRegistration_=void 0;this.tailRegistrationHandles_=null;this.tailRegistrationJobSet_=void 0;this.polymerWrapper_=this.applyNaiveRegistration_;this.elapsedRegistrationTime_=
0;this.flushCallback_=null;this.init_()};
Rq.prototype.applyNaiveRegistration_=function(a){var b=Sq(this,a);a.is==this.LAST_COMPONENT_NAME_&&(window.polyfillEarlyFlushCallback?(window.polyfillEarlyFlushCallback(),window.immediatePolyfillFlush=!0):this.flushCallback_&&(this.flushCallback_(),this.flushCallback_=null),pq("tcrc",this.components_.componentConstructors_.size),pq("tcrt",this.elapsedRegistrationTime_),rq("cr_c"),this.signals_.processSignal("eor"));return b};
var Tq=function(a){var b=Object.create(null);a&&a.forEach(function(c){b[c]=!0});
return b};
Rq.prototype.applyScheduledSelectiveRegistration_=function(a){if(se("SCHEDULE_IMMEDIATE_COMPONENTS")&&!this.synchronouslyRegisteredComponents_[a.is])Gn(Dn,this.applySelectiveRegistration_.bind(this,a));else return this.applySelectiveRegistration_(a)};
Rq.prototype.applySelectiveRegistration_=function(a){var b=void 0,c=a.is,d=c,e=c.match(/^synt\d+-(yt.*)$/);e&&(d=e[1]);this.isPendingTailRegistration_[d]?this.tailRegistrationHandles_[c]=jea(this,a):b=Sq(this,a);c==this.LAST_COMPONENT_NAME_&&(window.polyfillEarlyFlushCallback?(window.polyfillEarlyFlushCallback(),window.immediatePolyfillFlush=!0):this.flushCallback_&&(this.flushCallback_(),this.flushCallback_=null),pq("icrc",this.components_.componentConstructors_.size),pq("icrt",this.elapsedRegistrationTime_),
rq("cr_ic"),this.signals_.processSignal("eoir"),lp(this.signals_,"fwtr")?this.proceedToTailRegistrationPhase_():Hn(Dn,this.proceedToTailRegistrationPhase_.bind(this)));return b};
var jea=function(a,b){return function(){Sq(this,b);delete this.tailRegistrationHandles_[b.is];u.isEmpty(this.tailRegistrationHandles_)&&(rq("cr_c"),this.isPendingTailRegistration_=void 0,this.tailRegistrationHandles_=null,this.signals_.processSignal("eor"))}.bind(a)},Sq=function(a,b){iq("cr_s");
var c=b.is,d=Hm();b=a.rawPolymer_(b);d=Hm()-d;a.elapsedRegistrationTime_+=d;a.components_.componentConstructors_.set(c,b);a.signals_.processSignal(c);return b},kea=function(a){function b(){ip.getInstance().processSignal("eodhi")}
function c(){rq("dhic");se("ASYNC_APP_ATTACH")?ip.getInstance().parkOrScheduleJob(b,0,"aa"):b()}
if(!A("disable_deferred_bundle")){var d=z("DEFERRED_BUNDLE_URL",void 0);if(se("HTML_IMPORT_DEFERRED_BUNDLE")){var e=function(n,p){var x=document.createElement("link");x.as="document";var y=Ra();y&&x.setAttribute("nonce",y);id(x,d,n);p&&x.addEventListener("load",p);document.head.appendChild(x)},g=!1;
En(function(){En(function(){g||e("preload")})});
var h=function(){g=!0;e("import",c)}}else h=function(){var n=new XMLHttpRequest;
n.onloadend=function(){document.head.insertAdjacentHTML("beforeend",n.responseText);c()};
n.open("GET",d,!0);n.send()};
var m=Object.create(null);m.fwtr=10;m.dl=0;Kda(a.signals_,h,m)}};
f=Rq.prototype;f.proceedToTailRegistrationPhase_=function(){A("disable_tail_registration_phase")||(se("ENABLE_SELECTIVE_INITIALIZATION")?this.signals_.parkOrScheduleJob(this.tailRegistrationScheduler_.bind(this),10,"eodhi"):this.tailRegistrationScheduler_())};
f.tailRegistrationScheduler_=function(){var a=this.forceCompletePhasedRegistration_.bind(this);if(lp(this.signals_,"fwtr"))Jn(a);else{var b=new qp(window.requestIdleCallback?0:1,"eocs");u.forEach(this.tailRegistrationHandles_,function(c){sp(b,c)});
this.tailRegistrationJobSet_=b;this.signals_.parkOrScheduleJob(a,10,"fwtr")}};
f.forceCompletePhasedRegistration_=function(){this.tailRegistrationJobSet_&&this.tailRegistrationJobSet_.cancel();u.forEach(this.tailRegistrationHandles_,function(a){a()})};
f.startPreconstruction_=function(){Kq.getInstance().init(se("IS_HOMEPAGE_COLD")?"home":null,"n/a")};
f.init_=function(){lea(this);var a="eor";se("ENABLE_SELECTIVE_REGISTRATION")&&(se("SCHEDULE_IMMEDIATE_COMPONENTS")&&(this.synchronouslyRegisteredComponents_=Tq(this.SYNCHRONOUSLY_REGISTERED_COMPONENTS_)),this.isPendingTailRegistration_=Tq(window.ytsa_rs),this.tailRegistrationHandles_=Object.create(null),window.ytsa_rs=void 0,this.polymerWrapper_=se("SCHEDULE_IMMEDIATE_COMPONENTS")?this.applyScheduledSelectiveRegistration_:this.applySelectiveRegistration_,a="eoir");A("enable_polymer_resin")&&Gca({reportHandler:this.resinReportHandler_});
window.Polymer&&ue&&hp();var b=!!Polymer.Element&&A("polymer2_polyfill_manual_flush");(!A("kevlar_js_fixes")||window.customElements)&&b&&customElements.polyfillWrapFlushCallback&&!window.polyfillEarlyFlushCallback&&customElements.polyfillWrapFlushCallback(this.polyfillWrapFlushCallback_.bind(this));window.Polymer=function(c){return this.polymerWrapper_(c)}.bind(this);
u.extend(window.Polymer,this.rawPolymer_);this.signals_.parkOrScheduleJob(this.startPreconstruction_,10,a);mea(this);se("ENABLE_SELECTIVE_INITIALIZATION")&&kea(this)};
f.polyfillWrapFlushCallback_=function(a){var b=se("ENABLE_SELECTIVE_REGISTRATION")?"eoir":"eor";lp(ip.getInstance(),b)?a():this.flushCallback_=a};
var lea=function(a){a=function(){this.signals_.processSignal("dl")}.bind(a);
"complete"==document.readyState?(xe(Error("app_initializer encountered loaded document"),"WARNING"),a()):Fm(window,"load",a)},mea=function(a){var b=Sa("ytcsi");
if(b&&b.gt&&(b=b.gt())&&b.tick&&(0<b.tick.aft||0<b.tick.pbs)&&(se("IS_HOMEPAGE_COLD")||se("IS_RESULTS_PAGE_COLD")||se("IS_WATCH_PAGE_COLD"))){Uq(a);return}ro(Ap,a.onNotifications_,a)};
Rq.prototype.onNotifications_=function(a){a.timer||(se("IS_HOMEPAGE_COLD")||se("IS_RESULTS_PAGE_COLD")||se("IS_WATCH_PAGE_COLD"))&&Uq(this)};
var Uq=function(a){var b=function(){this.signals_.processSignal("eocs")}.bind(a);
a.signals_.parkOrScheduleJob(b,10,se("ENABLE_SELECTIVE_REGISTRATION")?"eoir":"eor")};
Rq.prototype.resinReportHandler_=function(a,b,c){for(var d=[b],e=2,g=arguments.length;e<g;++e)d[e-1]=arguments[e];a?console.warn.apply(console,d):console.log.apply(console,d)};
window.Polymer&&!A("use_polymer2")||"function"==typeof window.Polymer?new Rq:window.onLegacyPolymerFunctionDefinedCallback=function(){new Rq};var Vq=function(a){eg(this,a,0,null,null)};
t(Vq,$f);Vq.prototype.toObject=function(a){return Wq(a,this)};
var Wq=function(a,b){var c={gmailDelegatorId:D(b,1,"")};a&&(c.$jspbMessageInstance=b);return c};
Vq.prototype.serializeBinary=function(){var a=new Hf;Xq(this,a);return Nf(a)};
var Xq=function(a,b){a=D(a,1,"");0<a.length&&b.writeString(1,a)};
Vq.prototype.setGmailDelegatorId=function(a){return rg(this,1,a)};var Yq=function(a){eg(this,a,0,null,null)};
t(Yq,$f);Yq.prototype.toObject=function(a){return Zq(a,this)};
var Zq=function(a,b){var c={seconds:D(b,1,0),nanos:D(b,2,0)};a&&(c.$jspbMessageInstance=b);return c};
Yq.prototype.serializeBinary=function(){var a=new Hf;$q(this,a);return Nf(a)};
var $q=function(a,b){var c=a.getSeconds();0!==c&&b.writeInt64(1,c);c=D(a,2,0);0!==c&&b.writeInt32(2,c)};
f=Yq.prototype;f.getSeconds=function(){return D(this,1,0)};
f.setSeconds=function(a){return pg(this,1,a)};
f.setNanos=function(a){pg(this,2,a)};
f.toDate=function(){var a=this.getSeconds(),b=D(this,2,0);return new Date(1E3*a+b/1E6)};
f.fromDate=function(a){this.setSeconds(Math.floor(a.getTime()/1E3));this.setNanos(1E6*a.getMilliseconds())};var ar=function(a){eg(this,a,0,null,null)};
t(ar,$f);ar.prototype.toObject=function(a){return br(a,this)};
var br=function(a,b){var c,d={origin:D(b,1,""),instanceId:D(b,2,""),widgetType:D(b,3,0),containerType:D(b,4,0),iframeLoadStartTime:(c=E(b,Yq,5))&&Zq(a,c),gapiLoadStartTimestamp:(c=E(b,Yq,6))&&Zq(a,c),gapiLoadEndTimestamp:(c=E(b,Yq,7))&&Zq(a,c)};a&&(d.$jspbMessageInstance=b);return d};
ar.prototype.serializeBinary=function(){var a=new Hf;cr(this,a);return Nf(a)};
var cr=function(a,b){var c=a.getOrigin();0<c.length&&b.writeString(1,c);c=D(a,2,"");0<c.length&&b.writeString(2,c);c=D(a,3,0);0!==c&&b.writeEnum(3,c);c=D(a,4,0);0!==c&&b.writeEnum(4,c);c=E(a,Yq,5);null!=c&&Rf(b,5,c,$q);c=E(a,Yq,6);null!=c&&Rf(b,6,c,$q);c=E(a,Yq,7);null!=c&&Rf(b,7,c,$q)};
ar.prototype.getOrigin=function(){return D(this,1,"")};
ar.prototype.setOrigin=function(a){return rg(this,1,a)};
ar.prototype.setInstanceId=function(a){return rg(this,2,a)};
var oea=function(){var a=new ar().setOrigin(nea());return sg(a,3,2)};
f=ar.prototype;f.setContainerType=function(a){return sg(this,4,a)};
f.clearIframeLoadStartTime=function(){return xg(this,5,void 0)};
f.hasIframeLoadStartTime=function(){return null!=C(this,5)};
f.clearGapiLoadStartTimestamp=function(){return xg(this,6,void 0)};
f.hasGapiLoadStartTimestamp=function(){return null!=C(this,6)};
f.clearGapiLoadEndTimestamp=function(){return xg(this,7,void 0)};
f.hasGapiLoadEndTimestamp=function(){return null!=C(this,7)};var dr=function(a){eg(this,a,0,null,null)};
t(dr,$f);dr.prototype.toObject=function(a){return er(a,this)};
var er=function(a,b){var c={authUser:D(b,1,0),email:D(b,2,"")};a&&(c.$jspbMessageInstance=b);return c};
dr.prototype.serializeBinary=function(){var a=new Hf;fr(this,a);return Nf(a)};
var fr=function(a,b){var c=a.getAuthUser();0!==c&&b.writeUint32(1,c);c=a.getEmail();0<c.length&&b.writeString(2,c)};
dr.prototype.getAuthUser=function(){return D(this,1,0)};
dr.prototype.setAuthUser=function(a){return pg(this,1,a)};
dr.prototype.getEmail=function(){return D(this,2,"")};
dr.prototype.setEmail=function(a){return rg(this,2,a)};var gr=function(a){eg(this,a,0,null,null)};
t(gr,$f);gr.prototype.toObject=function(a){return hr(a,this)};
var hr=function(a,b){var c={top:lg(b,1),right:lg(b,2),bottom:lg(b,3),left:lg(b,4)};a&&(c.$jspbMessageInstance=b);return c};
gr.prototype.serializeBinary=function(){var a=new Hf;ir(this,a);return Nf(a)};
var ir=function(a,b){var c=lg(a,1);0!==c&&b.writeFloat(1,c);c=lg(a,2);0!==c&&b.writeFloat(2,c);c=lg(a,3);0!==c&&b.writeFloat(3,c);c=lg(a,4);0!==c&&b.writeFloat(4,c)};
gr.prototype.setTop=function(a){return og(this,1,a,0)};
gr.prototype.setRight=function(a){return og(this,2,a,0)};
gr.prototype.setBottom=function(a){return og(this,3,a,0)};
gr.prototype.setLeft=function(a){return og(this,4,a,0)};var jr=function(a){eg(this,a,0,null,null)};
t(jr,$f);jr.prototype.toObject=function(a){return kr(a,this)};
var kr=function(a,b){var c,d={contentPadding:(c=E(b,gr,1))&&hr(a,c),gridElementHeight:lg(b,2)};a&&(d.$jspbMessageInstance=b);return d};
jr.prototype.serializeBinary=function(){var a=new Hf;lr(this,a);return Nf(a)};
var lr=function(a,b){var c=E(a,gr,1);null!=c&&Rf(b,1,c,ir);c=lg(a,2);0!==c&&b.writeFloat(2,c)};
jr.prototype.clearContentPadding=function(){return xg(this,1,void 0)};
jr.prototype.hasContentPadding=function(){return null!=C(this,1)};
jr.prototype.setGridElementHeight=function(a){return og(this,2,a,0)};var mr=function(a){eg(this,a,0,null,null)};
t(mr,$f);mr.prototype.toObject=function(a){return nr(a,this)};
var nr=function(a,b){var c,d={chromeMode:D(b,1,0),modeSettings:(c=E(b,jr,4))&&kr(a,c),deprecatedWidgetType:D(b,2,0),deprecatedContainerType:D(b,3,0)};a&&(d.$jspbMessageInstance=b);return d};
mr.prototype.serializeBinary=function(){var a=new Hf;or(this,a);return Nf(a)};
var or=function(a,b){var c=D(a,1,0);0!==c&&b.writeEnum(1,c);c=E(a,jr,4);null!=c&&Rf(b,4,c,lr);c=D(a,2,0);0!==c&&b.writeEnum(2,c);c=D(a,3,0);0!==c&&b.writeEnum(3,c)};
f=mr.prototype;f.setChromeMode=function(a){return sg(this,1,a)};
f.clearModeSettings=function(){return xg(this,4,void 0)};
f.hasModeSettings=function(){return null!=C(this,4)};
f.setDeprecatedWidgetType=function(a){return sg(this,2,a)};
f.setDeprecatedContainerType=function(a){return sg(this,3,a)};var pr=function(a){eg(this,a,0,null,null)};
t(pr,$f);pr.prototype.toObject=function(a){return qr(a,this)};
var qr=function(a,b){var c={jsDebug:D(b,1,""),forceDisableDriveIvdp:kg(b,2),enableLiveImpressions:kg(b,3)};a&&(c.$jspbMessageInstance=b);return c};
pr.prototype.serializeBinary=function(){var a=new Hf;rr(this,a);return Nf(a)};
var rr=function(a,b){var c=D(a,1,"");0<c.length&&b.writeString(1,c);(c=kg(a,2))&&b.writeBool(2,c);(c=kg(a,3))&&b.writeBool(3,c)};
pr.prototype.setJsDebug=function(a){return rg(this,1,a)};
pr.prototype.setForceDisableDriveIvdp=function(a){return qg(this,2,a)};
pr.prototype.setEnableLiveImpressions=function(a){return qg(this,3,a)};var sr=function(a){eg(this,a,0,null,null)};
t(sr,$f);sr.prototype.toObject=function(a){return tr(a,this)};
var tr=function(a,b){var c={index:D(b,1,0)};a&&(c.$jspbMessageInstance=b);return c};
sr.prototype.serializeBinary=function(){var a=new Hf;ur(this,a);return Nf(a)};
var ur=function(a,b){a=a.getIndex();0!==a&&b.writeUint32(1,a)};
sr.prototype.getIndex=function(){return D(this,1,0)};
sr.prototype.setIndex=function(a){return pg(this,1,a)};var vr=function(a){eg(this,a,0,null,null)};
t(vr,$f);vr.prototype.toObject=function(a){return wr(a,this)};
var wr=function(a,b){var c={id:D(b,1,""),sourceId:D(b,2,0)};a&&(c.$jspbMessageInstance=b);return c};
vr.prototype.serializeBinary=function(){var a=new Hf;xr(this,a);return Nf(a)};
var xr=function(a,b){var c=a.getId();0<c.length&&b.writeString(1,c);c=a.getSourceId();0!==c&&b.writeEnum(2,c)};
vr.prototype.getId=function(){return D(this,1,"")};
vr.prototype.setId=function(a){return rg(this,1,a)};
vr.prototype.getSourceId=function(){return D(this,2,0)};
vr.prototype.setSourceId=function(a){return sg(this,2,a)};var yr=function(a){eg(this,a,0,null,null)};
t(yr,$f);yr.prototype.toObject=function(a){return zr(a,this)};
var zr=function(a,b){var c={url:D(b,1,""),height:D(b,2,0),width:D(b,3,0),rotation:D(b,4,0)};a&&(c.$jspbMessageInstance=b);return c};
yr.prototype.serializeBinary=function(){var a=new Hf;Ar(this,a);return Nf(a)};
var Ar=function(a,b){var c=a.getUrl();0<c.length&&b.writeString(1,c);c=a.getHeight();0!==c&&b.writeInt32(2,c);c=a.getWidth();0!==c&&b.writeInt32(3,c);c=D(a,4,0);0!==c&&b.writeUint32(4,c)};
f=yr.prototype;f.getUrl=function(){return D(this,1,"")};
f.setUrl=function(a){return rg(this,1,a)};
f.getHeight=function(){return D(this,2,0)};
f.setHeight=function(a){pg(this,2,a)};
f.getWidth=function(){return D(this,3,0)};
f.setWidth=function(a){pg(this,3,a)};
f.setRotation=function(a){return pg(this,4,a)};var Br=function(a){eg(this,a,0,null,null)};
t(Br,$f);Br.prototype.toObject=function(a){return Cr(a,this)};
var Cr=function(a,b){var c={seconds:D(b,1,0),nanos:D(b,2,0)};a&&(c.$jspbMessageInstance=b);return c};
Br.prototype.serializeBinary=function(){var a=new Hf;Dr(this,a);return Nf(a)};
var Dr=function(a,b){var c=a.getSeconds();0!==c&&b.writeInt64(1,c);c=D(a,2,0);0!==c&&b.writeInt32(2,c)};
Br.prototype.getSeconds=function(){return D(this,1,0)};
Br.prototype.setSeconds=function(a){return pg(this,1,a)};
Br.prototype.getNanos=function(){return D(this,2,0)};
Br.prototype.setNanos=function(a){pg(this,2,a)};var Er=function(a){eg(this,a,0,null,null)};
t(Er,$f);Er.prototype.toObject=function(a){return Fr(a,this)};
var Fr=function(a,b){var c,d={aspectRatio:lg(b,1),duration:(c=b.getDuration())&&Cr(a,c)};a&&(d.$jspbMessageInstance=b);return d};
Er.prototype.serializeBinary=function(){var a=new Hf;Gr(this,a);return Nf(a)};
var Gr=function(a,b){var c=lg(a,1);0!==c&&b.writeDouble(1,c);c=a.getDuration();null!=c&&Rf(b,2,c,Dr)};
f=Er.prototype;f.setAspectRatio=function(a){return og(this,1,a,0)};
f.getDuration=function(){return E(this,Br,2)};
f.setDuration=function(a){return xg(this,2,a)};
f.clearDuration=function(){return this.setDuration(void 0)};
f.hasDuration=function(){return null!=C(this,2)};var Hr=function(a){eg(this,a,0,null,null)};
t(Hr,$f);Hr.prototype.toObject=function(a){return Ir(a,this)};
var Ir=function(a,b){var c,d={email:D(b,1,""),name:D(b,2,""),displayName:D(b,3,""),templateProfilePhotoUrl:D(b,4,""),profilePhoto:(c=E(b,yr,5))&&zr(a,c)};a&&(d.$jspbMessageInstance=b);return d};
Hr.prototype.serializeBinary=function(){var a=new Hf;Jr(this,a);return Nf(a)};
var Jr=function(a,b){var c=a.getEmail();0<c.length&&b.writeString(1,c);c=a.getName();0<c.length&&b.writeString(2,c);c=D(a,3,"");0<c.length&&b.writeString(3,c);c=D(a,4,"");0<c.length&&b.writeString(4,c);c=E(a,yr,5);null!=c&&Rf(b,5,c,Ar)};
f=Hr.prototype;f.getEmail=function(){return D(this,1,"")};
f.setEmail=function(a){return rg(this,1,a)};
f.getName=function(){return D(this,2,"")};
f.setName=function(a){return rg(this,2,a)};
f.setDisplayName=function(a){return rg(this,3,a)};
f.setTemplateProfilePhotoUrl=function(a){return rg(this,4,a)};
f.clearProfilePhoto=function(){return xg(this,5,void 0)};
f.hasProfilePhoto=function(){return null!=C(this,5)};var Kr=function(a){eg(this,a,0,null,null)};
t(Kr,$f);Kr.prototype.toObject=function(a){return Lr(a,this)};
var Lr=function(a,b){var c,d={accessRole:D(b,1,0),backgroundColor:D(b,2,""),foregroundColor:D(b,3,""),hidden:kg(b,4),selected:kg(b,5),profileMetadata:(c=E(b,Hr,6))&&Ir(a,c)};a&&(d.$jspbMessageInstance=b);return d};
Kr.prototype.serializeBinary=function(){var a=new Hf;Mr(this,a);return Nf(a)};
var Mr=function(a,b){var c=D(a,1,0);0!==c&&b.writeEnum(1,c);c=D(a,2,"");0<c.length&&b.writeString(2,c);c=D(a,3,"");0<c.length&&b.writeString(3,c);(c=kg(a,4))&&b.writeBool(4,c);(c=kg(a,5))&&b.writeBool(5,c);c=E(a,Hr,6);null!=c&&Rf(b,6,c,Jr)};
f=Kr.prototype;f.setAccessRole=function(a){return sg(this,1,a)};
f.setBackgroundColor=function(a){return rg(this,2,a)};
f.setForegroundColor=function(a){return rg(this,3,a)};
f.setHidden=function(a){return qg(this,4,a)};
f.setSelected=function(a){return qg(this,5,a)};
f.clearProfileMetadata=function(){return xg(this,6,void 0)};
f.hasProfileMetadata=function(){return null!=C(this,6)};var Nr=function(a){eg(this,a,0,null,null)};
t(Nr,$f);Nr.prototype.toObject=function(a){return Or(a,this)};
var Or=function(a,b){var c={rawBytes:ig(D(b,1,""))};a&&(c.$jspbMessageInstance=b);return c};
Nr.prototype.serializeBinary=function(){var a=new Hf;Pr(this,a);return Nf(a)};
var Pr=function(a,b){a=jg(D(a,1,""));0<a.length&&b.writeBytes(1,a)};
Nr.prototype.setRawBytes=function(a){return og(this,1,a,"")};var Qr=function(a){eg(this,a,0,pea,null)};
t(Qr,$f);var pea=[1,2];Qr.prototype.toObject=function(a){return Rr(a,this)};
var Rr=function(a,b){var c,d={emailList:null==(c=C(b,1))?void 0:c,groupIdList:null==(c=C(b,2))?void 0:c};a&&(d.$jspbMessageInstance=b);return d};
Qr.prototype.serializeBinary=function(){var a=new Hf;Sr(this,a);return Nf(a)};
var Sr=function(a,b){var c=C(a,1);0<c.length&&Sf(b,1,c);c=C(a,2);0<c.length&&Sf(b,2,c)};
Qr.prototype.clearEmailList=function(){return mg(this,1,[])};
Qr.prototype.addGroupId=function(a,b){return tg(this,2,a,b)};
Qr.prototype.clearGroupIdList=function(){return mg(this,2,[])};var Tr=function(a){eg(this,a,0,null,null)};
t(Tr,$f);Tr.prototype.toObject=function(a){return Ur(a,this)};
var Ur=function(a,b){var c={category:D(b,1,0),categoryLabel:D(b,2,"")};a&&(c.$jspbMessageInstance=b);return c};
Tr.prototype.serializeBinary=function(){var a=new Hf;Vr(this,a);return Nf(a)};
var Vr=function(a,b){var c=a.getCategory();0!==c&&b.writeEnum(1,c);c=D(a,2,"");0<c.length&&b.writeString(2,c)};
Tr.prototype.getCategory=function(){return D(this,1,0)};
Tr.prototype.setCategory=function(a){sg(this,1,a)};
Tr.prototype.setCategoryLabel=function(a){return rg(this,2,a)};var Wr=function(a){eg(this,a,0,null,null)};
t(Wr,$f);Wr.prototype.toObject=function(a){return Xr(a,this)};
var Xr=function(a,b){var c,d={totalItems:D(b,1,0),startTimestamp:(c=E(b,Yq,2))&&Zq(a,c),endTimestamp:(c=E(b,Yq,3))&&Zq(a,c)};a&&(d.$jspbMessageInstance=b);return d};
Wr.prototype.serializeBinary=function(){var a=new Hf;Yr(this,a);return Nf(a)};
var Yr=function(a,b){var c=D(a,1,0);0!==c&&b.writeUint32(1,c);c=E(a,Yq,2);null!=c&&Rf(b,2,c,$q);c=E(a,Yq,3);null!=c&&Rf(b,3,c,$q)};
f=Wr.prototype;f.setTotalItems=function(a){return pg(this,1,a)};
f.clearStartTimestamp=function(){return xg(this,2,void 0)};
f.hasStartTimestamp=function(){return null!=C(this,2)};
f.clearEndTimestamp=function(){return xg(this,3,void 0)};
f.hasEndTimestamp=function(){return null!=C(this,3)};var Zr=function(a){eg(this,a,0,null,null)};
t(Zr,$f);Zr.prototype.toObject=function(a){return $r(a,this)};
var $r=function(a,b){var c,d={albumMetadata:(c=E(b,Wr,1))&&Xr(a,c),dedupKey:D(b,2,"")};a&&(d.$jspbMessageInstance=b);return d};
Zr.prototype.serializeBinary=function(){var a=new Hf;as(this,a);return Nf(a)};
var as=function(a,b){var c=E(a,Wr,1);null!=c&&Rf(b,1,c,Yr);c=D(a,2,"");0<c.length&&b.writeString(2,c)};
Zr.prototype.clearAlbumMetadata=function(){return xg(this,1,void 0)};
Zr.prototype.hasAlbumMetadata=function(){return null!=C(this,1)};
Zr.prototype.setDedupKey=function(a){return rg(this,2,a)};var bs=function(a){eg(this,a,0,null,null)};
t(bs,$f);bs.prototype.toObject=function(a){return cs(a,this)};
var cs=function(a,b){var c={dataUrl:D(b,1,"")};a&&(c.$jspbMessageInstance=b);return c};
bs.prototype.serializeBinary=function(){var a=new Hf;ds(this,a);return Nf(a)};
var ds=function(a,b){a=D(a,1,"");0<a.length&&b.writeString(1,a)};
bs.prototype.setDataUrl=function(a){return rg(this,1,a)};var es=function(a){eg(this,a,0,null,null)};
t(es,$f);es.prototype.toObject=function(a){return fs(a,this)};
var fs=function(a,b){var c={category:D(b,1,"")};a&&(c.$jspbMessageInstance=b);return c};
es.prototype.serializeBinary=function(){var a=new Hf;gs(this,a);return Nf(a)};
var gs=function(a,b){a=a.getCategory();0<a.length&&b.writeString(1,a)};
es.prototype.getCategory=function(){return D(this,1,"")};
es.prototype.setCategory=function(a){rg(this,1,a)};var hs=function(a){eg(this,a,0,null,null)};
t(hs,$f);hs.prototype.toObject=function(a){return is(a,this)};
var is=function(a,b){var c={width:D(b,1,0),height:D(b,2,0)};a&&(c.$jspbMessageInstance=b);return c};
hs.prototype.serializeBinary=function(){var a=new Hf;js(this,a);return Nf(a)};
var js=function(a,b){var c=a.getWidth();0!==c&&b.writeUint32(1,c);c=a.getHeight();0!==c&&b.writeUint32(2,c)};
hs.prototype.getWidth=function(){return D(this,1,0)};
hs.prototype.setWidth=function(a){pg(this,1,a)};
hs.prototype.getHeight=function(){return D(this,2,0)};
hs.prototype.setHeight=function(a){pg(this,2,a)};var ks=function(a){eg(this,a,0,null,null)};
t(ks,$f);ks.prototype.toObject=function(a){return ls(a,this)};
var ls=function(a,b){var c,d={imageSize:(c=E(b,hs,1))&&is(a,c)};a&&(d.$jspbMessageInstance=b);return d};
ks.prototype.serializeBinary=function(){var a=new Hf;ms(this,a);return Nf(a)};
var ms=function(a,b){a=E(a,hs,1);null!=a&&Rf(b,1,a,js)};
ks.prototype.clearImageSize=function(){return xg(this,1,void 0)};
ks.prototype.hasImageSize=function(){return null!=C(this,1)};var ps=function(a){eg(this,a,0,null,null)};
t(ps,$f);ps.prototype.toObject=function(a){return qs(a,this)};
var qs=function(a,b){var c,d={originalImage:(c=E(b,yr,1))&&zr(a,c),referrerUrl:D(b,2,"")};a&&(d.$jspbMessageInstance=b);return d};
ps.prototype.serializeBinary=function(){var a=new Hf;rs(this,a);return Nf(a)};
var rs=function(a,b){var c=E(a,yr,1);null!=c&&Rf(b,1,c,Ar);c=D(a,2,"");0<c.length&&b.writeString(2,c)};
ps.prototype.clearOriginalImage=function(){return xg(this,1,void 0)};
ps.prototype.hasOriginalImage=function(){return null!=C(this,1)};
ps.prototype.setReferrerUrl=function(a){return rg(this,2,a)};var ss=function(a){eg(this,a,0,null,null)};
t(ss,$f);ss.prototype.toObject=function(a){return ts(a,this)};
var ts=function(a,b){var c,d={videoMetadata:(c=b.getVideoMetadata())&&Fr(a,c),channelName:D(b,2,""),channelId:D(b,3,""),viewCount:D(b,4,0)};a&&(d.$jspbMessageInstance=b);return d};
ss.prototype.serializeBinary=function(){var a=new Hf;us(this,a);return Nf(a)};
var us=function(a,b){var c=a.getVideoMetadata();null!=c&&Rf(b,1,c,Gr);c=D(a,2,"");0<c.length&&b.writeString(2,c);c=D(a,3,"");0<c.length&&b.writeString(3,c);c=D(a,4,0);0!==c&&b.writeUint64(4,c)};
f=ss.prototype;f.getVideoMetadata=function(){return E(this,Er,1)};
f.setVideoMetadata=function(a){return xg(this,1,a)};
f.clearVideoMetadata=function(){return this.setVideoMetadata(void 0)};
f.hasVideoMetadata=function(){return null!=C(this,1)};
f.setChannelName=function(a){return rg(this,2,a)};
f.setChannelId=function(a){return rg(this,3,a)};
f.setViewCount=function(a){return pg(this,4,a)};var vs=function(a){eg(this,a,0,null,null)};
t(vs,$f);vs.prototype.toObject=function(a){return ws(a,this)};
var ws=function(a,b){var c,d={youtubeVideoMetadata:(c=E(b,ss,1))&&ts(a,c)};a&&(d.$jspbMessageInstance=b);return d};
vs.prototype.serializeBinary=function(){var a=new Hf;xs(this,a);return Nf(a)};
var xs=function(a,b){a=E(a,ss,1);null!=a&&Rf(b,1,a,us)};
vs.prototype.clearYoutubeVideoMetadata=function(){return xg(this,1,void 0)};
vs.prototype.hasYoutubeVideoMetadata=function(){return null!=C(this,1)};var ys=function(a){eg(this,a,0,null,null)};
t(ys,$f);var zs=function(a){eg(this,a,0,qea,null)};
t(zs,$f);var As=function(a){eg(this,a,0,null,null)};
t(As,$f);ys.prototype.toObject=function(a){return Bs(a,this)};
var Bs=function(a,b){var c,d={shared:kg(b,1),hasPrimarySyncParent:kg(b,2),videoMetadata:(c=b.getVideoMetadata())&&Fr(a,c),recencyTimestamp:(c=E(b,Yq,4))&&Zq(a,c),recencyReason:D(b,5,0),sharedDriveId:D(b,6,""),hasOwnPermissions:kg(b,7),shortcutDetails:(c=E(b,As,8))&&Cs(a,c),copyable:kg(b,9),downloadUrl:D(b,10,"")};a&&(d.$jspbMessageInstance=b);return d};
ys.prototype.serializeBinary=function(){var a=new Hf;Ds(this,a);return Nf(a)};
var Ds=function(a,b){var c;(c=kg(a,1))&&b.writeBool(1,c);(c=kg(a,2))&&b.writeBool(2,c);c=a.getVideoMetadata();null!=c&&Rf(b,3,c,Gr);c=E(a,Yq,4);null!=c&&Rf(b,4,c,$q);c=D(a,5,0);0!==c&&b.writeInt64(5,c);c=D(a,6,"");0<c.length&&b.writeString(6,c);(c=kg(a,7))&&b.writeBool(7,c);c=E(a,As,8);null!=c&&Rf(b,8,c,Es);(c=kg(a,9))&&b.writeBool(9,c);c=D(a,10,"");0<c.length&&b.writeString(10,c)};
f=ys.prototype;f.setShared=function(a){return qg(this,1,a)};
f.setHasPrimarySyncParent=function(a){return qg(this,2,a)};
f.getVideoMetadata=function(){return E(this,Er,3)};
f.setVideoMetadata=function(a){return xg(this,3,a)};
f.clearVideoMetadata=function(){return this.setVideoMetadata(void 0)};
f.hasVideoMetadata=function(){return null!=C(this,3)};
f.clearRecencyTimestamp=function(){return xg(this,4,void 0)};
f.hasRecencyTimestamp=function(){return null!=C(this,4)};
f.setRecencyReason=function(a){return pg(this,5,a)};
f.setSharedDriveId=function(a){return rg(this,6,a)};
f.setHasOwnPermissions=function(a){return qg(this,7,a)};
f.clearShortcutDetails=function(){return xg(this,8,void 0)};
f.hasShortcutDetails=function(){return null!=C(this,8)};
f.setCopyable=function(a){return qg(this,9,a)};
f.setDownloadUrl=function(a){return rg(this,10,a)};
var qea=[5,10,22];zs.prototype.toObject=function(a){return Fs(a,this)};
var Fs=function(a,b){var c,d={id:(c=b.getId())&&wr(a,c),name:D(b,2,""),description:D(b,3,""),parentId:D(b,4,""),allParentIdList:null==(c=C(b,5))?void 0:c,type:D(b,6,0),mimeType:D(b,7,""),url:D(b,8,""),templateThumbUrl:D(b,9,""),iconUrl:D(b,11,""),embedUrl:D(b,13,""),previewUrl:D(b,20,""),thumbnailList:fg(Gs(b),zr,a),internalThumbnailList:fg(wg(b,yr,22),zr,a),lastModifiedTimestamp:(c=E(b,Yq,12))&&Zq(a,c),creationTimestampMs:(c=E(b,Yq,16))&&Zq(a,c),calendarMetadata:(c=E(b,Kr,14))&&Lr(a,c),webMetadata:(c=
E(b,ps,15))&&qs(a,c),photosMetadata:(c=E(b,Zr,18))&&$r(a,c),themesMetadata:(c=E(b,es,19))&&fs(a,c),driveMetadata:(c=E(b,ys,21))&&Bs(a,c),youtubeMetadata:(c=E(b,vs,24))&&ws(a,c),cameraMetadata:(c=E(b,Nr,26))&&Or(a,c),contactsMetadata:(c=E(b,Qr,27))&&Rr(a,c),partyMetadata:(c=E(b,Tr,28))&&Ur(a,c),urlMetadata:(c=E(b,ks,29))&&ls(a,c),uploadMetadata:(c=E(b,bs,30))&&cs(a,c),bucketId:D(b,17,""),sizeBytes:D(b,23,0),itemDiagnosticsInfo:(c=E(b,sr,25))&&tr(a,c)};a&&(d.$jspbMessageInstance=b);return d};
zs.prototype.serializeBinary=function(){var a=new Hf;Hs(this,a);return Nf(a)};
var Hs=function(a,b){var c=a.getId();null!=c&&Rf(b,1,c,xr);c=a.getName();0<c.length&&b.writeString(2,c);c=a.getDescription();0<c.length&&b.writeString(3,c);c=a.getParentId();0<c.length&&b.writeString(4,c);c=C(a,5);0<c.length&&Sf(b,5,c);c=a.getType();0!==c&&b.writeEnum(6,c);c=D(a,7,"");0<c.length&&b.writeString(7,c);c=a.getUrl();0<c.length&&b.writeString(8,c);c=D(a,9,"");0<c.length&&b.writeString(9,c);c=D(a,11,"");0<c.length&&b.writeString(11,c);c=D(a,13,"");0<c.length&&b.writeString(13,c);c=D(a,20,
"");0<c.length&&b.writeString(20,c);c=Gs(a);0<c.length&&Tf(b,10,c,Ar);c=wg(a,yr,22);0<c.length&&Tf(b,22,c,Ar);c=E(a,Yq,12);null!=c&&Rf(b,12,c,$q);c=E(a,Yq,16);null!=c&&Rf(b,16,c,$q);c=E(a,Kr,14);null!=c&&Rf(b,14,c,Mr);c=E(a,ps,15);null!=c&&Rf(b,15,c,rs);c=E(a,Zr,18);null!=c&&Rf(b,18,c,as);c=E(a,es,19);null!=c&&Rf(b,19,c,gs);c=E(a,ys,21);null!=c&&Rf(b,21,c,Ds);c=E(a,vs,24);null!=c&&Rf(b,24,c,xs);c=E(a,Nr,26);null!=c&&Rf(b,26,c,Pr);c=E(a,Qr,27);null!=c&&Rf(b,27,c,Sr);c=E(a,Tr,28);null!=c&&Rf(b,28,c,
Vr);c=E(a,ks,29);null!=c&&Rf(b,29,c,ms);c=E(a,bs,30);null!=c&&Rf(b,30,c,ds);c=D(a,17,"");0<c.length&&b.writeString(17,c);c=D(a,23,0);0!==c&&b.writeUint64(23,c);c=E(a,sr,25);null!=c&&Rf(b,25,c,ur)};
f=zs.prototype;f.getId=function(){return E(this,vr,1)};
f.setId=function(a){return xg(this,1,a)};
f.clearId=function(){return this.setId(void 0)};
f.hasId=function(){return null!=C(this,1)};
f.getName=function(){return D(this,2,"")};
f.setName=function(a){return rg(this,2,a)};
f.getDescription=function(){return D(this,3,"")};
f.setDescription=function(a){return rg(this,3,a)};
f.getParentId=function(){return D(this,4,"")};
f.setParentId=function(a){rg(this,4,a)};
f.addAllParentId=function(a,b){return tg(this,5,a,b)};
f.clearAllParentIdList=function(){return mg(this,5,[])};
f.getType=function(){return D(this,6,0)};
f.setType=function(a){return sg(this,6,a)};
f.setMimeType=function(a){return rg(this,7,a)};
f.getUrl=function(){return D(this,8,"")};
f.setUrl=function(a){return rg(this,8,a)};
f.setTemplateThumbUrl=function(a){return rg(this,9,a)};
f.setIconUrl=function(a){return rg(this,11,a)};
f.setEmbedUrl=function(a){return rg(this,13,a)};
f.setPreviewUrl=function(a){return rg(this,20,a)};
var Gs=function(a){return wg(a,yr,10)};
f=zs.prototype;f.addThumbnail=function(a,b){return Ag(this,10,a,yr,b)};
f.clearThumbnailList=function(){return zg(this,10,[])};
f.addInternalThumbnail=function(a,b){return Ag(this,22,a,yr,b)};
f.clearInternalThumbnailList=function(){return zg(this,22,[])};
f.clearLastModifiedTimestamp=function(){return xg(this,12,void 0)};
f.hasLastModifiedTimestamp=function(){return null!=C(this,12)};
f.clearCreationTimestampMs=function(){return xg(this,16,void 0)};
f.hasCreationTimestampMs=function(){return null!=C(this,16)};
f.clearCalendarMetadata=function(){return xg(this,14,void 0)};
f.hasCalendarMetadata=function(){return null!=C(this,14)};
f.clearWebMetadata=function(){return xg(this,15,void 0)};
f.hasWebMetadata=function(){return null!=C(this,15)};
f.clearPhotosMetadata=function(){return xg(this,18,void 0)};
f.hasPhotosMetadata=function(){return null!=C(this,18)};
f.clearThemesMetadata=function(){return xg(this,19,void 0)};
f.hasThemesMetadata=function(){return null!=C(this,19)};
f.clearDriveMetadata=function(){return xg(this,21,void 0)};
f.hasDriveMetadata=function(){return null!=C(this,21)};
f.clearYoutubeMetadata=function(){return xg(this,24,void 0)};
f.hasYoutubeMetadata=function(){return null!=C(this,24)};
f.clearCameraMetadata=function(){return xg(this,26,void 0)};
f.hasCameraMetadata=function(){return null!=C(this,26)};
f.clearContactsMetadata=function(){return xg(this,27,void 0)};
f.hasContactsMetadata=function(){return null!=C(this,27)};
f.clearPartyMetadata=function(){return xg(this,28,void 0)};
f.hasPartyMetadata=function(){return null!=C(this,28)};
f.clearUrlMetadata=function(){return xg(this,29,void 0)};
f.hasUrlMetadata=function(){return null!=C(this,29)};
f.clearUploadMetadata=function(){return xg(this,30,void 0)};
f.hasUploadMetadata=function(){return null!=C(this,30)};
f.setBucketId=function(a){return rg(this,17,a)};
f.setSizeBytes=function(a){return pg(this,23,a)};
f.clearItemDiagnosticsInfo=function(){return xg(this,25,void 0)};
f.hasItemDiagnosticsInfo=function(){return null!=C(this,25)};
As.prototype.toObject=function(a){return Cs(a,this)};
var Cs=function(a,b){var c,d={targetId:D(b,1,""),targetMimeType:D(b,2,""),targetItem:(c=E(b,zs,3))&&Fs(a,c),targetLookupStatus:D(b,4,0)};a&&(d.$jspbMessageInstance=b);return d};
As.prototype.serializeBinary=function(){var a=new Hf;Es(this,a);return Nf(a)};
var Es=function(a,b){var c=D(a,1,"");0<c.length&&b.writeString(1,c);c=D(a,2,"");0<c.length&&b.writeString(2,c);c=E(a,zs,3);null!=c&&Rf(b,3,c,Hs);c=D(a,4,0);0!==c&&b.writeEnum(4,c)};
f=As.prototype;f.setTargetId=function(a){return rg(this,1,a)};
f.setTargetMimeType=function(a){return rg(this,2,a)};
f.clearTargetItem=function(){return xg(this,3,void 0)};
f.hasTargetItem=function(){return null!=C(this,3)};
f.setTargetLookupStatus=function(a){return sg(this,4,a)};var Is=function(a){eg(this,a,0,rea,null)};
t(Is,$f);var rea=[1,2,3,4];Is.prototype.toObject=function(a){return Js(a,this)};
var Js=function(a,b){var c,d={typeList:null==(c=C(b,1))?void 0:c,mimetypeList:null==(c=C(b,2))?void 0:c,excludeTypeList:null==(c=C(b,3))?void 0:c,excludeMimetypeList:null==(c=C(b,4))?void 0:c,maxSize:(c=E(b,hs,5))&&is(a,c),maxSizeBytes:D(b,6,0)};a&&(d.$jspbMessageInstance=b);return d};
Is.prototype.serializeBinary=function(){var a=new Hf;Ks(this,a);return Nf(a)};
var Ks=function(a,b){var c=C(a,1);0<c.length&&Uf(b,1,c);c=C(a,2);0<c.length&&Sf(b,2,c);c=C(a,3);0<c.length&&Uf(b,3,c);c=C(a,4);0<c.length&&Sf(b,4,c);c=E(a,hs,5);null!=c&&Rf(b,5,c,js);c=D(a,6,0);0!==c&&b.writeUint32(6,c)},Ls=function(a,b){tg(a,1,b,void 0)};
f=Is.prototype;f.clearTypeList=function(){return mg(this,1,[])};
f.addMimetype=function(a,b){return tg(this,2,a,b)};
f.clearMimetypeList=function(){return mg(this,2,[])};
f.addExcludeType=function(a,b){return tg(this,3,a,b)};
f.clearExcludeTypeList=function(){return mg(this,3,[])};
f.addExcludeMimetype=function(a,b){return tg(this,4,a,b)};
f.clearExcludeMimetypeList=function(){return mg(this,4,[])};
f.setMaxSize=function(a){return xg(this,5,a)};
f.clearMaxSize=function(){return this.setMaxSize(void 0)};
f.hasMaxSize=function(){return null!=C(this,5)};
f.setMaxSizeBytes=function(a){return pg(this,6,a)};var Ms=function(a){eg(this,a,0,null,null)};
t(Ms,$f);Ms.prototype.toObject=function(a){return Ns(a,this)};
var Ns=function(a,b){var c={noDataFoundLabel:D(b,1,""),noDataFoundDescription:D(b,2,"")};a&&(c.$jspbMessageInstance=b);return c};
Ms.prototype.serializeBinary=function(){var a=new Hf;Os(this,a);return Nf(a)};
var Os=function(a,b){var c=D(a,1,"");0<c.length&&b.writeString(1,c);c=D(a,2,"");0<c.length&&b.writeString(2,c)};
Ms.prototype.setNoDataFoundLabel=function(a){return rg(this,1,a)};
Ms.prototype.setNoDataFoundDescription=function(a){return rg(this,2,a)};var Ps=function(a){eg(this,a,0,null,null)};
t(Ps,$f);Ps.prototype.toObject=function(a){return Qs(a,this)};
var Qs=function(a,b){var c={copyToTemporaryAlbum:kg(b,1),hasCaption:kg(b,2)};a&&(c.$jspbMessageInstance=b);return c};
Ps.prototype.serializeBinary=function(){var a=new Hf;Rs(this,a);return Nf(a)};
var Rs=function(a,b){var c;(c=kg(a,1))&&b.writeBool(1,c);(c=kg(a,2))&&b.writeBool(2,c)};
Ps.prototype.setCopyToTemporaryAlbum=function(a){return qg(this,1,a)};
var sea=function(){var a=new Ps;return qg(a,2,!0)};var Ss=function(a){eg(this,a,0,null,null)};
t(Ss,$f);Ss.prototype.toObject=function(a){return Ts(a,this)};
var Ts=function(a,b){var c={};a&&(c.$jspbMessageInstance=b);return c};
Ss.prototype.serializeBinary=function(){return Nf(new Hf)};
var tea=function(){};var Us=function(a){eg(this,a,0,null,null)};
t(Us,$f);Us.prototype.toObject=function(a){return Vs(a,this)};
var Vs=function(a,b){var c={};a&&(c.$jspbMessageInstance=b);return c};
Us.prototype.serializeBinary=function(){return Nf(new Hf)};
var uea=function(){};var Xs=function(a){eg(this,a,0,null,Ws)};
t(Xs,$f);var Ws=[[2,3,4]];Xs.prototype.getOptionsOneofCase=function(){return dg(this,Ws[0])};
Xs.prototype.toObject=function(a){return Ys(a,this)};
var Ys=function(a,b){var c,d={id:D(b,1,0),profilePhotoOptions:(c=E(b,Us,2))&&Vs(a,c),cropPhotoOptions:(c=E(b,Ps,3))&&Qs(a,c),photoSharingOptions:(c=E(b,Ss,4))&&Ts(a,c)};a&&(d.$jspbMessageInstance=b);return d};
Xs.prototype.serializeBinary=function(){var a=new Hf;Zs(this,a);return Nf(a)};
var Zs=function(a,b){var c=a.getId();0!==c&&b.writeEnum(1,c);c=E(a,Us,2);null!=c&&Rf(b,2,c,uea);c=E(a,Ps,3);null!=c&&Rf(b,3,c,Rs);c=E(a,Ss,4);null!=c&&Rf(b,4,c,tea)};
Xs.prototype.getId=function(){return D(this,1,0)};
Xs.prototype.setId=function(a){return sg(this,1,a)};
Xs.prototype.clearProfilePhotoOptions=function(){return yg(this,2,Ws[0],void 0)};
Xs.prototype.hasProfilePhotoOptions=function(){return null!=C(this,2)};
var $s=function(a,b){return yg(a,3,Ws[0],b)};
Xs.prototype.clearCropPhotoOptions=function(){return $s(this,void 0)};
Xs.prototype.hasCropPhotoOptions=function(){return null!=C(this,3)};
Xs.prototype.clearPhotoSharingOptions=function(){return yg(this,4,Ws[0],void 0)};
Xs.prototype.hasPhotoSharingOptions=function(){return null!=C(this,4)};var at=function(a){eg(this,a,0,null,null)};
t(at,$f);at.prototype.toObject=function(a){return bt(a,this)};
var bt=function(a,b){var c={previewMode:D(b,1,0)};a&&(c.$jspbMessageInstance=b);return c};
at.prototype.serializeBinary=function(){var a=new Hf;ct(this,a);return Nf(a)};
var ct=function(a,b){a=D(a,1,0);0!==a&&b.writeEnum(1,a)};
at.prototype.setPreviewMode=function(a){return sg(this,1,a)};var dt=function(a){eg(this,a,0,null,null)};
t(dt,$f);dt.prototype.toObject=function(a){return et(a,this)};
var et=function(a,b){var c={selectionMode:D(b,1,0),allowCollectionSelection:kg(b,2)};a&&(c.$jspbMessageInstance=b);return c};
dt.prototype.serializeBinary=function(){var a=new Hf;ft(this,a);return Nf(a)};
var ft=function(a,b){var c=D(a,1,0);0!==c&&b.writeEnum(1,c);(c=kg(a,2))&&b.writeBool(2,c)};
dt.prototype.setAllowCollectionSelection=function(a){return qg(this,2,a)};var gt=function(a){eg(this,a,0,vea,null)};
t(gt,$f);var vea=[18,28];gt.prototype.toObject=function(a){return ht(a,this)};
var ht=function(a,b){var c,d={host:D(b,23,0),hostUsecase:D(b,24,""),itemType:(c=E(b,Is,2))&&Js(a,c),selectionStrategy:(c=E(b,dt,3))&&et(a,c),maxItemsToSelect:D(b,5,0),previewStrategy:(c=E(b,at,21))&&bt(a,c),authUser:(c=b.getAuthUser())&&er(a,c),oauth:D(b,7,""),baseUrl:D(b,8,""),topOrigin:D(b,27,""),title:D(b,9,""),locale:D(b,10,""),containerSpec:(c=E(b,mr,11))&&nr(a,c),secretToken:D(b,12,""),debugSpec:(c=E(b,pr,14))&&qr(a,c),clientEnabledExperimentsList:null==(c=C(b,18))?void 0:c,selectButtonLabel:D(b,
19,""),additionalInfo:(c=E(b,ar,20))&&br(a,c),messageTextOverrides:(c=E(b,Ms,22))&&Ns(a,c),enableDragDrop:kg(b,25),preloaded:kg(b,26),postProcessorList:fg(wg(b,Xs,28),Ys,a),accountDelegation:(c=E(b,Vq,29))&&Wq(a,c),initialViewLayout:D(b,30,0),buildLabel:D(b,31,""),deprecatedIsMultiselectAllowed:kg(b,4),deprecatedOrigin:D(b,13,""),deprecatedInstanceId:D(b,15,""),deprecatedEnablePreview:kg(b,17),deprecatedUseRefreshedUi:kg(b,16)};a&&(d.$jspbMessageInstance=b);return d};
gt.prototype.serializeBinary=function(){var a=new Hf;it(this,a);return Nf(a)};
var it=function(a,b){var c=D(a,23,0);0!==c&&b.writeEnum(23,c);c=D(a,24,"");0<c.length&&b.writeString(24,c);c=E(a,Is,2);null!=c&&Rf(b,2,c,Ks);c=E(a,dt,3);null!=c&&Rf(b,3,c,ft);c=D(a,5,0);0!==c&&b.writeInt64(5,c);c=E(a,at,21);null!=c&&Rf(b,21,c,ct);c=a.getAuthUser();null!=c&&Rf(b,6,c,fr);c=D(a,7,"");0<c.length&&b.writeString(7,c);c=a.getBaseUrl();0<c.length&&b.writeString(8,c);c=D(a,27,"");0<c.length&&b.writeString(27,c);c=a.getTitle();0<c.length&&b.writeString(9,c);c=D(a,10,"");0<c.length&&b.writeString(10,
c);c=E(a,mr,11);null!=c&&Rf(b,11,c,or);c=D(a,12,"");0<c.length&&b.writeString(12,c);c=E(a,pr,14);null!=c&&Rf(b,14,c,rr);c=C(a,18);0<c.length&&Uf(b,18,c);c=a.getSelectButtonLabel();0<c.length&&b.writeString(19,c);c=E(a,ar,20);null!=c&&Rf(b,20,c,cr);c=E(a,Ms,22);null!=c&&Rf(b,22,c,Os);(c=kg(a,25))&&b.writeBool(25,c);(c=kg(a,26))&&b.writeBool(26,c);c=wg(a,Xs,28);0<c.length&&Tf(b,28,c,Zs);c=E(a,Vq,29);null!=c&&Rf(b,29,c,Xq);c=D(a,30,0);0!==c&&b.writeEnum(30,c);c=D(a,31,"");0<c.length&&b.writeString(31,
c);(c=kg(a,4))&&b.writeBool(4,c);c=D(a,13,"");0<c.length&&b.writeString(13,c);c=D(a,15,"");0<c.length&&b.writeString(15,c);(c=kg(a,17))&&b.writeBool(17,c);(c=kg(a,16))&&b.writeBool(16,c)},wea=function(){var a=new gt;
return sg(a,23,20)};
f=gt.prototype;f.clearItemType=function(){return xg(this,2,void 0)};
f.hasItemType=function(){return null!=C(this,2)};
f.clearSelectionStrategy=function(){return xg(this,3,void 0)};
f.hasSelectionStrategy=function(){return null!=C(this,3)};
f.clearPreviewStrategy=function(){return xg(this,21,void 0)};
f.hasPreviewStrategy=function(){return null!=C(this,21)};
f.getAuthUser=function(){return E(this,dr,6)};
f.setAuthUser=function(a){return xg(this,6,a)};
f.clearAuthUser=function(){return this.setAuthUser(void 0)};
f.hasAuthUser=function(){return null!=C(this,6)};
f.setOauth=function(a){return rg(this,7,a)};
f.getBaseUrl=function(){return D(this,8,"")};
var xea=function(a,b){return rg(a,8,b)};
f=gt.prototype;f.getTitle=function(){return D(this,9,"")};
f.setTitle=function(a){return rg(this,9,a)};
f.setLocale=function(a){rg(this,10,a)};
f.clearContainerSpec=function(){return xg(this,11,void 0)};
f.hasContainerSpec=function(){return null!=C(this,11)};
f.setSecretToken=function(a){rg(this,12,a)};
f.clearDebugSpec=function(){return xg(this,14,void 0)};
f.hasDebugSpec=function(){return null!=C(this,14)};
f.addClientEnabledExperiments=function(a,b){return tg(this,18,a,b)};
f.clearClientEnabledExperimentsList=function(){return mg(this,18,[])};
f.getSelectButtonLabel=function(){return D(this,19,"")};
f.setSelectButtonLabel=function(a){return rg(this,19,a)};
var jt=function(a,b){return xg(a,20,b)};
f=gt.prototype;f.clearAdditionalInfo=function(){return jt(this,void 0)};
f.hasAdditionalInfo=function(){return null!=C(this,20)};
f.clearMessageTextOverrides=function(){return xg(this,22,void 0)};
f.hasMessageTextOverrides=function(){return null!=C(this,22)};
f.setEnableDragDrop=function(a){return qg(this,25,a)};
f.setPreloaded=function(a){return qg(this,26,a)};
f.addPostProcessor=function(a,b){return Ag(this,28,a,Xs,b)};
f.clearPostProcessorList=function(){return zg(this,28,[])};
f.clearAccountDelegation=function(){return xg(this,29,void 0)};
f.hasAccountDelegation=function(){return null!=C(this,29)};
f.setInitialViewLayout=function(a){return sg(this,30,a)};
f.setBuildLabel=function(a){return rg(this,31,a)};
f.setDeprecatedIsMultiselectAllowed=function(a){return qg(this,4,a)};
f.setDeprecatedOrigin=function(a){return rg(this,13,a)};
f.setDeprecatedInstanceId=function(a){return rg(this,15,a)};
f.setDeprecatedEnablePreview=function(a){return qg(this,17,a)};
f.setDeprecatedUseRefreshedUi=function(a){return qg(this,16,a)};var kt=function(a){eg(this,a,0,null,null)};
t(kt,$f);kt.prototype.toObject=function(a){return lt(a,this)};
var lt=function(a,b){var c={eventType:D(b,1,0)};a&&(c.$jspbMessageInstance=b);return c};
kt.prototype.serializeBinary=function(){var a=new Hf;mt(this,a);return Nf(a)};
var mt=function(a,b){a=D(a,1,0);0!==a&&b.writeEnum(1,a)};
kt.prototype.setEventType=function(a){return sg(this,1,a)};var nt=function(a){eg(this,a,0,yea,null)};
t(nt,$f);var yea=[1];nt.prototype.toObject=function(a){return ot(a,this)};
var ot=function(a,b){var c,d={itemList:fg(b.getItemList(),Fs,a),currentItem:(c=E(b,zs,2))&&Fs(a,c),currentItemIndex:D(b,3,0)};a&&(d.$jspbMessageInstance=b);return d};
nt.prototype.serializeBinary=function(){var a=new Hf;pt(this,a);return Nf(a)};
var pt=function(a,b){var c=a.getItemList();0<c.length&&Tf(b,1,c,Hs);c=E(a,zs,2);null!=c&&Rf(b,2,c,Hs);c=D(a,3,0);0!==c&&b.writeUint32(3,c)};
f=nt.prototype;f.getItemList=function(){return wg(this,zs,1)};
f.setItemList=function(a){return zg(this,1,a)};
f.addItem=function(a){Ag(this,1,a,zs,void 0)};
f.clearItemList=function(){return this.setItemList([])};
f.clearCurrentItem=function(){return xg(this,2,void 0)};
f.hasCurrentItem=function(){return null!=C(this,2)};
f.setCurrentItemIndex=function(a){return pg(this,3,a)};var qt=function(a){eg(this,a,0,zea,null)};
t(qt,$f);var zea=[2];qt.prototype.toObject=function(a){return rt(a,this)};
var rt=function(a,b){var c={status:D(b,1,0),itemList:fg(b.getItemList(),Fs,a),action:D(b,3,0),errorCode:D(b,4,0)};a&&(c.$jspbMessageInstance=b);return c};
qt.prototype.serializeBinary=function(){var a=new Hf;st(this,a);return Nf(a)};
var st=function(a,b){var c=a.getStatus();0!==c&&b.writeEnum(1,c);c=a.getItemList();0<c.length&&Tf(b,2,c,Hs);c=D(a,3,0);0!==c&&b.writeEnum(3,c);c=D(a,4,0);0!==c&&b.writeEnum(4,c)};
f=qt.prototype;f.getStatus=function(){return D(this,1,0)};
f.setStatus=function(a){return sg(this,1,a)};
f.getItemList=function(){return wg(this,zs,2)};
f.setItemList=function(a){return zg(this,2,a)};
f.addItem=function(a){Ag(this,2,a,zs,void 0)};
f.clearItemList=function(){return this.setItemList([])};
f.setAction=function(a){return sg(this,3,a)};
f.setErrorCode=function(a){return sg(this,4,a)};var tt=function(a){eg(this,a,0,null,null)};
t(tt,$f);tt.prototype.toObject=function(a){return ut(a,this)};
var ut=function(a,b){var c={query:D(b,1,""),minAccessRole:D(b,2,0),showHidden:kg(b,3),fetchProfile:kg(b,4)};a&&(c.$jspbMessageInstance=b);return c};
tt.prototype.serializeBinary=function(){var a=new Hf;vt(this,a);return Nf(a)};
var vt=function(a,b){var c=a.getQuery();0<c.length&&b.writeString(1,c);c=D(a,2,0);0!==c&&b.writeEnum(2,c);(c=kg(a,3))&&b.writeBool(3,c);(c=kg(a,4))&&b.writeBool(4,c)};
f=tt.prototype;f.getQuery=function(){return D(this,1,"")};
f.setQuery=function(a){return rg(this,1,a)};
f.setMinAccessRole=function(a){return sg(this,2,a)};
f.setShowHidden=function(a){return qg(this,3,a)};
f.setFetchProfile=function(a){return qg(this,4,a)};var wt=function(a){eg(this,a,0,null,null)};
t(wt,$f);wt.prototype.toObject=function(a){return xt(a,this)};
var xt=function(a,b){var c,d={uploadUrl:D(b,1,""),metadataMap:(c=ng(b,void 0))?c.toObject(a,void 0):[],agentId:D(b,3,0),configurationId:D(b,4,0),sendDataUrl:kg(b,5)};a&&(d.$jspbMessageInstance=b);return d};
wt.prototype.serializeBinary=function(){var a=new Hf;zt(this,a);return Nf(a)};
var zt=function(a,b){var c=a.getUploadUrl();0<c.length&&b.writeString(1,c);(c=ng(a,!0))&&0<c.getLength()&&c.serializeBinary(2,b,Hf.prototype.writeString,Hf.prototype.writeString);c=D(a,3,0);0!==c&&b.writeEnum(3,c);c=D(a,4,0);0!==c&&b.writeEnum(4,c);(c=kg(a,5))&&b.writeBool(5,c)};
f=wt.prototype;f.getUploadUrl=function(){return D(this,1,"")};
f.setUploadUrl=function(a){return rg(this,1,a)};
f.clearMetadataMap=function(){ng(this,void 0).clear();return this};
f.setAgentId=function(a){return sg(this,3,a)};
f.setSendDataUrl=function(a){return qg(this,5,a)};var At=function(a){eg(this,a,0,null,null)};
t(At,$f);At.prototype.toObject=function(a){return Bt(a,this)};
var Bt=function(a,b){var c,d={uploadMode:D(b,1,0),uploadSourceOptions:(c=b.getUploadSourceOptions())&&xt(a,c)};a&&(d.$jspbMessageInstance=b);return d};
At.prototype.serializeBinary=function(){var a=new Hf;Ct(this,a);return Nf(a)};
var Ct=function(a,b){var c=D(a,1,0);0!==c&&b.writeEnum(1,c);c=a.getUploadSourceOptions();null!=c&&Rf(b,2,c,zt)};
At.prototype.getUploadSourceOptions=function(){return E(this,wt,2)};
At.prototype.setUploadSourceOptions=function(a){return xg(this,2,a)};
At.prototype.clearUploadSourceOptions=function(){return this.setUploadSourceOptions(void 0)};
At.prototype.hasUploadSourceOptions=function(){return null!=C(this,2)};var Dt=function(a){eg(this,a,0,null,null)};
t(Dt,$f);Dt.prototype.toObject=function(a){return Et(a,this)};
var Et=function(a,b){var c={query:D(b,1,"")};a&&(c.$jspbMessageInstance=b);return c};
Dt.prototype.serializeBinary=function(){var a=new Hf;Ft(this,a);return Nf(a)};
var Ft=function(a,b){a=a.getQuery();0<a.length&&b.writeString(1,a)};
Dt.prototype.getQuery=function(){return D(this,1,"")};
Dt.prototype.setQuery=function(a){return rg(this,1,a)};var Gt=function(a){eg(this,a,0,null,null)};
t(Gt,$f);Gt.prototype.toObject=function(a){return Ht(a,this)};
var Ht=function(a,b){var c={type:D(b,1,0),direction:D(b,2,0),foldersFirst:kg(b,3)};a&&(c.$jspbMessageInstance=b);return c};
Gt.prototype.serializeBinary=function(){var a=new Hf;It(this,a);return Nf(a)};
var It=function(a,b){var c=a.getType();0!==c&&b.writeEnum(1,c);c=a.getDirection();0!==c&&b.writeEnum(2,c);(c=kg(a,3))&&b.writeBool(3,c)};
f=Gt.prototype;f.getType=function(){return D(this,1,0)};
f.setType=function(a){return sg(this,1,a)};
f.getDirection=function(){return D(this,2,0)};
f.setDirection=function(a){return sg(this,2,a)};
f.setFoldersFirst=function(a){return qg(this,3,a)};var Jt=function(a){eg(this,a,0,null,null)};
t(Jt,$f);Jt.prototype.toObject=function(a){return Kt(a,this)};
var Kt=function(a,b){var c,d={parentId:D(b,1,""),query:D(b,2,""),sortBy:(c=E(b,Gt,3))&&Ht(a,c),ownedBy:D(b,4,0),sharedWithMe:kg(b,5),starred:kg(b,7),viewMode:D(b,8,0),lastModified:(c=E(b,Yq,9))&&Zq(a,c),disableInstantUpdates:kg(b,10),inSharedDrive:kg(b,11),inComputers:kg(b,12),permissions:D(b,13,0),itemSuggest:kg(b,14)};a&&(d.$jspbMessageInstance=b);return d};
Jt.prototype.serializeBinary=function(){var a=new Hf;Lt(this,a);return Nf(a)};
var Lt=function(a,b){var c=a.getParentId();0<c.length&&b.writeString(1,c);c=a.getQuery();0<c.length&&b.writeString(2,c);c=E(a,Gt,3);null!=c&&Rf(b,3,c,It);c=D(a,4,0);0!==c&&b.writeEnum(4,c);(c=kg(a,5))&&b.writeBool(5,c);(c=kg(a,7))&&b.writeBool(7,c);c=a.getViewMode();0!==c&&b.writeEnum(8,c);c=E(a,Yq,9);null!=c&&Rf(b,9,c,$q);(c=kg(a,10))&&b.writeBool(10,c);(c=kg(a,11))&&b.writeBool(11,c);(c=kg(a,12))&&b.writeBool(12,c);c=D(a,13,0);0!==c&&b.writeEnum(13,c);(c=kg(a,14))&&b.writeBool(14,c)};
f=Jt.prototype;f.getParentId=function(){return D(this,1,"")};
f.setParentId=function(a){rg(this,1,a)};
f.getQuery=function(){return D(this,2,"")};
f.setQuery=function(a){return rg(this,2,a)};
f.clearSortBy=function(){return xg(this,3,void 0)};
f.hasSortBy=function(){return null!=C(this,3)};
f.getViewMode=function(){return D(this,8,0)};
f.setViewMode=function(a){sg(this,8,a)};
f.clearLastModified=function(){return xg(this,9,void 0)};
f.hasLastModified=function(){return null!=C(this,9)};
f.setDisableInstantUpdates=function(a){return qg(this,10,a)};
f.setPermissions=function(a){return sg(this,13,a)};var Mt=function(a){eg(this,a,0,Aea,null)};
t(Mt,$f);var Aea=[1,3];Mt.prototype.toObject=function(a){return Nt(a,this)};
var Nt=function(a,b){var c,d={parentList:null==(c=C(b,1))?void 0:c,embeddingParent:D(b,2,""),fileExtensionsList:null==(c=C(b,3))?void 0:c};a&&(d.$jspbMessageInstance=b);return d};
Mt.prototype.serializeBinary=function(){var a=new Hf;Ot(this,a);return Nf(a)};
var Ot=function(a,b){var c=C(a,1);0<c.length&&Sf(b,1,c);c=D(a,2,"");0<c.length&&b.writeString(2,c);c=C(a,3);0<c.length&&Sf(b,3,c)};
f=Mt.prototype;f.addParent=function(a,b){return tg(this,1,a,b)};
f.clearParentList=function(){return mg(this,1,[])};
f.setEmbeddingParent=function(a){return rg(this,2,a)};
f.addFileExtensions=function(a,b){return tg(this,3,a,b)};
f.clearFileExtensionsList=function(){return mg(this,3,[])};var Pt=function(a){eg(this,a,0,null,null)};
t(Pt,$f);Pt.prototype.toObject=function(a){return Qt(a,this)};
var Qt=function(a,b){var c={category:D(b,2,0),deprecatedCategory:D(b,1,"")};a&&(c.$jspbMessageInstance=b);return c};
Pt.prototype.serializeBinary=function(){var a=new Hf;Rt(this,a);return Nf(a)};
var Rt=function(a,b){var c=a.getCategory();0!==c&&b.writeEnum(2,c);c=D(a,1,"");0<c.length&&b.writeString(1,c)};
Pt.prototype.getCategory=function(){return D(this,2,0)};
Pt.prototype.setCategory=function(a){sg(this,2,a)};
Pt.prototype.setDeprecatedCategory=function(a){return rg(this,1,a)};var St=function(a){eg(this,a,0,null,null)};
t(St,$f);St.prototype.toObject=function(a){return Tt(a,this)};
var Tt=function(a,b){var c={parentAlbumKey:D(b,1,""),bucketBy:D(b,2,0),viewMode:D(b,3,0),queryText:D(b,4,""),includePhotos:kg(b,5),includeVideos:kg(b,6)};a&&(c.$jspbMessageInstance=b);return c};
St.prototype.serializeBinary=function(){var a=new Hf;Ut(this,a);return Nf(a)};
var Ut=function(a,b){var c=D(a,1,"");0<c.length&&b.writeString(1,c);c=D(a,2,0);0!==c&&b.writeEnum(2,c);c=a.getViewMode();0!==c&&b.writeEnum(3,c);c=D(a,4,"");0<c.length&&b.writeString(4,c);(c=kg(a,5))&&b.writeBool(5,c);(c=kg(a,6))&&b.writeBool(6,c)};
St.prototype.setParentAlbumKey=function(a){return rg(this,1,a)};
St.prototype.getViewMode=function(){return D(this,3,0)};
St.prototype.setViewMode=function(a){sg(this,3,a)};
St.prototype.setQueryText=function(a){return rg(this,4,a)};var Vt=function(a){eg(this,a,0,null,null)};
t(Vt,$f);Vt.prototype.toObject=function(a){return Wt(a,this)};
var Wt=function(a,b){var c={themeSourceId:D(b,1,0)};a&&(c.$jspbMessageInstance=b);return c};
Vt.prototype.serializeBinary=function(){var a=new Hf;Xt(this,a);return Nf(a)};
var Xt=function(a,b){a=D(a,1,0);0!==a&&b.writeEnum(1,a)};
Vt.prototype.setThemeSourceId=function(a){return sg(this,1,a)};var Yt=function(a){eg(this,a,0,null,null)};
t(Yt,$f);Yt.prototype.toObject=function(a){return Zt(a,this)};
var Zt=function(a,b){var c={mode:D(b,1,0)};a&&(c.$jspbMessageInstance=b);return c};
Yt.prototype.serializeBinary=function(){var a=new Hf;$t(this,a);return Nf(a)};
var $t=function(a,b){a=D(a,1,0);0!==a&&b.writeEnum(1,a)};
Yt.prototype.setMode=function(a){return sg(this,1,a)};var au=function(a){eg(this,a,0,null,null)};
t(au,$f);au.prototype.toObject=function(a){return bu(a,this)};
var bu=function(a,b){var c={query:D(b,1,""),usageRights:D(b,2,0),disableSafeSearchMode:kg(b,3),viewMode:D(b,4,0)};a&&(c.$jspbMessageInstance=b);return c};
au.prototype.serializeBinary=function(){var a=new Hf;cu(this,a);return Nf(a)};
var cu=function(a,b){var c=a.getQuery();0<c.length&&b.writeString(1,c);c=D(a,2,0);0!==c&&b.writeEnum(2,c);(c=kg(a,3))&&b.writeBool(3,c);c=a.getViewMode();0!==c&&b.writeEnum(4,c)};
f=au.prototype;f.getQuery=function(){return D(this,1,"")};
f.setQuery=function(a){return rg(this,1,a)};
f.setUsageRights=function(a){return sg(this,2,a)};
f.setDisableSafeSearchMode=function(a){return qg(this,3,a)};
f.getViewMode=function(){return D(this,4,0)};
f.setViewMode=function(a){sg(this,4,a)};var du=function(a){eg(this,a,0,null,null)};
t(du,$f);du.prototype.toObject=function(a){return eu(a,this)};
var eu=function(a,b){var c={viewMode:D(b,1,0),query:D(b,2,"")};a&&(c.$jspbMessageInstance=b);return c};
du.prototype.serializeBinary=function(){var a=new Hf;fu(this,a);return Nf(a)};
var fu=function(a,b){var c=a.getViewMode();0!==c&&b.writeEnum(1,c);c=a.getQuery();0<c.length&&b.writeString(2,c)};
du.prototype.getViewMode=function(){return D(this,1,0)};
du.prototype.setViewMode=function(a){sg(this,1,a)};
du.prototype.getQuery=function(){return D(this,2,"")};
du.prototype.setQuery=function(a){return rg(this,2,a)};var gu=function(a){eg(this,a,0,Bea,null)};
t(gu,$f);var Bea=[14];gu.prototype.toObject=function(a){return hu(a,this)};
var hu=function(a,b){var c,d={sourceId:D(b,1,0),name:D(b,8,""),driveSourceOptions:(c=E(b,Jt,3))&&Kt(a,c),calendarSourceOptions:(c=E(b,tt,4))&&ut(a,c),webSourceOptions:(c=E(b,au,5))&&bu(a,c),photosSourceOptions:(c=E(b,St,6))&&Tt(a,c),themesSourceOptions:(c=E(b,Vt,7))&&Wt(a,c),youtubeSourceOptions:(c=E(b,du,9))&&eu(a,c),uploadSourceOptions:(c=b.getUploadSourceOptions())&&xt(a,c),driveUploadSourceOptions:(c=E(b,Mt,11))&&Nt(a,c),contactsSourceOptions:(c=E(b,Dt,12))&&Et(a,c),partySourceOptions:(c=E(b,
Pt,13))&&Qt(a,c),urlSourceOptions:(c=E(b,Yt,15))&&Zt(a,c),cameraSourceOptions:(c=E(b,At,16))&&Bt(a,c),childSourceList:fg(wg(b,gu,14),hu,a)};a&&(d.$jspbMessageInstance=b);return d};
gu.prototype.serializeBinary=function(){var a=new Hf;iu(this,a);return Nf(a)};
var iu=function(a,b){var c=a.getSourceId();0!==c&&b.writeEnum(1,c);c=a.getName();0<c.length&&b.writeString(8,c);c=E(a,Jt,3);null!=c&&Rf(b,3,c,Lt);c=E(a,tt,4);null!=c&&Rf(b,4,c,vt);c=E(a,au,5);null!=c&&Rf(b,5,c,cu);c=E(a,St,6);null!=c&&Rf(b,6,c,Ut);c=E(a,Vt,7);null!=c&&Rf(b,7,c,Xt);c=E(a,du,9);null!=c&&Rf(b,9,c,fu);c=a.getUploadSourceOptions();null!=c&&Rf(b,10,c,zt);c=E(a,Mt,11);null!=c&&Rf(b,11,c,Ot);c=E(a,Dt,12);null!=c&&Rf(b,12,c,Ft);c=E(a,Pt,13);null!=c&&Rf(b,13,c,Rt);c=E(a,Yt,15);null!=c&&Rf(b,
15,c,$t);c=E(a,At,16);null!=c&&Rf(b,16,c,Ct);c=wg(a,gu,14);0<c.length&&Tf(b,14,c,iu)};
f=gu.prototype;f.getSourceId=function(){return D(this,1,0)};
f.setSourceId=function(a){return sg(this,1,a)};
f.getName=function(){return D(this,8,"")};
f.setName=function(a){return rg(this,8,a)};
f.clearDriveSourceOptions=function(){return xg(this,3,void 0)};
f.hasDriveSourceOptions=function(){return null!=C(this,3)};
f.clearCalendarSourceOptions=function(){return xg(this,4,void 0)};
f.hasCalendarSourceOptions=function(){return null!=C(this,4)};
f.clearWebSourceOptions=function(){return xg(this,5,void 0)};
f.hasWebSourceOptions=function(){return null!=C(this,5)};
f.clearPhotosSourceOptions=function(){return xg(this,6,void 0)};
f.hasPhotosSourceOptions=function(){return null!=C(this,6)};
f.clearThemesSourceOptions=function(){return xg(this,7,void 0)};
f.hasThemesSourceOptions=function(){return null!=C(this,7)};
f.clearYoutubeSourceOptions=function(){return xg(this,9,void 0)};
f.hasYoutubeSourceOptions=function(){return null!=C(this,9)};
f.getUploadSourceOptions=function(){return E(this,wt,10)};
f.setUploadSourceOptions=function(a){return xg(this,10,a)};
f.clearUploadSourceOptions=function(){return this.setUploadSourceOptions(void 0)};
f.hasUploadSourceOptions=function(){return null!=C(this,10)};
f.clearDriveUploadSourceOptions=function(){return xg(this,11,void 0)};
f.hasDriveUploadSourceOptions=function(){return null!=C(this,11)};
f.clearContactsSourceOptions=function(){return xg(this,12,void 0)};
f.hasContactsSourceOptions=function(){return null!=C(this,12)};
f.clearPartySourceOptions=function(){return xg(this,13,void 0)};
f.hasPartySourceOptions=function(){return null!=C(this,13)};
f.clearUrlSourceOptions=function(){return xg(this,15,void 0)};
f.hasUrlSourceOptions=function(){return null!=C(this,15)};
f.clearCameraSourceOptions=function(){return xg(this,16,void 0)};
f.hasCameraSourceOptions=function(){return null!=C(this,16)};
f.addChildSource=function(a,b){return Ag(this,14,a,gu,b)};
f.clearChildSourceList=function(){return zg(this,14,[])};var ju=function(a){eg(this,a,0,Cea,null)};
t(ju,$f);var Cea=[1];f=ju.prototype;f.toObject=function(a){var b={sourceList:fg(this.getSourceList(),hu,a)};a&&(b.$jspbMessageInstance=this);return b};
f.serializeBinary=function(){var a=new Hf;var b=this.getSourceList();0<b.length&&Tf(a,1,b,iu);return Nf(a)};
f.getSourceList=function(){return wg(this,gu,1)};
f.setSourceList=function(a){return zg(this,1,a)};
f.addSource=function(a){Ag(this,1,a,gu,void 0)};
f.clearSourceList=function(){return this.setSourceList([])};var ku=function(a){eg(this,a,0,Dea,null)};
t(ku,$f);var Dea=[3,7];f=ku.prototype;f.toObject=function(a){var b,c={command:D(this,1,0),source:(b=this.getSource())&&hu(a,b),itemIdList:fg(wg(this,vr,3),wr,a),correlationId:D(this,4,""),visible:kg(this,5),cssVisibilityChanged:kg(this,6),itemList:fg(this.getItemList(),Fs,a)};a&&(c.$jspbMessageInstance=this);return c};
f.serializeBinary=function(){var a=new Hf;var b=D(this,1,0);0!==b&&a.writeEnum(1,b);b=this.getSource();null!=b&&Rf(a,2,b,iu);b=wg(this,vr,3);0<b.length&&Tf(a,3,b,xr);b=this.getCorrelationId();0<b.length&&a.writeString(4,b);(b=kg(this,5))&&a.writeBool(5,b);(b=kg(this,6))&&a.writeBool(6,b);b=this.getItemList();0<b.length&&Tf(a,7,b,Hs);return Nf(a)};
f.setCommand=function(a){return sg(this,1,a)};
f.getSource=function(){return E(this,gu,2)};
f.setSource=function(a){return xg(this,2,a)};
f.clearSource=function(){return this.setSource(void 0)};
f.hasSource=function(){return null!=C(this,2)};
f.addItemId=function(a,b){return Ag(this,3,a,vr,b)};
f.clearItemIdList=function(){return zg(this,3,[])};
f.getCorrelationId=function(){return D(this,4,"")};
f.setCorrelationId=function(a){return rg(this,4,a)};
f.setVisible=function(a){return qg(this,5,a)};
f.setCssVisibilityChanged=function(a){return qg(this,6,a)};
f.getItemList=function(){return wg(this,zs,7)};
f.setItemList=function(a){return zg(this,7,a)};
f.addItem=function(a){Ag(this,7,a,zs,void 0)};
f.clearItemList=function(){return this.setItemList([])};var lu=function(a){eg(this,a,0,Eea,null)};
t(lu,$f);var Eea=[4];f=lu.prototype;f.toObject=function(a){var b,c={command:D(this,1,0),pickerResult:(b=E(this,qt,2))&&rt(a,b),correlationId:D(this,3,""),itemList:fg(this.getItemList(),Fs,a),previewData:(b=E(this,nt,5))&&ot(a,b),latencyData:(b=E(this,kt,6))&<(a,b)};a&&(c.$jspbMessageInstance=this);return c};
f.serializeBinary=function(){var a=new Hf;var b=D(this,1,0);0!==b&&a.writeEnum(1,b);b=E(this,qt,2);null!=b&&Rf(a,2,b,st);b=this.getCorrelationId();0<b.length&&a.writeString(3,b);b=this.getItemList();0<b.length&&Tf(a,4,b,Hs);b=E(this,nt,5);null!=b&&Rf(a,5,b,pt);b=E(this,kt,6);null!=b&&Rf(a,6,b,mt);return Nf(a)};
f.getCommand=function(){return D(this,1,0)};
f.setCommand=function(a){return sg(this,1,a)};
f.clearPickerResult=function(){return xg(this,2,void 0)};
f.hasPickerResult=function(){return null!=C(this,2)};
f.getCorrelationId=function(){return D(this,3,"")};
f.setCorrelationId=function(a){return rg(this,3,a)};
f.getItemList=function(){return wg(this,zs,4)};
f.setItemList=function(a){return zg(this,4,a)};
f.addItem=function(a){Ag(this,4,a,zs,void 0)};
f.clearItemList=function(){return this.setItemList([])};
f.clearPreviewData=function(){return xg(this,5,void 0)};
f.hasPreviewData=function(){return null!=C(this,5)};
f.clearLatencyData=function(){return xg(this,6,void 0)};
f.hasLatencyData=function(){return null!=C(this,6)};var mu=function(a){eg(this,a,"ireq",Fea,null)};
t(mu,$f);var Fea=[2];mu.prototype.toObject=function(a){var b,c={config:(b=this.getConfig())&&ht(a,b),sourceList:fg(this.getSourceList(),hu,a)};a&&(c.$jspbMessageInstance=this);return c};
mu.prototype.serializeBinary=function(){var a=new Hf;var b=this.getConfig();null!=b&&Rf(a,1,b,it);b=this.getSourceList();0<b.length&&Tf(a,2,b,iu);return Nf(a)};
mu.messageId="ireq";f=mu.prototype;f.getConfig=function(){return E(this,gt,1)};
f.setConfig=function(a){return xg(this,1,a)};
f.clearConfig=function(){return this.setConfig(void 0)};
f.hasConfig=function(){return null!=C(this,1)};
f.getSourceList=function(){return wg(this,gu,2)};
f.setSourceList=function(a){return zg(this,2,a)};
f.addSource=function(a){Ag(this,2,a,gu,void 0)};
f.clearSourceList=function(){return this.setSourceList([])};var nu=function(a,b){this.bcError_=a;this.lastHttpStatusCode_=b};
nu.prototype.getBrowserChannelErrorCode=function(){return this.bcError_};
nu.prototype.getLastHttpStatusCode=function(){return this.lastHttpStatusCode_};var ou=function(a,b,c){this.messageType_=a;this.name_=b.name||null;this.fullName_=b.fullName||null;this.containingType_=b.containingType;this.fields_={};for(a=0;a<c.length;a++)b=c[a],this.fields_[b.tag_]=b};
ou.prototype.getName=function(){return this.name_};
ou.prototype.getFullName=function(){return this.fullName_};
ou.prototype.getContainingType=function(){return this.containingType_?this.containingType_.getDescriptor():null};
ou.prototype.getFields=function(){var a=u.getValues(this.fields_);Hb(a,function(b,c){return b.tag_-c.tag_});
return a};
var pu=function(a,b){return u.findValue(a.fields_,function(c){return c.getName()==b})||null};var qu=function(a,b,c){this.parent_=a;this.tag_=b;this.name_=c.name;this.isPacked_=!!c.packed;this.isRepeated_=!!c.repeated;this.isRequired_=!!c.required;this.fieldType_=c.fieldType;this.nativeType_=c.type;this.deserializationConversionPermitted_=!1;switch(this.fieldType_){case 3:case 4:case 6:case 16:case 18:case 2:case 1:this.deserializationConversionPermitted_=!0;}this.defaultValue_=c.defaultValue};
qu.prototype.getContainingType=function(){return this.parent_.prototype.getDescriptor()};
qu.prototype.getName=function(){return this.name_};
var ru=function(a){return 11==a.fieldType_||10==a.fieldType_};
qu.prototype.isPacked=function(){return this.isPacked_};
qu.prototype.isRepeated=function(){return this.isRepeated_};
qu.prototype.isRequired=function(){return this.isRequired_};
qu.prototype.isOptional=function(){return!this.isRepeated_&&!this.isRequired_};var J=function(){this.values_={};this.fields_=this.getDescriptor().fields_;this.deserializedFields_=this.lazyDeserializer_=null};
J.prototype.initializeForLazyDeserializer=function(a,b){this.lazyDeserializer_=a;this.values_=b;this.deserializedFields_={}};
var su=function(a,b,c){c=c||a;for(var d in a.values_){var e=Number(d);a.fields_[e]||b.call(c,e,a.values_[d])}};
f=J.prototype;f.has=function(a){return K(this,a.tag_)};
f.arrayOf=function(a){return tu(this,a.tag_)};
f.get=function(a,b){return L(this,a.tag_,b)};
f.getOrDefault=function(a,b){return M(this,a.tag_,b)};
f.set=function(a,b){N(this,a.tag_,b)};
f.add=function(a,b){uu(this,a.tag_,b)};
f.clear=function(a){O(this,a.tag_)};
f.equals=function(a){if(!a||this.constructor!=a.constructor)return!1;for(var b=this.getDescriptor().getFields(),c=0;c<b.length;c++){var d=b[c],e=d.tag_;if(K(this,e)!=K(a,e))return!1;if(K(this,e)){var g=ru(d),h=vu(this,e);e=vu(a,e);if(d.isRepeated()){if(h.length!=e.length)return!1;for(d=0;d<h.length;d++){var m=h[d],n=e[d];if(g?!m.equals(n):m!=n)return!1}}else if(g?!h.equals(e):h!=e)return!1}}return!0};
f.copyFrom=function(a){this!=a&&(this.values_={},this.deserializedFields_&&(this.deserializedFields_={}),wu(this,a))};
var wu=function(a,b){for(var c=a.getDescriptor().getFields(),d=0;d<c.length;d++){var e=c[d],g=e.tag_;if(K(b,g)){a.deserializedFields_&&delete a.deserializedFields_[e.tag_];var h=ru(e);if(e.isRepeated()){e=tu(b,g);for(var m=0;m<e.length;m++)uu(a,g,h?e[m].clone():e[m])}else e=vu(b,g),h?(h=vu(a,g))?wu(h,e):N(a,g,e.clone()):N(a,g,e)}}};
J.prototype.clone=function(){var a=new this.constructor;a.copyFrom(this);return a};
var K=function(a,b){return null!=a.values_[b]},vu=function(a,b){var c=a.values_[b];
return null==c?null:a.lazyDeserializer_?b in a.deserializedFields_?a.deserializedFields_[b]:(c=a.lazyDeserializer_.deserializeField(a,a.fields_[b],c),a.deserializedFields_[b]=c):c},L=function(a,b,c){var d=vu(a,b);
return a.fields_[b].isRepeated()?d[c||0]:d},M=function(a,b,c){if(K(a,b))a=L(a,b,c);else
a:{a=a.fields_[b];if(void 0===a.defaultValue_)if(b=a.nativeType_,b===Boolean)a.defaultValue_=!1;else if(b===Number)a.defaultValue_=0;else if(b===String)a.defaultValue_=a.deserializationConversionPermitted_?"0":"";else{a=new b;break a}a=a.defaultValue_}return a},tu=function(a,b){return vu(a,b)||[]},Q=function(a,b){return a.fields_[b].isRepeated()?K(a,b)?a.values_[b].length:0:K(a,b)?1:0},N=function(a,b,c){a.values_[b]=c;
a.deserializedFields_&&(a.deserializedFields_[b]=c)},uu=function(a,b,c){a.values_[b]||(a.values_[b]=[]);
a.values_[b].push(c);a.deserializedFields_&&delete a.deserializedFields_[b]};
J.prototype.checkFieldType_=function(){};
var O=function(a,b){delete a.values_[b];a.deserializedFields_&&delete a.deserializedFields_[b]},xu=function(a,b){var c=[],d=b[0],e;
for(e in b)0!=e&&c.push(new qu(a,e,b[e]));return new ou(a,d,c)};var yu=function(){J.call(this)};
t(yu,J);var zu=null;f=yu.prototype;f.getAuthuser=function(){return L(this,1)};
f.getAuthuserOrDefault=function(){return M(this,1)};
f.setAuthuser=function(a){N(this,1,a)};
f.hasAuthuser=function(){return K(this,1)};
f.authuserCount=function(){return Q(this,1)};
f.clearAuthuser=function(){O(this,1)};
f.getClientType=function(){return L(this,2)};
f.getClientTypeOrDefault=function(){return M(this,2)};
f.setClientType=function(a){N(this,2,a)};
f.hasClientType=function(){return K(this,2)};
f.clientTypeCount=function(){return Q(this,2)};
f.clearClientType=function(){O(this,2)};
f.getInitDelayMs=function(){return L(this,3)};
f.hasInitDelayMs=function(){return K(this,3)};
f.initDelayMsCount=function(){return Q(this,3)};
f.clearInitDelayMs=function(){O(this,3)};
f.getServiceOverrideOrDefault=function(){return M(this,4)};
f.serviceOverrideCount=function(){return Q(this,4)};
f.clearServiceOverride=function(){O(this,4)};
f.getGapiSrcOrDefault=function(){return M(this,5)};
f.setGapiSrc=function(a){N(this,5,a)};
f.hasGapiSrc=function(){return K(this,5)};
f.gapiSrcCount=function(){return Q(this,5)};
f.clearGapiSrc=function(){O(this,5)};
f.getPropertyIdOrDefault=function(){return M(this,6)};
f.setPropertyId=function(a){N(this,6,a)};
f.propertyIdCount=function(){return Q(this,6)};
f.clearPropertyId=function(){O(this,6)};
f.getApplicationVersionOrDefault=function(){return M(this,7)};
f.setApplicationVersion=function(a){N(this,7,a)};
f.applicationVersionCount=function(){return Q(this,7)};
f.clearApplicationVersion=function(){O(this,7)};
f.getRetryOnAuthErrorOrDefault=function(){return M(this,8)};
f.setRetryOnAuthError=function(a){N(this,8,a)};
f.hasRetryOnAuthError=function(){return K(this,8)};
f.retryOnAuthErrorCount=function(){return Q(this,8)};
f.clearRetryOnAuthError=function(){O(this,8)};
f.getGsidServletPathOrDefault=function(){return M(this,9)};
f.setGsidServletPath=function(a){N(this,9,a)};
f.hasGsidServletPath=function(){return K(this,9)};
f.gsidServletPathCount=function(){return Q(this,9)};
f.clearGsidServletPath=function(){O(this,9)};
f.getPageId=function(){return L(this,10)};
f.getPageIdOrDefault=function(){return M(this,10)};
f.setPageId=function(a){N(this,10,a)};
f.pageIdCount=function(){return Q(this,10)};
f.clearPageId=function(){O(this,10)};
f.getInitialRetryDelayMs=function(){return L(this,11)};
f.setInitialRetryDelayMs=function(a){N(this,11,a)};
f.hasInitialRetryDelayMs=function(){return K(this,11)};
f.initialRetryDelayMsCount=function(){return Q(this,11)};
f.clearInitialRetryDelayMs=function(){O(this,11)};
f.getMaxBackoffFactor=function(){return L(this,12)};
f.setMaxBackoffFactor=function(a){N(this,12,a)};
f.hasMaxBackoffFactor=function(){return K(this,12)};
f.maxBackoffFactorCount=function(){return Q(this,12)};
f.clearMaxBackoffFactor=function(){O(this,12)};
f.getUseSharedChannelOrDefault=function(){return M(this,13)};
f.setUseSharedChannel=function(a){N(this,13,a)};
f.hasUseSharedChannel=function(){return K(this,13)};
f.useSharedChannelCount=function(){return Q(this,13)};
f.clearUseSharedChannel=function(){O(this,13)};
f.getStableConnectionThresholdMs=function(){return L(this,14)};
f.setStableConnectionThresholdMs=function(a){N(this,14,a)};
f.hasStableConnectionThresholdMs=function(){return K(this,14)};
f.stableConnectionThresholdMsCount=function(){return Q(this,14)};
f.clearStableConnectionThresholdMs=function(){O(this,14)};
var Au=function(){J.call(this)};
t(Au,J);var Bu=null;f=Au.prototype;f.getOrigin=function(){return L(this,1)};
f.getOriginOrDefault=function(){return M(this,1)};
f.setOrigin=function(a){N(this,1,a)};
f.hasOrigin=function(){return K(this,1)};
f.originCount=function(){return Q(this,1)};
f.clearOrigin=function(){O(this,1)};
f.getScheme=function(){return L(this,2)};
f.getSchemeOrDefault=function(){return M(this,2)};
f.setScheme=function(a){N(this,2,a)};
f.hasScheme=function(){return K(this,2)};
f.schemeCount=function(){return Q(this,2)};
f.clearScheme=function(){O(this,2)};
f.getToken=function(){return L(this,3)};
f.getTokenOrDefault=function(){return M(this,3)};
f.tokenCount=function(){return Q(this,3)};
f.clearToken=function(){O(this,3)};
f.getAuthuser=function(){return L(this,4)};
f.getAuthuserOrDefault=function(){return M(this,4)};
f.setAuthuser=function(a){N(this,4,a)};
f.hasAuthuser=function(){return K(this,4)};
f.authuserCount=function(){return Q(this,4)};
f.clearAuthuser=function(){O(this,4)};
yu.prototype.getDescriptor=function(){var a=zu;a||(zu=a=xu(yu,{0:{name:"BrowserChannelConfig",fullName:"buzz.channel.proto.BrowserChannelConfig"},1:{name:"authuser",fieldType:4,type:Number},2:{name:"client_type",fieldType:9,type:String},3:{name:"init_delay_ms",fieldType:5,type:Number},4:{name:"service_override",fieldType:9,type:String},5:{name:"gapi_src",fieldType:9,type:String},6:{name:"property_id",fieldType:9,type:String},7:{name:"application_version",fieldType:9,type:String},8:{name:"retry_on_auth_error",
fieldType:8,type:Boolean},9:{name:"gsid_servlet_path",fieldType:9,type:String},10:{name:"page_id",fieldType:9,type:String},11:{name:"initial_retry_delay_ms",fieldType:5,defaultValue:1E4,type:Number},12:{name:"max_backoff_factor",fieldType:5,defaultValue:180,type:Number},13:{name:"use_shared_channel",fieldType:8,type:Boolean},14:{name:"stable_connection_threshold_ms",fieldType:5,defaultValue:3E5,type:Number}}));return a};
yu.getDescriptor=yu.prototype.getDescriptor;Au.prototype.getDescriptor=function(){var a=Bu;a||(Bu=a=xu(Au,{0:{name:"AuthenticationParameters",fullName:"buzz.channel.proto.AuthenticationParameters"},1:{name:"origin",fieldType:9,type:String},2:{name:"scheme",fieldType:5,type:Number},3:{name:"token",fieldType:9,type:String},4:{name:"authuser",fieldType:13,type:Number}}));return a};
Au.getDescriptor=Au.prototype.getDescriptor;var Cu={APISIDHASH:1,SAPISIDHASH:2,OAuth:3},Gea={1:"APISIDHASH",2:"SAPISIDHASH",3:"OAuth"};var Du=function(a){return a.getCount&&"function"==typeof a.getCount?a.getCount():Xa(a)||Ka(a)?a.length:u.getCount(a)},Eu=function(a){if(a.getValues&&"function"==typeof a.getValues)return a.getValues();
if(Ka(a))return a.split("");if(Xa(a)){for(var b=[],c=a.length,d=0;d<c;d++)b.push(a[d]);return b}return u.getValues(a)},Fu=function(a){if(a.getKeys&&"function"==typeof a.getKeys)return a.getKeys();
if(!a.getValues||"function"!=typeof a.getValues){if(Xa(a)||Ka(a)){var b=[];a=a.length;for(var c=0;c<a;c++)b.push(c);return b}return u.getKeys(a)}},Gu=function(a,b,c){if(a.forEach&&"function"==typeof a.forEach)a.forEach(b,c);else
if(Xa(a)||Ka(a))mb(a,b,c);else for(var d=Fu(a),e=Eu(a),g=e.length,h=0;h<g;h++)b.call(c,e[h],d&&d[h],a)},Hu=function(a,b,c){if("function"==typeof a.every)return a.every(b,c);
if(Xa(a)||Ka(a))return sb(a,b,c);for(var d=Fu(a),e=Eu(a),g=e.length,h=0;h<g;h++)if(!b.call(c,e[h],d&&d[h],a))return!1;return!0};var Iu=function(a){this.map_=new Ak;a&&this.addAll(a)},Ju=function(a){var b=typeof a;
return"object"==b&&a||"function"==b?"o"+bb(a):b.substr(0,1)+a};
f=Iu.prototype;f.getCount=function(){return this.map_.getCount()};
f.add=function(a){this.map_.set(Ju(a),a)};
f.addAll=function(a){a=Eu(a);for(var b=a.length,c=0;c<b;c++)this.add(a[c])};
f.removeAll=function(a){a=Eu(a);for(var b=a.length,c=0;c<b;c++)this.remove(a[c])};
f.remove=function(a){return this.map_.remove(Ju(a))};
f.clear=function(){this.map_.clear()};
f.isEmpty=function(){return this.map_.isEmpty()};
f.contains=function(a){return this.map_.containsKey(Ju(a))};
f.containsAll=function(a){return Hu(a,this.contains,this)};
f.intersection=function(a){var b=new Iu;a=Eu(a);for(var c=0;c<a.length;c++){var d=a[c];this.contains(d)&&b.add(d)}};
f.difference=function(a){var b=this.clone();b.removeAll(a);return b};
f.getValues=function(){return this.map_.getValues()};
f.clone=function(){return new Iu(this)};
f.equals=function(a){return this.getCount()==Du(a)&&Hea(this,a)};
var Hea=function(a,b){var c=Du(b);if(a.getCount()>c)return!1;!(b instanceof Iu)&&5<c&&(b=new Iu(b));return Hu(a,function(d){var e=b;return e.contains&&"function"==typeof e.contains?e.contains(d):e.containsValue&&"function"==typeof e.containsValue?e.containsValue(d):Xa(e)||Ka(e)?wb(e,d):u.containsValue(e,d)})};
Iu.prototype.__iterator__=function(){return this.map_.__iterator__(!1)};function Ku(a){var b={},c=a.getScheme();K(a,3)&&Iea.contains(c)&&(b.Authorization=Gea[c]+" "+a.getToken(),Lu.contains(c)&&(b["X-Origin"]=a.getOrigin(),b["X-Goog-AuthUser"]=a.getAuthuserOrDefault()));return b}
var Iea=new Iu([1,2,3]),Lu=new Iu([1,2]);var Mu=function(){var a=8;a=void 0===a?1:a;this.periodMs=3E5;this.max=8;this.lastAddedTimestampMs=fb();this.tokens=a};
Mu.prototype.update=function(){var a=fb();a=Math.floor((a-this.lastAddedTimestampMs)/this.periodMs);this.tokens=Math.min(this.tokens+a,this.max);this.lastAddedTimestampMs+=a*this.periodMs};var Nu=function(a,b,c){this.initialMaxDelayMs_=b;this.maxBackoffMultiplier_=c;this.random_=a;this.reset()};
Nu.prototype.reset=function(){this.currentMaxDelayMs_=this.initialMaxDelayMs_;this.inRetryMode_=!1};
var Ou=function(a){var b=0;if(a.inRetryMode_){b=Math.ceil(a.random_()*a.currentMaxDelayMs_);var c=a.initialMaxDelayMs_*a.maxBackoffMultiplier_;a.currentMaxDelayMs_<=c&&(a.currentMaxDelayMs_*=2,a.currentMaxDelayMs_>c&&(a.currentMaxDelayMs_=c))}a.inRetryMode_=!0;return b};var Qu=function(a,b){var c=Array.prototype.slice.call(arguments),d=c.shift();if("undefined"==typeof d)throw Error("[goog.string.format] Template required");return d.replace(/%([0\- \+]*)(\d+)?(\.(\d+))?([%sfdiu])/g,function(e,g,h,m,n,p,x,y){if("%"==p)return"%";var B=c.shift();if("undefined"==typeof B)throw Error("[goog.string.format] Not enough arguments");arguments[0]=B;return Pu[p].apply(null,arguments)})},Pu={s:function(a,b,c){return isNaN(c)||""==c||a.length>=Number(c)?a:a=-1<b.indexOf("-",0)?
a+vd(" ",Number(c)-a.length):vd(" ",Number(c)-a.length)+a},
f:function(a,b,c,d,e){d=a.toString();isNaN(e)||""==e||(d=parseFloat(a).toFixed(e));var g=0>Number(a)?"-":0<=b.indexOf("+")?"+":0<=b.indexOf(" ")?" ":"";0<=Number(a)&&(d=g+d);if(isNaN(c)||d.length>=Number(c))return d;d=isNaN(e)?Math.abs(Number(a)).toString():Math.abs(Number(a)).toFixed(e);a=Number(c)-d.length-g.length;0<=b.indexOf("-",0)?d=g+d+vd(" ",a):(b=0<=b.indexOf("0",0)?"0":" ",d=g+vd(b,a)+d);return d},
d:function(a,b,c,d,e,g,h,m){return Pu.f(parseInt(a,10),b,c,d,0,g,h,m)}};
Pu.i=Pu.d;Pu.u=Pu.d;var Ru=function(){this.logger_=null};
f=Ru.prototype;f.severe=function(a,b){Ha.log&&Ha.log.ENABLED&&Su(this,gb.Logger.Level.SEVERE,arguments)};
f.warning=function(a,b){Ha.log&&Ha.log.ENABLED&&Su(this,gb.Logger.Level.WARNING,arguments)};
f.info=function(a,b){Ha.log&&Ha.log.ENABLED&&Su(this,gb.Logger.Level.INFO,arguments)};
f.fine=function(a,b){Ha.log&&Ha.log.ENABLED&&Su(this,gb.Logger.Level.FINE,arguments)};
f.isLoggable=function(a){return null!=this.logger_&&Ha.log.ENABLED&&this.logger_.isLoggable(a)};
f.setLevel=function(){};
var Su=function(a,b,c){a.logger_&&a.logger_.isLoggable(b)&&Qu.apply(null,c)};var Tu=function(){};
Tu.prototype.getSerializedValue=function(a,b){return ru(a)?this.serialize(b):Ma(b)&&!isFinite(b)?b.toString():b};
Tu.prototype.deserialize=function(a,b){a=new a.messageType_;this.deserializeTo(a,b);return a};
Tu.prototype.getDeserializedValue=function(a,b){if(ru(a))return b instanceof J?b:this.deserialize(a.nativeType_.prototype.getDescriptor(),b);if(14==a.fieldType_)return Ka(b)&&Uu.test(b)&&(a=Number(b),0<a)?a:b;if(!a.deserializationConversionPermitted_)return b;a=a.nativeType_;if(a===String){if(Ma(b))return String(b)}else if(a===Number&&Ka(b)&&("Infinity"===b||"-Infinity"===b||"NaN"===b||Uu.test(b)))return Number(b);return b};
var Uu=/^-?[0-9]+$/;var Vu=function(a,b){this.keyOption_=a;this.serializeBooleanAsNumber_=b};
t(Vu,Tu);Vu.prototype.serialize=function(a){for(var b=a.getDescriptor().getFields(),c={},d=0;d<b.length;d++){var e=b[d],g=e.tag_;switch(this.keyOption_){case 1:g=e.getName();break;case 2:g=Cd(e.getName().replace(/_/g,"-"));}if(a.has(e))if(e.isRepeated()){var h=[];c[g]=h;for(g=0;g<Q(a,e.tag_);g++)h.push(this.getSerializedValue(e,a.get(e,g)))}else c[g]=this.getSerializedValue(e,a.get(e))}su(a,function(m,n){c[m]=n});
return c};
Vu.prototype.getSerializedValue=function(a,b){return this.serializeBooleanAsNumber_&&8==a.fieldType_&&La(b)?b?1:0:Vu.superClass_.getSerializedValue.call(this,a,b)};
Vu.prototype.getDeserializedValue=function(a,b){return 8==a.fieldType_&&Ma(b)?!!b:Vu.superClass_.getDeserializedValue.call(this,a,b)};
Vu.prototype.deserializeTo=function(a,b){var c=a.getDescriptor(),d;for(d in b){var e=b[d],g=!/[^0-9]/.test(d);if(g)var h=c.fields_[parseInt(d,10)]||null;else 2==this.keyOption_&&(d=Dd(d).replace(/\-/g,"_")),h=pu(c,d);if(h){if(h.isRepeated())for(g=0;g<e.length;g++)a.add(h,this.getDeserializedValue(h,e[g]));else a.set(h,this.getDeserializedValue(h,e));}else g&&(h=a,g=Number(d),h.values_[g]=e,h.deserializedFields_&&delete h.deserializedFields_[g])}};var Wu=function(a,b){this.ignoreMissingFields_=!!a;this.useEnumValues_=!!b};
t(Wu,Tu);Wu.prototype.deserializeTo=function(a,b){var c=new Xu;c.parse(a,b.toString(),this.ignoreMissingFields_)||c.getError()};
Wu.prototype.serialize=function(a){var b=new Yu;Zu(this,a,b);return b.toString()};
var Zu=function(a,b,c){var d=b.getDescriptor().getFields();mb(d,function(e){if(b.has(e))for(var g=Q(b,e.tag_),h=0;h<g;++h){c.append(e.getName());11==e.fieldType_||10==e.fieldType_?(c.append(" {"),$u(c),c.indentation_+=2):c.append(": ");Jea(this,b.get(e,h),e,c);if(11==e.fieldType_||10==e.fieldType_)c.indentation_-=2,c.append("}");$u(c)}},a);
su(b,function(e,g){av(this,e,g,c)},a)},av=function(a,b,c,d){if(null!=c)if(Wa(c))mb(c,function(g){av(this,b,g,d)},a);else
{if($a(c)){d.append(b);d.append(" {");$u(d);d.indentation_+=2;if(c instanceof J)Zu(a,c,d);else for(var e in c)av(a,Ed(e),c[e],d);d.indentation_-=2;d.append("}")}else Ka(c)&&(c=td(c)),d.append(b),d.append(": "),d.append(c.toString());$u(d)}},Jea=function(a,b,c,d){switch(c.fieldType_){case 1:case 2:case 3:case 4:case 5:case 13:case 6:case 7:case 8:case 15:case 16:case 17:case 18:d.append(b);
break;case 12:case 9:b=td(b.toString());d.append(b);break;case 14:if(!a.useEnumValues_){var e=!1;u.forEach(c.nativeType_,function(g,h){e||g!=b||(d.append(h),e=!0)})}e&&!a.useEnumValues_||d.append(b.toString());
break;case 10:case 11:Zu(a,b,d);}},Yu=function(){this.indentation_=0;
this.buffer_=[];this.requiresIndentation_=!0};
Yu.prototype.toString=function(){return this.buffer_.join("")};
Yu.prototype.append=function(a){if(this.requiresIndentation_){for(var b=0;b<this.indentation_;++b)this.buffer_.push(" ");this.requiresIndentation_=!1}this.buffer_.push(a.toString())};
var $u=function(a){a.buffer_.push("\n");a.requiresIndentation_=!0},cv=function(a){this.ignoreComments_=this.ignoreWhitespace_=!0;
this.data_=a;this.index_=0;this.currentData_=a;this.current_={type:bv,value:null}},bv=/---end---/,dv=/^-?[a-zA-Z][a-zA-Z0-9_]*/,ev=/^(0x[0-9a-f]+)|(([-])?[0-9][0-9]*(\.?[0-9]+)?(e[+-]?[0-9]+|[f])?)/,fv=/^#.*/,gv=/^"([^"\\]|\\.)*"/,hv=/^\s/,Kea={END:bv,
IDENTIFIER:dv,NUMBER:ev,COMMENT:fv,OPEN_BRACE:/^{/,CLOSE_BRACE:/^}/,OPEN_TAG:/^</,CLOSE_TAG:/^>/,OPEN_LIST:/^\[/,CLOSE_LIST:/^\]/,STRING:gv,COLON:/^:/,COMMA:/^,/,SEMI:/^;/,WHITESPACE:hv};cv.prototype.next=function(){for(;Lea(this);){var a=this.current_.type;if(a!=hv&&a!=fv||a==hv&&!this.ignoreWhitespace_||a==fv&&!this.ignoreComments_)return!0}this.current_={type:bv,value:null};return!1};
var Lea=function(a){if(a.index_>=a.data_.length)return!1;var b=a.currentData_,c=null;u.some(Kea,function(d){if(c||d==bv)return!1;var e=d.exec(b);e&&0==e.index&&(c={type:d,value:e[0]});return!!c});
c&&(a.current_=c,a.index_+=c.value.length,a.currentData_=a.currentData_.substring(c.value.length));return!!c},Xu=function(){this.tokenizer_=this.error_=null;
this.ignoreMissingFields_=!1};
Xu.prototype.parse=function(a,b,c){this.error_=null;this.ignoreMissingFields_=!!c;this.tokenizer_=new cv(b);this.tokenizer_.next();return iv(this,a,"")};
Xu.prototype.getError=function(){return this.error_};
var iv=function(a,b,c){for(;">"!=a.tokenizer_.current_.value&&"}"!=a.tokenizer_.current_.value&&a.tokenizer_.current_.type!=bv;)if(!Mea(a,b))return!1;if(c){if(!jv(a,c))return!1}else a.tokenizer_.current_.type!=bv&&(a.error_="Expected END token");return!0},kv=function(a,b,c){a=Nea(a,c);
if(null===a)return!1;c.isRepeated()?b.add(c,a):b.set(c,a);return!0},lv=function(a){return pc(a,".")?parseFloat(a):Ed(a)},Nea=function(a,b){switch(b.fieldType_){case 1:case 2:if(b=mv(a,dv))if(b=/^-?inf(?:inity)?f?$/i.test(b)?Infinity*(ec(b,"-")?-1:1):/^nanf?$/i.test(b)?NaN:null,null!=b)return b;
case 5:case 13:case 7:case 15:case 17:return(a=mv(a,ev))?lv(a):null;case 3:case 4:case 6:case 16:case 18:return(a=mv(a,ev))?b.nativeType_==Number?lv(a):a:null;case 8:b=mv(a,dv);if(!b)return null;switch(b){case"true":return!0;case"false":return!1;default:return a.error_="Unknown type for bool: "+b,null;}case 14:if(a.tokenizer_.current_.type==ev)return(a=mv(a,ev))?lv(a):null;var c=mv(a,dv);if(!c)return null;b=b.nativeType_[c];return null==b?(a.error_="Unknown enum value: "+c,null):b;case 12:case 9:if(b=
mv(a,gv)){for(c=JSON.parse(b).toString();a.tokenizer_.current_.type==gv;)b=mv(a,gv),c+=JSON.parse(b).toString();a=c}else a=null;return a;}},Oea=function(a){nv(a,":");
if(nv(a,"[")){for(;;){a.tokenizer_.next();if(nv(a,"]"))break;if(!jv(a,","))return!1}return!0}if(nv(a,"<"))return iv(a,null,">");if(nv(a,"{"))return iv(a,null,"}");a.tokenizer_.next();return!0},Mea=function(a,b){var c=mv(a,dv);
if(!c)return a.error_="Missing field name",!1;var d=null;b&&(d=pu(b.getDescriptor(),c.toString()));if(null==d){if(a.ignoreMissingFields_)return Oea(a);a.error_="Unknown field: "+c;return!1}if(11==d.fieldType_||10==d.fieldType_){nv(a,":");a:{c=d;if(nv(a,"<"))d=">";else{if(!jv(a,"{")){b=!1;break a}d="}"}var e=new(c.nativeType_.prototype.getDescriptor().messageType_);iv(a,e,d)?(c.isRepeated()?b.add(c,e):b.set(c,e),b=!0):b=!1}if(!b)return!1}else{if(!jv(a,":"))return!1;if(d.isRepeated()&&nv(a,"["))for(;;){if(!kv(a,
b,d))return!1;if(nv(a,"]"))break;if(!jv(a,","))return!1}else if(!kv(a,b,d))return!1}nv(a,",")||nv(a,";");return!0},nv=function(a,b){return a.tokenizer_.current_.value==b?(a.tokenizer_.next(),!0):!1},mv=function(a,b){if(a.tokenizer_.current_.type!=b)return a.error_="Expected token type: "+b,null;
b=a.tokenizer_.current_.value;a.tokenizer_.next();return b},jv=function(a,b){return nv(a,b)?!0:(a.error_="Expected token \""+b+"\"",!1)};var ov=new Vu(0),Pea=new Vu(2),Qea=new Wu,pv=function(a){a=ov.serialize(a);return Gk(a)},qv=JSON.parse,rv=function(a,b){try{var c=qv(b)}catch(e){return null}try{var d=Pea.deserialize(a,c)}catch(e){return null}return null==d?null:d};
J.prototype.toString=function(){return Qea.serialize(this)};
var Rea=function(a){var b=bh(document,a);null==b&&(b=rh("DIV",{id:a,style:"display:none"}),dh(document,"body",void 0,void 0)[0].appendChild(b));return b};var Sea=!Ne||af(9),sv=!Ne||af(9),Tea=Ne&&!$e("9"),tv=!Re||$e("528"),Uea=Qe&&$e("1.9b")||Ne&&$e("8")||Me&&$e("9.5")||Re&&$e("528"),Vea=Qe&&!$e("8")||Ne&&!$e("9"),Wea=function(){if(!q.addEventListener||!Object.defineProperty)return!1;var a=!1,b=Object.defineProperty({},"passive",{get:function(){a=!0}});
try{q.addEventListener("test",Ta,b),q.removeEventListener("test",Ta,b)}catch(c){}return a}();var uv=function(a){this.id=a};
uv.prototype.toString=function(){return this.id};var vv=function(a,b){this.type=a instanceof uv?String(a):a;this.currentTarget=this.target=b;this.defaultPrevented=this.propagationStopped_=!1;this.returnValue_=!0};
vv.prototype.stopPropagation=function(){this.propagationStopped_=!0};
vv.prototype.preventDefault=function(){this.defaultPrevented=!0;this.returnValue_=!1};
var Xea=function(a){a.preventDefault()};var wv=function(a,b){vv.call(this,a?a.type:"");this.relatedTarget=this.currentTarget=this.target=null;this.button=this.screenY=this.screenX=this.clientY=this.clientX=this.offsetY=this.offsetX=0;this.key="";this.charCode=this.keyCode=0;this.metaKey=this.shiftKey=this.altKey=this.ctrlKey=!1;this.state=null;this.platformModifierKey=!1;this.pointerId=0;this.pointerType="";this.event_=null;a&&this.init(a,b)};
t(wv,vv);var Yea=[1,4,2],Zea={2:"touch",3:"pen",4:"mouse"};
wv.prototype.init=function(a,b){var c=this.type=a.type,d=a.changedTouches&&a.changedTouches.length?a.changedTouches[0]:null;this.target=a.target||a.srcElement;this.currentTarget=b;(b=a.relatedTarget)?Qe&&(Le(b,"nodeName")||(b=null)):"mouseover"==c?b=a.fromElement:"mouseout"==c&&(b=a.toElement);this.relatedTarget=b;d?(this.clientX=void 0!==d.clientX?d.clientX:d.pageX,this.clientY=void 0!==d.clientY?d.clientY:d.pageY,this.screenX=d.screenX||0,this.screenY=d.screenY||0):(this.offsetX=Re||void 0!==a.offsetX?
a.offsetX:a.layerX,this.offsetY=Re||void 0!==a.offsetY?a.offsetY:a.layerY,this.clientX=void 0!==a.clientX?a.clientX:a.pageX,this.clientY=void 0!==a.clientY?a.clientY:a.pageY,this.screenX=a.screenX||0,this.screenY=a.screenY||0);this.button=a.button;this.keyCode=a.keyCode||0;this.key=a.key||"";this.charCode=a.charCode||("keypress"==c?a.keyCode:0);this.ctrlKey=a.ctrlKey;this.altKey=a.altKey;this.shiftKey=a.shiftKey;this.metaKey=a.metaKey;this.platformModifierKey=Se?a.metaKey:a.ctrlKey;this.pointerId=
a.pointerId||0;this.pointerType=Ka(a.pointerType)?a.pointerType:Zea[a.pointerType]||"";this.state=a.state;this.event_=a;a.defaultPrevented&&this.preventDefault()};
wv.prototype.stopPropagation=function(){wv.superClass_.stopPropagation.call(this);this.event_.stopPropagation?this.event_.stopPropagation():this.event_.cancelBubble=!0};
wv.prototype.preventDefault=function(){wv.superClass_.preventDefault.call(this);var a=this.event_;if(a.preventDefault)a.preventDefault();else if(a.returnValue=!1,Tea)try{if(a.ctrlKey||112<=a.keyCode&&123>=a.keyCode)a.keyCode=-1}catch(b){}};var xv="closure_listenable_"+(1E6*Math.random()|0),yv=function(a){return!(!a||!a[xv])},$ea=0;var afa=function(a,b,c,d,e){this.listener=a;this.proxy=null;this.src=b;this.type=c;this.capture=!!d;this.handler=e;this.key=++$ea;this.removed=this.callOnce=!1},zv=function(a){a.removed=!0;
a.listener=null;a.proxy=null;a.src=null;a.handler=null};var Av=function(a){this.src=a;this.listeners={};this.typeCount_=0};
Av.prototype.getListenerCount=function(){var a=0,b;for(b in this.listeners)a+=this.listeners[b].length;return a};
Av.prototype.add=function(a,b,c,d,e){var g=a.toString();a=this.listeners[g];a||(a=this.listeners[g]=[],this.typeCount_++);var h=Bv(a,b,d,e);-1<h?(b=a[h],c||(b.callOnce=!1)):(b=new afa(b,this.src,g,!!d,e),b.callOnce=c,a.push(b));return b};
Av.prototype.remove=function(a,b,c,d){a=a.toString();if(!(a in this.listeners))return!1;var e=this.listeners[a];b=Bv(e,b,c,d);return-1<b?(zv(e[b]),yb(e,b),0==e.length&&(delete this.listeners[a],this.typeCount_--),!0):!1};
var Cv=function(a,b){var c=b.type;if(!(c in a.listeners))return!1;var d=zb(a.listeners[c],b);d&&(zv(b),0==a.listeners[c].length&&(delete a.listeners[c],a.typeCount_--));return d};
Av.prototype.removeAll=function(a){a=a&&a.toString();var b=0,c;for(c in this.listeners)if(!a||c==a){for(var d=this.listeners[c],e=0;e<d.length;e++)++b,zv(d[e]);delete this.listeners[c];this.typeCount_--}return b};
Av.prototype.getListeners=function(a,b){a=this.listeners[a.toString()];var c=[];if(a)for(var d=0;d<a.length;++d){var e=a[d];e.capture==b&&c.push(e)}return c};
Av.prototype.getListener=function(a,b,c,d){a=this.listeners[a.toString()];var e=-1;a&&(e=Bv(a,b,c,d));return-1<e?a[e]:null};
Av.prototype.hasListener=function(a,b){var c=Ia(a),d=c?a.toString():"",e=Ia(b);return u.some(this.listeners,function(g){for(var h=0;h<g.length;++h)if(!(c&&g[h].type!=d||e&&g[h].capture!=b))return!0;return!1})};
var Bv=function(a,b,c,d){for(var e=0;e<a.length;++e){var g=a[e];if(!g.removed&&g.listener==b&&g.capture==!!c&&g.handler==d)return e}return-1};var Dv="closure_lm_"+(1E6*Math.random()|0),Ev={},Fv=0,Hv=function(a,b,c,d,e){if(d&&d.once)return Gv(a,b,c,d,e);if(Wa(b)){for(var g=0;g<b.length;g++)Hv(a,b[g],c,d,e);return null}c=Iv(c);return yv(a)?a.listen(b,c,$a(d)?!!d.capture:!!d,e):Jv(a,b,c,!1,d,e)},Jv=function(a,b,c,d,e,g){if(!b)throw Error("Invalid event type");
var h=$a(e)?!!e.capture:!!e,m=Kv(a);m||(a[Dv]=m=new Av(a));c=m.add(b,c,d,h,g);if(c.proxy)return c;d=bfa();c.proxy=d;d.src=a;d.listener=c;if(a.addEventListener)Wea||(e=h),void 0===e&&(e=!1),a.addEventListener(b.toString(),d,e);else if(a.attachEvent)a.attachEvent(Lv(b.toString()),d);else if(a.addListener&&a.removeListener)a.addListener(d);else throw Error("addEventListener and attachEvent are unavailable.");Fv++;return c},bfa=function(){var a=cfa,b=sv?function(c){return a.call(b.src,b.listener,c)}:
function(c){c=a.call(b.src,b.listener,c);
if(!c)return c};
return b},Gv=function(a,b,c,d,e){if(Wa(b)){for(var g=0;g<b.length;g++)Gv(a,b[g],c,d,e);
return null}c=Iv(c);return yv(a)?a.listenOnce(b,c,$a(d)?!!d.capture:!!d,e):Jv(a,b,c,!0,d,e)},Mv=function(a,b,c,d,e){if(Wa(b))for(var g=0;g<b.length;g++)Mv(a,b[g],c,d,e);else
d=$a(d)?!!d.capture:!!d,c=Iv(c),yv(a)?a.unlisten(b,c,d,e):a&&(a=Kv(a))&&(b=a.getListener(b,c,d,e))&&Nv(b)},Nv=function(a){if(Ma(a)||!a||a.removed)return!1;
var b=a.src;if(yv(b))return Cv(b.eventTargetListeners_,a);var c=a.type,d=a.proxy;b.removeEventListener?b.removeEventListener(c,d,a.capture):b.detachEvent?b.detachEvent(Lv(c),d):b.addListener&&b.removeListener&&b.removeListener(d);Fv--;(c=Kv(b))?(Cv(c,a),0==c.typeCount_&&(c.src=null,b[Dv]=null)):zv(a);return!0},Ov=function(a,b,c,d,e){c=Iv(c);
d=!!d;return yv(a)?a.getListener(b,c,d,e):a?(a=Kv(a))?a.getListener(b,c,d,e):null:null},Lv=function(a){return a in Ev?Ev[a]:Ev[a]="on"+a},Qv=function(a,b,c,d){var e=!0;
if(a=Kv(a))if(b=a.listeners[b.toString()])for(b=b.concat(),a=0;a<b.length;a++){var g=b[a];g&&g.capture==c&&!g.removed&&(g=Pv(g,d),e=e&&!1!==g)}return e},Pv=function(a,b){var c=a.listener,d=a.handler||a.src;
a.callOnce&&Nv(a);return c.call(d,b)},cfa=function(a,b){if(a.removed)return!0;
if(!sv){var c=b||Sa("window.event");b=new wv(c,this);var d=!0;if(!(0>c.keyCode||void 0!=c.returnValue)){a:{var e=!1;if(0==c.keyCode)try{c.keyCode=-1;break a}catch(h){e=!0}if(e||void 0==c.returnValue)c.returnValue=!0}c=[];for(e=b.currentTarget;e;e=e.parentNode)c.push(e);a=a.type;for(e=c.length-1;!b.propagationStopped_&&0<=e;e--){b.currentTarget=c[e];var g=Qv(c[e],a,!0,b);d=d&&g}for(e=0;!b.propagationStopped_&&e<c.length;e++)b.currentTarget=c[e],g=Qv(c[e],a,!1,b),d=d&&g}return d}return Pv(a,new wv(b,
this))},Kv=function(a){a=a[Dv];
return a instanceof Av?a:null},Rv="__closure_events_fn_"+(1E9*Math.random()>>>0),Iv=function(a){if(Za(a))return a;
a[Rv]||(a[Rv]=function(b){return a.handleEvent(b)});
return a[Rv]};var Sv=function(a){lk.call(this);this.handler_=a;this.keys_={}};
t(Sv,lk);var Tv=[];Sv.prototype.listen=function(a,b,c,d){return Uv(this,a,b,c,d)};
Sv.prototype.listenWithScope=function(a,b,c,d,e){return Uv(this,a,b,c,d,e)};
var Uv=function(a,b,c,d,e,g){Wa(c)||(c&&(Tv[0]=c.toString()),c=Tv);for(var h=0;h<c.length;h++){var m=Hv(b,c[h],d||a.handleEvent,e||!1,g||a.handler_||a);if(!m)break;a.keys_[m.key]=m}return a};
Sv.prototype.listenOnce=function(a,b,c,d){return Vv(this,a,b,c,d)};
var Vv=function(a,b,c,d,e,g){if(Wa(c))for(var h=0;h<c.length;h++)Vv(a,b,c[h],d,e,g);else{b=Gv(b,c,d||a.handleEvent,e,g||a.handler_||a);if(!b)return a;a.keys_[b.key]=b}return a};
f=Sv.prototype;f.listenWithWrapper=function(a,b,c,d){b.listen(a,c,d,this.handler_||this,this);return this};
f.listenWithWrapperAndScope=function(a,b,c,d,e){b.listen(a,c,d,e||this.handler_||this,this);return this};
f.getListenerCount=function(){var a=0,b;for(b in this.keys_)Object.prototype.hasOwnProperty.call(this.keys_,b)&&a++;return a};
f.unlisten=function(a,b,c,d,e){if(Wa(b))for(var g=0;g<b.length;g++)this.unlisten(a,b[g],c,d,e);else if(a=Ov(a,b,c||this.handleEvent,$a(d)?!!d.capture:!!d,e||this.handler_||this))Nv(a),delete this.keys_[a.key];return this};
f.unlistenWithWrapper=function(a,b,c,d,e){b.unlisten(a,c,d,e||this.handler_||this,this);return this};
f.removeAll=function(){u.forEach(this.keys_,function(a,b){this.keys_.hasOwnProperty(b)&&Nv(a)},this);
this.keys_={}};
f.disposeInternal=function(){Sv.superClass_.disposeInternal.call(this);this.removeAll()};
f.handleEvent=function(){throw Error("EventHandler.handleEvent not implemented")};var Wv=function(){lk.call(this);this.eventTargetListeners_=new Av(this);this.actualEventTarget_=this;this.parentEventTarget_=null};
t(Wv,lk);Wv.prototype[xv]=!0;f=Wv.prototype;f.setParentEventTarget=function(a){this.parentEventTarget_=a};
f.addEventListener=function(a,b,c,d){Hv(this,a,b,c,d)};
f.removeEventListener=function(a,b,c,d){Mv(this,a,b,c,d)};
f.dispatchEvent=function(a){var b,c=this.parentEventTarget_;if(c)for(b=[];c;c=c.parentEventTarget_)b.push(c);c=this.actualEventTarget_;var d=a.type||a;if(Ka(a))a=new vv(a,c);else if(a instanceof vv)a.target=a.target||c;else{var e=a;a=new vv(d,c);u.extend(a,e)}e=!0;if(b)for(var g=b.length-1;!a.propagationStopped_&&0<=g;g--){var h=a.currentTarget=b[g];e=Xv(h,d,!0,a)&&e}a.propagationStopped_||(h=a.currentTarget=c,e=Xv(h,d,!0,a)&&e,a.propagationStopped_||(e=Xv(h,d,!1,a)&&e));if(b)for(g=0;!a.propagationStopped_&&
g<b.length;g++)h=a.currentTarget=b[g],e=Xv(h,d,!1,a)&&e;return e};
f.disposeInternal=function(){Wv.superClass_.disposeInternal.call(this);this.removeAllListeners();this.parentEventTarget_=null};
f.listen=function(a,b,c,d){return this.eventTargetListeners_.add(String(a),b,!1,c,d)};
f.listenOnce=function(a,b,c,d){return this.eventTargetListeners_.add(String(a),b,!0,c,d)};
f.unlisten=function(a,b,c,d){return this.eventTargetListeners_.remove(String(a),b,c,d)};
f.removeAllListeners=function(a){return this.eventTargetListeners_?this.eventTargetListeners_.removeAll(a):0};
var Xv=function(a,b,c,d){b=a.eventTargetListeners_.listeners[String(b)];if(!b)return!0;b=b.concat();for(var e=!0,g=0;g<b.length;++g){var h=b[g];if(h&&!h.removed&&h.capture==c){var m=h.listener,n=h.handler||h.src;h.callOnce&&Cv(a.eventTargetListeners_,h);e=!1!==m.call(n,d)&&e}}return e&&0!=d.returnValue_};
f=Wv.prototype;f.getListeners=function(a,b){return this.eventTargetListeners_.getListeners(String(a),b)};
f.getListener=function(a,b,c,d){return this.eventTargetListeners_.getListener(String(a),b,c,d)};
f.hasListener=function(a,b){return this.eventTargetListeners_.hasListener(Ia(a)?String(a):void 0,b)};
f.setTargetForTesting=function(a){this.actualEventTarget_=a};
f.assertInitialized_=function(){};var Yv=function(a,b){this.state_=0;this.result_=void 0;this.callbackEntriesTail_=this.callbackEntries_=this.parent_=null;this.hadUnhandledRejection_=this.executing_=!1;if(a!=Ta)try{var c=this;a.call(b,function(d){c.resolve_(2,d)},function(d){c.resolve_(3,d)})}catch(d){this.resolve_(3,d)}},Zv=function(){this.next=this.context=this.onRejected=this.onFulfilled=this.child=null;
this.always=!1};
Zv.prototype.reset=function(){this.context=this.onRejected=this.onFulfilled=this.child=null;this.always=!1};
var $v=new Wj(function(){return new Zv},function(a){a.reset()}),aw=function(a,b,c){var d=$v.get();
d.onFulfilled=a;d.onRejected=b;d.context=c;return d},bw=function(a){if(a instanceof Yv)return a;
var b=new Yv(Ta);b.resolve_(2,a);return b},cw=function(a){return new Yv(function(b,c){c(a)})},dfa=function(a,b,c){dw(a,b,c,null)||hk(db(b,a))},ew=function(a){return new Yv(function(b,c){var d=a.length,e=[];
if(d)for(var g=function(p,x){d--;e[p]=x;0==d&&b(e)},h=function(p){c(p)},m=0,n;m<a.length;m++)n=a[m],dfa(n,db(g,m),h);else
b(e)})},fw=function(){var a,b,c=new Yv(function(d,e){a=d;
b=e});
return new efa(c,a,b)};
Yv.prototype.then=function(a,b,c){return gw(this,Za(a)?a:null,Za(b)?b:null,c)};
Kk(Yv);var iw=function(a,b){b=aw(b,b,void 0);b.always=!0;hw(a,b);return a},jw=function(a,b){return gw(a,null,b,void 0)};
Yv.prototype.cancel=function(a){0==this.state_&&hk(function(){var b=new kw(a);lw(this,b)},this)};
var lw=function(a,b){if(0==a.state_)if(a.parent_){var c=a.parent_;if(c.callbackEntries_){for(var d=0,e=null,g=null,h=c.callbackEntries_;h&&(h.always||(d++,h.child==a&&(e=h),!(e&&1<d)));h=h.next)e||(g=h);e&&(0==c.state_&&1==d?lw(c,b):(g?(d=g,d.next==c.callbackEntriesTail_&&(c.callbackEntriesTail_=d),d.next=d.next.next):mw(c),nw(c,e,3,b)))}a.parent_=null}else a.resolve_(3,b)},hw=function(a,b){a.callbackEntries_||2!=a.state_&&3!=a.state_||ow(a);
a.callbackEntriesTail_?a.callbackEntriesTail_.next=b:a.callbackEntries_=b;a.callbackEntriesTail_=b},gw=function(a,b,c,d){var e=aw(null,null,null);
e.child=new Yv(function(g,h){e.onFulfilled=b?function(m){try{var n=b.call(d,m);g(n)}catch(p){h(p)}}:g;
e.onRejected=c?function(m){try{var n=c.call(d,m);!Ia(n)&&m instanceof kw?h(m):g(n)}catch(p){h(p)}}:h});
e.child.parent_=a;hw(a,e);return e.child};
Yv.prototype.unblockAndFulfill_=function(a){this.state_=0;this.resolve_(2,a)};
Yv.prototype.unblockAndReject_=function(a){this.state_=0;this.resolve_(3,a)};
Yv.prototype.resolve_=function(a,b){0==this.state_&&(this===b&&(a=3,b=new TypeError("Promise cannot resolve to itself")),this.state_=1,dw(b,this.unblockAndFulfill_,this.unblockAndReject_,this)||(this.result_=b,this.state_=a,this.parent_=null,ow(this),3!=a||b instanceof kw||ffa(this,b)))};
var dw=function(a,b,c,d){if(a instanceof Yv)return hw(a,aw(b||Ta,c||null,d)),!0;if(Lk(a))return a.then(b,c,d),!0;if($a(a))try{var e=a.then;if(Za(e))return gfa(a,e,b,c,d),!0}catch(g){return c.call(d,g),!0}return!1},gfa=function(a,b,c,d,e){var g=!1,h=function(n){g||(g=!0,c.call(e,n))},m=function(n){g||(g=!0,d.call(e,n))};
try{b.call(a,h,m)}catch(n){m(n)}},ow=function(a){a.executing_||(a.executing_=!0,hk(a.executeCallbacks_,a))},mw=function(a){var b=null;
a.callbackEntries_&&(b=a.callbackEntries_,a.callbackEntries_=b.next,b.next=null);a.callbackEntries_||(a.callbackEntriesTail_=null);return b};
Yv.prototype.executeCallbacks_=function(){for(var a;a=mw(this);)nw(this,a,this.state_,this.result_);this.executing_=!1};
var nw=function(a,b,c,d){if(3==c&&b.onRejected&&!b.always)for(;a&&a.hadUnhandledRejection_;a=a.parent_)a.hadUnhandledRejection_=!1;if(b.child)b.child.parent_=null,pw(b,c,d);else try{b.always?b.onFulfilled.call(b.context):pw(b,c,d)}catch(e){qw.call(null,e)}$v.put(b)},pw=function(a,b,c){2==b?a.onFulfilled.call(a.context,c):a.onRejected&&a.onRejected.call(a.context,c)};
Yv.prototype.addStackTrace_=function(){};
Yv.prototype.appendLongStack_=function(){};
var ffa=function(a,b){a.hadUnhandledRejection_=!0;hk(function(){a.hadUnhandledRejection_&&qw.call(null,b)})},qw=Xj,kw=function(a){hb.call(this,a)};
t(kw,hb);kw.prototype.name="cancel";var efa=function(a,b,c){this.promise=a;this.resolve=b;this.reject=c};var rw=function(a,b){Wv.call(this);this.interval_=a||1;this.timerObject_=b||q;this.boundTick_=r(this.tick_,this);this.last_=fb()};
t(rw,Wv);f=rw.prototype;f.enabled=!1;f.timer_=null;f.getInterval=function(){return this.interval_};
f.setInterval=function(a){this.interval_=a;this.timer_&&this.enabled?(this.stop(),this.start()):this.timer_&&this.stop()};
f.tick_=function(){if(this.enabled){var a=fb()-this.last_;0<a&&a<.8*this.interval_?this.timer_=this.timerObject_.setTimeout(this.boundTick_,this.interval_-a):(this.timer_&&(this.timerObject_.clearTimeout(this.timer_),this.timer_=null),this.dispatchEvent("tick"),this.enabled&&(this.stop(),this.start()))}};
f.start=function(){this.enabled=!0;this.timer_||(this.timer_=this.timerObject_.setTimeout(this.boundTick_,this.interval_),this.last_=fb())};
f.stop=function(){this.enabled=!1;this.timer_&&(this.timerObject_.clearTimeout(this.timer_),this.timer_=null)};
f.disposeInternal=function(){rw.superClass_.disposeInternal.call(this);this.stop();delete this.timerObject_};
var xw=function(a,b,c){if(Za(a))c&&(a=r(a,c));else if(a&&"function"==typeof a.handleEvent)a=r(a.handleEvent,a);else throw Error("Invalid listener argument");return 2147483647<Number(b)?-1:q.setTimeout(a,b||0)},yw=function(a){q.clearTimeout(a)},zw=function(a){var b=null;
return jw(new Yv(function(c,d){b=xw(function(){c(void 0)},a);
-1==b&&d(Error("Failed to schedule timer."))}),function(c){yw(b);
throw c})};var Aw=function(){Wv.call(this);this.eventHandler_=new Sv(this);tv&&(Uea?this.eventHandler_.listen(Vea?document.body:window,["online","offline"],this.handleChange_):(this.online_=this.isOnline(),this.timer_=new rw(250),this.eventHandler_.listen(this.timer_,"tick",this.handleTick_),this.timer_.start()))};
t(Aw,Wv);Aw.prototype.isOnline=function(){return tv?navigator.onLine:!0};
Aw.prototype.handleTick_=function(){var a=this.isOnline();a!=this.online_&&(this.online_=a,this.handleChange_())};
Aw.prototype.handleChange_=function(){this.dispatchEvent(this.isOnline()?"online":"offline")};
Aw.prototype.disposeInternal=function(){Aw.superClass_.disposeInternal.call(this);this.eventHandler_.dispose();this.eventHandler_=null;this.timer_&&(this.timer_.dispose(),this.timer_=null)};var Bw=function(){this.reviver_=this.replacer_=void 0};
Bw.prototype.stringify=function(a){return q.JSON.stringify(a,this.replacer_)};
Bw.prototype.parse=function(a){return q.JSON.parse(a,this.reviver_)};var Cw=function(a,b,c){lk.call(this);this.listener_=null!=c?r(a,c):a;this.interval_=b;this.callback_=r(this.onTimer_,this);this.args_=[]};
t(Cw,lk);f=Cw.prototype;f.shouldFire_=!1;f.pauseCount_=0;f.timer_=null;f.fire=function(a){this.args_=arguments;this.timer_||this.pauseCount_?this.shouldFire_=!0:this.doAction_()};
f.stop=function(){this.timer_&&(yw(this.timer_),this.timer_=null,this.shouldFire_=!1,this.args_=[])};
f.pause=function(){this.pauseCount_++};
f.resume=function(){this.pauseCount_--;this.pauseCount_||!this.shouldFire_||this.timer_||(this.shouldFire_=!1,this.doAction_())};
f.disposeInternal=function(){Cw.superClass_.disposeInternal.call(this);this.stop()};
f.onTimer_=function(){this.timer_=null;this.shouldFire_&&!this.pauseCount_&&(this.shouldFire_=!1,this.doAction_())};
f.doAction_=function(){this.timer_=xw(this.callback_,this.interval_);this.listener_.apply(null,this.args_)};var hfa=function(a){switch(a){case 0:return"No Error";case 1:return"Access denied to content document";case 2:return"File not found";case 3:return"Firefox silently errored";case 4:return"Application custom error";case 5:return"An exception occurred";case 6:return"Http response at 400 or 500 level";case 7:return"Request was aborted";case 8:return"Request timed out";case 9:return"The resource is not available offline";default:return"Unrecognized error code";}};var Dw=function(){};
Dw.prototype.cachedOptions_=null;Dw.prototype.getOptions=function(){var a;(a=this.cachedOptions_)||(a={},Ew(this)&&(a[0]=!0,a[1]=!0),a=this.cachedOptions_=a);return a};var Fw,Gw=function(){};
t(Gw,Dw);Gw.prototype.createInstance=function(){var a=Ew(this);return a?new ActiveXObject(a):new XMLHttpRequest};
var Ew=function(a){if(!a.ieProgId_&&"undefined"==typeof XMLHttpRequest&&"undefined"!=typeof ActiveXObject){for(var b=["MSXML2.XMLHTTP.6.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"],c=0;c<b.length;c++){var d=b[c];try{return new ActiveXObject(d),a.ieProgId_=d}catch(e){}}throw Error("Could not create ActiveXObject. ActiveX might be disabled, or MSXML might not be installed")}return a.ieProgId_};
Fw=new Gw;var Hw=function(a,b,c,d,e){this.channel_=a;this.channelDebug_=b;this.sid_=c;this.rid_=d;this.retryId_=e||1;this.timeout_=45E3;this.eventHandler_=new Sv(this);this.pollingTimer_=new rw;this.pollingTimer_.setInterval(250)};
f=Hw.prototype;f.extraHeaders_=null;f.successful_=!1;f.watchDogTimerId_=null;f.watchDogTimeoutTime_=null;f.requestStartTime_=null;f.type_=null;f.baseUri_=null;f.requestUri_=null;f.postData_=null;f.xmlHttp_=null;f.xmlHttpChunkStart_=0;f.trident_=null;f.verb_=null;f.lastError_=null;f.lastStatusCode_=-1;f.sendClose_=!0;f.cancelled_=!1;f.readyStateChangeThrottleMs_=0;f.readyStateChangeThrottle_=null;
var ifa=function(a,b){switch(a){case 0:return"Non-200 return code ("+b+")";case 1:return"XMLHTTP failure (no data)";case 2:return"HttpConnection timeout";default:return"Unknown error";}},Iw={},Jw={};
Hw.prototype.setExtraHeaders=function(a){this.extraHeaders_=a};
Hw.prototype.setTimeout=function(a){this.timeout_=a};
Hw.prototype.setReadyStateChangeThrottle=function(a){this.readyStateChangeThrottleMs_=a};
var Mw=function(a,b,c){a.type_=1;a.baseUri_=Kw(b.clone());a.postData_=c;a.decodeChunks_=!0;Lw(a,null)},Nw=function(a,b,c,d,e){a.type_=1;
a.baseUri_=Kw(b.clone());a.postData_=null;a.decodeChunks_=c;e&&(a.sendClose_=!1);Lw(a,d)},Lw=function(a,b){a.requestStartTime_=fb();
Ow(a);a.requestUri_=a.baseUri_.clone();Pw(a.requestUri_,"t",a.retryId_);a.xmlHttpChunkStart_=0;a.xmlHttp_=a.channel_.createXhrIo(a.channel_.shouldUseSecondaryDomains()?b:null);0<a.readyStateChangeThrottleMs_&&(a.readyStateChangeThrottle_=new Cw(r(a.xmlHttpHandler_,a,a.xmlHttp_),a.readyStateChangeThrottleMs_));a.eventHandler_.listen(a.xmlHttp_,"readystatechange",a.readyStateChangeHandler_);b=a.extraHeaders_?u.clone(a.extraHeaders_):{};a.postData_?(a.verb_="POST",b["Content-Type"]="application/x-www-form-urlencoded",
a.xmlHttp_.send(a.requestUri_,a.verb_,a.postData_,b)):(a.verb_="GET",a.sendClose_&&!Re&&(b.Connection="close"),a.xmlHttp_.send(a.requestUri_,a.verb_,null,b));a.channel_.notifyServerReachabilityEvent(1);a.channelDebug_.info("XMLHTTP REQ ("+a.rid_+") [attempt "+a.retryId_+"]: "+a.verb_+"\n"+a.requestUri_+"\n"+jfa(a.postData_))};
Hw.prototype.readyStateChangeHandler_=function(a){a=a.target;var b=this.readyStateChangeThrottle_;b&&3==a.getReadyState()?(this.channelDebug_.debug("Throttling readystatechange."),b.fire()):this.xmlHttpHandler_(a)};
Hw.prototype.xmlHttpHandler_=function(a){try{if(a==this.xmlHttp_)a:{var b=this.xmlHttp_.getReadyState(),c=this.xmlHttp_.lastErrorCode_,d=this.xmlHttp_.getStatus();if(Ne&&!af(10)||Re&&!$e("420+")){if(4>b)break a}else if(3>b||3==b&&!Me&&!this.xmlHttp_.getResponseText())break a;this.cancelled_||4!=b||7==c||(8==c||0>=d?this.channel_.notifyServerReachabilityEvent(3):this.channel_.notifyServerReachabilityEvent(2));Qw(this);var e=this.xmlHttp_.getStatus();this.lastStatusCode_=e;var g=this.xmlHttp_.getResponseText();
g||this.channelDebug_.debug("No response text for uri "+this.requestUri_+" status "+e);this.successful_=200==e;this.channelDebug_.info("XMLHTTP RESP ("+this.rid_+") [ attempt "+this.retryId_+"]: "+this.verb_+"\n"+this.requestUri_+"\n"+b+" "+e);if(this.successful_){if(4==b&&this.cleanup_(),this.decodeChunks_?(Rw(this,b,g),Me&&this.successful_&&3==b&&(this.eventHandler_.listen(this.pollingTimer_,"tick",this.pollResponse_),this.pollingTimer_.start())):(Sw(this.channelDebug_,this.rid_,g,null),Tw(this,
g)),this.successful_&&!this.cancelled_)if(4==b)this.channel_.onRequestComplete(this);else this.successful_=!1,Ow(this)}else 400==e&&0<g.indexOf("Unknown SID")?(this.lastError_=3,Uw(13),this.channelDebug_.warning("XMLHTTP Unknown SID ("+this.rid_+")")):(this.lastError_=0,Uw(14),this.channelDebug_.warning("XMLHTTP Bad status "+e+" ("+this.rid_+")")),this.cleanup_(),Vw(this)}else this.channelDebug_.warning("Called back with an unexpected xmlhttp")}catch(h){this.channelDebug_.debug("Failed call to OnXmlHttpReadyStateChanged_"),
this.xmlHttp_&&this.xmlHttp_.getResponseText()?Ww(this.channelDebug_,h,"ResponseText: "+this.xmlHttp_.getResponseText()):Ww(this.channelDebug_,h,"No response text")}finally{}};
var Rw=function(a,b,c){for(var d=!0;!a.cancelled_&&a.xmlHttpChunkStart_<c.length;){var e=kfa(a,c);if(e==Jw){4==b&&(a.lastError_=4,Uw(15),d=!1);Sw(a.channelDebug_,a.rid_,null,"[Incomplete Response]");break}else if(e==Iw){a.lastError_=4;Uw(16);Sw(a.channelDebug_,a.rid_,c,"[Invalid Chunk]");d=!1;break}else Sw(a.channelDebug_,a.rid_,e,null),Tw(a,e)}4==b&&0==c.length&&(a.lastError_=1,Uw(17),d=!1);a.successful_=a.successful_&&d;d||(Sw(a.channelDebug_,a.rid_,c,"[Invalid Chunked Response]"),a.cleanup_(),
Vw(a))};
Hw.prototype.pollResponse_=function(){var a=this.xmlHttp_.getReadyState(),b=this.xmlHttp_.getResponseText();this.xmlHttpChunkStart_<b.length&&(Qw(this),Rw(this,a,b),this.successful_&&4!=a&&Ow(this))};
var kfa=function(a,b){var c=a.xmlHttpChunkStart_,d=b.indexOf("\n",c);if(-1==d)return Jw;c=Number(b.substring(c,d));if(isNaN(c))return Iw;d+=1;if(d+c>b.length)return Jw;b=b.substr(d,c);a.xmlHttpChunkStart_=d+c;return b},Yw=function(a,b){a.requestStartTime_=fb();
Ow(a);var c=b?window.location.hostname:"";a.requestUri_=a.baseUri_.clone();Xw(a.requestUri_,"DOMAIN",c);Xw(a.requestUri_,"t",a.retryId_);try{a.trident_=new ActiveXObject("htmlfile")}catch(h){a.channelDebug_.severe("ActiveX blocked");a.cleanup_();a.lastError_=7;Uw(22);Vw(a);return}var d="<html><body>";if(b){b="";for(var e=0;e<c.length;e++){var g=c.charAt(e);b="<"==g?b+"\\x3c":">"==g?b+"\\x3e":b+sd(g)}d+="<script>document.domain=\""+b+"\"</script>"}c=cd(d+"</body></html>");a.trident_.open();a.trident_.write(Vc(c));
a.trident_.close();a.trident_.parentWindow.m=r(a.onTridentRpcMessage_,a);a.trident_.parentWindow.d=r(a.onTridentDone_,a,!0);a.trident_.parentWindow.rpcClose=r(a.onTridentDone_,a,!1);c=a.trident_.createElement("DIV");a.trident_.parentWindow.document.body.appendChild(c);d=Ac(a.requestUri_.toString());d=od(wc(d));d=cd("<iframe src=\""+d+"\"></iframe>");dd(c,d);a.channelDebug_.info("TRIDENT REQ ("+a.rid_+") [ attempt "+a.retryId_+"]: GET\n"+a.requestUri_);a.channel_.notifyServerReachabilityEvent(1)};
f=Hw.prototype;f.onTridentRpcMessage_=function(a){Zw(r(this.onTridentRpcMessageAsync_,this,a),0)};
f.onTridentRpcMessageAsync_=function(a){if(!this.cancelled_){var b=this.channelDebug_;b.info("TRIDENT TEXT ("+this.rid_+"): "+$w(b,a));Qw(this);Tw(this,a);Ow(this)}};
f.onTridentDone_=function(a){Zw(r(this.onTridentDoneAsync_,this,a),0)};
f.onTridentDoneAsync_=function(a){this.cancelled_||(this.channelDebug_.info("TRIDENT TEXT ("+this.rid_+"): "+a?"success":"failure"),this.cleanup_(),this.successful_=a,this.channel_.onRequestComplete(this),this.channel_.notifyServerReachabilityEvent(4))};
f.cancel=function(){this.cancelled_=!0;this.cleanup_()};
var Ow=function(a){a.watchDogTimeoutTime_=fb()+a.timeout_;ax(a,a.timeout_)},ax=function(a,b){if(null!=a.watchDogTimerId_)throw Error("WatchDog timer not null");
a.watchDogTimerId_=Zw(r(a.onWatchDogTimeout_,a),b)},Qw=function(a){a.watchDogTimerId_&&(q.clearTimeout(a.watchDogTimerId_),a.watchDogTimerId_=null)};
Hw.prototype.onWatchDogTimeout_=function(){this.watchDogTimerId_=null;var a=fb();0<=a-this.watchDogTimeoutTime_?(this.successful_&&this.channelDebug_.severe("Received watchdog timeout even though request loaded successfully"),this.channelDebug_.info("TIMEOUT: "+this.requestUri_),2!=this.type_&&this.channel_.notifyServerReachabilityEvent(3),this.cleanup_(),this.lastError_=2,Uw(18),Vw(this)):(this.channelDebug_.warning("WatchDog timer called too early"),ax(this,this.watchDogTimeoutTime_-a))};
var Vw=function(a){if(!a.channel_.isClosed()&&!a.cancelled_)a.channel_.onRequestComplete(a)};
Hw.prototype.cleanup_=function(){Qw(this);nk(this.readyStateChangeThrottle_);this.readyStateChangeThrottle_=null;this.pollingTimer_.stop();this.eventHandler_.removeAll();if(this.xmlHttp_){var a=this.xmlHttp_;this.xmlHttp_=null;a.abort();a.dispose()}this.trident_&&(this.trident_=null)};
Hw.prototype.getLastError=function(){return this.lastError_};
Hw.prototype.getSessionId=function(){return this.sid_};
var Tw=function(a,b){try{a.channel_.onRequestData(a,b),a.channel_.notifyServerReachabilityEvent(4)}catch(c){Ww(a.channelDebug_,c,"Error in httprequest callback")}};var bx=function(){this.logger_=null};
bx.prototype.getLogger=function(){return this.logger_};
bx.prototype.browserOfflineResponse=function(a){this.info("BROWSER_OFFLINE: "+a)};
var Sw=function(a,b,c,d){a.info("XMLHTTP TEXT ("+b+"): "+$w(a,c)+(d?" "+d:""))};
bx.prototype.debug=function(a){this.info(a)};
var Ww=function(a,b,c){a.severe((c||"Exception")+b)};
bx.prototype.info=function(){};
bx.prototype.warning=function(){};
bx.prototype.severe=function(){};
var $w=function(a,b){if(!b||"y2f%"==b)return b;try{var c=JSON.parse(b);if(c)for(var d=0;d<c.length;d++)if(Wa(c[d])){var e=c[d];if(!(2>e.length)){var g=e[1];if(Wa(g)&&!(1>g.length)){var h=g[0];if("noop"!=h&&"stop"!=h)for(var m=1;m<g.length;m++)g[m]=""}}}return Gk(c)}catch(n){return a.debug("Exception parsing expected JS array - probably was not JS"),b}},jfa=function(a){if(!a)return null;
var b="";a=a.split("&");for(var c=0;c<a.length;c++){var d=a[c].split("=");if(1<d.length){var e=d[0];d=d[1];var g=e.split("_");b=2<=g.length&&"type"==g[1]?b+(e+"="+d+"&"):b+(e+"=redacted&")}}return b};var cx=function(a,b){this.domain_=this.userInfo_=this.scheme_="";this.port_=null;this.fragment_=this.path_="";this.ignoreCase_=this.isReadOnly_=!1;if(a instanceof cx){this.ignoreCase_=Ia(b)?b:a.ignoreCase_;this.setScheme(a.getScheme());var c=a.userInfo_;dx(this);this.userInfo_=c;ex(this,a.domain_);fx(this,a.port_);gx(this,a.path_);hx(this,a.queryData_.clone());ix(this,a.fragment_)}else a&&(c=String(a).match(li))?(this.ignoreCase_=!!b,this.setScheme(c[1]||"",!0),a=c[2]||"",dx(this),this.userInfo_=
jx(a),ex(this,c[3]||"",!0),fx(this,c[4]),gx(this,c[5]||"",!0),hx(this,c[6]||"",!0),ix(this,c[7]||"",!0)):(this.ignoreCase_=!!b,this.queryData_=new kx(null,this.ignoreCase_))};
f=cx.prototype;f.toString=function(){var a=[],b=this.getScheme();b&&a.push(lx(b,mx,!0),":");var c=this.domain_;if(c||"file"==b)a.push("//"),(b=this.userInfo_)&&a.push(lx(b,mx,!0),"@"),a.push(md(c).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),c=this.port_,null!=c&&a.push(":",String(c));if(c=this.path_)this.domain_&&"/"!=c.charAt(0)&&a.push("/"),a.push(lx(c,"/"==c.charAt(0)?lfa:mfa,!0));(c=this.queryData_.toString())&&a.push("?",c);(c=this.fragment_)&&a.push("#",lx(c,nfa));return a.join("")};
f.resolve=function(a){var b=this.clone(),c=a.hasScheme();c?b.setScheme(a.getScheme()):c=!!a.userInfo_;if(c){var d=a.userInfo_;dx(b);b.userInfo_=d}else c=!!a.domain_;c?ex(b,a.domain_):c=null!=a.port_;d=a.path_;if(c)fx(b,a.port_);else if(c=!!a.path_){if("/"!=d.charAt(0))if(this.domain_&&!this.path_)d="/"+d;else{var e=b.path_.lastIndexOf("/");-1!=e&&(d=b.path_.substr(0,e+1)+d)}e=d;if(".."==e||"."==e)d="";else if(pc(e,"./")||pc(e,"/.")){d=ec(e,"/");e=e.split("/");for(var g=[],h=0;h<e.length;){var m=e[h++];
"."==m?d&&h==e.length&&g.push(""):".."==m?((1<g.length||1==g.length&&""!=g[0])&&g.pop(),d&&h==e.length&&g.push("")):(g.push(m),d=!0)}d=g.join("/")}else d=e}c?gx(b,d):c=""!==a.queryData_.toString();c?hx(b,a.queryData_.clone()):c=!!a.fragment_;c&&ix(b,a.fragment_);return b};
f.clone=function(){return new cx(this)};
f.getScheme=function(){return this.scheme_};
f.setScheme=function(a,b){dx(this);if(this.scheme_=b?jx(a,!0):a)this.scheme_=this.scheme_.replace(/:$/,"");return this};
f.hasScheme=function(){return!!this.scheme_};
var ex=function(a,b,c){dx(a);a.domain_=c?jx(b,!0):b;return a},fx=function(a,b){dx(a);
if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.port_=b}else a.port_=null;return a},gx=function(a,b,c){dx(a);
a.path_=c?jx(b,!0):b;return a},hx=function(a,b,c){dx(a);
b instanceof kx?(a.queryData_=b,a.queryData_.setIgnoreCase(a.ignoreCase_)):(c||(b=lx(b,ofa)),a.queryData_=new kx(b,a.ignoreCase_));return a};
cx.prototype.setQuery=function(a,b){return hx(this,a,b)};
cx.prototype.getDecodedQuery=function(){return jx(this.queryData_.toString())};
cx.prototype.getQuery=function(){return this.queryData_.toString()};
var Xw=function(a,b,c){dx(a);a.queryData_.set(b,c);return a},Pw=function(a,b,c){dx(a);
Wa(c)||(c=[String(c)]);nx(a.queryData_,b,c)};
cx.prototype.getParameterValues=function(a){return this.queryData_.getValues(a)};
var ox=function(a,b){return a.queryData_.get(b)},ix=function(a,b,c){dx(a);
a.fragment_=c?jx(b):b;return a};
cx.prototype.hasSameDomainAs=function(a){return(!this.domain_&&!a.domain_||this.domain_==a.domain_)&&(null==this.port_&&null==a.port_||this.port_==a.port_)};
var Kw=function(a){dx(a);Xw(a,"zx",zd());return a};
cx.prototype.removeParameter=function(a){dx(this);this.queryData_.remove(a);return this};
cx.prototype.setReadOnly=function(a){this.isReadOnly_=a;return this};
cx.prototype.isReadOnly=function(){return this.isReadOnly_};
var dx=function(a){if(a.isReadOnly_)throw Error("Tried to modify a read-only Uri")};
cx.prototype.setIgnoreCase=function(a){this.ignoreCase_=a;this.queryData_&&this.queryData_.setIgnoreCase(a)};
var px=function(a){return a instanceof cx?a.clone():new cx(a,void 0)},pfa=function(a,b,c,d){var e=new cx(null,void 0);
a&&e.setScheme(a);b&&ex(e,b);c&&fx(e,c);d&&gx(e,d);return e},jx=function(a,b){return a?b?decodeURI(a.replace(/%25/g,"%2525")):decodeURIComponent(a):""},lx=function(a,b,c){return Ka(a)?(a=encodeURI(a).replace(b,qfa),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null},qfa=function(a){a=a.charCodeAt(0);
return"%"+(a>>4&15).toString(16)+(a&15).toString(16)},mx=/[#\/\?@]/g,mfa=/[#\?:]/g,lfa=/[#\?]/g,ofa=/[#\?@]/g,nfa=/#/g,kx=function(a,b){this.count_=this.keyMap_=null;
this.encodedQuery_=a||null;this.ignoreCase_=!!b},qx=function(a){a.keyMap_||(a.keyMap_=new Ak,a.count_=0,a.encodedQuery_&&ti(a.encodedQuery_,function(b,c){a.add(nd(b),c)}))};
f=kx.prototype;f.getCount=function(){qx(this);return this.count_};
f.add=function(a,b){qx(this);this.encodedQuery_=null;a=rx(this,a);var c=this.keyMap_.get(a);c||this.keyMap_.set(a,c=[]);c.push(b);this.count_+=1;return this};
f.remove=function(a){qx(this);a=rx(this,a);return this.keyMap_.containsKey(a)?(this.encodedQuery_=null,this.count_-=this.keyMap_.get(a).length,this.keyMap_.remove(a)):!1};
f.clear=function(){this.keyMap_=this.encodedQuery_=null;this.count_=0};
f.isEmpty=function(){qx(this);return 0==this.count_};
f.containsKey=function(a){qx(this);a=rx(this,a);return this.keyMap_.containsKey(a)};
f.containsValue=function(a){var b=this.getValues();return wb(b,a)};
f.forEach=function(a,b){qx(this);this.keyMap_.forEach(function(c,d){mb(c,function(e){a.call(b,e,d,this)},this)},this)};
f.getKeys=function(){qx(this);for(var a=this.keyMap_.getValues(),b=this.keyMap_.getKeys(),c=[],d=0;d<b.length;d++)for(var e=a[d],g=0;g<e.length;g++)c.push(b[d]);return c};
f.getValues=function(a){qx(this);var b=[];if(Ka(a))this.containsKey(a)&&(b=Bb(b,this.keyMap_.get(rx(this,a))));else{a=this.keyMap_.getValues();for(var c=0;c<a.length;c++)b=Bb(b,a[c])}return b};
f.set=function(a,b){qx(this);this.encodedQuery_=null;a=rx(this,a);this.containsKey(a)&&(this.count_-=this.keyMap_.get(a).length);this.keyMap_.set(a,[b]);this.count_+=1;return this};
f.get=function(a,b){if(!a)return b;a=this.getValues(a);return 0<a.length?String(a[0]):b};
var nx=function(a,b,c){a.remove(b);0<c.length&&(a.encodedQuery_=null,a.keyMap_.set(rx(a,b),Cb(c)),a.count_+=c.length)};
kx.prototype.toString=function(){if(this.encodedQuery_)return this.encodedQuery_;if(!this.keyMap_)return"";for(var a=[],b=this.keyMap_.getKeys(),c=0;c<b.length;c++){var d=b[c],e=md(d);d=this.getValues(d);for(var g=0;g<d.length;g++){var h=e;""!==d[g]&&(h+="="+md(d[g]));a.push(h)}}return this.encodedQuery_=a.join("&")};
var rfa=function(a){var b=["expflag"];qx(a);a.keyMap_.forEach(function(c,d){wb(b,d)||this.remove(d)},a)};
kx.prototype.clone=function(){var a=new kx;a.encodedQuery_=this.encodedQuery_;this.keyMap_&&(a.keyMap_=this.keyMap_.clone(),a.count_=this.count_);return a};
var rx=function(a,b){b=String(b);a.ignoreCase_&&(b=b.toLowerCase());return b};
kx.prototype.setIgnoreCase=function(a){a&&!this.ignoreCase_&&(qx(this),this.encodedQuery_=null,this.keyMap_.forEach(function(b,c){var d=c.toLowerCase();c!=d&&(this.remove(c),nx(this,d,b))},this));
this.ignoreCase_=a};
kx.prototype.extend=function(a){for(var b=0;b<arguments.length;b++)Gu(arguments[b],function(c,d){this.add(d,c)},this)};var tx=function(a,b,c,d,e){new bx().debug("TestLoadImageWithRetries: "+e);if(0==d)c(!1);else{var g=e||0;d--;sx(a,b,function(h){h?c(!0):q.setTimeout(function(){tx(a,b,c,d,g)},g)})}},sx=function(a,b,c){var d=new bx;
d.debug("TestLoadImage: loading "+a);var e=new Image;e.onload=function(){try{d.debug("TestLoadImage: loaded"),ux(e),c(!0)}catch(g){Ww(d,g)}};
e.onerror=function(){try{d.debug("TestLoadImage: error"),ux(e),c(!1)}catch(g){Ww(d,g)}};
e.onabort=function(){try{d.debug("TestLoadImage: abort"),ux(e),c(!1)}catch(g){Ww(d,g)}};
e.ontimeout=function(){try{d.debug("TestLoadImage: timeout"),ux(e),c(!1)}catch(g){Ww(d,g)}};
q.setTimeout(function(){if(e.ontimeout)e.ontimeout()},b);
gd(e,a)},ux=function(a){a.onload=null;
a.onerror=null;a.onabort=null;a.ontimeout=null};var vx=function(a,b){this.channel_=a;this.channelDebug_=b;this.parser_=new Bw};
f=vx.prototype;f.extraHeaders_=null;f.request_=null;f.receivedIntermediateResult_=!1;f.startTime_=null;f.firstTime_=null;f.lastTime_=null;f.path_=null;f.state_=null;f.lastStatusCode_=-1;f.hostPrefix_=null;f.blockedPrefix_=null;f.setExtraHeaders=function(a){this.extraHeaders_=a};
f.setParser=function(a){this.parser_=a};
f.connect=function(a){this.path_=a;a=wx(this.channel_,this.path_);Uw(3);this.startTime_=fb();var b=this.channel_.firstTestResults_;null!=b?(this.hostPrefix_=this.channel_.correctHostPrefix(b[0]),(this.blockedPrefix_=b[1])?(this.state_=1,xx(this)):(this.state_=2,yx(this))):(Pw(a,"MODE","init"),this.request_=new Hw(this,this.channelDebug_,void 0,void 0,void 0),this.request_.setExtraHeaders(this.extraHeaders_),Nw(this.request_,a,!1,null,!0),this.state_=0)};
var xx=function(a){var b=zx(a.channel_,a.blockedPrefix_,"/mail/images/cleardot.gif");Kw(b);tx(b.toString(),5E3,r(a.checkBlockedCallback_,a),3,2E3);a.notifyServerReachabilityEvent(1)};
vx.prototype.checkBlockedCallback_=function(a){if(a)this.state_=2,yx(this);else{Uw(4);var b=this.channel_;b.channelDebug_.debug("Test Connection Blocked");b.lastStatusCode_=b.connectionTest_.lastStatusCode_;Ax(b,9)}a&&this.notifyServerReachabilityEvent(2)};
var yx=function(a){a.channelDebug_.debug("TestConnection: starting stage 2");var b=a.channel_.secondTestResults_;if(null!=b)a.channelDebug_.debug("TestConnection: skipping stage 2, precomputed result is "+b?"Buffered":"Unbuffered"),Uw(5),b?(Uw(11),Bx(a.channel_,a,!1)):(Uw(12),Bx(a.channel_,a,!0));else if(a.request_=new Hw(a,a.channelDebug_,void 0,void 0,void 0),a.request_.setExtraHeaders(a.extraHeaders_),b=Cx(a.channel_,a.hostPrefix_,a.path_),Uw(5),!Ne||af(10))Pw(b,"TYPE","xmlhttp"),Nw(a.request_,
b,!1,a.hostPrefix_,!1);else{Pw(b,"TYPE","html");var c=a.request_;a=!!a.hostPrefix_;c.type_=3;c.baseUri_=Kw(b.clone());Yw(c,a)}};
f=vx.prototype;f.createXhrIo=function(a){return this.channel_.createXhrIo(a)};
f.abort=function(){this.request_&&(this.request_.cancel(),this.request_=null);this.lastStatusCode_=-1};
f.isClosed=function(){return!1};
f.onRequestData=function(a,b){this.lastStatusCode_=a.lastStatusCode_;if(0==this.state_){if(this.channelDebug_.debug("TestConnection: Got data for stage 1"),b){try{var c=this.parser_.parse(b)}catch(d){Ww(this.channelDebug_,d);Dx(this.channel_,this);return}this.hostPrefix_=this.channel_.correctHostPrefix(c[0]);this.blockedPrefix_=c[1]}else this.channelDebug_.debug("TestConnection: Null responseText"),Dx(this.channel_,this);}else if(2==this.state_)if(this.receivedIntermediateResult_)Uw(7),this.lastTime_=
fb();else if("11111"==b){if(Uw(6),this.receivedIntermediateResult_=!0,this.firstTime_=fb(),a=this.firstTime_-this.startTime_,!Ne||af(10)||500>a)this.lastStatusCode_=200,this.request_.cancel(),this.channelDebug_.debug("Test connection succeeded; using streaming connection"),Uw(12),Bx(this.channel_,this,!0)}else Uw(8),this.firstTime_=this.lastTime_=fb(),this.receivedIntermediateResult_=!1};
f.onRequestComplete=function(){this.lastStatusCode_=this.request_.lastStatusCode_;this.request_.successful_?0==this.state_?(this.channelDebug_.debug("TestConnection: request complete for initial check"),this.blockedPrefix_?(this.state_=1,xx(this)):(this.state_=2,yx(this))):2==this.state_&&(this.channelDebug_.debug("TestConnection: request complete for stage 2"),(!Ne||af(10)?!this.receivedIntermediateResult_:200>this.lastTime_-this.firstTime_)?(this.channelDebug_.debug("Test connection failed; not using streaming"),
Uw(11),Bx(this.channel_,this,!1)):(this.channelDebug_.debug("Test connection succeeded; using streaming connection"),Uw(12),Bx(this.channel_,this,!0))):(this.channelDebug_.debug("TestConnection: request failed, in state "+this.state_),0==this.state_?Uw(9):2==this.state_&&Uw(10),Dx(this.channel_,this,this.request_.getLastError()))};
f.getLastStatusCode=function(){return this.lastStatusCode_};
f.shouldUseSecondaryDomains=function(){return this.channel_.shouldUseSecondaryDomains()};
f.isActive=function(){return this.channel_.isActive()};
f.notifyServerReachabilityEvent=function(a){this.channel_.notifyServerReachabilityEvent(a)};var Ex=function(a){if(q.JSON)try{return q.JSON.parse(a)}catch(b){}return Ek(a)};var Fx=function(a){Wv.call(this);this.headers=new Ak;this.xmlHttpFactory_=a||null;this.active_=!1;this.xhrOptions_=this.xhr_=null;this.lastMethod_=this.lastUri_="";this.lastErrorCode_=0;this.lastError_="";this.inAbort_=this.inOpen_=this.inSend_=this.errorDispatched_=!1;this.timeoutInterval_=0;this.timeoutId_=null;this.responseType_="";this.useXhr2Timeout_=this.progressEventsEnabled_=this.withCredentials_=!1};
t(Fx,Wv);Fx.prototype.logger_=null;var sfa=/^https?$/i,tfa=["POST","PUT"],Gx=[],Hx=function(a,b,c,d,e,g,h){var m=new Fx;Gx.push(m);b&&m.listen("complete",b);m.listenOnce("ready",m.cleanupSend_);g&&(m.timeoutInterval_=Math.max(0,g));h&&(m.withCredentials_=h);m.send(a,c,d,e)};
f=Fx.prototype;f.cleanupSend_=function(){this.dispose();zb(Gx,this)};
f.getTimeoutInterval=function(){return this.timeoutInterval_};
f.setResponseType=function(a){this.responseType_=a};
f.getResponseType=function(){return this.responseType_};
f.getWithCredentials=function(){return this.withCredentials_};
f.setProgressEventsEnabled=function(a){this.progressEventsEnabled_=a};
f.send=function(a,b,c,d){if(this.xhr_)throw Error("[goog.net.XhrIo] Object is active with another request="+this.lastUri_+"; newUri="+a);b=b?b.toUpperCase():"GET";this.lastUri_=a;this.lastError_="";this.lastErrorCode_=0;this.lastMethod_=b;this.errorDispatched_=!1;this.active_=!0;this.xhr_=this.createXhr();this.xhrOptions_=this.xmlHttpFactory_?this.xmlHttpFactory_.getOptions():Fw.getOptions();this.xhr_.onreadystatechange=r(this.onReadyStateChange_,this);this.progressEventsEnabled_&&"onprogress"in this.xhr_&&(
this.xhr_.onprogress=r(function(g){this.onProgressHandler_(g,!0)},this),this.xhr_.upload&&(this.xhr_.upload.onprogress=r(this.onProgressHandler_,this)));
try{this.inOpen_=!0,this.xhr_.open(b,String(a),!0),this.inOpen_=!1}catch(g){this.error_(5,g);return}a=c||"";var e=this.headers.clone();d&&Gu(d,function(g,h){e.set(h,g)});
d=ub(e.getKeys(),ufa);c=q.FormData&&a instanceof q.FormData;!wb(tfa,b)||d||c||e.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8");e.forEach(function(g,h){this.xhr_.setRequestHeader(h,g)},this);
this.responseType_&&(this.xhr_.responseType=this.responseType_);"withCredentials"in this.xhr_&&this.xhr_.withCredentials!==this.withCredentials_&&(this.xhr_.withCredentials=this.withCredentials_);try{Ix(this),0<this.timeoutInterval_&&((this.useXhr2Timeout_=vfa(this.xhr_))?(this.xhr_.timeout=this.timeoutInterval_,this.xhr_.ontimeout=r(this.timeout_,this)):this.timeoutId_=xw(this.timeout_,this.timeoutInterval_,this)),this.inSend_=!0,this.xhr_.send(a),this.inSend_=!1}catch(g){this.error_(5,g)}};
var vfa=function(a){return Ne&&$e(9)&&Ma(a.timeout)&&Ia(a.ontimeout)},ufa=function(a){return"content-type"==a.toLowerCase()};
Fx.prototype.createXhr=function(){return this.xmlHttpFactory_?this.xmlHttpFactory_.createInstance():Fw.createInstance()};
Fx.prototype.timeout_=function(){"undefined"!=typeof Ha&&this.xhr_&&(this.lastError_="Timed out after "+this.timeoutInterval_+"ms, aborting",this.lastErrorCode_=8,this.dispatchEvent("timeout"),this.abort(8))};
Fx.prototype.error_=function(a,b){this.active_=!1;this.xhr_&&(this.inAbort_=!0,this.xhr_.abort(),this.inAbort_=!1);this.lastError_=b;this.lastErrorCode_=a;Jx(this);Kx(this)};
var Jx=function(a){a.errorDispatched_||(a.errorDispatched_=!0,a.dispatchEvent("complete"),a.dispatchEvent("error"))};
Fx.prototype.abort=function(a){this.xhr_&&this.active_&&(this.active_=!1,this.inAbort_=!0,this.xhr_.abort(),this.inAbort_=!1,this.lastErrorCode_=a||7,this.dispatchEvent("complete"),this.dispatchEvent("abort"),Kx(this))};
Fx.prototype.disposeInternal=function(){this.xhr_&&(this.active_&&(this.active_=!1,this.inAbort_=!0,this.xhr_.abort(),this.inAbort_=!1),Kx(this,!0));Fx.superClass_.disposeInternal.call(this)};
Fx.prototype.onReadyStateChange_=function(){if(!this.isDisposed())if(this.inOpen_||this.inSend_||this.inAbort_)Lx(this);else this.onReadyStateChangeEntryPoint_()};
Fx.prototype.onReadyStateChangeEntryPoint_=function(){Lx(this)};
var Lx=function(a){if(a.active_&&"undefined"!=typeof Ha&&(!a.xhrOptions_[1]||4!=a.getReadyState()||2!=a.getStatus()))if(a.inSend_&&4==a.getReadyState())xw(a.onReadyStateChange_,0,a);else if(a.dispatchEvent("readystatechange"),a.isComplete()){a.active_=!1;try{if(a.isSuccess())a.dispatchEvent("complete"),a.dispatchEvent("success");else{a.lastErrorCode_=6;try{var b=2<a.getReadyState()?a.xhr_.statusText:""}catch(c){b=""}a.lastError_=b+" ["+a.getStatus()+"]";Jx(a)}}finally{Kx(a)}}};
Fx.prototype.onProgressHandler_=function(a,b){this.dispatchEvent(Mx(a,"progress"));this.dispatchEvent(Mx(a,b?"downloadprogress":"uploadprogress"))};
var Mx=function(a,b){return{type:b,lengthComputable:a.lengthComputable,loaded:a.loaded,total:a.total}},Kx=function(a,b){if(a.xhr_){Ix(a);
var c=a.xhr_,d=a.xhrOptions_[0]?Ta:null;a.xhr_=null;a.xhrOptions_=null;b||a.dispatchEvent("ready");try{c.onreadystatechange=d}catch(e){}}},Ix=function(a){a.xhr_&&a.useXhr2Timeout_&&(a.xhr_.ontimeout=null);
a.timeoutId_&&(yw(a.timeoutId_),a.timeoutId_=null)};
f=Fx.prototype;f.isActive=function(){return!!this.xhr_};
f.isComplete=function(){return 4==this.getReadyState()};
f.isSuccess=function(){var a=this.getStatus();a:switch(a){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:var b=!0;break a;default:b=!1;}if(!b){if(a=0===a)a=ni(1,String(this.lastUri_)),!a&&q.self&&q.self.location&&(a=q.self.location.protocol,a=a.substr(0,a.length-1)),a=!sfa.test(a?a.toLowerCase():"");b=a}return b};
f.getReadyState=function(){return this.xhr_?this.xhr_.readyState:0};
f.getStatus=function(){try{return 2<this.getReadyState()?this.xhr_.status:-1}catch(a){return-1}};
f.getLastUri=function(){return String(this.lastUri_)};
f.getResponseText=function(){try{return this.xhr_?this.xhr_.responseText:""}catch(a){return""}};
f.getResponseBody=function(){try{if(this.xhr_&&"responseBody"in this.xhr_)return this.xhr_.responseBody}catch(a){}return null};
f.getResponseXml=function(){try{return this.xhr_?this.xhr_.responseXML:null}catch(a){return null}};
f.getResponseJson=function(a){if(this.xhr_){var b=this.xhr_.responseText;a&&0==b.indexOf(a)&&(b=b.substring(a.length));return Ex(b)}};
f.getResponse=function(){try{if(!this.xhr_)return null;if("response"in this.xhr_)return this.xhr_.response;switch(this.responseType_){case"":case"text":return this.xhr_.responseText;case"arraybuffer":if("mozResponseArrayBuffer"in this.xhr_)return this.xhr_.mozResponseArrayBuffer;}return null}catch(a){return null}};
f.getResponseHeader=function(a){if(this.xhr_&&this.isComplete())return a=this.xhr_.getResponseHeader(a),null===a?void 0:a};
f.getAllResponseHeaders=function(){return this.xhr_&&this.isComplete()?this.xhr_.getAllResponseHeaders()||"":""};
f.getResponseHeaders=function(){for(var a={},b=this.getAllResponseHeaders().split("\r\n"),c=0;c<b.length;c++)if(!gc(b[c])){var d=Vaa(b[c]),e=d[0];d=d[1];if(Ka(d)){d=d.trim();var g=a[e]||[];a[e]=g;g.push(d)}}return u.map(a,function(h){return h.join(", ")})};
f.getStreamingResponseHeader=function(a){return this.xhr_?this.xhr_.getResponseHeader(a):null};
f.getAllStreamingResponseHeaders=function(){return this.xhr_?this.xhr_.getAllResponseHeaders():""};
f.getLastError=function(){return Ka(this.lastError_)?this.lastError_:String(this.lastError_)};
f.formatMsg_=function(a){return a+" ["+this.lastMethod_+" "+this.lastUri_+" "+this.getStatus()+"]"};var Nx=function(a,b,c,d){this.clientVersion_=a||null;this.state_=1;this.outgoingMaps_=[];this.pendingMaps_=[];this.channelDebug_=new bx;this.parser_=new Bw;this.firstTestResults_=b||null;this.secondTestResults_=null!=c?c:null;this.asyncTest_=d||!1},wfa=function(a,b){this.mapId=a;
this.map=b;this.context=null};
f=Nx.prototype;f.extraHeaders_=null;f.extraParams_=null;f.forwardChannelRequest_=null;f.backChannelRequest_=null;f.path_=null;f.forwardChannelUri_=null;f.backChannelUri_=null;f.hostPrefix_=null;f.allowHostPrefix_=!0;f.nextRid_=0;f.nextMapId_=0;f.failFast_=!1;f.handler_=null;f.forwardChannelTimerId_=null;f.backChannelTimerId_=null;f.deadBackChannelTimerId_=null;f.connectionTest_=null;f.useChunked_=null;f.allowChunkedMode_=!0;f.lastArrayId_=-1;f.lastPostResponseArrayId_=-1;f.lastStatusCode_=-1;
f.forwardChannelRetryCount_=0;f.backChannelRetryCount_=0;f.baseRetryDelayMs_=5E3;f.retryDelaySeedMs_=1E4;f.forwardChannelMaxRetries_=2;f.forwardChannelRequestTimeoutMs_=2E4;f.readyStateChangeThrottleMs_=0;f.supportsCrossDomainXhrs_=!1;f.channelVersion_=8;var Ox=new Wv,Px=function(a,b){vv.call(this,"statevent",a);this.stat=b};
t(Px,vv);var Qx=function(a,b,c,d){vv.call(this,"timingevent",a);this.size=b;this.rtt=c;this.retries=d};
t(Qx,vv);var Rx=function(a,b){vv.call(this,"serverreachability",a);this.reachabilityType=b};
t(Rx,vv);f=Nx.prototype;f.getChannelDebug=function(){return this.channelDebug_};
f.setChannelDebug=function(a){null!=a&&(this.channelDebug_=a)};
f.connect=function(a,b,c,d,e){this.channelDebug_.debug("connect()");Uw(0);this.path_=b;this.extraParams_=c||{};d&&Ia(e)&&(this.extraParams_.OSID=d,this.extraParams_.OAID=e);this.asyncTest_?(Zw(r(this.connectTest_,this,a),100),Sx(this)):this.connectTest_(a)};
f.disconnect=function(){this.channelDebug_.debug("disconnect()");Tx(this);if(3==this.state_){var a=this.nextRid_++,b=this.forwardChannelUri_.clone();Xw(b,"SID",this.sid_);Xw(b,"RID",a);Xw(b,"TYPE","terminate");Ux(this,b);a=new Hw(this,this.channelDebug_,this.sid_,a,void 0);a.type_=2;a.baseUri_=Kw(b.clone());gd(new Image,a.baseUri_.toString());a.requestStartTime_=fb();Ow(a)}this.onClose_()};
f.getSessionId=function(){return this.sid_};
f.connectTest_=function(a){this.channelDebug_.debug("connectTest_()");this.connectionTest_=new vx(this,this.channelDebug_);this.connectionTest_.setExtraHeaders(this.extraHeaders_);this.connectionTest_.setParser(this.parser_);this.connectionTest_.connect(a)};
var Sx=function(a){a.channelDebug_.debug("connectChannel_()");a.ensureInState_(1,0);a.forwardChannelUri_=wx(a,a.path_);Vx(a)},Tx=function(a){a.connectionTest_&&(a.connectionTest_.abort(),a.connectionTest_=null);
a.backChannelRequest_&&(a.backChannelRequest_.cancel(),a.backChannelRequest_=null);a.backChannelTimerId_&&(q.clearTimeout(a.backChannelTimerId_),a.backChannelTimerId_=null);Wx(a);a.forwardChannelRequest_&&(a.forwardChannelRequest_.cancel(),a.forwardChannelRequest_=null);a.forwardChannelTimerId_&&(q.clearTimeout(a.forwardChannelTimerId_),a.forwardChannelTimerId_=null)};
f=Nx.prototype;f.setExtraHeaders=function(a){this.extraHeaders_=a};
f.setReadyStateChangeThrottle=function(a){this.readyStateChangeThrottleMs_=a};
f.getHandler=function(){return this.handler_};
f.getAllowHostPrefix=function(){return this.allowHostPrefix_};
f.setAllowHostPrefix=function(a){this.allowHostPrefix_=a};
f.getAllowChunkedMode=function(){return this.allowChunkedMode_};
f.setAllowChunkedMode=function(a){this.allowChunkedMode_=a};
f.sendMap=function(a){if(0==this.state_)throw Error("Invalid operation: sending map when state is closed");1E3==this.outgoingMaps_.length&&this.channelDebug_.severe("Already have 1000 queued maps upon queueing "+this.parser_.stringify(a));this.outgoingMaps_.push(new wfa(this.nextMapId_++,a));2!=this.state_&&3!=this.state_||Vx(this)};
f.setFailFast=function(a){this.failFast_=a;this.channelDebug_.info("setFailFast: "+a);(this.forwardChannelRequest_||this.forwardChannelTimerId_)&&this.forwardChannelRetryCount_>(this.failFast_?0:this.forwardChannelMaxRetries_)&&(this.channelDebug_.info("Retry count "+this.forwardChannelRetryCount_+" > new maxRetries "+(this.failFast_?0:this.forwardChannelMaxRetries_)+". Fail immediately!"),this.forwardChannelRequest_?(this.forwardChannelRequest_.cancel(),this.onRequestComplete(this.forwardChannelRequest_)):(
q.clearTimeout(this.forwardChannelTimerId_),this.forwardChannelTimerId_=null,Ax(this,2)))};
f.setForwardChannelMaxRetries=function(a){this.forwardChannelMaxRetries_=a};
f.setForwardChannelRequestTimeout=function(a){this.forwardChannelRequestTimeoutMs_=a};
f.isClosed=function(){return 0==this.state_};
f.getState=function(){return this.state_};
f.getLastStatusCode=function(){return this.lastStatusCode_};
f.setParser=function(a){this.parser_=a};
var Vx=function(a){a.forwardChannelRequest_||a.forwardChannelTimerId_||(a.forwardChannelTimerId_=Zw(r(a.onStartForwardChannelTimer_,a),0),a.forwardChannelRetryCount_=0)};
Nx.prototype.onStartForwardChannelTimer_=function(a){this.forwardChannelTimerId_=null;Xx(this,a)};
var Xx=function(a,b){a.channelDebug_.debug("startForwardChannel_");if(1==a.state_){if(b)a.channelDebug_.severe("Not supposed to retry the open");else{a.channelDebug_.debug("open_()");a.nextRid_=Math.floor(1E5*Math.random());b=a.nextRid_++;var c=new Hw(a,a.channelDebug_,"",b,void 0);c.setExtraHeaders(a.extraHeaders_);var d=Yx(a),e=a.forwardChannelUri_.clone();Xw(e,"RID",b);a.clientVersion_&&Xw(e,"CVER",a.clientVersion_);Ux(a,e);Mw(c,e,d);a.forwardChannelRequest_=c;a.state_=2}}else 3==a.state_&&(b?Zx(a,
b):0==a.outgoingMaps_.length?a.channelDebug_.debug("startForwardChannel_ returned: nothing to send"):a.forwardChannelRequest_?a.channelDebug_.severe("startForwardChannel_ returned: connection already in progress"):(Zx(a),a.channelDebug_.debug("startForwardChannel_ finished, sent request")))},Zx=function(a,b){if(b){if(6<a.channelVersion_){a.outgoingMaps_=a.pendingMaps_.concat(a.outgoingMaps_);
a.pendingMaps_.length=0;var c=a.nextRid_-1;b=Yx(a)}else c=b.rid_,b=b.postData_;}else c=a.nextRid_++,b=Yx(a);var d=a.forwardChannelUri_.clone();Xw(d,"SID",a.sid_);Xw(d,"RID",c);Xw(d,"AID",a.lastArrayId_);Ux(a,d);c=new Hw(a,a.channelDebug_,a.sid_,c,a.forwardChannelRetryCount_+1);c.setExtraHeaders(a.extraHeaders_);c.setTimeout(Math.round(.5*a.forwardChannelRequestTimeoutMs_)+Math.round(.5*a.forwardChannelRequestTimeoutMs_*Math.random()));a.forwardChannelRequest_=c;Mw(c,d,b)},Ux=function(a,b){a.handler_&&(
a=a.handler_.getAdditionalParams())&&u.forEach(a,function(c,d){Xw(b,d,c)})},Yx=function(a){var b=Math.min(a.outgoingMaps_.length,1E3),c=["count="+b];
if(6<a.channelVersion_&&0<b){var d=a.outgoingMaps_[0].mapId;c.push("ofs="+d)}else d=0;for(var e=0;e<b;e++){var g=a.outgoingMaps_[e].mapId,h=a.outgoingMaps_[e].map;g=6>=a.channelVersion_?e:g-d;try{u.forEach(h,function(m,n){c.push("req"+g+"_"+n+"="+encodeURIComponent(m))})}catch(m){c.push("req"+g+"_type="+encodeURIComponent("_badmap"))}}a.pendingMaps_=a.pendingMaps_.concat(a.outgoingMaps_.splice(0,b));
return c.join("&")},$x=function(a){a.backChannelRequest_||a.backChannelTimerId_||(a.backChannelAttemptId_=1,a.backChannelTimerId_=Zw(r(a.onStartBackChannelTimer_,a),0),a.backChannelRetryCount_=0)},by=function(a){if(a.backChannelRequest_||a.backChannelTimerId_)return a.channelDebug_.severe("Request already in progress"),!1;
if(3<=a.backChannelRetryCount_)return!1;a.channelDebug_.debug("Going to retry GET");a.backChannelAttemptId_++;a.backChannelTimerId_=Zw(r(a.onStartBackChannelTimer_,a),ay(a,a.backChannelRetryCount_));a.backChannelRetryCount_++;return!0};
Nx.prototype.onStartBackChannelTimer_=function(){this.backChannelTimerId_=null;this.channelDebug_.debug("Creating new HttpRequest");this.backChannelRequest_=new Hw(this,this.channelDebug_,this.sid_,"rpc",this.backChannelAttemptId_);this.backChannelRequest_.setExtraHeaders(this.extraHeaders_);this.backChannelRequest_.setReadyStateChangeThrottle(this.readyStateChangeThrottleMs_);var a=this.backChannelUri_.clone();Xw(a,"RID","rpc");Xw(a,"SID",this.sid_);Xw(a,"CI",this.useChunked_?"0":"1");Xw(a,"AID",
this.lastArrayId_);Ux(this,a);if(!Ne||af(10))Xw(a,"TYPE","xmlhttp"),Nw(this.backChannelRequest_,a,!0,this.hostPrefix_,!1);else{Xw(a,"TYPE","html");var b=this.backChannelRequest_,c=!!this.hostPrefix_;b.type_=3;b.baseUri_=Kw(a.clone());Yw(b,c)}this.channelDebug_.debug("New Request created")};
var Bx=function(a,b,c){a.channelDebug_.debug("Test Connection Finished");a.useChunked_=a.allowChunkedMode_&&c;a.lastStatusCode_=b.lastStatusCode_;a.asyncTest_||Sx(a)},Dx=function(a,b){a.channelDebug_.debug("Test Connection Failed");
a.lastStatusCode_=b.lastStatusCode_;Ax(a,2)};
Nx.prototype.onRequestData=function(a,b){if(0!=this.state_&&(this.backChannelRequest_==a||this.forwardChannelRequest_==a))if(this.lastStatusCode_=a.lastStatusCode_,this.forwardChannelRequest_==a&&3==this.state_){if(7<this.channelVersion_){try{var c=this.parser_.parse(b)}catch(d){c=null}if(Wa(c)&&3==c.length){if(b=c,0==b[0]){a:if(this.channelDebug_.debug("Server claims our backchannel is missing."),this.backChannelTimerId_)this.channelDebug_.debug("But we are currently starting the request.");else{if(this.backChannelRequest_){if(this.backChannelRequest_.requestStartTime_+
3E3<this.forwardChannelRequest_.requestStartTime_)Wx(this),this.backChannelRequest_.cancel(),this.backChannelRequest_=null;else break a;}else this.channelDebug_.warning("We do not have a BackChannel established");by(this);Uw(19)}}else this.lastPostResponseArrayId_=b[1],a=this.lastPostResponseArrayId_-this.lastArrayId_,0<a&&(b=b[2],this.channelDebug_.debug(b+" bytes (in "+a+" arrays) are outstanding on the BackChannel"),37500>b&&this.useChunked_&&0==this.backChannelRetryCount_&&!this.deadBackChannelTimerId_&&(
this.deadBackChannelTimerId_=Zw(r(this.onBackChannelDead_,this),6E3)));}else this.channelDebug_.debug("Bad POST response data returned"),Ax(this,11)}else"y2f%"!=b&&(this.channelDebug_.debug("Bad data returned - missing/invald magic cookie"),Ax(this,11));}else this.backChannelRequest_==a&&Wx(this),gc(b)||(c=this.parser_.parse(b),this.onInput_(c))};
Nx.prototype.correctHostPrefix=function(a){return this.allowHostPrefix_?this.handler_?this.handler_.correctHostPrefix(a):a:null};
Nx.prototype.onBackChannelDead_=function(){null!=this.deadBackChannelTimerId_&&(this.deadBackChannelTimerId_=null,this.backChannelRequest_.cancel(),this.backChannelRequest_=null,by(this),Uw(20))};
var Wx=function(a){null!=a.deadBackChannelTimerId_&&(q.clearTimeout(a.deadBackChannelTimerId_),a.deadBackChannelTimerId_=null)};
Nx.prototype.onRequestComplete=function(a){this.channelDebug_.debug("Request complete");if(this.backChannelRequest_==a){Wx(this);this.backChannelRequest_=null;var b=2}else if(this.forwardChannelRequest_==a)this.forwardChannelRequest_=null,b=1;else return;this.lastStatusCode_=a.lastStatusCode_;if(0!=this.state_)if(a.successful_)1==b?(b=fb()-a.requestStartTime_,Ox.dispatchEvent(new Qx(Ox,a.postData_?a.postData_.length:0,b,this.forwardChannelRetryCount_)),Vx(this),this.onSuccess_(),this.pendingMaps_.length=
0):$x(this);else{var c=a.getLastError();if(3==c||7==c||0==c&&0<this.lastStatusCode_)this.channelDebug_.debug("Not retrying due to error type");else{this.channelDebug_.debug("Maybe retrying, last error: "+ifa(c,this.lastStatusCode_));var d;if(d=1==b)this.forwardChannelRequest_||this.forwardChannelTimerId_?(this.channelDebug_.severe("Request already in progress"),d=!1):1==this.state_||this.forwardChannelRetryCount_>=(this.failFast_?0:this.forwardChannelMaxRetries_)?d=!1:(this.channelDebug_.debug("Going to retry POST"),
this.forwardChannelTimerId_=Zw(r(this.onStartForwardChannelTimer_,this,a),ay(this,this.forwardChannelRetryCount_)),this.forwardChannelRetryCount_++,d=!0);if(d||2==b&&by(this))return;this.channelDebug_.debug("Exceeded max number of retries")}this.channelDebug_.debug("Error: HTTP request failed");switch(c){case 1:Ax(this,5);break;case 4:Ax(this,10);break;case 3:Ax(this,6);break;case 7:Ax(this,12);break;default:Ax(this,2);}}};
var ay=function(a,b){var c=a.baseRetryDelayMs_+Math.floor(Math.random()*a.retryDelaySeedMs_);a.isActive()||(a.channelDebug_.debug("Inactive channel"),c*=2);return c*b};
Nx.prototype.setRetryDelay=function(a,b){this.baseRetryDelayMs_=a;this.retryDelaySeedMs_=b};
Nx.prototype.onInput_=function(a){for(var b=this.handler_&&this.handler_.channelHandleMultipleArrays?[]:null,c=0;c<a.length;c++){var d=a[c];this.lastArrayId_=d[0];d=d[1];2==this.state_?"c"==d[0]?(this.sid_=d[1],this.hostPrefix_=this.correctHostPrefix(d[2]),d=d[3],this.channelVersion_=null!=d?d:6,this.state_=3,this.handler_&&this.handler_.channelOpened(this),this.backChannelUri_=Cx(this,this.hostPrefix_,this.path_),$x(this)):"stop"==d[0]&&Ax(this,7):3==this.state_&&("stop"==d[0]?(b&&0!=b.length&&(this.handler_.channelHandleMultipleArrays(this,
b),b.length=0),Ax(this,7)):"noop"!=d[0]&&(b?b.push(d):this.handler_&&this.handler_.channelHandleArray(this,d)),this.backChannelRetryCount_=0)}b&&0!=b.length&&this.handler_.channelHandleMultipleArrays(this,b)};
Nx.prototype.ensureInState_=function(a){if(!wb(arguments,this.state_))throw Error("Unexpected channel state: "+this.state_)};
var Ax=function(a,b){a.channelDebug_.info("Error code "+b);if(2==b||9==b){var c=null;a.handler_&&(c=null);var d=r(a.testGoogleComCallback_,a);c||(c=new cx("//www.google.com/images/cleardot.gif"),Kw(c));sx(c.toString(),1E4,d)}else Uw(2);a.onError_(b)};
Nx.prototype.testGoogleComCallback_=function(a){a?(this.channelDebug_.info("Successfully pinged google.com"),Uw(2)):(this.channelDebug_.info("Failed to ping google.com"),Uw(1),this.onError_(8))};
Nx.prototype.onSuccess_=function(){};
Nx.prototype.onError_=function(a){this.channelDebug_.debug("HttpChannel: error - "+a);this.state_=0;this.handler_&&this.handler_.channelError(this,a);this.onClose_();Tx(this)};
Nx.prototype.onClose_=function(){this.state_=0;this.lastStatusCode_=-1;if(this.handler_)if(0==this.pendingMaps_.length&&0==this.outgoingMaps_.length)this.handler_.channelClosed(this);else{this.channelDebug_.debug("Number of undelivered maps, pending: "+this.pendingMaps_.length+", outgoing: "+this.outgoingMaps_.length);var a=Cb(this.pendingMaps_),b=Cb(this.outgoingMaps_);this.pendingMaps_.length=0;this.outgoingMaps_.length=0;this.handler_.channelClosed(this,a,b)}};
var wx=function(a,b){b=zx(a,null,b);a.channelDebug_.debug("GetForwardChannelUri: "+b);return b},Cx=function(a,b,c){b=zx(a,a.shouldUseSecondaryDomains()?b:null,c);
a.channelDebug_.debug("GetBackChannelUri: "+b);return b},zx=function(a,b,c){var d=px(c);
if(""!=d.domain_)b&&ex(d,b+"."+d.domain_),fx(d,d.port_);else{var e=window.location;d=pfa(e.protocol,b?b+"."+e.hostname:e.hostname,+e.port,c)}a.extraParams_&&u.forEach(a.extraParams_,function(g,h){Xw(d,h,g)});
Xw(d,"VER",a.channelVersion_);Ux(a,d);return d};
Nx.prototype.createXhrIo=function(a){if(a&&!this.supportsCrossDomainXhrs_)throw Error("Can't create secondary domain capable XhrIo object.");a=new Fx;a.withCredentials_=this.supportsCrossDomainXhrs_;return a};
Nx.prototype.isActive=function(){return!!this.handler_&&this.handler_.isActive(this)};
var Zw=function(a,b){if(!Za(a))throw Error("Fn must not be null and must be a function");return q.setTimeout(function(){a()},b)};
Nx.prototype.notifyServerReachabilityEvent=function(a){Ox.dispatchEvent(new Rx(Ox,a))};
var Uw=function(a){Ox.dispatchEvent(new Px(Ox,a))};
Nx.prototype.shouldUseSecondaryDomains=function(){return this.supportsCrossDomainXhrs_||!(!Ne||af(10))};
var cy=function(){};
f=cy.prototype;f.channelHandleMultipleArrays=null;f.channelOpened=function(){};
f.channelHandleArray=function(){};
f.channelSuccess=function(){};
f.channelError=function(){};
f.channelClosed=function(){};
f.getAdditionalParams=function(){return{}};
f.isActive=function(){return!0};
f.badMapError=function(){};
f.correctHostPrefix=function(a){return a};var xfa=function(a,b,c){return new dy(a,b,c)},ey=function(a,b,c,d){d=void 0===d?xfa:d;
this.baseUri=a;this.handler=b;this.config=c;this.browserChannelProvider=d;this.hasBeenDisposed=!1;this.protocolVersion="5";this.stateVersionNumber=this.state=0;this.logger=new Ru("BrowserChannelImpl");this.eventHandler=new Sv;this.delayGeneratorOnQuota=new Nu(Math.random,6E4,30);this.delayGeneratorOnNotFound=new Nu(Math.random,250,7200);this.authParams=new Au;this.immediateConnectionRateLimiter=new Mu;this.lastStatusCode=-1;this.authState=0;this.eventHandler.listen(Ox,"statevent",this.onStatEvent.bind(this));
this.delayGenerator=new Nu(Math.random,M(c,11),M(c,12));Ou(this.delayGeneratorOnQuota);Ou(this.delayGeneratorOnNotFound)};
l(ey,cy);ey.prototype.getStateForTest=function(){return this.state};
ey.prototype.getImmediateConnectBudgetForTest=function(){var a=this.immediateConnectionRateLimiter;a.update();return a.tokens};
var fy=function(a,b){b!==a.state&&(a.state=b,a.stateVersionNumber++);return a.stateVersionNumber};
f=ey.prototype;f.updateAuthParams=function(a){var b=!this.authParams||this.authParams.getToken()!==a.getToken();this.authParams=a.clone();this.browserChannel&&(a=Ku(this.authParams),this.browserChannel.setExtraHeaders(a));b&&(b=this.authState,this.authState=1,2===b&&this.tryImmediateReconnectByUserRequest())};
f.start=function(){fy(this,1);this.open(this.delayGenerator)};
f.startHandoff=function(){};
f.open=function(a){var b=this;if(1===this.state){fy(this,2);a=Ou(a)+M(this.config,3);N(this.config,3,0);var c=this.stateVersionNumber;xw(function(){gy(b,c)},a)}};
f.tryImmediateReconnectByUserRequest=function(){switch(this.state){case 1:case 2:var a=this.immediateConnectionRateLimiter;a.update();0<a.tokens?(a.tokens--,a=!0):a=!1;a&&(2===this.authState&&(this.authState=0),gy(this,this.stateVersionNumber));}};
f.handleStuckChannel=function(a){switch(a.getState()){case 1:case 2:a.disconnect();this.handler.channelStatEvent(1001,this);a.getId();break;case 3:a.disconnect(),this.handler.channelStatEvent(1002,this),a.getId();}};
var gy=function(a,b){if(a.stateVersionNumber===b){var c=fy(a,3);a.browserChannel=a.browserChannelProvider(a.protocolVersion,a.handleStuckChannel.bind(a),c);a.browserChannel.handler_=a;5===a.authParams.getScheme()?a.browserChannel.supportsCrossDomainXhrs_=!0:(b=Ku(a.authParams),a.browserChannel.setExtraHeaders(b));2===a.authState?(a.handler.channelError(new nu(2,401),a),a.browserChannel.disconnect()):(a.authState=0,L(a.config,9)?yfa(L(a.config,9),function(d){a.stateVersionNumber===c&&(d&&(a.gsessionid=
d),hy(a))}):hy(a))}},hy=function(a){var b=a.baseUri+"/cbp",c=a.baseUri+"/bind",d={};
iy(a,d);a.browserChannel.connect(b,c,d)},iy=function(a,b){a.authParams.hasAuthuser()&&(b.authuser=a.authParams.getAuthuser());
4===a.authParams.getScheme()&&(b.app_auth=a.authParams.getToken());b.ctype=a.config.getClientType();K(a.config,4)&&(b.service=L(a.config,4));K(a.config,6)&&(b.prop=L(a.config,6));K(a.config,7)&&(b.appver=L(a.config,7));a.gsessionid&&(b.gsessionid=a.gsessionid);K(a.config,10)&&(b.pageId=a.config.getPageId());L(a.config,13)&&(b.sw=!0)};
f=ey.prototype;f.getAdditionalParams=function(){var a={};iy(this,a);return a};
f.close=function(){fy(this,1);this.browserChannel&&this.browserChannel.disconnect()};
f.sendMap=function(a){this.browserChannel&&this.browserChannel.sendMap(a)};
f.channelOpened=function(a){var b=this;if(a===this.browserChannel){fy(this,4);this.delayGeneratorOnQuota.reset();Ou(this.delayGeneratorOnQuota);var c=this.stateVersionNumber;xw(function(){b.stateVersionNumber!==c||b.delayGenerator.reset()},M(this.config,14));
this.handler.channelOpened(this)}};
f.channelHandleArray=function(a,b){if(a===this.browserChannel){a=[];b=k(b);for(var c=b.next();!c.done;c=b.next()){c=c.value;var d=c.gsid;d?this.gsessionid=d:(d=c.osc)?400<=d&&499>=d&&(this.lastStatusCode=d,this.handler.channelError(new nu(2,d),this),void 0!==this.browserChannel&&this.browserChannel.disconnect()):a.push(c)}0<a.length&&this.handler.channelHandleArray(a,this)}};
f.channelError=function(a,b){a===this.browserChannel&&(this.lastStatusCode=a.lastStatusCode_,this.handler.channelError(new nu(b,this.lastStatusCode),this))};
f.channelClosed=function(a){if(a===this.browserChannel){a=this.state;fy(this,1);if(4===a||3===a){a=this.delayGenerator;switch(this.lastStatusCode){case 401:0!==this.authState||L(this.config,8)||(this.authState=2);break;case 429:a=this.delayGeneratorOnQuota;break;case 404:a=this.delayGeneratorOnNotFound;}this.open(a)}this.lastStatusCode=-1;this.browserChannel=void 0;this.handler.channelClosed(this)}};
f.onStatEvent=function(a){this.handler.channelStatEvent(a.stat,this)};
f.dispose=function(){nk(this.eventHandler);this.hasBeenDisposed=!0};
f.isDisposed=function(){return this.hasBeenDisposed};
var jy=function(a,b){Hx(a,function(c){var d=null;try{var e=c.target;if(e.isSuccess()){var g=qv(e.getResponseText());d={count:Number(g[0]),gsid:g[1].toString()}}}catch(h){}b(d)},"GET",void 0,void 0,500)},yfa=function(a,b){jy(a,function(c){c?jy(a,function(d){d?b(c.count<d.count?c.gsid:d.gsid):b(void 0)}):b(void 0)})};
ey.prototype.installOnlineHandler=function(){var a=new Aw;this.eventHandler.listen(a,"online",this.onBrowserOnline.bind(this))};
ey.prototype.onBrowserOnline=function(){2!==this.authState&&this.tryImmediateReconnectByUserRequest()};
var ky=function(a,b){this.browserChannel=a;this.onStuck=b;this.checksSinceLastActivity=0;this.logger=new Ru("bc-watchdog")};
ky.prototype.checkActivity=function(){this.checksSinceLastActivity++;switch(this.browserChannel.getState()){case 1:case 2:if(3===this.checksSinceLastActivity){this.onStuck(this.browserChannel);return}break;case 3:if(5===this.checksSinceLastActivity){this.onStuck(this.browserChannel);return}break;case 0:return;}this.schedule();this.browserChannel.getId()};
ky.prototype.schedule=function(){xw(this.checkActivity,2E4,this)};
var dy=function(a,b,c){Nx.call(this,a);this.id=c;this.watchdog=new ky(this,b);this.watchdog.schedule()};
l(dy,Nx);dy.prototype.getId=function(){return this.id};
dy.prototype.onRequestData=function(a,b){var c=this.watchdog;3===c.browserChannel.getState()&&(c.checksSinceLastActivity=0);Nx.prototype.onRequestData.call(this,a,b)};var zfa=function(a,b,c){return new ey(a,b,c)};var ly=null;function my(){ly||(ly=Afa()?"0":Math.floor(30*Math.random()).toString());return ly}
function Afa(){try{if(q.PerformanceNavigationTiming){var a=performance.getEntriesByType("navigation")[0];return"hq"===a.nextHopProtocol||"h2"===a.nextHopProtocol}return!!q.chrome.loadTimes().wasFetchedViaSpdy}catch(b){return!1}}
;var ny=function(){J.call(this)};
t(ny,J);var oy=null;f=ny.prototype;f.getMajorVersion=function(){return L(this,1)};
f.getMajorVersionOrDefault=function(){return M(this,1)};
f.setMajorVersion=function(a){N(this,1,a)};
f.hasMajorVersion=function(){return K(this,1)};
f.majorVersionCount=function(){return Q(this,1)};
f.clearMajorVersion=function(){O(this,1)};
f.getMinorVersion=function(){return L(this,2)};
f.getMinorVersionOrDefault=function(){return M(this,2)};
f.setMinorVersion=function(a){N(this,2,a)};
f.hasMinorVersion=function(){return K(this,2)};
f.minorVersionCount=function(){return Q(this,2)};
f.clearMinorVersion=function(){O(this,2)};
var py=function(){J.call(this)};
t(py,J);var qy=null;f=py.prototype;f.getVersion=function(){return L(this,1)};
f.getVersionOrDefault=function(){return M(this,1)};
f.setVersion=function(a){N(this,1,a)};
f.hasVersion=function(){return K(this,1)};
f.versionCount=function(){return Q(this,1)};
f.clearVersion=function(){O(this,1)};
var ry=function(){J.call(this)};
t(ry,J);var sy=null;f=ry.prototype;f.getVersion=function(){return L(this,1)};
f.getVersionOrDefault=function(){return M(this,1)};
f.setVersion=function(a){N(this,1,a)};
f.hasVersion=function(){return K(this,1)};
f.versionCount=function(){return Q(this,1)};
f.clearVersion=function(){O(this,1)};
f.getPlatform=function(){return L(this,2)};
f.getPlatformOrDefault=function(){return M(this,2)};
f.setPlatform=function(a){N(this,2,a)};
f.hasPlatform=function(){return K(this,2)};
f.platformCount=function(){return Q(this,2)};
f.clearPlatform=function(){O(this,2)};
f.getLanguage=function(){return L(this,3)};
f.getLanguageOrDefault=function(){return M(this,3)};
f.setLanguage=function(a){N(this,3,a)};
f.hasLanguage=function(){return K(this,3)};
f.languageCount=function(){return Q(this,3)};
f.clearLanguage=function(){O(this,3)};
f.getApplicationInfo=function(){return L(this,4)};
f.getApplicationInfoOrDefault=function(){return M(this,4)};
f.setApplicationInfo=function(a){N(this,4,a)};
f.hasApplicationInfo=function(){return K(this,4)};
f.applicationInfoCount=function(){return Q(this,4)};
f.clearApplicationInfo=function(){O(this,4)};
var ty=function(){J.call(this)};
t(ty,J);var uy=null;f=ty.prototype;f.getServiceName=function(){return L(this,1)};
f.getServiceNameOrDefault=function(){return M(this,1)};
f.hasServiceName=function(){return K(this,1)};
f.serviceNameCount=function(){return Q(this,1)};
f.clearServiceName=function(){O(this,1)};
f.getSessionName=function(){return L(this,2)};
f.getSessionNameOrDefault=function(){return M(this,2)};
f.hasSessionName=function(){return K(this,2)};
f.sessionNameCount=function(){return Q(this,2)};
f.clearSessionName=function(){O(this,2)};
var vy=function(){J.call(this)};
t(vy,J);var wy=null;f=vy.prototype;f.getHeaderOrDefault=function(){return M(this,1)};
f.setHeader=function(a){N(this,1,a)};
f.hasHeader=function(){return K(this,1)};
f.headerCount=function(){return Q(this,1)};
f.clearHeader=function(){O(this,1)};
f.getInitEndpointMessage=function(){return L(this,2)};
f.getInitEndpointMessageOrDefault=function(){return M(this,2)};
f.hasInitEndpointMessage=function(){return K(this,2)};
f.initEndpointMessageCount=function(){return Q(this,2)};
f.clearInitEndpointMessage=function(){O(this,2)};
f.getInitSessionMessage=function(){return L(this,3)};
f.getInitSessionMessageOrDefault=function(){return M(this,3)};
f.setInitSessionMessage=function(a){N(this,3,a)};
f.hasInitSessionMessage=function(){return K(this,3)};
f.initSessionMessageCount=function(){return Q(this,3)};
f.clearInitSessionMessage=function(){O(this,3)};
f.getClientDataMessageDeprecated=function(){return L(this,4)};
f.getClientDataMessageDeprecatedOrDefault=function(){return M(this,4)};
f.setClientDataMessageDeprecated=function(a){N(this,4,a)};
f.hasClientDataMessageDeprecated=function(){return K(this,4)};
f.clientDataMessageDeprecatedCount=function(){return Q(this,4)};
f.clearClientDataMessageDeprecated=function(){O(this,4)};
f.getSendOnDisconnectMessage=function(){return L(this,5)};
f.getSendOnDisconnectMessageOrDefault=function(){return M(this,5)};
f.setSendOnDisconnectMessage=function(a){N(this,5,a)};
f.hasSendOnDisconnectMessage=function(){return K(this,5)};
f.sendOnDisconnectMessageCount=function(){return Q(this,5)};
f.clearSendOnDisconnectMessage=function(){O(this,5)};
f.getCloseSessionMessage=function(){return L(this,6)};
f.getCloseSessionMessageOrDefault=function(){return M(this,6)};
f.hasCloseSessionMessage=function(){return K(this,6)};
f.closeSessionMessageCount=function(){return Q(this,6)};
f.clearCloseSessionMessage=function(){O(this,6)};
var xy=function(){J.call(this)};
t(xy,J);var yy=null;f=xy.prototype;f.getProtocolVersion=function(){return L(this,1)};
f.getProtocolVersionOrDefault=function(){return M(this,1)};
f.setProtocolVersion=function(a){N(this,1,a)};
f.hasProtocolVersion=function(){return K(this,1)};
f.protocolVersionCount=function(){return Q(this,1)};
f.clearProtocolVersion=function(){O(this,1)};
f.getClientVersion=function(){return L(this,2)};
f.getClientVersionOrDefault=function(){return M(this,2)};
f.setClientVersion=function(a){N(this,2,a)};
f.hasClientVersion=function(){return K(this,2)};
f.clientVersionCount=function(){return Q(this,2)};
f.clearClientVersion=function(){O(this,2)};
f.getClientTimeMs=function(){return L(this,3)};
f.getClientTimeMsOrDefault=function(){return M(this,3)};
f.setClientTimeMs=function(a){N(this,3,a)};
f.hasClientTimeMs=function(){return K(this,3)};
f.clientTimeMsCount=function(){return Q(this,3)};
f.clearClientTimeMs=function(){O(this,3)};
f.getMaxKnownServerTimeMs=function(){return L(this,4)};
f.getMaxKnownServerTimeMsOrDefault=function(){return M(this,4)};
f.setMaxKnownServerTimeMs=function(a){N(this,4,a)};
f.hasMaxKnownServerTimeMs=function(){return K(this,4)};
f.maxKnownServerTimeMsCount=function(){return Q(this,4)};
f.clearMaxKnownServerTimeMs=function(){O(this,4)};
f.getMessageId=function(){return L(this,5)};
f.getMessageIdOrDefault=function(){return M(this,5)};
f.setMessageId=function(a){N(this,5,a)};
f.hasMessageId=function(){return K(this,5)};
f.messageIdCount=function(){return Q(this,5)};
f.clearMessageId=function(){O(this,5)};
var zy=function(){J.call(this)};
t(zy,J);var Ay=null,By=function(){J.call(this)};
t(By,J);var Cy=null;f=By.prototype;f.getSessionId=function(){return L(this,1)};
f.getSessionIdOrDefault=function(){return M(this,1)};
f.setSessionId=function(a){N(this,1,a)};
f.hasSessionId=function(){return K(this,1)};
f.sessionIdCount=function(){return Q(this,1)};
f.clearSessionId=function(){O(this,1)};
f.getSubscriberInfo=function(){return L(this,2)};
f.getSubscriberInfoOrDefault=function(){return M(this,2)};
f.setSubscriberInfo=function(a){N(this,2,a)};
f.hasSubscriberInfo=function(){return K(this,2)};
f.subscriberInfoCount=function(){return Q(this,2)};
f.clearSubscriberInfo=function(){O(this,2)};
var Dy=function(){J.call(this)};
t(Dy,J);var Ey=null;f=Dy.prototype;f.getSessionId=function(){return L(this,1)};
f.getSessionIdOrDefault=function(){return M(this,1)};
f.setSessionId=function(a){N(this,1,a)};
f.hasSessionId=function(){return K(this,1)};
f.sessionIdCount=function(){return Q(this,1)};
f.clearSessionId=function(){O(this,1)};
var Fy=function(){J.call(this)};
t(Fy,J);var Gy=null;f=Fy.prototype;f.getSessionId=function(){return L(this,1)};
f.getSessionIdOrDefault=function(){return M(this,1)};
f.setSessionId=function(a){N(this,1,a)};
f.hasSessionId=function(){return K(this,1)};
f.sessionIdCount=function(){return Q(this,1)};
f.clearSessionId=function(){O(this,1)};
f.getMessage=function(){return L(this,2)};
f.getMessageOrDefault=function(){return M(this,2)};
f.setMessage=function(a){N(this,2,a)};
f.hasMessage=function(){return K(this,2)};
f.messageCount=function(){return Q(this,2)};
f.clearMessage=function(){O(this,2)};
var Hy=function(){J.call(this)};
t(Hy,J);var Iy=null;f=Hy.prototype;f.getSessionId=function(){return L(this,1)};
f.getSessionIdOrDefault=function(){return M(this,1)};
f.setSessionId=function(a){N(this,1,a)};
f.hasSessionId=function(){return K(this,1)};
f.sessionIdCount=function(){return Q(this,1)};
f.clearSessionId=function(){O(this,1)};
f.getAddressOrDefault=function(){return M(this,2)};
f.setAddress=function(a){N(this,2,a)};
f.hasAddress=function(){return K(this,2)};
f.addressCount=function(){return Q(this,2)};
f.clearAddress=function(){O(this,2)};
f.getIsBroadcastToUser=function(){return L(this,3)};
f.setIsBroadcastToUser=function(a){N(this,3,a)};
f.hasIsBroadcastToUser=function(){return K(this,3)};
f.isBroadcastToUserCount=function(){return Q(this,3)};
f.clearIsBroadcastToUser=function(){O(this,3)};
f.getStatus=function(){return L(this,4)};
f.getStatusOrDefault=function(){return M(this,4)};
f.setStatus=function(a){N(this,4,a)};
f.hasStatus=function(){return K(this,4)};
f.statusCount=function(){return Q(this,4)};
f.clearStatus=function(){O(this,4)};
f.getSubscriberInfo=function(){return L(this,5)};
f.getSubscriberInfoOrDefault=function(){return M(this,5)};
f.setSubscriberInfo=function(a){N(this,5,a)};
f.hasSubscriberInfo=function(){return K(this,5)};
f.subscriberInfoCount=function(){return Q(this,5)};
f.clearSubscriberInfo=function(){O(this,5)};
var Jy=function(){J.call(this)};
t(Jy,J);var Ky=null;f=Jy.prototype;f.getHeader=function(){return L(this,1)};
f.getHeaderOrDefault=function(){return M(this,1)};
f.setHeader=function(a){N(this,1,a)};
f.hasHeader=function(){return K(this,1)};
f.headerCount=function(){return Q(this,1)};
f.clearHeader=function(){O(this,1)};
f.getServerDataMessageOrDefault=function(){return M(this,2)};
f.setServerDataMessage=function(a){N(this,2,a)};
f.serverDataMessageCount=function(){return Q(this,2)};
f.clearServerDataMessage=function(){O(this,2)};
f.getPostmanInvalidation=function(){return L(this,5)};
f.getPostmanInvalidationOrDefault=function(){return M(this,5)};
f.setPostmanInvalidation=function(a){N(this,5,a)};
f.hasPostmanInvalidation=function(){return K(this,5)};
f.postmanInvalidationCount=function(){return Q(this,5)};
f.clearPostmanInvalidation=function(){O(this,5)};
f.getChannelStatusMessageOrDefault=function(){return M(this,3)};
f.setChannelStatusMessage=function(a){N(this,3,a)};
f.channelStatusMessageCount=function(){return Q(this,3)};
f.clearChannelStatusMessage=function(){O(this,3)};
f.getSessionStatusMessage=function(){return L(this,4)};
f.getSessionStatusMessageOrDefault=function(){return M(this,4)};
f.setSessionStatusMessage=function(a){N(this,4,a)};
f.hasSessionStatusMessage=function(){return K(this,4)};
f.sessionStatusMessageCount=function(){return Q(this,4)};
f.clearSessionStatusMessage=function(){O(this,4)};
var Ly=function(){J.call(this)};
t(Ly,J);var My=null;f=Ly.prototype;f.getProtocolVersion=function(){return L(this,1)};
f.getProtocolVersionOrDefault=function(){return M(this,1)};
f.setProtocolVersion=function(a){N(this,1,a)};
f.hasProtocolVersion=function(){return K(this,1)};
f.protocolVersionCount=function(){return Q(this,1)};
f.clearProtocolVersion=function(){O(this,1)};
f.getServerTimeMsOrDefault=function(){return M(this,4)};
f.setServerTimeMs=function(a){N(this,4,a)};
f.hasServerTimeMs=function(){return K(this,4)};
f.serverTimeMsCount=function(){return Q(this,4)};
f.clearServerTimeMs=function(){O(this,4)};
f.getMessageId=function(){return L(this,5)};
f.getMessageIdOrDefault=function(){return M(this,5)};
f.setMessageId=function(a){N(this,5,a)};
f.hasMessageId=function(){return K(this,5)};
f.messageIdCount=function(){return Q(this,5)};
f.clearMessageId=function(){O(this,5)};
var Ny=function(){J.call(this)};
t(Ny,J);var Oy=null;f=Ny.prototype;f.getCode=function(){return L(this,1)};
f.getCodeOrDefault=function(){return M(this,1)};
f.setCode=function(a){N(this,1,a)};
f.hasCode=function(){return K(this,1)};
f.codeCount=function(){return Q(this,1)};
f.clearCode=function(){O(this,1)};
f.getDescription=function(){return L(this,2)};
f.getDescriptionOrDefault=function(){return M(this,2)};
f.setDescription=function(a){N(this,2,a)};
f.hasDescription=function(){return K(this,2)};
f.descriptionCount=function(){return Q(this,2)};
f.clearDescription=function(){O(this,2)};
var Py=function(){J.call(this)};
t(Py,J);var Qy=null;f=Py.prototype;f.getStatus=function(){return L(this,1)};
f.getStatusOrDefault=function(){return M(this,1)};
f.setStatus=function(a){N(this,1,a)};
f.hasStatus=function(){return K(this,1)};
f.statusCount=function(){return Q(this,1)};
f.clearStatus=function(){O(this,1)};
f.getJidResourceOrDefault=function(){return M(this,2)};
f.setJidResource=function(a){N(this,2,a)};
f.jidResourceCount=function(){return Q(this,2)};
f.clearJidResource=function(){O(this,2)};
var Ry=function(){J.call(this)};
t(Ry,J);var Sy=null;f=Ry.prototype;f.getSignalOrDefault=function(){return M(this,1)};
f.setSignal=function(a){N(this,1,a)};
f.hasSignal=function(){return K(this,1)};
f.signalCount=function(){return Q(this,1)};
f.clearSignal=function(){O(this,1)};
f.getSessionId=function(){return L(this,2)};
f.getSessionIdOrDefault=function(){return M(this,2)};
f.setSessionId=function(a){N(this,2,a)};
f.hasSessionId=function(){return K(this,2)};
f.sessionIdCount=function(){return Q(this,2)};
f.clearSessionId=function(){O(this,2)};
f.getAckIdOrDefault=function(){return M(this,3)};
f.setAckId=function(a){N(this,3,a)};
f.hasAckId=function(){return K(this,3)};
f.ackIdCount=function(){return Q(this,3)};
f.clearAckId=function(){O(this,3)};
var Ty=function(){J.call(this)};
t(Ty,J);var Uy=null;f=Ty.prototype;f.getSubscriptionKeyOrDefault=function(){return M(this,1)};
f.setSubscriptionKey=function(a){N(this,1,a)};
f.hasSubscriptionKey=function(){return K(this,1)};
f.subscriptionKeyCount=function(){return Q(this,1)};
f.clearSubscriptionKey=function(){O(this,1)};
f.getMessage=function(){return L(this,2)};
f.getMessageOrDefault=function(){return M(this,2)};
f.setMessage=function(a){N(this,2,a)};
f.hasMessage=function(){return K(this,2)};
f.messageCount=function(){return Q(this,2)};
f.clearMessage=function(){O(this,2)};
var Vy=function(){J.call(this)};
t(Vy,J);var Wy=null;f=Vy.prototype;f.getName=function(){return L(this,1)};
f.getNameOrDefault=function(){return M(this,1)};
f.setName=function(a){N(this,1,a)};
f.hasName=function(){return K(this,1)};
f.nameCount=function(){return Q(this,1)};
f.clearName=function(){O(this,1)};
f.getTopicName=function(){return L(this,2)};
f.getTopicNameOrDefault=function(){return M(this,2)};
f.setTopicName=function(a){N(this,2,a)};
f.hasTopicName=function(){return K(this,2)};
f.topicNameCount=function(){return Q(this,2)};
f.clearTopicName=function(){O(this,2)};
var Xy=function(){J.call(this)};
t(Xy,J);var Yy=null;f=Xy.prototype;f.getData=function(){return L(this,1)};
f.getDataOrDefault=function(){return M(this,1)};
f.setData=function(a){N(this,1,a)};
f.dataCount=function(){return Q(this,1)};
f.clearData=function(){O(this,1)};
f.getTraceIdOrDefault=function(){return M(this,2)};
f.setTraceId=function(a){N(this,2,a)};
f.traceIdCount=function(){return Q(this,2)};
f.clearTraceId=function(){O(this,2)};
f.getPublishTimestampMicrosOrDefault=function(){return M(this,3)};
f.setPublishTimestampMicros=function(a){N(this,3,a)};
f.hasPublishTimestampMicros=function(){return K(this,3)};
f.publishTimestampMicrosCount=function(){return Q(this,3)};
f.clearPublishTimestampMicros=function(){O(this,3)};
f.getIsSuppressor=function(){return L(this,4)};
f.setIsSuppressor=function(a){N(this,4,a)};
f.hasIsSuppressor=function(){return K(this,4)};
f.isSuppressorCount=function(){return Q(this,4)};
f.clearIsSuppressor=function(){O(this,4)};
ny.prototype.getDescriptor=function(){var a=oy;a||(oy=a=xu(ny,{0:{name:"Version",fullName:"buzz.channel.Version"},1:{name:"major_version",fieldType:5,type:Number},2:{name:"minor_version",fieldType:5,type:Number}}));return a};
ny.getDescriptor=ny.prototype.getDescriptor;py.prototype.getDescriptor=function(){var a=qy;a||(qy=a=xu(py,{0:{name:"ProtocolVersion",fullName:"buzz.channel.ProtocolVersion"},1:{name:"version",fieldType:11,type:ny}}));return a};
py.getDescriptor=py.prototype.getDescriptor;ry.prototype.getDescriptor=function(){var a=sy;a||(sy=a=xu(ry,{0:{name:"ClientVersion",fullName:"buzz.channel.ClientVersion"},1:{name:"version",fieldType:11,type:ny},2:{name:"platform",fieldType:9,type:String},3:{name:"language",fieldType:9,type:String},4:{name:"application_info",fieldType:9,type:String}}));return a};
ry.getDescriptor=ry.prototype.getDescriptor;ty.prototype.getDescriptor=function(){var a=uy;a||(uy=a=xu(ty,{0:{name:"SessionId",fullName:"buzz.channel.SessionId"},1:{name:"service_name",fieldType:9,type:String},2:{name:"session_name",fieldType:9,type:String}}));return a};
ty.getDescriptor=ty.prototype.getDescriptor;
vy.prototype.getDescriptor=function(){var a=wy;a||(wy=a=xu(vy,{0:{name:"ClientToServerMessage",fullName:"buzz.channel.ClientToServerMessage"},1:{name:"header",fieldType:11,type:xy},2:{name:"init_endpoint_message",fieldType:11,type:zy},3:{name:"init_session_message",fieldType:11,type:By},4:{name:"client_data_message_deprecated",fieldType:11,type:Fy},5:{name:"send_on_disconnect_message",fieldType:11,type:Fy},6:{name:"close_session_message",fieldType:11,type:Dy}}));return a};
vy.getDescriptor=vy.prototype.getDescriptor;xy.prototype.getDescriptor=function(){var a=yy;a||(yy=a=xu(xy,{0:{name:"ClientHeader",fullName:"buzz.channel.ClientHeader"},1:{name:"protocol_version",fieldType:11,type:py},2:{name:"client_version",fieldType:11,type:ry},3:{name:"client_time_ms",fieldType:3,type:Number},4:{name:"max_known_server_time_ms",fieldType:3,type:Number},5:{name:"message_id",fieldType:9,type:String}}));return a};
xy.getDescriptor=xy.prototype.getDescriptor;zy.prototype.getDescriptor=function(){var a=Ay;a||(Ay=a=xu(zy,{0:{name:"InitEndpointMessage",fullName:"buzz.channel.InitEndpointMessage"}}));return a};
zy.getDescriptor=zy.prototype.getDescriptor;By.prototype.getDescriptor=function(){var a=Cy;a||(Cy=a=xu(By,{0:{name:"InitSessionMessage",fullName:"buzz.channel.InitSessionMessage"},1:{name:"session_id",fieldType:11,type:ty},2:{name:"subscriber_info",fieldType:9,type:String}}));return a};
By.getDescriptor=By.prototype.getDescriptor;Dy.prototype.getDescriptor=function(){var a=Ey;a||(Ey=a=xu(Dy,{0:{name:"CloseSessionMessage",fullName:"buzz.channel.CloseSessionMessage"},1:{name:"session_id",fieldType:11,type:ty}}));return a};
Dy.getDescriptor=Dy.prototype.getDescriptor;Fy.prototype.getDescriptor=function(){var a=Gy;a||(Gy=a=xu(Fy,{0:{name:"DataMessage",fullName:"buzz.channel.DataMessage"},1:{name:"session_id",fieldType:11,type:ty},2:{name:"message",fieldType:9,type:String}}));return a};
Fy.getDescriptor=Fy.prototype.getDescriptor;Hy.prototype.getDescriptor=function(){var a=Iy;a||(Iy=a=xu(Hy,{0:{name:"SessionStatusMessage",fullName:"buzz.channel.SessionStatusMessage"},1:{name:"session_id",fieldType:11,type:ty},2:{name:"address",fieldType:9,type:String},3:{name:"is_broadcast_to_user",fieldType:8,type:Boolean},4:{name:"status",fieldType:11,type:Ny},5:{name:"subscriber_info",fieldType:9,type:String}}));return a};
Hy.getDescriptor=Hy.prototype.getDescriptor;Jy.prototype.getDescriptor=function(){var a=Ky;a||(Ky=a=xu(Jy,{0:{name:"ServerToClientMessage",fullName:"buzz.channel.ServerToClientMessage"},1:{name:"header",fieldType:11,type:Ly},2:{name:"server_data_message",fieldType:11,type:Fy},5:{name:"postman_invalidation",fieldType:11,type:Ry},3:{name:"channel_status_message",fieldType:11,type:Py},4:{name:"session_status_message",fieldType:11,type:Hy}}));return a};
Jy.getDescriptor=Jy.prototype.getDescriptor;Ly.prototype.getDescriptor=function(){var a=My;a||(My=a=xu(Ly,{0:{name:"ServerHeader",fullName:"buzz.channel.ServerHeader"},1:{name:"protocol_version",fieldType:11,type:py},4:{name:"server_time_ms",fieldType:3,type:Number},5:{name:"message_id",fieldType:9,type:String}}));return a};
Ly.getDescriptor=Ly.prototype.getDescriptor;Ny.prototype.getDescriptor=function(){var a=Oy;a||(Oy=a=xu(Ny,{0:{name:"StatusP",fullName:"buzz.channel.StatusP"},1:{name:"code",fieldType:5,type:Number},2:{name:"description",fieldType:9,type:String}}));return a};
Ny.getDescriptor=Ny.prototype.getDescriptor;Py.prototype.getDescriptor=function(){var a=Qy;a||(Qy=a=xu(Py,{0:{name:"ChannelStatusMessage",fullName:"buzz.channel.ChannelStatusMessage"},1:{name:"status",fieldType:11,type:Ny},2:{name:"jid_resource",fieldType:9,type:String}}));return a};
Py.getDescriptor=Py.prototype.getDescriptor;Ry.prototype.getDescriptor=function(){var a=Sy;a||(Sy=a=xu(Ry,{0:{name:"LcsPostmanInvalidation",fullName:"buzz.channel.LcsPostmanInvalidation"},1:{name:"signal",fieldType:11,type:Ty},2:{name:"session_id",fieldType:11,type:ty},3:{name:"ack_id",fieldType:9,type:String}}));return a};
Ry.getDescriptor=Ry.prototype.getDescriptor;Ty.prototype.getDescriptor=function(){var a=Uy;a||(Uy=a=xu(Ty,{0:{name:"LcsSignal",fullName:"buzz.channel.LcsSignal"},1:{name:"subscription_key",fieldType:11,type:Vy},2:{name:"message",fieldType:11,type:Xy}}));return a};
Ty.getDescriptor=Ty.prototype.getDescriptor;Vy.prototype.getDescriptor=function(){var a=Wy;a||(Wy=a=xu(Vy,{0:{name:"LcsSubscriptionKey",fullName:"buzz.channel.LcsSubscriptionKey"},1:{name:"name",fieldType:12,type:String},2:{name:"topic_name",fieldType:9,type:String}}));return a};
Vy.getDescriptor=Vy.prototype.getDescriptor;Xy.prototype.getDescriptor=function(){var a=Yy;a||(Yy=a=xu(Xy,{0:{name:"LcsPostmanMessage",fullName:"buzz.channel.LcsPostmanMessage"},1:{name:"data",fieldType:9,type:String},2:{name:"trace_id",fieldType:9,type:String},3:{name:"publish_timestamp_micros",fieldType:3,type:String},4:{name:"is_suppressor",fieldType:8,defaultValue:!0,type:Boolean}}));return a};
Xy.getDescriptor=Xy.prototype.getDescriptor;var Zy=new py,$y=new ny;$y.setMajorVersion(3);$y.setMinorVersion(2);Zy.setVersion($y);var az=new ny;az.setMajorVersion(3);az.setMinorVersion(2);var bz=new ny;bz.setMajorVersion(3);bz.setMinorVersion(2);var cz=function(){J.call(this)};
t(cz,J);var dz=null;f=cz.prototype;f.getAuthParams=function(){return L(this,1)};
f.getAuthParamsOrDefault=function(){return M(this,1)};
f.hasAuthParams=function(){return K(this,1)};
f.authParamsCount=function(){return Q(this,1)};
f.clearAuthParams=function(){O(this,1)};
f.getInitSessionMessage=function(){return L(this,2)};
f.getInitSessionMessageOrDefault=function(){return M(this,2)};
f.setInitSessionMessage=function(a){N(this,2,a)};
f.hasInitSessionMessage=function(){return K(this,2)};
f.initSessionMessageCount=function(){return Q(this,2)};
f.clearInitSessionMessage=function(){O(this,2)};
f.getBrowserChannelConfig=function(){return L(this,3)};
f.getBrowserChannelConfigOrDefault=function(){return M(this,3)};
f.hasBrowserChannelConfig=function(){return K(this,3)};
f.browserChannelConfigCount=function(){return Q(this,3)};
f.clearBrowserChannelConfig=function(){O(this,3)};
f.getHeartbeat=function(){return L(this,4)};
f.getHeartbeatOrDefault=function(){return M(this,4)};
f.setHeartbeat=function(a){N(this,4,a)};
f.hasHeartbeat=function(){return K(this,4)};
f.heartbeatCount=function(){return Q(this,4)};
f.clearHeartbeat=function(){O(this,4)};
var ez=function(){J.call(this)};
t(ez,J);var fz=null;f=ez.prototype;f.getDataMessageOrDefault=function(){return M(this,1)};
f.setDataMessage=function(a){N(this,1,a)};
f.dataMessageCount=function(){return Q(this,1)};
f.clearDataMessage=function(){O(this,1)};
f.getPostmanInvalidation=function(){return L(this,12)};
f.getPostmanInvalidationOrDefault=function(){return M(this,12)};
f.setPostmanInvalidation=function(a){N(this,12,a)};
f.hasPostmanInvalidation=function(){return K(this,12)};
f.postmanInvalidationCount=function(){return Q(this,12)};
f.clearPostmanInvalidation=function(){O(this,12)};
f.getSessionStatusMessage=function(){return L(this,2)};
f.getSessionStatusMessageOrDefault=function(){return M(this,2)};
f.setSessionStatusMessage=function(a){N(this,2,a)};
f.hasSessionStatusMessage=function(){return K(this,2)};
f.sessionStatusMessageCount=function(){return Q(this,2)};
f.clearSessionStatusMessage=function(){O(this,2)};
f.getChannelStatusMessage=function(){return L(this,3)};
f.getChannelStatusMessageOrDefault=function(){return M(this,3)};
f.setChannelStatusMessage=function(a){N(this,3,a)};
f.hasChannelStatusMessage=function(){return K(this,3)};
f.channelStatusMessageCount=function(){return Q(this,3)};
f.clearChannelStatusMessage=function(){O(this,3)};
f.getSharedWorkerEventMessageOrDefault=function(){return M(this,4)};
f.setSharedWorkerEventMessage=function(a){N(this,4,a)};
f.sharedWorkerEventMessageCount=function(){return Q(this,4)};
f.clearSharedWorkerEventMessage=function(){O(this,4)};
f.getAuthParamsRequestMessage=function(){return L(this,5)};
f.getAuthParamsRequestMessageOrDefault=function(){return M(this,5)};
f.setAuthParamsRequestMessage=function(a){N(this,5,a)};
f.authParamsRequestMessageCount=function(){return Q(this,5)};
f.clearAuthParamsRequestMessage=function(){O(this,5)};
f.getConfigRequestMessage=function(){return L(this,6)};
f.getConfigRequestMessageOrDefault=function(){return M(this,6)};
f.setConfigRequestMessage=function(a){N(this,6,a)};
f.configRequestMessageCount=function(){return Q(this,6)};
f.clearConfigRequestMessage=function(){O(this,6)};
f.getSenderId=function(){return L(this,7)};
f.getSenderIdOrDefault=function(){return M(this,7)};
f.setSenderId=function(a){N(this,7,a)};
f.hasSenderId=function(){return K(this,7)};
f.senderIdCount=function(){return Q(this,7)};
f.clearSenderId=function(){O(this,7)};
f.getChannelStatMessageOrDefault=function(){return M(this,9)};
f.setChannelStatMessage=function(a){N(this,9,a)};
f.channelStatMessageCount=function(){return Q(this,9)};
f.clearChannelStatMessage=function(){O(this,9)};
f.getBrowserChannelClosedMessage=function(){return L(this,10)};
f.getBrowserChannelClosedMessageOrDefault=function(){return M(this,10)};
f.setBrowserChannelClosedMessage=function(a){N(this,10,a)};
f.browserChannelClosedMessageCount=function(){return Q(this,10)};
f.clearBrowserChannelClosedMessage=function(){O(this,10)};
f.getBrowserChannelErrorMessageOrDefault=function(){return M(this,11)};
f.setBrowserChannelErrorMessage=function(a){N(this,11,a)};
f.browserChannelErrorMessageCount=function(){return Q(this,11)};
f.clearBrowserChannelErrorMessage=function(){O(this,11)};
var gz=function(){J.call(this)};
t(gz,J);var hz=null;f=gz.prototype;f.getEventOrDefault=function(){return M(this,1)};
f.setEvent=function(a){N(this,1,a)};
f.eventCount=function(){return Q(this,1)};
f.clearEvent=function(){O(this,1)};
f.getConnectionCountOrDefault=function(){return M(this,2)};
f.setConnectionCount=function(a){N(this,2,a)};
f.hasConnectionCount=function(){return K(this,2)};
f.connectionCountCount=function(){return Q(this,2)};
f.clearConnectionCount=function(){O(this,2)};
var Bfa={CREATED:1,STARTED:2},iz=function(){J.call(this)};
t(iz,J);var jz=null,kz=function(){J.call(this)};
t(kz,J);var lz=null,mz=function(){J.call(this)};
t(mz,J);var nz=null,oz=function(){J.call(this)};
t(oz,J);var pz=null;f=oz.prototype;f.getStatOrDefault=function(){return M(this,1)};
f.setStat=function(a){N(this,1,a)};
f.hasStat=function(){return K(this,1)};
f.statCount=function(){return Q(this,1)};
f.clearStat=function(){O(this,1)};
var qz=function(){J.call(this)};
t(qz,J);var rz=null,sz=function(){J.call(this)};
t(sz,J);var tz=null;f=sz.prototype;f.getBrowserChannelErrorCode=function(){return L(this,1)};
f.getBrowserChannelErrorCodeOrDefault=function(){return M(this,1)};
f.setBrowserChannelErrorCode=function(a){N(this,1,a)};
f.hasBrowserChannelErrorCode=function(){return K(this,1)};
f.browserChannelErrorCodeCount=function(){return Q(this,1)};
f.clearBrowserChannelErrorCode=function(){O(this,1)};
f.getLastHttpStatusCode=function(){return L(this,2)};
f.getLastHttpStatusCodeOrDefault=function(){return M(this,2)};
f.setLastHttpStatusCode=function(a){N(this,2,a)};
f.hasLastHttpStatusCode=function(){return K(this,2)};
f.lastHttpStatusCodeCount=function(){return Q(this,2)};
f.clearLastHttpStatusCode=function(){O(this,2)};
cz.prototype.getDescriptor=function(){var a=dz;a||(dz=a=xu(cz,{0:{name:"ClientToSharedWorkerMessage",fullName:"buzz.channel.proto.ClientToSharedWorkerMessage"},1:{name:"auth_params",fieldType:11,type:Au},2:{name:"init_session_message",fieldType:11,type:By},3:{name:"browser_channel_config",fieldType:11,type:yu},4:{name:"heartbeat",fieldType:11,type:iz}}));return a};
cz.getDescriptor=cz.prototype.getDescriptor;
ez.prototype.getDescriptor=function(){var a=fz;a||(fz=a=xu(ez,{0:{name:"SharedWorkerToClientMessage",fullName:"buzz.channel.proto.SharedWorkerToClientMessage"},1:{name:"data_message",fieldType:11,type:Fy},12:{name:"postman_invalidation",fieldType:11,type:Ry},2:{name:"session_status_message",fieldType:11,type:Hy},3:{name:"channel_status_message",fieldType:11,type:Py},4:{name:"shared_worker_event_message",fieldType:11,type:gz},5:{name:"auth_params_request_message",fieldType:11,type:kz},6:{name:"config_request_message",
fieldType:11,type:mz},7:{name:"sender_id",fieldType:9,type:String},9:{name:"channel_stat_message",fieldType:11,type:oz},10:{name:"browser_channel_closed_message",fieldType:11,type:qz},11:{name:"browser_channel_error_message",fieldType:11,type:sz}}));return a};
ez.getDescriptor=ez.prototype.getDescriptor;gz.prototype.getDescriptor=function(){var a=hz;a||(hz=a=xu(gz,{0:{name:"SharedWorkerEventMessage",fullName:"buzz.channel.proto.SharedWorkerEventMessage"},1:{name:"event",fieldType:14,defaultValue:1,type:Bfa},2:{name:"connection_count",fieldType:5,type:Number}}));return a};
gz.getDescriptor=gz.prototype.getDescriptor;iz.prototype.getDescriptor=function(){var a=jz;a||(jz=a=xu(iz,{0:{name:"Heartbeat",fullName:"buzz.channel.proto.Heartbeat"}}));return a};
iz.getDescriptor=iz.prototype.getDescriptor;kz.prototype.getDescriptor=function(){var a=lz;a||(lz=a=xu(kz,{0:{name:"AuthenticationParametersRequestMessage",fullName:"buzz.channel.proto.AuthenticationParametersRequestMessage"}}));return a};
kz.getDescriptor=kz.prototype.getDescriptor;mz.prototype.getDescriptor=function(){var a=nz;a||(nz=a=xu(mz,{0:{name:"BrowserChannelConfigRequestMessage",fullName:"buzz.channel.proto.BrowserChannelConfigRequestMessage"}}));return a};
mz.getDescriptor=mz.prototype.getDescriptor;oz.prototype.getDescriptor=function(){var a=pz;a||(pz=a=xu(oz,{0:{name:"ChannelStatMessage",fullName:"buzz.channel.proto.ChannelStatMessage"},1:{name:"stat",fieldType:5,type:Number}}));return a};
oz.getDescriptor=oz.prototype.getDescriptor;qz.prototype.getDescriptor=function(){var a=rz;a||(rz=a=xu(qz,{0:{name:"BrowserChannelClosedMessage",fullName:"buzz.channel.proto.BrowserChannelClosedMessage"}}));return a};
qz.getDescriptor=qz.prototype.getDescriptor;sz.prototype.getDescriptor=function(){var a=tz;a||(tz=a=xu(sz,{0:{name:"BrowserChannelErrorMessage",fullName:"buzz.channel.proto.BrowserChannelErrorMessage"},1:{name:"browser_channel_error_code",fieldType:5,type:Number},2:{name:"last_http_status_code",fieldType:5,type:Number}}));return a};
sz.getDescriptor=sz.prototype.getDescriptor;var uz=function(){if(sba){var a=/Windows NT ([0-9.]+)/;return(a=a.exec(Kc))?a[1]:"0"}return Se?(a=/10[_.][0-9_.]+/,(a=a.exec(Kc))?a[0].replace(/_/g,"."):"10"):uba?(a=/Android\s+([^\);]+)(\)|;)/,(a=a.exec(Kc))?a[1]:""):vba||wba||xba?(a=/(?:iPhone|CPU)\s+OS\s+(\S+)/,(a=a.exec(Kc))?a[1].replace(/_/g,"."):""):""}();function Cfa(){var a=new ry;a.setVersion(bz);a.setPlatform(uz);a.setLanguage("JS");a.setApplicationInfo("lcsclient");return a}
function Dfa(a,b){var c=new ty;N(c,1,a);null!=b&&N(c,2,b);return c}
function vz(a,b,c){var d=new By;d.setSessionId(Dfa(a,b));c&&d.setSubscriberInfo(c);return d}
;var wz=function(a,b){this.authuser=0;this.useCors=this.useSharedChannel=this.retryOnAuthError=!1;a=new cx(a);var c=a.domain_;if("client-channel.google.com"===c){var d=my();d&&ex(a,d+"."+c)}this.uri=a;this.clientType=b;(b=q.gapi)&&b.load&&q.gapi.load("auth")};
f=wz.prototype;f.getClientType=function(){return this.clientType};
f.getAuthuser=function(){return this.authuser};
f.setAuthuser=function(a){this.authuser=a};
f.getPageId=function(){return this.pageId||null};
f.setPageId=function(a){this.pageId=a};
f.setGapiSrc=function(a){this.gapiSrc=a};
f.setApplicationVersion=function(a){this.applicationVersion=a};
f.setPropertyId=function(a){this.propertyId=a};
f.setRetryOnAuthError=function(a){this.retryOnAuthError=a};
f.setUseSharedChannel=function(a){if(-1!==this.uri.domain_.indexOf("client-channel.google.com")){var b=a?this.getClientType():my();ex(this.uri,b+".client-channel.google.com")}this.useSharedChannel=a};
f.setUseCors=function(a){a&&this.isIframed()||(this.useCors=a)};
f.setDomHelper=function(a){this.domHelper=a};
f.getDomHelper=function(){return this.domHelper||null};
var xz=function(a){var b=a.clientType,c=a.gaiaServiceOverride||null,d=a.gapiSrc||null,e=a.propertyId||null,g=a.applicationVersion||null,h=a.retryOnAuthError,m=a.pageId||null;a=!a.pageId&&q.SharedWorker&&a.isIframed()?a.useSharedChannel:!1;var n=new yu;n.setClientType(b);null!==c&&N(n,4,c);null!==d&&n.setGapiSrc(d);null!==e&&n.setPropertyId(e);null!==g&&n.setApplicationVersion(g);n.setRetryOnAuthError(h);null!==m&&n.setPageId(m);n.setUseSharedChannel(a);return n};
wz.prototype.getFirstPartyAuthSchemeAndHash=function(){var a;if(q.gapi&&q.gapi.auth&&(a=q.gapi.auth.getAuthHeaderValueForFirstParty))try{var b=a([]);if(b){var c=b.split(" ");var d={scheme:c[0],hash:c[1]}}else d=null;return d}catch(e){}return null};var yz=function(){var a=Vj([]);return a?(a=a.split(" "),{scheme:a[0],hash:a[1]}):null};var zz=function(a,b,c){c=void 0===c?zfa:c;wz.call(this,a,b);this.browserChannelProvider=c};
l(zz,wz);zz.prototype.createBrowserChannel=function(a){return this.browserChannelProvider(this.uri.toString(),a,xz(this))};
zz.prototype.getIframeContainerId=function(){throw Error("getIframeContainerId: unsupported method")};
zz.prototype.isIframed=function(){return!1};
zz.prototype.getFirstPartyAuthSchemeAndHash=function(a){return wz.prototype.getFirstPartyAuthSchemeAndHash.call(this,a)||yz()};var Az=function(a,b,c){lk.call(this);this.listener_=a;this.interval_=b||0;this.handler_=c;this.callback_=r(this.doAction_,this)};
t(Az,lk);f=Az.prototype;f.id_=0;f.disposeInternal=function(){Az.superClass_.disposeInternal.call(this);this.stop();delete this.listener_;delete this.handler_};
f.start=function(a){this.stop();this.id_=xw(this.callback_,Ia(a)?a:this.interval_)};
f.startIfNotActive=function(a){this.isActive()||this.start(a)};
f.stop=function(){this.isActive()&&yw(this.id_);this.id_=0};
f.fire=function(){this.stop();this.doAction_()};
f.fireIfActive=function(){this.isActive()&&this.fire()};
f.isActive=function(){return 0!=this.id_};
f.doAction_=function(){this.id_=0;this.listener_&&this.listener_.call(this.handler_)};var Bz=function(){lk.call(this);this.services_={}};
t(Bz,lk);f=Bz.prototype;f.logger=null;f.connect=function(a){a&&a()};
f.isConnected=function(){return!0};
f.registerService=function(a,b,c){this.services_[a]={callback:b,objectPayload:!!c}};
f.registerDefaultService=function(a){this.defaultService_=a};
f.getService=function(a,b){var c=this.services_[a];return c?c:this.defaultService_?{callback:db(this.defaultService_,a),objectPayload:$a(b)}:null};
var Efa=function(a,b){if(b&&Ka(a))try{return JSON.parse(a)}catch(c){return null}else if(!b&&!Ka(a))return Gk(a);return a};
Bz.prototype.disposeInternal=function(){Bz.superClass_.disposeInternal.call(this);delete this.services_;delete this.defaultService_};var Ffa={1:"NativeMessagingTransport",2:"IframePollingTransport",3:"DirectTransport"},Gfa=["pu","lru","pru","lpu","ppu"],Cz={},Dz=function(a){for(var b=Hfa,c=b.length,d="";0<a--;)d+=b.charAt(Math.floor(Math.random()*c));return d},Hfa="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";var Ez=function(a){lk.call(this);this.domHelper_=a||ah()};
t(Ez,lk);Ez.prototype.transportType=0;Ez.prototype.getType=function(){return this.transportType};
Ez.prototype.getWindow=function(){return this.domHelper_.getWindow()};
Ez.prototype.getName=function(){return Ffa[String(this.transportType)]||""};/*
Portions of this code are from MochiKit, received by
The Closure Authors under the MIT license. All other code is Copyright
2005-2009 The Closure Authors. All Rights Reserved.
*/
var Fz=function(a,b){this.sequence_=[];this.onCancelFunction_=a;this.defaultScope_=b||null;this.hadError_=this.fired_=!1;this.result_=void 0;this.silentlyCanceled_=this.blocking_=this.blocked_=!1;this.unhandledErrorId_=0;this.parent_=null;this.branches_=0};
Fz.prototype.cancel=function(a){if(this.fired_)this.result_ instanceof Fz&&this.result_.cancel();else{if(this.parent_){var b=this.parent_;delete this.parent_;a?b.cancel(a):(b.branches_--,0>=b.branches_&&b.cancel())}this.onCancelFunction_?this.onCancelFunction_.call(this.defaultScope_,this):this.silentlyCanceled_=!0;this.fired_||this.errback(new Gz(this))}};
Fz.prototype.continue_=function(a,b){this.blocked_=!1;Hz(this,a,b)};
var Hz=function(a,b,c){a.fired_=!0;a.result_=c;a.hadError_=!b;Iz(a)};
Fz.prototype.check_=function(){if(this.fired_){if(!this.silentlyCanceled_)throw new Jz(this);this.silentlyCanceled_=!1}};
Fz.prototype.callback=function(a){this.check_();Hz(this,!0,a)};
Fz.prototype.errback=function(a){this.check_();Hz(this,!1,a)};
Fz.prototype.assertNotDeferred_=function(){};
var Lz=function(a,b,c){Kz(a,b,null,c)};
Fz.prototype.addErrback=function(a,b){return Kz(this,null,a,b)};
Fz.prototype.addBoth=function(a,b){return Kz(this,a,a,b)};
Fz.prototype.addFinally=function(a,b){return Kz(this,a,function(c){var d=a.call(this,c);if(!Ia(d))throw c;return d},b)};
var Kz=function(a,b,c,d){a.sequence_.push([b,c,d]);a.fired_&&Iz(a);return a};
Fz.prototype.then=function(a,b,c){var d,e,g=new Yv(function(h,m){d=h;e=m});
Kz(this,d,function(h){h instanceof Gz?g.cancel():e(h)});
return g.then(a,b,c)};
Kk(Fz);var Mz=function(a,b){b instanceof Fz?Lz(a,r(b.branch,b)):Lz(a,function(){return b})};
Fz.prototype.branch=function(a){var b=new Fz;Kz(this,b.callback,b.errback,b);a&&(b.parent_=this,this.branches_++);return b};
Fz.prototype.isError=function(a){return a instanceof Error};
var Nz=function(a){return rb(a.sequence_,function(b){return Za(b[1])})},Iz=function(a){if(a.unhandledErrorId_&&a.fired_&&Nz(a)){var b=a.unhandledErrorId_,c=Oz[b];
c&&(q.clearTimeout(c.id_),delete Oz[b]);a.unhandledErrorId_=0}a.parent_&&(a.parent_.branches_--,delete a.parent_);b=a.result_;for(var d=c=!1;a.sequence_.length&&!a.blocked_;){var e=a.sequence_.shift(),g=e[0],h=e[1];e=e[2];if(g=a.hadError_?h:g)try{var m=g.call(e||a.defaultScope_,b);Ia(m)&&(a.hadError_=a.hadError_&&(m==b||a.isError(m)),a.result_=b=m);if(Lk(b)||"function"===typeof q.Promise&&b instanceof q.Promise)d=!0,a.blocked_=!0}catch(n){b=n,a.hadError_=!0,Nz(a)||(c=!0)}}a.result_=b;d&&(m=r(a.continue_,
a,!0),d=r(a.continue_,a,!1),b instanceof Fz?(Kz(b,m,d),b.blocking_=!0):b.then(m,d));c&&(b=new Pz(b),Oz[b.id_]=b,a.unhandledErrorId_=b.id_)},Jz=function(a){hb.call(this);
this.deferred=a};
t(Jz,hb);Jz.prototype.message="Deferred has already fired";Jz.prototype.name="AlreadyCalledError";var Gz=function(a){hb.call(this);this.deferred=a};
t(Gz,hb);Gz.prototype.message="Deferred was canceled";Gz.prototype.name="CanceledError";var Pz=function(a){this.id_=q.setTimeout(r(this.throwError,this),0);this.error_=a};
Pz.prototype.throwError=function(){delete Oz[this.id_];throw this.error_};
var Oz={};var Sz=function(a,b){Ez.call(this,b);this.channel_=a;this.eventHandler_=new Sv(this);ok(this,this.eventHandler_);this.maybeAttemptToConnectTimer_=new rw(100,this.getWindow());ok(this,this.maybeAttemptToConnectTimer_);this.setupAckReceived_=new Fz;this.setupAckSent_=new Fz;this.connected_=new Fz;this.endpointId_=Dz(10);this.peerEndpointId_=null;this.asyncSendsMap_={};this.originalChannelName_=this.channel_.name;Qz(this.channel_,this.channel_.name+"_"+Rz(this.channel_));this.initialized_=!1;Mz(this.connected_,
this.setupAckReceived_);Mz(this.connected_,this.setupAckSent_);Lz(this.connected_,this.notifyConnected_,this);this.connected_.callback(!0);this.eventHandler_.listen(this.maybeAttemptToConnectTimer_,"tick",this.maybeAttemptToConnect_)};
t(Sz,Ez);var Tz={},Ifa=function(a){var b=new Uz(a.channelName,a.service,a.payload);a=b.channelName;var c=b.service;b=b.payload;var d=Cz[a];if(d)return d.xpcDeliver(c,b),!0;d=Vz(b)[0];for(var e in Cz){var g=Cz[e];if(1==Rz(g)&&!g.isConnected()&&"tp"==c&&"SETUP"==d)return Qz(g,a),g.xpcDeliver(c,b),!0}return!1};
f=Sz.prototype;f.transportType=3;f.transportServiceHandler=function(a){a=Vz(a);var b=a[1];switch(a[0]){case"SETUP_ACK":this.setupAckReceived_.fired_||this.setupAckReceived_.callback(!0);break;case"SETUP":this.sendSetupAckMessage_(),null!=this.peerEndpointId_&&this.peerEndpointId_!=b&&this.sendSetupMessage_(),this.peerEndpointId_=b;}};
f.sendSetupMessage_=function(){this.send("tp","SETUP,"+this.endpointId_)};
f.sendSetupAckMessage_=function(){this.send("tp","SETUP_ACK");this.setupAckSent_.fired_||this.setupAckSent_.callback(!0)};
f.connect=function(){var a=this.getWindow();if(a){var b=bb(a);0==(Tz[b]||0)&&null==Sa("crosswindowmessaging.channel",a)&&Na("crosswindowmessaging.channel",Ifa,a);Tz[b]++;this.initialized_=!0;this.maybeAttemptToConnect_()}};
f.maybeAttemptToConnect_=function(){this.channel_.isConnected()?this.maybeAttemptToConnectTimer_.stop():(this.maybeAttemptToConnectTimer_.start(),this.sendSetupMessage_())};
f.send=function(a,b){this.channel_.peerWindowObject_&&(a=new Uz(this.originalChannelName_+"_"+(0==Rz(this.channel_)?1:0),a,b),this.channel_.getConfig().directSyncMode?this.executeScheduledSend_(a):this.asyncSendsMap_[bb(a)]=xw(r(this.executeScheduledSend_,this,a),0))};
f.executeScheduledSend_=function(a){var b=bb(a);this.asyncSendsMap_[b]&&delete this.asyncSendsMap_[b];try{var c=Sa("crosswindowmessaging.channel",this.channel_.peerWindowObject_)}catch(d){return}if(null!==c)try{c({channelName:a.channelName,service:a.service,payload:a.payload})}catch(d){}};
f.notifyConnected_=function(){Wz(this.channel_,(this.channel_.getConfig(),0))};
f.disposeInternal=function(){if(this.initialized_){var a=this.getWindow(),b=bb(a);1==--Tz[b]&&Na("crosswindowmessaging.channel",null,a)}this.asyncSendsMap_&&(u.forEach(this.asyncSendsMap_,function(c){yw(c)}),this.asyncSendsMap_=null);
this.setupAckReceived_&&(this.setupAckReceived_.cancel(),delete this.setupAckReceived_);this.setupAckSent_&&(this.setupAckSent_.cancel(),delete this.setupAckSent_);this.connected_&&(this.connected_.cancel(),delete this.connected_);Sz.superClass_.disposeInternal.call(this)};
var Vz=function(a){a=a.split(",");a[1]=a[1]||null;return a},Uz=function(a,b,c){this.channelName=a;
this.service=b;this.payload=c};var Xz=function(a,b,c,d,e){Ez.call(this,c);this.channel_=a;this.protocolVersion_=e||2;this.peerHostname_=b||"*";this.eventHandler_=new Sv(this);this.maybeAttemptToConnectTimer_=new rw(100,this.getWindow());this.oneSidedHandshake_=!!d;this.setupAckReceived_=new Fz;this.setupAckSent_=new Fz;this.connected_=new Fz;this.endpointId_=Dz(10);this.peerEndpointId_=null;this.oneSidedHandshake_?1==Rz(this.channel_)?Mz(this.connected_,this.setupAckReceived_):Mz(this.connected_,this.setupAckSent_):(Mz(this.connected_,
this.setupAckReceived_),2==this.protocolVersion_&&Mz(this.connected_,this.setupAckSent_));Lz(this.connected_,this.notifyConnected_,this);this.connected_.callback(!0);this.eventHandler_.listen(this.maybeAttemptToConnectTimer_,"tick",this.maybeAttemptToConnect_)};
t(Xz,Ez);Xz.prototype.peerProtocolVersion_=null;Xz.prototype.initialized_=!1;Xz.prototype.transportType=1;var Yz={};Xz.prototype.sendTimerId_=0;
var aA=function(a){var b=a.event_.data;if(!Ka(b))return!1;var c=b.indexOf("|"),d=b.indexOf(":");if(-1==c||-1==d)return!1;var e=b.substring(0,c);c=b.substring(c+1,d);b=b.substring(d+1);if(d=Cz[e])return d.xpcDeliver(c,b,a.event_.origin),!0;d=Zz(b)[0];for(var g in Cz){var h=Cz[g];if(1==Rz(h)&&!h.isConnected()&&"tp"==c&&("SETUP"==d||"SETUP_NTPV2"==d)&&$z(h,a.event_.origin))return Qz(h,e),h.xpcDeliver(c,b),!0}return!1};
Xz.prototype.transportServiceHandler=function(a){var b=Zz(a);a=b[1];switch(b[0]){case"SETUP_ACK":bA(this,1);this.setupAckReceived_.fired_||this.setupAckReceived_.callback(!0);break;case"SETUP_ACK_NTPV2":2==this.protocolVersion_&&(bA(this,2),this.setupAckReceived_.fired_||this.setupAckReceived_.callback(!0));break;case"SETUP":bA(this,1);this.sendSetupAckMessage_(1);break;case"SETUP_NTPV2":2==this.protocolVersion_&&(b=this.peerProtocolVersion_,bA(this,2),this.sendSetupAckMessage_(2),1!=b&&null==
this.peerEndpointId_||this.peerEndpointId_==a||this.sendSetupMessage_(),this.peerEndpointId_=a);}};
Xz.prototype.sendSetupMessage_=function(){2!=this.protocolVersion_||null!=this.peerProtocolVersion_&&2!=this.peerProtocolVersion_||this.send("tp","SETUP_NTPV2,"+this.endpointId_);null!=this.peerProtocolVersion_&&1!=this.peerProtocolVersion_||this.send("tp","SETUP")};
Xz.prototype.sendSetupAckMessage_=function(a){if(2!=this.protocolVersion_||null!=this.peerProtocolVersion_&&2!=this.peerProtocolVersion_||2!=a){if(null!=this.peerProtocolVersion_&&1!=this.peerProtocolVersion_||1!=a)return;this.send("tp","SETUP_ACK")}else this.send("tp","SETUP_ACK_NTPV2");this.setupAckSent_.fired_||this.setupAckSent_.callback(!0)};
var bA=function(a,b){b>a.peerProtocolVersion_&&(a.peerProtocolVersion_=b);1==a.peerProtocolVersion_&&(a.setupAckSent_.fired_||a.oneSidedHandshake_||a.setupAckSent_.callback(!0),a.peerEndpointId_=null)};
f=Xz.prototype;f.connect=function(){var a=this.getWindow(),b=bb(a),c=Yz[b];Ma(c)||(c=0);0==c&&Hv(a.postMessage?a:a.document,"message",aA,!1,Xz);Yz[b]=c+1;this.initialized_=!0;this.maybeAttemptToConnect_()};
f.maybeAttemptToConnect_=function(){var a=0==Rz(this.channel_);this.oneSidedHandshake_&&a||this.channel_.isConnected()||this.isDisposed()?this.maybeAttemptToConnectTimer_.stop():(this.maybeAttemptToConnectTimer_.start(),this.sendSetupMessage_())};
f.send=function(a,b){var c=this.channel_.peerWindowObject_;c&&(this.send=function(d,e){var g=this,h=this.channel_.name;this.sendTimerId_=xw(function(){g.sendTimerId_=0;try{var m=c.postMessage?c:c.document;m.postMessage&&m.postMessage(h+"|"+d+":"+e,g.peerHostname_)}catch(n){}},0)},this.send(a,b))};
f.notifyConnected_=function(){Wz(this.channel_,1==this.protocolVersion_||1==this.peerProtocolVersion_?200:void 0)};
f.disposeInternal=function(){if(this.initialized_){var a=this.getWindow(),b=bb(a),c=Yz[b];Yz[b]=c-1;1==c&&Mv(a.postMessage?a:a.document,"message",aA,!1,Xz)}this.sendTimerId_&&(yw(this.sendTimerId_),this.sendTimerId_=0);nk(this.eventHandler_);delete this.eventHandler_;nk(this.maybeAttemptToConnectTimer_);delete this.maybeAttemptToConnectTimer_;this.setupAckReceived_.cancel();delete this.setupAckReceived_;this.setupAckSent_.cancel();delete this.setupAckSent_;this.connected_.cancel();delete this.connected_;
delete this.send;Xz.superClass_.disposeInternal.call(this)};
var Zz=function(a){a=a.split(",");a[1]=a[1]||null;return a};var dA=function(a,b){Bz.call(this);for(var c=0,d;d=Gfa[c];c++)if(d in a&&!/^https?:\/\//.test(a[d]))throw Error("URI "+a[d]+" is invalid for field "+d);this.cfg_=a;this.name=this.cfg_.cn||Dz(10);this.domHelper_=b||ah();this.deferredDeliveries_=[];this.peerLoadHandler_=new Sv(this);a.lpu=a.lpu||pi(this.domHelper_.getWindow().location.href)+"/robots.txt";a.ppu=a.ppu||pi(a.pu||"")+"/robots.txt";Cz[this.name]=this;Ov(window,"unload",cA)||Gv(window,"unload",cA)};
t(dA,Bz);var Jfa=/^%*tp$/,Kfa=/^%+tp$/;f=dA.prototype;f.connectionDelay_=null;f.peerWindowDeferred_=null;f.transport_=null;f.state_=1;f.isConnected=function(){return 2==this.state_};
f.peerWindowObject_=null;f.iframeElement_=null;f.getConfig=function(){return this.cfg_};
f.getIframeElement=function(){return this.iframeElement_};
f.getTransportType=function(){return this.transport_.getType()};
f.getTransportName=function(){return this.transport_.getName()};
var Mfa=function(a,b){var c=a.cfg_.ifrid;c||(c=a.cfg_.ifrid="xpcpeer"+Dz(4));var d=ah(b).createElement("IFRAME");d.id=d.name=c;d.style.width=d.style.height="100%";eA(a);a.peerWindowDeferred_=new Fz(void 0,a);var e=Lfa(a);Vv(a.peerLoadHandler_,d,"load",a.peerWindowDeferred_.callback,!1,a.peerWindowDeferred_);Qe||Re?window.setTimeout(r(function(){b.appendChild(d);hd(d,hi(e.toString()))},a),1):(hd(d,hi(e.toString())),b.appendChild(d))},eA=function(a){a.peerWindowDeferred_&&(a.peerWindowDeferred_.cancel(),
a.peerWindowDeferred_=null);
a.deferredDeliveries_.length=0;a.peerLoadHandler_.removeAll()},Lfa=function(a){var b=a.cfg_.pu;
Ka(b)&&(b=a.cfg_.pu=new cx(b));var c={};c.cn=a.name;c.tp=a.cfg_.tp;c.osh=a.cfg_.osh;a.cfg_.lru&&(c.pru=a.cfg_.lru);a.cfg_.lpu&&(c.ppu=a.cfg_.lpu);a.cfg_.ppu&&(c.lpu=a.cfg_.ppu);(a=a.cfg_.role)&&(c.role=1==a?0:1);Xw(b,"xpc",Gk(c));return b};
dA.prototype.connect=function(a){this.connectCb_=a||Ta;3==this.state_&&(this.state_=1);this.peerWindowDeferred_?Lz(this.peerWindowDeferred_,this.continueConnection_):this.continueConnection_()};
dA.prototype.continueConnection_=function(){this.peerWindowDeferred_=null;this.cfg_.ifrid&&(this.iframeElement_=this.domHelper_.getElement(this.cfg_.ifrid));if(this.iframeElement_){var a=this.iframeElement_.contentWindow;a||(a=window.frames[this.cfg_.ifrid]);this.peerWindowObject_=a}if(!this.peerWindowObject_){if(window==window.top)throw Error("CrossPageChannel: Can't connect, peer window-object not set.");this.peerWindowObject_=window.parent}if(!this.transport_){this.cfg_.tp||(this.cfg_.tp=Za(document.postMessage)||
Za(window.postMessage)||Ne&&window.postMessage?1:0);if(Za(this.cfg_.tp))this.transport_=new this.cfg_.tp(this,this.domHelper_);else switch(this.cfg_.tp){case 1:this.transport_=new Xz(this,this.cfg_.ph,this.domHelper_,!!this.cfg_.osh,this.cfg_.nativeProtocolVersion||2);break;case 3:if(a=this.peerWindowObject_)try{a=window.document.domain==this.peerWindowObject_.document.domain}catch(b){a=!1}a&&(this.transport_=new Sz(this,this.domHelper_));}if(!this.transport_)throw Error("CrossPageChannel: No suitable transport found! You may try injecting a Transport constructor directly via the channel config object.");
}for(this.transport_.connect();0<this.deferredDeliveries_.length;)this.deferredDeliveries_.shift()()};
dA.prototype.close=function(){eA(this);this.state_=3;nk(this.transport_);this.connectCb_=this.transport_=null;nk(this.connectionDelay_);this.connectionDelay_=null};
var Wz=function(a,b){a.isConnected()||a.connectionDelay_&&a.connectionDelay_.isActive()||(a.state_=2,nk(a.connectionDelay_),Ia(b)?(a.connectionDelay_=new Az(a.connectCb_,b),a.connectionDelay_.start()):(a.connectionDelay_=null,a.connectCb_()))};
dA.prototype.notifyTransportError=function(){this.close()};
dA.prototype.send=function(a,b){if(this.isConnected()){try{var c=!!this.peerWindowObject_&&!this.peerWindowObject_.closed}catch(d){c=!1}c?($a(b)&&(b=Gk(b)),this.transport_.send(Nfa(a),b)):this.close()}};
dA.prototype.xpcDeliver=function(a,b,c){this.peerWindowDeferred_?this.deferredDeliveries_.push(r(this.xpcDeliver,this,a,b,c)):$z(this,c)&&!this.isDisposed()&&3!=this.state_&&(a&&"tp"!=a?this.isConnected()&&(a=a.replace(/%[0-9a-f]{2}/gi,decodeURIComponent),a=Kfa.test(a)?a.substring(1):a,a=this.getService(a,b))&&(b=Efa(b,a.objectPayload),null!=b&&a.callback(b)):this.transport_.transportServiceHandler(b))};
var Nfa=function(a){Jfa.test(a)&&(a="%"+a);return a.replace(/[%:|]/g,encodeURIComponent)},Rz=function(a){var b=a.cfg_.role;
return Ma(b)?b:window.parent==a.peerWindowObject_?1:0},Qz=function(a,b){delete Cz[a.name];
a.name=b;Cz[b]=a},$z=function(a,b){var c=a.cfg_.ph;
return gc(xd(b))||gc(xd(c))||b==a.cfg_.ph};
dA.prototype.disposeInternal=function(){this.close();this.iframeElement_=this.peerWindowObject_=null;delete Cz[this.name];nk(this.peerLoadHandler_);delete this.peerLoadHandler_;dA.superClass_.disposeInternal.call(this)};
var cA=function(){for(var a in Cz)nk(Cz[a])};var fA=function(a,b,c,d){this.xpcConfig_=a;this.iframeContainerId_=b;this.domHelper_=c;this.connectionCallback_=d;this.delayGenerator_=new Nu(Math.random,5E3,128);this.crossPageChannel_=null},gA=function(a){a.crossPageChannel_=new dA(a.xpcConfig_,a.domHelper_||void 0);
var b=Rea(a.iframeContainerId_);Mfa(a.crossPageChannel_,b);xw(a.checkConnectionTimeout_,Ou(a.delayGenerator_)+5E3,a);a.crossPageChannel_.connect(r(function(){this.delayGenerator_.reset();this.connectionCallback_(this.crossPageChannel_)},a))},hA=function(a,b){a=bh(document,a);
a=Eh(a);b=new cx(b);for(var c=0;c<a.length;++c)if("IFRAME"==a[c].tagName){var d=new cx(a[c].src);d.domain_==b.domain_&&d.path_==b.path_&&Dh(a[c])}};
fA.prototype.checkConnectionTimeout_=function(){this.crossPageChannel_&&!this.crossPageChannel_.isConnected()&&(iA(this),gA(this))};
var iA=function(a){a.crossPageChannel_&&(a.crossPageChannel_.close(),a.crossPageChannel_=null);hA(a.iframeContainerId_,a.xpcConfig_.pu)};var jA=function(a,b,c,d,e){this.iframeUri=a;this.iframeContainerId=b;this.iframeChannel=c;this.handler=d;this.config=e;this.hasBeenDisposed=!1;this.logger=new Ru("IframedBrowserChannelClient")};
f=jA.prototype;f.start=function(){this.iframeChannel.start(this.getIframeUri(),this.iframeContainerId,this.onConnect.bind(this))};
f.startHandoff=function(){kA(this.iframeChannel,"sh",[])};
f.onConnect=function(){this.iframeChannel.registerService("cha",this.channelHandleArray.bind(this),!0);this.iframeChannel.registerService("co",this.channelOpened.bind(this),!0);this.iframeChannel.registerService("cc",this.channelClosed.bind(this),!0);this.iframeChannel.registerService("ce",this.channelError.bind(this),!0);this.iframeChannel.registerService("cse",this.channelStatEvent.bind(this),!0);this.authParams&&this.updateAuthParams(this.authParams);kA(this.iframeChannel,"s",[])};
f.getIframeUri=function(){var a=new cx(this.iframeUri),b=pv(this.config);Xw(a,"cfg",b);Xw(a,"ctype",this.config.getClientType());(b=L(this.config,5))&&Xw(a,"gapi_src",b);(b=L(this.config,4))&&Xw(a,"service",b);null!=this.authParams&&3===this.authParams.getScheme()&&Xw(a,"oauth_token",this.authParams.getToken());this.config.getPageId()&&Xw(a,"pageId",this.config.getPageId());return a.toString()};
f.close=function(){this.iframeChannel.close();hA(this.iframeContainerId,this.iframeUri)};
f.updateAuthParams=function(a){this.authParams=a;a=ov.serialize(this.authParams);kA(this.iframeChannel,"uap",a)};
f.sendMap=function(a){kA(this.iframeChannel,"sm",a)};
f.tryImmediateReconnectByUserRequest=function(){kA(this.iframeChannel,"tcn",[])};
f.channelOpened=function(){this.handler.channelOpened(this)};
f.channelHandleArray=function(a){this.handler.channelHandleArray(a,this)};
f.channelClosed=function(){this.handler.channelClosed(this)};
f.channelError=function(a){this.handler.channelError("object"===typeof a?new nu(a[0],a[1]):new nu(Number(a),-1),this)};
f.channelStatEvent=function(a){this.handler.channelStatEvent(a,this)};
f.isDisposed=function(){return this.hasBeenDisposed};
f.dispose=function(){this.hasBeenDisposed=!0};var lA=function(a){this.domHelper=a;this.logger=new Ru("XpcIframeChannel")};
lA.prototype.start=function(a,b,c){var d={};d.pu=a;this.xpcIframeCreator=new fA(d,b,this.domHelper||null,this.onXpcConnect.bind(this,c));gA(this.xpcIframeCreator)};
lA.prototype.onXpcConnect=function(a,b){this.crossPageChannel=b;a()};
lA.prototype.registerService=function(a,b,c){this.crossPageChannel.registerService(a,b,c)};
var kA=function(a,b,c){a.crossPageChannel&&a.crossPageChannel.isConnected()&&a.crossPageChannel.send(b,c||[])};
lA.prototype.close=function(){iA(this.xpcIframeCreator);this.crossPageChannel=void 0};var mA=function(a,b,c){wz.call(this,a,b);this.iframeContainerId=c};
l(mA,wz);mA.prototype.createBrowserChannel=function(a){return new jA(this.uri.toString(),this.iframeContainerId,new lA(this.getDomHelper()||void 0),a,xz(this))};
mA.prototype.getIframeContainerId=function(){return this.iframeContainerId};
mA.prototype.getFirstPartyAuthSchemeAndHash=function(a){return wz.prototype.getFirstPartyAuthSchemeAndHash.call(this,a)||yz()};
mA.prototype.isIframed=function(){return!0};var nA=function(a){this.logger=a};
nA.prototype.validate=function(a){for(var b=a.getDescriptor(),c=this.getSpecifications()[b.getName()],d=b.getFields(),e=0;e<d.length;++e);for(var g in c){d=c[g];var h=pu(b,g);for(e=0;e<d.length;++e){if(!d[e](h,a))return!1;for(var m=0;m<Q(a,h.tag_);++m){var n=a.get(h,m);if(n instanceof J&&!this.validate(n))return!1}}}return!0};
nA.prototype.required=function(a,b){(b=b.has(a))||a.getName();return b};
nA.prototype.greaterOrEqualTo=function(a,b,c){a=!c.has(b)||c.get(b)>=a;a||(b.getName(),c.get(b));return a};
nA.prototype.nonEmpty=function(a,b){(b=!b.has(a)||""!=b.get(a))||a.getName();return b};var oA=function(a){this.logger=a;a=function(){return!0};
var b=this.required.bind(this),c=this.greaterOrEqualTo.bind(this,0),d=this.nonEmpty.bind(this);this.specifications={Version:{major_version:[b,c],minor_version:[b,c]},ProtocolVersion:{version:[b]},ClientVersion:{version:[b],platform:[b],language:[b,d],application_info:[b,d]},ClientToServerMessage:{header:[b],init_endpoint_message:[a],init_session_message:[a],client_data_message_deprecated:[a],send_on_disconnect_message:[a],close_session_message:[a]},ClientHeader:{protocol_version:[b],client_version:[b],
client_time_ms:[b],max_known_server_time_ms:[b],message_id:[a]},SessionId:{service_name:[b,d],session_name:[a]},InitEndpointMessage:{},InitSessionMessage:{session_id:[b],subscriber_info:[a]},CloseSessionMessage:{session_id:[b]},SessionStatusMessage:{session_id:[b],address:[a,d],is_broadcast_to_user:[a],subscriber_info:[a],status:[a]},DataMessage:{session_id:[b],message:[b]},LcsPostmanInvalidation:{signal:[b],session_id:[b],ack_id:[b]},LcsSignal:{subscription_key:[b],message:[b]},LcsSubscriptionKey:{name:[b],
topic_name:[b]},LcsPostmanMessage:{data:[a],trace_id:[a],publish_timestamp_micros:[b],is_suppressor:[a]},ServerToClientMessage:{header:[b],server_data_message:[a],postman_invalidation:[a],channel_status_message:[a],session_status_message:[a]},ServerHeader:{protocol_version:[b],server_time_ms:[b,c],message_id:[a,d]},StatusP:{code:[b],description:[a]},ChannelStatusMessage:{status:[b],jid_resource:[a]}}};
l(oA,nA);oA.prototype.getSpecifications=function(){return this.specifications};
oA.prototype.isClientMessageValid=function(a){return this.validate(a)};
oA.prototype.isServerMessageValid=function(a){return!!this.validate(a)};var pA=function(a,b){this.channel=a;this.serviceName=b;this.isOpen=!1};
f=pA.prototype;f.toString=function(){return"HangingGetChannel("+this.sessionName+")"};
f.open=function(){this.isOpen=!0;this.channel.sendSubscription(this)};
f.getSubscriberInfo=function(){return this.subscriberInfo||null};
f.getServiceName=function(){return this.serviceName};
f.getSessionName=function(){return this.sessionName||null};
var qA=function(a,b,c){pA.call(this,a,b);this.sessionHandler=c};
l(qA,pA);qA.prototype.handleAddressAssigned=function(a){var b=this.sessionHandler,c=a!=b.address_;b.address_=a;rA(b,!0,c)};
qA.prototype.handleSubscriberInfo=function(){};
var sA=function(a,b,c){pA.call(this,a,b);this.sessionHandler=c};
l(sA,pA);sA.prototype.getSessionHandler=function(){return this.sessionHandler};
sA.prototype.handleAddressAssigned=function(){};
sA.prototype.handleSubscriberInfo=function(a){this.subscriberInfo=a;var b=this.sessionHandler;if(tA(b))if(a===b.subscriberInfo)b.logger.warning("Received duplicate subscriber info from LCS");else{b.logger.info("Received new subscriber info from LCS");b.subscriberInfo=a;for(var c=k(b.registrations),d=c.next();!d.done;d=c.next()){var e=k(d.value);d=e.next().value;e=e.next().value;uA(b,e);0<e.numSubscribers()&&vA(b,e,d,a)}}};var wA=function(a,b){this.channelHandler=a;this.channelConfig=b;this.unnamedSessions=[];this.sessions=new Map;this.broadcastSessions=new Map;this.nextChannelReloadTimeMs=0;this.logger=new Ru("HangingGetChannel");this.msgValidator=new oA(this.logger);this.isOpen=!1;this.authParams=new Au;this.messageId=this.lastKnownServerTimeMs=0;this.hasBeenDisposed=!1;this.channelConfig.useCors?this.authParams.setScheme(5):(this.authParams.setScheme(2),this.authParams.setOrigin(pi(q.location.href)));a=b.getAuthuser();
0!==a&&this.authParams.setAuthuser(a)};
f=wA.prototype;f.setOAuthToken=function(a){5!==this.authParams.getScheme()&&(this.authParams.setScheme(3),N(this.authParams,3,a),this.updateAuthParams())};
f.setAppAuthToken=function(a){5!==this.authParams.getScheme()&&(this.authParams.setScheme(4),N(this.authParams,3,a),this.updateAuthParams())};
f.open=function(){this.browserChannel=this.channelConfig.createBrowserChannel(this);this.updateAuthParams();this.browserChannel.start()};
f.maybeReloadChannel=function(){var a=fb();a>this.nextChannelReloadTimeMs&&(this.nextChannelReloadTimeMs=a+Math.ceil(18E5*Math.random()),this.close(),this.channelClosed(),this.browserChannel=void 0,this.open())};
f.close=function(){void 0!==this.browserChannel&&this.browserChannel.close()};
f.dispose=function(){this.close();this.hasBeenDisposed=!0};
f.isDisposed=function(){return this.hasBeenDisposed};
f.updateAuthParams=function(){if(Lu.contains(this.authParams.getScheme())){var a=this.channelConfig.getFirstPartyAuthSchemeAndHash(this.authParams.getOrigin());if(null!=a){var b=a.scheme;a=a.hash;a!==this.authParams.getToken()&&(this.authParams.setScheme(Cu[b]),N(this.authParams,3,a))}else N(this.authParams,3,"")}this.browserChannel&&this.browserChannel.updateAuthParams(this.authParams)};
f.channelOpened=function(){};
f.handleSessionStatusMessage=function(a){var b=a.getSessionId();if(null!=b){var c=b.getSessionName();if(null!=c){var d=this.getSession(b);if(null==d)for(var e=0;e<this.unnamedSessions.length;++e){var g=this.unnamedSessions[e],h=b.getServiceName();if(g.getServiceName()===h){d=g;d.sessionName=c;this.unnamedSessions.splice(e,1);M(a,3)?this.broadcastSessions.has(h)||this.broadcastSessions.set(h,d):this.sessions.set(d.getSessionName(),d);break}}if(null!=d)if(a.hasStatus()&&1!==a.getStatus().getCode()){if(b.getServiceName(),
a.getStatus().getDescription(),b=d.sessionHandler,null!=b.onSessionError)b.onSessionError(d,{isTransient:!1,description:a.getStatus().getDescription()||""})}else L(a,2),b.getSessionName(),b.getServiceName(),d.handleAddressAssigned(L(a,2)),a.hasSubscriberInfo()&&d.handleSubscriberInfo(a.getSubscriberInfo())}}};
f.channelHandleArray=function(a){a=k(a);for(var b=a.next();!b.done;b=a.next())if(b=b.value.p)if(b=this.deserializeMessage(b),null!=b&&this.msgValidator.isServerMessageValid(b)&&b.hasHeader()){var c=L(L(b,1),4);this.lastKnownServerTimeMs=c?Math.max(this.lastKnownServerTimeMs,c):this.lastKnownServerTimeMs;if(K(b,3)){c=L(b,3);var d=c.getStatus();d=d?d.getCode():null;if(1===d){this.isOpen=!0;var e=k(this.sessions.values());for(d=e.next();!d.done;d=e.next())this.sendSubscription(d.value);e=k(this.unnamedSessions);
for(d=e.next();!d.done;d=e.next())this.sendSubscription(d.value);e=k(this.broadcastSessions.values());for(d=e.next();!d.done;d=e.next())this.sendSubscription(d.value);d={};K(c,2)&&(d.jidResource=L(c,2));this.channelHandler.onOpen(this,d)}else 4===d?(this.isOpen=!1,this.browserChannel.startHandoff()):5===d&&this.maybeReloadChannel()}b.hasSessionStatusMessage()&&(c=b.getSessionStatusMessage(),this.handleSessionStatusMessage(c));if(K(b,2)){c=L(b,2);d=(d=c.getSessionId())?this.getSession(d):null;if(null==
d)continue;else if(d instanceof sA)continue;d.sessionHandler.receive(d,c.getMessage())}b.hasPostmanInvalidation()&&(b=b.getPostmanInvalidation(),c=(c=b.getSessionId())?this.getSession(c):null,null==c||c instanceof qA||xA(c.sessionHandler,b))}};
f.channelError=function(a){this.updateAuthParams();this.channelHandler.onError(this,a)};
f.channelClosed=function(){this.isOpen=!1;this.channelHandler.onClose(this)};
f.channelStatEvent=function(a){if(null!=this.channelHandler.onStatEvent)this.channelHandler.onStatEvent(this,a)};
f.newSession=function(a,b){a=new qA(this,a,b);this.unnamedSessions.push(a);return a};
f.newPostmanSession=function(a,b){a=new sA(this,a,b);this.unnamedSessions.push(a);return a};
f.tryImmediateReconnectByUserRequest=function(){this.browserChannel&&this.browserChannel.tryImmediateReconnectByUserRequest()};
f.getSession=function(a){var b=this.sessions.get(a.getSessionName());null==b&&(b=this.broadcastSessions.get(a.getServiceName()));return b};
f.sendSubscription=function(a){this.isOpen&&(a=vz(a.getServiceName(),a.getSessionName(),a.getSubscriberInfo()),this.sendMessageToServer(a))};
f.sendNoOp=function(){this.sendMessageToServer(void 0)};
f.sendMessageToServer=function(a){var b="c"+ ++this.messageId,c=fb(),d=this.lastKnownServerTimeMs,e=new xy;e.setProtocolVersion(Zy);e.setClientTimeMs(c);e.setMaxKnownServerTimeMs(d);e.setMessageId(b);e.setClientVersion(Cfa());b=new vy;b.setHeader(e);a instanceof zy?N(b,2,a):a instanceof By?b.setInitSessionMessage(a):a instanceof Dy&&N(b,6,a);this.msgValidator.isClientMessageValid(b)&&(a={},e=pv(b),a.p=e,this.browserChannel.sendMap(a))};
f.deserializeMessage=function(a){var b=Jy.getDescriptor();return rv(b,a)};var yA=function(a,b){var c=void 0===c?new lA(b.getDomHelper()||void 0):c;this.channelHandler=a;this.channelConfig=b;this.iframeChannel=c;this.authParams=new Au;this.unnamedSessions=[];this.sessions=new Map;this.broadcastSessions=new Map;this.hasBeenDisposed=this.isConnectedToWorker=!1;this.nextChannelReloadTimeMs=0;this.clientLogger=new Ru("SharedChannelClient");this.delayGenerator=new Nu(Math.random,1E4,100);this.authParams.setOrigin(pi(q.location.href));this.authParams.setScheme(2);a=b.getAuthuser();
null!=a&&this.authParams.setAuthuser(a)};
f=yA.prototype;f.setOAuthToken=function(){};
f.setAppAuthToken=function(){};
f.getIframeUri=function(){var a=new cx(this.channelConfig.uri.toString()),b=pv(xz(this.channelConfig));Xw(a,"cfg",b);Xw(a,"ctype",this.channelConfig.getClientType());Xw(a,"sw",!0);return a.toString()};
f.open=function(){this.iframeUri=this.getIframeUri();this.iframeChannel.start(this.iframeUri,this.channelConfig.getIframeContainerId(),this.onXpcConnect.bind(this))};
f.onXpcConnect=function(){this.iframeChannel.registerService("sw2c",this.channelHandleMessage.bind(this),!1);zA(this)};
f.newSession=function(a,b){a=new qA(this,a,b);this.unnamedSessions.push(a);return a};
f.newPostmanSession=function(a,b){a=new sA(this,a,b);this.unnamedSessions.push(a);return a};
f.tryImmediateReconnectByUserRequest=function(){AA(this)};
f.dispose=function(){this.close();this.hasBeenDisposed=!0};
f.isDisposed=function(){return this.hasBeenDisposed};
f.close=function(){this.iframeChannel.close();this.isConnectedToWorker=!1;this.channelHandler.onClose(this)};
f.updateAuthParams=function(){var a=this.channelConfig.getFirstPartyAuthSchemeAndHash(this.authParams.getOrigin());if(null!=a){var b=a.scheme;a=a.hash;a!==this.authParams.getToken()&&(this.authParams.setScheme(Cu[b]),N(this.authParams,3,a))}else N(this.authParams,3,"")};
var zA=function(a){a.updateAuthParams();var b=new cz;N(b,1,a.authParams);a.send(b)},AA=function(a){var b=new cz,c=xz(a.channelConfig);
N(b,3,c);a.send(b)},Ofa=function(a){var b=Ou(a.delayGenerator)+1E4;
xw(function(){a.isConnectedToWorker?a.delayGenerator.reset():(a.close(),a.open())},b)};
f=yA.prototype;f.sendSubscription=function(a){if(this.isConnectedToWorker){a=vz(a.getServiceName(),a.getSessionName(),a.getSubscriberInfo());var b=new cz;b.setInitSessionMessage(a);this.send(b)}};
f.send=function(a){a=pv(a);kA(this.iframeChannel,"c2sw",a)};
f.getSession=function(a){var b=this.sessions.get(a.getSessionName());null==b&&(b=this.broadcastSessions.get(a.getServiceName()));return b};
f.channelHandleMessage=function(a){var b=ez.getDescriptor();a=rv(b,a);if(null!=a)if(K(a,1))a=L(a,1),b=a.getSessionId(),b=this.getSession(b),null==b||b instanceof sA||b.sessionHandler.receive(b,a.getMessage());else if(a.hasPostmanInvalidation())a=a.getPostmanInvalidation(),b=a.getSessionId(),b=this.getSession(b),null==b||b instanceof qA||xA(b.sessionHandler,a);else if(K(a,6))AA(this);else if(a.hasSessionStatusMessage())this.handleSessionStatusMessage(a.getSessionStatusMessage());else if(K(a,3))a=L(a,
3),b=(b=a.getStatus())?b.getCode():null,1===b?(b={},K(a,2)&&(b.jidResource=L(a,2)),this.channelHandler.onOpen(this,b)):4!==b&&5===b&&this.maybeReloadChannel();else if(K(a,9)){if(a=L(a,9),a=L(a,1),null!=this.channelHandler.onStatEvent)this.channelHandler.onStatEvent(this,a)}else if(K(a,5))zA(this);else if(K(a,4)){if(a=L(a,4),K(a,1))switch(L(a,1)){case 1:Ofa(this);break;case 2:L(a,2);this.isConnectedToWorker=!0;b=k(this.sessions.values());for(a=b.next();!a.done;a=b.next())this.sendSubscription(a.value);
b=k(this.unnamedSessions);for(a=b.next();!a.done;a=b.next())this.sendSubscription(a.value);b=k(this.broadcastSessions.values());for(a=b.next();!a.done;a=b.next())this.sendSubscription(a.value);}}else if(K(a,10))this.channelHandler.onClose(this);else K(a,11)&&(zA(this),a=L(a,11),a=new nu(a.getBrowserChannelErrorCode(),a.getLastHttpStatusCode()),this.channelHandler.onError(this,a))};
f.handleSessionStatusMessage=function(a){var b=a.getSessionId();if(null!=b){var c=b.getSessionName();if(null!=c){var d=this.getSession(b);if(null==d)for(var e=0;e<this.unnamedSessions.length;++e){var g=this.unnamedSessions[e],h=b.getServiceName();if(g.getServiceName()===h){d=g;d.sessionName=c;this.unnamedSessions.splice(e,1);M(a,3)?this.broadcastSessions.has(h)||this.broadcastSessions.set(h,d):this.sessions.set(d.getSessionName(),d);break}}if(a.hasStatus()&&1!==a.getStatus().getCode()){if(b.getServiceName(),
a.getStatus().getDescription(),b=d.sessionHandler,null!=b.onSessionError)b.onSessionError(d,{isTransient:!1,description:a.getStatus().getDescription()||""})}else L(a,2),b.getSessionName(),b.getServiceName(),d.handleAddressAssigned(L(a,2)),a.hasSubscriberInfo()&&(a=a.getSubscriberInfo(),d.handleSubscriberInfo(a))}}};
f.maybeReloadChannel=function(){var a=fb();a>this.nextChannelReloadTimeMs&&(this.nextChannelReloadTimeMs=a+Math.ceil(18E5*Math.random()),this.close(),this.open())};var BA=function(a,b){return!a.pageId&&q.SharedWorker&&a.isIframed()&&a.useSharedChannel?new yA(b,a):new wA(b,a)};var CA=function(a){return!!document.currentScript&&(-1!=document.currentScript.src.indexOf("?"+a)||-1!=document.currentScript.src.indexOf("&"+a))},Pfa=CA("loadCastFramework")||CA("loadCastApplicationFramework"),DA=function(){return"function"==typeof window.__onGCastApiAvailable?window.__onGCastApiAvailable:null},Qfa=["pkedcjkdefgpdelpbcmbmeomcjbeemfm",
"enhhojjnijigcajfphajepfemndkmdlo"],FA=function(a){a.length?EA(a.shift(),function(){FA(a)}):GA()},Rfa=function(a){return"chrome-extension://"+a+"/cast_sender.js"},EA=function(a,b,c){var d=document.createElement("script");
d.onerror=b;c&&(d.onload=c);d.src=a;(document.head||document.documentElement).appendChild(d)},GA=function(){var a=DA();
a&&a(!1,"No cast extension found")},HA=function(){if(Pfa){var a=2,b=DA(),c=function(){a--;
0==a&&b&&b(!0)};
window.__onGCastApiAvailable=c;EA("//www.gstatic.com/cast/sdk/libs/sender/1.0/cast_framework.js",GA,c)}},Sfa=function(){HA();
var a=window.navigator.userAgent.match(/Chrome\/([0-9]+)/);FA(["//www.gstatic.com/eureka/clank/"+(a?parseInt(a[1],10):0)+"/cast_sender.js","//www.gstatic.com/eureka/clank/cast_sender.js"])};var IA;IA=["av.key","js","unreleased"].slice(-1)[0];var JA={},KA=(JA.google_ad_channel="channel",JA.google_ad_type="ad_type",JA.google_ad_format="format",JA.google_color_bg="color_bg",JA.google_color_border="color_border",JA.google_color_link="color_link",JA.google_color_text="color_text",JA.google_color_url="color_url",JA.google_page_url="url",JA.google_allow_expandable_ads="ea",JA.google_ad_section="region",JA.google_cpm="cpm",JA.google_encoding="oe",JA.google_safe="adsafe",JA.google_flash_version="flash",JA.google_font_face="f",JA.google_font_size=
"fs",JA.google_hints="hints",JA.google_ad_host="host",JA.google_ad_host_channel="h_ch",JA.google_ad_host_tier_id="ht_id",JA.google_kw_type="kw_type",JA.google_kw="kw",JA.google_contents="contents",JA.google_targeting="targeting",JA.google_adtest="adtest",JA.google_alternate_color="alt_color",JA.google_alternate_ad_url="alternate_ad_url",JA.google_cust_age="cust_age",JA.google_cust_ch="cust_ch",JA.google_cust_gender="cust_gender",JA.google_cust_interests="cust_interests",JA.google_cust_job="cust_job",
JA.google_cust_l="cust_l",JA.google_cust_lh="cust_lh",JA.google_cust_u_url="cust_u_url",JA.google_cust_id="cust_id",JA.google_language="hl",JA.google_city="gcs",JA.google_country="gl",JA.google_region="gr",JA.google_available_width="avail_w",JA.google_content_recommendation_ad_positions="ad_pos",JA.google_content_recommendation_columns_num="cr_col",JA.google_content_recommendation_rows_num="cr_row",JA.google_content_recommendation_ui_type="crui",JA.google_content_recommendation_use_square_imgs="cr_sq_img",
JA.google_color_line="color_line",JA.google_disable_video_autoplay="disable_video_autoplay",JA.google_full_width_responsive_allowed="fwr",JA.google_full_width_responsive="fwrattr",JA.efwr="efwr",JA.google_pgb_reactive="pra",JA.google_resizing_allowed="rs",JA.google_resizing_height="rh",JA.google_resizing_width="rw",JA.rpe="rpe",JA.google_responsive_formats="resp_fmts",JA.google_safe_for_responsive_override="sfro",JA.google_video_doc_id="video_doc_id",JA.google_video_product_type="video_product_type",
JA.google_webgl_support="wgl",JA.google_refresh_count="rc",JA),LA={},MA=(LA.google_ad_block="ad_block",LA.google_ad_client="client",LA.google_ad_output="output",LA.google_ad_callback="callback",LA.google_ad_height="h",LA.google_ad_resize="twa",LA.google_ad_slot="slotname",LA.google_ad_unit_key="adk",LA.google_ad_dom_fingerprint="adf",LA.google_ad_width="w",LA.google_captcha_token="captok",LA.google_content_recommendation_columns_num="cr_col",LA.google_content_recommendation_rows_num="cr_row",LA.google_ctr_threshold=
"ctr_t",LA.google_cust_criteria="cust_params",LA.google_full_width_responsive="fwr_io",LA.gfwrnwer="fwrn",LA.gfwrnher="fwrnh",LA.google_bfa="bfa",LA.ebfa="ebfa",LA.ebfaca="ebfaca",LA.google_image_size="image_size",LA.google_last_modified_time="lmt",LA.google_loeid="loeid",LA.google_max_num_ads="num_ads",LA.google_max_radlink_len="max_radlink_len",LA.google_mtl="mtl",LA.google_native_settings_key="nsk",LA.google_enable_content_recommendations="ecr",LA.google_infinite_scroll_slot_type="ifsl",LA.google_num_radlinks=
"num_radlinks",LA.google_num_radlinks_per_unit="num_radlinks_per_unit",LA.google_pucrd="pucrd",LA.google_reactive_plaf="plaf",LA.google_reactive_plat="plat",LA.google_reactive_fba="fba",LA.google_reactive_sra_channels="plach",LA.google_responsive_auto_format="rafmt",LA.armr="armr",LA.google_rl_dest_url="rl_dest_url",LA.google_rl_filtering="rl_filtering",LA.google_rl_mode="rl_mode",LA.google_rt="rt",LA.google_source_type="src_type",LA.google_tag_for_child_directed_treatment="tfcd",LA.google_tag_for_under_age_of_consent=
"tfua",LA.google_tag_origin="to",LA.google_ad_semantic_area="sem",LA.google_tfs="tfs",LA.google_package="pwprc",LA.google_tag_partner="tp",LA.fra="fpla",LA.google_ml_rank="mlr",LA),NA={},OA=(NA.google_core_dbp="dbp",NA.google_lact="lact",NA.google_only_pyv_ads="pyv",NA.google_scs="scs",NA.google_video_url_to_fetch="durl",NA.google_yt_pt="yt_pt",NA.google_yt_up="yt_up",NA);var PA=function(a,b,c){c=void 0===c?{}:c;this.error=a;this.context=b.context;this.msg=b.message||"";this.id=b.id||"jserror";this.meta=c};var Tfa=[/^https?:\/\/(secure)?pubads\.g\.doubleclick\.net(:\d+)?($|\/)/i,/^https?:\/\/(googleads|adx)\.g\.doubleclick\.net(:\d+)?($|\/)/i,/^https?:\/\/(?!adx)ad.*\.doubleclick\.net(:\d+)?($|\/)/i,/^https?:\/\/(tpc|pagead2)\.googlesyndication\.com(:\d+)?($|\/)/i,/^https?:\/\/www\.googletagservices\.com(:\d+)?($|\/)/i,/^https?:\/\/adservice\.google\.(com?\.)?[a-z]{2,3}(:\d+)?($|\/)/i],Ufa=function(a){return rb(Tfa,function(b){return b.test(a)})},QA=function(a){if(a=/[-\w]+\.[-\w]+$/.exec(a))switch(Ad(a[0].toLowerCase())){case 1967261364:return 0;
case 3147493546:return 1;case 1567346461:return 2;case 2183041838:return 3;case 763236279:return 4;case 1342279801:return 5;case 526831769:return 6;case 352806002:return 7;case 2755048925:return 8;case 3306848407:return 9;case 2207000920:return 10;case 484037040:return 11;case 3506871055:return 12;case 672143848:return 13;case 2528751226:return 14;case 2744854768:return 15;case 3703278665:return 16;case 2014749173:return 17;case 133063824:return 18;case 2749334602:return 19;case 3131239845:return 20;
case 2074086763:return 21;case 795772493:return 22;case 290857819:return 23;case 3035947606:return 24;case 2983138003:return 25;case 2197138676:return 26;case 4216016165:return 27;case 239803524:return 28;case 975993579:return 29;case 1794940339:return 30;case 1314429186:return 31;case 1643618937:return 32;case 497159982:return 33;}return-1},RA=function(a){if(!a.length)return 0;
for(var b=[],c=0;33>=c;c++)b[c]=0;for(c=a.length-1;0<=c;c--){var d=QA(a[c]);0<=d&&(b[33-d]=1)}return parseInt(b.join(""),2)};var Vfa=/^https?:\/\/(\w|-)+\.cdn\.ampproject\.(net|org)(\?|\/|$)/,SA=function(a){this.rootWin_=a||q;this.init_()};
SA.prototype.init_=function(){var a=this.rootWin_||q;this.iframingState=a.top==a?1:Ii(a.top)?2:3;3!=this.iframingState&&(a=q.top.document,this.pageReferrerUrl=a.referrer,this.lastModifiedTime=Date.parse(a.lastModified)/1E3);this.windowContexts=TA(this.rootWin_)};
SA.prototype.getTopAccessibleContexts=function(){return UA(this.windowContexts)};
var WA=function(a){for(var b=[],c=Math.min(a.windowContexts.length,27),d=1;d<c;d++)a.windowContexts[d]&&a.windowContexts[d].url&&(b[d-1]=a.windowContexts[d].url);return VA(a,b.reverse())},XA=function(a){var b=a.rootWin_.document&&a.rootWin_.document.scripts?a.rootWin_.document.scripts:[];
if(!b)return 0;for(var c=[],d=b.length-1;0<=d&&26>c.length;)b[d].src&&c.unshift(b[d].src),d--;return VA(a,c)},VA=function(a,b){for(var c=0,d=(a=a.windowContexts[Math.max(a.windowContexts.length-1,0)].url||null)&&oi(a),e=Math.min(b.length,26),g=0;g<e;g++)a=null!=b[g]&&oi(b[g])||"",c*=4,a&&(d&&a==d?c+=3:Ufa(b[g])?c+=2:a&&0<=QA(a)&&(c+=1));
return c},Wfa=function(a){a=a.windowContexts;
for(var b=[],c=a.length-1;0<c;c--){var d=a[c];d&&null!=d.url&&b.push(oi(d.url))}return RA(b)},Xfa=function(a){a=a.rootWin_.document&&a.rootWin_.document.scripts?a.rootWin_.document.scripts:[];
if(!a)return 0;for(var b=[],c=a.length-1;0<=c;c--){var d=a[c];d&&null!=d.src&&b.push(oi(d.src))}return RA(b)},UA=function(a){a=a||TA();
for(var b=new Yfa(q.location.href,q,!0,!1),c=null,d=a.length-1,e=d;0<=e;--e){var g=a[e];!c&&Vfa.test(g.url)&&(c=g);if(g.url&&!g.isOriginOnly){b=g;break}}e=null;g=a.length&&a[d].url;0!=b.depth&&g&&(e=a[d]);return new Zfa(b,e,c)},TA=function(a){var b=a||q,c=[],d=null;
do{var e=b;if(Ii(e)){var g=e.location.href;d=e.document&&e.document.referrer||null;var h=!0}else g=d,d=null,h=!1;c.push(new Yfa(g||"",e,h));try{b=e.parent}catch(m){b=null}}while(b&&e!=b);e=0;for(b=c.length-1;e<=b;++e)c[e].depth=b-e;e=a||q;if(e.location&&e.location.ancestorOrigins&&e.location.ancestorOrigins.length==c.length-1)for(a=1;a<c.length;++a)b=c[a],b.url||(b.url=e.location.ancestorOrigins[a-1]||"",b.isOriginOnly=!0);return c},Zfa=function(a,b,c){this.topFullUrl=a;
this.topOriginOnly=b;this.ampCacheUrl=c},Yfa=function(a,b,c,d){this.url=a;
this.win=b;this.isSameOrigin=c;this.isOriginOnly=!!d;this.depth=Ma(void 0)?void 0:null};var YA=function(){this.maxPathLength_=4E3;this.paramDelimiter_="&";this.arrayDelimiters_=",$";this.truncationParam=Ia(void 0)?void 0:"trn";this.truncationValue=null;this.allowHardTrunctation_=!1;this.allPriorityLists_={};this.nextPriority_=0;this.allPriorities_=[]},$fa=function(a,b){var c={};
c[a]=b;return[c]},aga=function(a,b,c,d,e){var g=[];
Ji(a,function(h,m){(h=ZA(h,b,c,d,e))&&g.push(m+"="+h)});
return g.join(b)},ZA=function(a,b,c,d,e){if(null==a)return"";
b=b||"&";c=c||",$";"string"==typeof c&&(c=c.split(""));if(a instanceof Array){if(d=d||0,d<c.length){for(var g=[],h=0;h<a.length;h++)g.push(ZA(a[h],b,c,d+1,e));return g.join(c[d])}}else if("object"==typeof a)return e=e||0,2>e?encodeURIComponent(aga(a,b,c,d,e+1)):"...";return encodeURIComponent(String(a))},$A=function(a,b,c,d){a.allPriorities_.push(b);
a.allPriorityLists_[b]=$fa(c,d)},aB=function(a,b,c){var d=a.nextPriority_++;
b=$fa(b,c);a.allPriorities_.push(d);a.allPriorityLists_[d]=b};
YA.prototype.addParams=function(a){Ji(a,function(b,c){null!=b&&aB(this,c,b)},this)};
YA.prototype.getUrl=function(a,b,c,d){a=a+"//"+b+c;var e=bga(this)-c.length-d.length;if(0>e)return"";this.allPriorities_.sort(function(x,y){return x-y});
c=null;b="";for(var g=0;g<this.allPriorities_.length;g++)for(var h=this.allPriorities_[g],m=this.allPriorityLists_[h],n=0;n<m.length;n++){if(!e){c=null==c?h:c;break}var p=aga(m[n],this.paramDelimiter_,this.arrayDelimiters_);if(p){p=b+p;if(e>=p.length){e-=p.length;a+=p;b=this.paramDelimiter_;break}else this.allowHardTrunctation_&&(b=e,p[b-1]==this.paramDelimiter_&&--b,a+=p.substr(0,b),b=this.paramDelimiter_,e=0);c=null==c?h:c}}g="";this.truncationParam&&null!=c&&(g=b+this.truncationParam+"="+(this.truncationValue||
c));return a+g+d};
var bga=function(a){if(!a.truncationParam)return a.maxPathLength_;var b=1,c;for(c in a.allPriorityLists_)b=c.length>b?c.length:b;return a.maxPathLength_-a.truncationParam.length-b-a.paramDelimiter_.length-1};
YA.prototype.setMaxPathLength=function(a){this.maxPathLength_=a};var bB=function(){var a=void 0===a?Ge:a;this.protocol_="http:"===a.location.protocol?"http:":"https:";this.domain_="pagead2.googlesyndication.com";this.path_="/pagead/gen_204?id=";this.defaultReportFreq_=.01;this.staticReportThreshold_=Math.random()};
bB.prototype.setDefaultReportingFrequency=function(a){this.defaultReportFreq_=a};
bB.prototype.maybeSendReport=function(a,b,c,d,e){if(this.shouldSendReport(!!c,d))try{if(b instanceof YA)var g=b;else g=new YA,Ji(b,function(m,n){aB(g,n,m)});
var h=g.getUrl(this.protocol_,this.domain_,this.path_+a+"&","");h&&("undefined"===typeof e?Ri(q,h,null,!1):Ri(q,h,void 0===e?null:e,!1))}catch(m){}};
bB.prototype.shouldSendReport=function(a,b){return(a?this.staticReportThreshold_:Math.random())<(b||this.defaultReportFreq_)};var cga=!1,cB=null,dB=function(a){this.defaultBucket={};this.layers={};this.experimentsFinalized_=!1;a=a||[];for(var b=0,c=a.length;b<c;++b)this.layers[a[b]]=""},ega=function(){var a=dga(),b=new dB;
Ji(a.defaultBucket,function(c,d){b.defaultBucket[d]=c});
Ji(a.layers,function(c,d){b.layers[d]=c});
return b},fga=function(){if(null===cB){cB="";
try{var a="";try{a=q.top.location.hash}catch(c){a=q.location.hash}if(a){var b=a.match(/\bdeid=([\d,]+)/);cB=b?b[1]:""}}catch(c){}}return cB};
dB.prototype.clearStateForTests=function(){u.clear(this.defaultBucket);Ji(this.layers,function(a,b){this.layers[b]=""},this);
this.experimentsFinalized_=!1};
var gga=function(a,b,c){return""==b?"":c?a.layers.hasOwnProperty(c)?a.layers[c]=b:"":(a.defaultBucket[b]=!0,b)};
dB.prototype.chooseAndSetExpId=function(a,b,c){if(this.experimentsFinalized_)return a.join(),"";if(hga(this,c)){var d;d=(d=fga())?(d=d.match(new RegExp("\\b("+a.join("|")+")\\b")))?d[0]:null:null;if(d)a=d;else if(cga)a=null;else a:{if(!Sba()&&!Rba()&&(d=Math.random(),d<b)){d=Qba();a=a[Math.floor(d*a.length)];break a}a=null}if(a)return gga(this,a,c)}return""};
dB.prototype.chooseAndSetStickyExpId=function(a,b,c,d,e){return hga(this,e)&&c.range&&(a=c.chooseElement(a,b,c.range.start,Math.round(1E3*d)))?gga(this,a,e):""};
var hga=function(a,b){return b?a.layers.hasOwnProperty(b)&&""==a.layers[b]:!0},fB=function(a){var b=eB();
return b.layers.hasOwnProperty(a)?b.layers[a]:""},gB=function(a){var b=[];
Ji(a.defaultBucket,function(c,d){b.push(d)});
Ji(a.layers,function(c){""!=c&&b.push(c)});
return b};
dB.prototype.getExpIdsCsv=function(){return gB(this).join()};
dB.prototype.isFinalized=function(){return this.experimentsFinalized_};var hB=function(){var a=q.performance;return a&&a.now&&a.timing?Math.floor(a.now()+a.timing.navigationStart):fb()},iB=function(){var a=void 0===a?q:a;
return(a=a.performance)&&a.now?a.now():null};var iga=function(a,b,c,d,e){this.label=a;this.type=b;this.value=c;this.duration=void 0===d?0:d;this.uniqueId=Math.random();this.slotId=e};var jB=q.performance,jga=!!(jB&&jB.mark&&jB.measure&&jB.clearMarks),kB=Nb(function(){var a;if(a=jga)a=fga(),a=!!a.indexOf&&0<=a.indexOf("1337");return a}),lB=function(a){this.events=[];
this.installedWindow=a||q;var b=null;a&&(a.google_js_reporting_queue=a.google_js_reporting_queue||[],this.events=a.google_js_reporting_queue,b=a.google_measure_js_timing);this.collectionEnabled=kB()||(null!=b?b:1>Math.random())};
lB.prototype.disable=function(){this.collectionEnabled=!1;this.events!=this.installedWindow.google_js_reporting_queue&&(kB()&&mb(this.events,mB),this.events.length=0)};
var mB=function(a){a&&jB&&kB()&&(jB.clearMarks("goog_"+a.label+"_"+a.uniqueId+"_start"),jB.clearMarks("goog_"+a.label+"_"+a.uniqueId+"_end"))};
lB.prototype.start=function(a,b){if(!this.collectionEnabled)return null;var c=iB()||hB();a=new iga(a,b,c);b="goog_"+a.label+"_"+a.uniqueId+"_start";jB&&kB()&&jB.mark(b);return a};
lB.prototype.end=function(a){if(this.collectionEnabled&&Ma(a.value)){var b=iB()||hB();a.duration=b-a.value;b="goog_"+a.label+"_"+a.uniqueId+"_end";jB&&kB()&&jB.mark(b);!this.collectionEnabled||2048<this.events.length||this.events.push(a)}};
lB.prototype.instant=function(a,b,c){var d=iB();d&&this.collectionEnabled&&(a=new iga(a,b,d,0,c),!this.collectionEnabled||2048<this.events.length||this.events.push(a))};
var kga=function(a,b,c){if(!a.collectionEnabled)return c();b=a.start(String(b),3);try{var d=c()}catch(e){throw mB(b),e}a.end(b);return d};
lB.prototype.timedFunction=function(a,b,c){var d=this;return function(e){for(var g=[],h=0;h<arguments.length;++h)g[h-0]=arguments[h];return kga(d,a,function(){return b.apply(c,g)})}};var lga=function(){var a=nB;this.pinger_=oB;this.errorTypeId_="jserror";this.silenceErrors_=!0;this.addParamsToErrorsFn_=null;this.errorHandler_=this.maybeReportError;this.timer_=void 0===a?null:a;this.useStaticThresholdForErrors_=!1};
f=lga.prototype;f.pinger=function(){return this.pinger_};
f.setErrorHandler=function(a){this.errorHandler_=a};
f.setAddParamsOnErrorFn=function(a){this.addParamsToErrorsFn_=a};
f.setErrorTypeId=function(a){this.errorTypeId_=a};
f.getSilenceErrors=function(){return this.silenceErrors_};
f.setSilenceErrors=function(a){this.silenceErrors_=a};
f.setUseStaticThresholdForErrors=function(a){this.useStaticThresholdForErrors_=a};
f.protectAndRun=function(a,b,c){try{if(this.timer_&&this.timer_.collectionEnabled){var d=this.timer_.start(a.toString(),3);var e=b();this.timer_.end(d)}else e=b()}catch(h){b=this.silenceErrors_;try{mB(d);var g=new PA(h,{message:pB(h)});b=this.errorHandler_(a,g,void 0,c)}catch(m){this.maybeReportError(217,m)}if(!b)throw h}return e};
f.protectFunction=function(a,b,c,d){var e=this;return function(g){for(var h=[],m=0;m<arguments.length;++m)h[m-0]=arguments[m];return e.protectAndRun(a,function(){return b.apply(c,h)},d)}};
f.maybeReportError=function(a,b,c,d,e){e=e||this.errorTypeId_;try{var g=new YA;g.allowHardTrunctation_=!0;$A(g,1,"context",a);b.error&&b.meta&&b.id||(b=new PA(b,{message:pB(b)}));b.msg&&$A(g,2,"msg",b.msg.substring(0,512));var h=b.meta||{};this.addCustomParams(h,d);b=[h];g.allPriorities_.push(3);g.allPriorityLists_[3]=b;var m=UA();m.topOriginOnly&&$A(g,4,"top",m.topOriginOnly.url||"");$A(g,5,"url",m.topFullUrl.url||"");this.pinger_.maybeSendReport(e,g,this.useStaticThresholdForErrors_,c)}catch(n){try{this.pinger_.maybeSendReport(e,
{context:"ecmserr",rctx:a,msg:pB(n),url:m&&m.topFullUrl.url},this.useStaticThresholdForErrors_,c)}catch(p){}}return this.silenceErrors_};
f.addCustomParams=function(a,b){if(this.addParamsToErrorsFn_)try{this.addParamsToErrorsFn_(a)}catch(c){}if(b)try{b(a)}catch(c){}};
var pB=function(a){var b=a.toString();a.name&&-1==b.indexOf(a.name)&&(b+=": "+a.name);a.message&&-1==b.indexOf(a.message)&&(b+=": "+a.message);if(a.stack){a=a.stack;var c=b;try{-1==a.indexOf(c)&&(a=c+"\n"+a);for(var d;a!=d;)d=a,a=a.replace(/((https?:\/..*\/)[^\/:]*:\d+(?:.|\n)*)\2/,"$1");b=a.replace(/\n */g,"\n")}catch(e){b=c}}return b};var oB,qB,rB,sB=Ti(),nB=new lB(sB);(function(){oB=new bB;qB=new lga;qB.setAddParamsOnErrorFn(function(b){var c=Ge.jerExpIds;if(Wa(c)&&0!==c.length){var d=b.eid;if(d){c=[].concat(ka(d.split(",")),ka(c));d={};for(var e=0,g=0;g<c.length;){var h=c[g++];var m=h;m=$a(m)?"o"+bb(m):(typeof m).charAt(0)+m;Object.prototype.hasOwnProperty.call(d,m)||(d[m]=!0,c[e++]=h)}c.length=e;b.eid=c.join(",")}else b.eid=c.join(",")}rB&&(b.jc=rB)});
"complete"==sB.document.readyState?sB.google_measure_js_timing||nB.disable():nB.collectionEnabled&&Pi(sB,"load",function(){sB.google_measure_js_timing||nB.disable()});
var a=Fe.currentScript;rB=a?a.dataset.jc:""})();
var tB=function(a,b){return qB.protectFunction(a,b,void 0,void 0)},mga=function(a,b){oB.maybeSendReport(a,b,"jserror"!=a,void 0,void 0)};var nga={FLOATING_BOTTOM:1,FLOATING_TOP:2,GDN_INTERSTITIAL:8,SCROLL_TRIGGERED_IMMERSIVE:9,RESPONSIVE_RESIZE:16,AUTO_NATIVE:26,APIANA:27,PEDESTAL:30,INFINITE_SCROLL_INVISIBLE_REQUEST:32};var oga=function(){this.wasPlaTagProcessed=!1;this.wasReactiveAdConfigReceived={};this.adCount={};this.wasReactiveAdVisible={};this.stateForType={};this.reactiveTypeEnabledInAsfe={};this.isReactiveTagFirstOnPage=this.wasReactiveAdConfigHandlerRegistered=this.wasReactiveTagRequestSent=!1;this.reactiveTypeDisabledByPublisher={};this.tagSpecificState={};this.adRegion=null;this.improveCollisionDetection=1;this.messageValidationEnabled=!1},uB=function(a){a.google_reactive_ads_global_state||(a.google_reactive_ads_global_state=
new oga);
return a.google_reactive_ads_global_state};var pga=728*1.38,vB=function(a){return a!=a.top?512:0},xB=function(a,b){return(a=wB(a).clientWidth)?a>(void 0===b?420:b)?32768:320>a?65536:0:16384},yB=function(a){var b=wB(a).clientWidth;
a=a.innerWidth;return(b=b&&a?b/a:0)?1.05<b?262144:.95>b?524288:0:131072},wB=function(a){a=a.document;
var b={};a&&(b="CSS1Compat"==a.compatMode?a.documentElement:a.body);return b||{}},qga=function(a,b){return a.adCount?1==b||2==b?!(!a.adCount[1]&&!a.adCount[2]):(a=a.adCount[b])&&27!=b&&26!=b?1<=a:!1:!1};var zB=function(){var a=window;Hj(KA,function(b,c){a[c]=null});
Hj(MA,function(b,c){a[c]=null});
Hj(OA,function(b,c){a[c]=null});
a.google_container_id=null;a.google_enable_async=null;a.google_eids=null;a.google_page_location=null;a.google_referrer_url=null;a.google_enable_single_iframe=null;a.google_ad_region=null;a.google_gl=null;a.google_loader_used=null;a.google_loader_features_used=null;a.google_debug_params=null},AB=function(a,b,c){a.featuresUsed|=2;
return b[c%b.length]};var BB=null,CB=function(a,b){for(var c=0,d=a,e=0;a&&a!=a.parent;)if(a=a.parent,e++,Ii(a))d=a,c=e;else if(b)break;return{win:d,level:c}},DB=function(){BB||(BB=CB(q,!0).win);
return BB};var EB=function(a){dB.call(this,a);this.dfltBktExt=this.defaultBucket;this.lrsExt=this.layers};
l(EB,dB);var rga=function(){this.S={}},HB=function(){if(FB)return FB;
var a=GB(),b=a.google_persistent_state_async;return null!=b&&"object"==typeof b&&null!=b.S&&"object"==typeof b.S?FB=b:a.google_persistent_state_async=FB=new rga},IB=function(a,b,c){b=sga[b]||"google_ps_"+b;
a=a.S;var d=a[b];return void 0===d?a[b]=c:d},GB=function(){var a=Ej();
return(a?Ii(a.master)?a.master:null:null)||Ti()},FB=null,JB={},sga=(JB[8]="google_prev_ad_formats_by_region",JB[9]="google_prev_ad_slotnames_by_region",JB);var KB=navigator,tga=function(){try{return KB.javaEnabled()}catch(a){return!1}},uga=function(a){var b=1,c;
if(void 0!=a&&""!=a)for(b=0,c=a.length-1;0<=c;c--){var d=a.charCodeAt(c);b=(b<<6&268435455)+d+(d<<14);d=b&266338304;b=0!=d?b^d>>21:b}return b},vga=function(a,b){if(!a||"none"==a)return 1;
a=String(a);"auto"==a&&(a=b,"www."==a.substring(0,4)&&(a=a.substring(4,a.length)));return uga(a.toLowerCase())},wga=/^\s*_ga=\s*1\.(\d+)[^.]*\.(.*?)\s*$/,xga=/^[^=]+=\s*GA1\.(\d+)[^.]*\.(.*?)\s*$/,yga=/^\s*_ga=\s*()(amp-[\w.-]{22,64})$/;Qe||Re||Ne&&$e(11);Re&&vh("IFRAME");var zga={AUTO_PAGE_LEVEL_TAG:"google_ads_preview",ECORE_ALL_ADS:"google_mc_lab",FLOATING_TOP:"google_anchor_debug",FLOATING_BOTTOM:"google_bottom_anchor_debug",INFINITE_SCROLL:"google_ifsl_debug",INTERSTITIAL:"google_ia_debug",IMMERSIVE_SCROLL:"google_scr_debug",INTERSTITIAL_ALLOW_ONCLICK_LINKS:"google_ia_debug_allow_onclick",PAGE_LEVEL_DEBUG:"googleads",PEDESTAL:"google_pedestal_debug",RESIZABLE:"google_resize_debug",SHOPPABLE_IMAGES:"google_shoppable_images_debug",SHOPPABLE_IMAGES_COOKIE_DOMAIN:"google_shoppable_images_cookie",
SHOPPABLE_IMAGES_FORCED:"google_shoppable_images_forced",RESPONSIVE_DEBUG:"google_responsive_slot_debug",RESPONSIVE_PREVIEW:"google_responsive_slot_preview",RESPONSIVE_DUMMY_AD:"google_responsive_dummy_ad"},LB={},Aga=(LB.google_bottom_anchor_debug=1,LB.google_anchor_debug=2,LB.google_ia_debug=8,LB.google_resize_debug=16,LB.google_ifsl_debug=32,LB.google_scr_debug=9,LB.googleads=2,LB.google_pedestal_debug=30,LB);var Cga=function(a,b){if(!a)return!1;a=a.hash;if(!a||!a.indexOf)return!1;if(-1!=a.indexOf(b))return!0;b=Bga(b);return"go"!=b&&-1!=a.indexOf(b)?!0:!1},Bga=function(a){var b="";
Hj(a.split("_"),function(c){b+=c.substr(0,2)});
return b};var Dga=function(a,b){var c;c||(c="https");q.location&&"https:"==q.location.protocol&&"http"==c&&(c="https");return[c,"://",a,b].join("")};var MB=function(a,b){if(!b)throw Error("Value for "+a+" is undefined, null or blank.");if("string"!==typeof b&&!(b instanceof String))throw Error("Value for "+a+" is not a string.");if(""===b.trim())throw Error("Value for "+a+" is empty string.")},NB=function(a){if(!a)throw Error("functionToExecute must not be truthy.");
},OB=function(a,b){if(null==b)throw Error(a+" must not be null or undefined.");
if("number"!==typeof b||isNaN(b))throw Error("Value for "+a+" is not a number");if(0>b)throw Error(a+" must be a positive number.")};var Ega=function(){return /\d+\.\d+\.\d+(-.*)?/.test("1.2.17-google_20190723")},Fga=function(){for(var a=["1",
"2","17"],b=["1","0","3"],c=0;3>c;c++){var d=parseInt(a[c],10),e=parseInt(b[c],10);if(d>e)break;else if(d<e)return!1}return!0};var PB=function(a,b,c,d){this.guid=a;this.method=b;this.version=c;this.args=d},Gga=function(a){return!!a&&void 0!==a.omid_message_guid&&void 0!==a.omid_message_method&&void 0!==a.omid_message_version&&"string"===typeof a.omid_message_guid&&"string"===typeof a.omid_message_method&&"string"===typeof a.omid_message_version&&(void 0===a.omid_message_args||void 0!==a.omid_message_args)},Hga=function(a){return new PB(a.omid_message_guid,a.omid_message_method,a.omid_message_version,a.omid_message_args)};
PB.prototype.serialize=function(){var a={};a=(a.omid_message_guid=this.guid,a.omid_message_method=this.method,a.omid_message_version=this.version,a);void 0!==this.args&&(a.omid_message_args=this.args);return a};var QB=function(a){this.to=a;this.communicationType_="NONE"};
QB.prototype.serialize=function(a){return JSON.stringify(a)};
QB.prototype.deserialize=function(a){return JSON.parse(a)};
QB.prototype.isDirectCommunication=function(){return"DIRECT"===this.communicationType_};function Iga(a,b){return a&&(a[b]||(a[b]={}))}
;var Jga=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(a){var b=16*Math.random()|0;return"y"===a?(b&3|8).toString(16):b.toString(16)})};var RB=function(a){for(var b=[],c=0;c<arguments.length;++c)b[c-0]=arguments[c];Kga(function(){throw new(Function.prototype.bind.apply(Error,[null,"Could not complete the test successfully - "].concat(ka(b))))},function(){return console.error.apply(console,ka(b))})};
function Kga(a,b){"undefined"!==typeof jasmine&&jasmine?a():"undefined"!==typeof console&&console&&console.error&&b()}
;var SB=eval("this"),TB=function(){if("undefined"!==typeof omidGlobal&&omidGlobal)return omidGlobal;if("undefined"!==typeof global&&global)return global;if("undefined"!==typeof window&&window)return window;if("undefined"!==typeof SB&&SB)return SB;throw Error("Could not determine global object context.")}();var Lga=function(a){try{return a.frames?!!a.frames.omid_v1_present:!1}catch(b){return!1}};var UB=function(a){QB.call(this,a);this.communicationType_="DIRECT";this.handleExportedMessage=UB.prototype.handleExportedMessage.bind(this)};
l(UB,QB);UB.prototype.sendMessage=function(a,b){b=void 0===b?this.to:b;if(!b)throw Error("Message destination must be defined at construction time or when sending the message.");b.handleExportedMessage(a.serialize(),this)};
UB.prototype.handleExportedMessage=function(a,b){if(Gga(a)&&this.onMessage)this.onMessage(Hga(a),b)};var VB=function(a,b){b=void 0===b?TB:b;QB.call(this,b);var c=this;this.communicationType_="POST_MESSAGE";a.addEventListener("message",function(d){if("object"===typeof d.data){var e=d.data;if(Gga(e)&&d.source&&c.onMessage)c.onMessage(Hga(e),d.source)}})};
l(VB,QB);VB.prototype.sendMessage=function(a,b){b=void 0===b?this.to:b;if(!b)throw Error("Message destination must be defined at construction time or when sending the message.");b.postMessage(a.serialize(),"*")};var Mga=function(){var a;"undefined"===typeof a&&"undefined"!==typeof window&&window&&(a=window);if("undefined"===typeof a||!a||"undefined"===typeof a.top||!a.top)return TB;if(a===a.top)return a;try{var b=a.top;return"undefined"===typeof b.location.hostname?a:""===b.x||""!==b.x?b:a}catch(c){return a}};
function Nga(a){return["omid","v1_VerificationServiceCommunication"].reduce(function(b,c){return b&&b[c]},a)}
;var WB=function(a){if(void 0===a){a=Mga();var b=void 0===b?Lga:b;var c=Nga(a);b=c?new UB(c):a.top&&b(a.top)?new VB(a,a.top):null}else b=a;if(this.communication=b)this.communication.onMessage=this.handleMessage_.bind(this);else if(b=(b=TB.omid3p)&&"function"===typeof b.registerSessionObserver&&"function"===typeof b.addEventListener?b:null)this.omid3p=b;this.remoteIntervals_=this.remoteTimeouts_=0;this.callbackMap_={};this.imgCache_=[]},Oga=function(a,b){NB(b);
a.omid3p?a.omid3p.registerSessionObserver(b,"doubleclickbygoogle.com"):a.sendMessage_("addSessionListener",b,"doubleclickbygoogle.com")};
WB.prototype.addEventListener=function(a,b){MB("eventType",a);NB(b);this.omid3p?this.omid3p.addEventListener(a,b):this.sendMessage_("addEventListener",b,a)};
WB.prototype.sendUrl=function(a,b,c){MB("url",a);TB.document&&TB.document.createElement?Pga(this,a,b,c):this.sendMessage_("sendUrl",function(d){d&&b?b():!d&&c&&c()},a)};
var Pga=function(a,b,c,d){var e=TB.document.createElement("img");a.imgCache_.push(e);var g=function(h){var m=a.imgCache_.indexOf(e);0<=m&&a.imgCache_.splice(m,1);h&&h()};
e.addEventListener("load",g.bind(a,c));e.addEventListener("error",g.bind(a,d));e.src=b};
WB.prototype.injectJavaScriptResource=function(a,b,c){MB("url",a);TB.document?Qga(a,b,c):this.sendMessage_("injectJavaScriptResource",function(d,e){d?(Rga(e,a),b()):(RB("Service failed to load JavaScript resource."),c())},a)};
var Qga=function(a,b,c){var d=TB.document,e=d.body;d=d.createElement("script");d.onload=b;d.onerror=c;d.src=a;d.type="application/javascript";e.appendChild(d)},Rga=function(a,b){try{eval(a)}catch(c){RB("Error evaluating the JavaScript resource from \""+b+"\".")}};
WB.prototype.setTimeout=function(a,b){NB(a);OB("timeInMillis",b);if(Sga())return TB.setTimeout(a,b);var c=this.remoteTimeouts_++;this.sendMessage_("setTimeout",a,c,b);return c};
WB.prototype.clearTimeout=function(a){OB("timeoutId",a);Sga()?TB.clearTimeout(a):this.sendOneWayMessage_("clearTimeout",a)};
WB.prototype.setInterval=function(a,b){NB(a);OB("timeInMillis",b);if(Tga())return TB.setInterval(a,b);var c=this.remoteIntervals_++;this.sendMessage_("setInterval",a,c,b);return c};
WB.prototype.clearInterval=function(a){OB("intervalId",a);Tga()?TB.clearInterval(a):this.sendOneWayMessage_("clearInterval",a)};
var Sga=function(){return"function"===typeof TB.setTimeout&&"function"===typeof TB.clearTimeout},Tga=function(){return"function"===typeof TB.setInterval&&"function"===typeof TB.clearInterval};
WB.prototype.handleMessage_=function(a){var b=a.method,c=a.guid;a=a.args;if("response"===b&&this.callbackMap_[c]){var d=Ega()&&Fga()?a?a:[]:a&&"string"===typeof a?JSON.parse(a):[];this.callbackMap_[c].apply(this,d)}"error"===b&&window.console&&RB(a)};
WB.prototype.sendOneWayMessage_=function(a,b){for(var c=[],d=1;d<arguments.length;++d)c[d-1]=arguments[d];this.sendMessage_.apply(this,[a,null].concat(ka(c)))};
WB.prototype.sendMessage_=function(a,b,c){for(var d=[],e=2;e<arguments.length;++e)d[e-2]=arguments[e];this.communication&&(e=Jga(),b&&(this.callbackMap_[e]=b),d=Ega()&&Fga()?d:JSON.stringify(d),this.communication.sendMessage(new PB(e,"VerificationService."+a,"1.2.17-google_20190723",d)))};
var XB=void 0;if(XB=void 0===XB?"undefined"===typeof omidExports?null:omidExports:XB){var YB=["OmidVerificationClient"];YB.slice(0,YB.length-1).reduce(Iga,XB)[YB[YB.length-1]]=WB};Ua(WB);var Uga={NONE:0,EFP:1};var ZB=function(){this.exposure=0;this.tabHidden=!1;this.backgroundedState=-1;this.percentageOfViewport=0;this.isLargeAd=!1;this.screenShare=0};
ZB.prototype.isVisible=function(){return this.isLargeAd?.3<=this.exposure:.5<=this.exposure};
ZB.prototype.isFullyVisible=function(){return 1<=this.exposure};var $B={CONTROL:0,EXPERIMENT:1},Vga={370204018:0,370204019:1,370204052:2,370204026:0,370204027:1,370204053:2},Wga={668123008:0,668123009:1},Xga={668123028:0,668123029:1},Yga={NONE:0,INTERSECTION_OBSERVER:1,GEOMETRIC:2},Zga={480596784:0,480596785:1,21063355:2},$ga={387667120:0,387667121:1},aha={319331040:0,BLOCK_UNMEASURABLE_VIEWABLE_PING:1},bha={42530094:0,42530095:1},cha={370204070:1};var aC=function(){this.value_=null;this.consumesParameter_=this.addsToPing_=!1;this.experimentIdMapping_=null};
aC.prototype.consumesParameter=function(a){this.consumesParameter_=void 0===a?!0:a;return this};
var bC=function(a){a.addsToPing_=!0;return a},cC=function(a,b){a.experimentIdMapping_=void 0===b?null:b};
aC.prototype.setExperimentIds=function(a){var b=this;this.experimentIdMapping_&&mb(a,function(c){c=b.experimentIdMapping_[c];void 0!==c&&b.setValue(c)})};
aC.prototype.getValue=function(){return this.value_};
var dC=function(a){aC.call(this);this.legalValues_=a};
l(dC,aC);dC.prototype.setValue=function(a){if(null!==this.value_||!u.containsValue(this.legalValues_,a))return!1;this.value_=a;return!0};
var eC=function(){aC.call(this)};
l(eC,aC);eC.prototype.setValue=function(a){if(null!==this.value_||!Ma(a))return!1;this.value_=a;return!0};
var fC=function(){aC.call(this)};
l(fC,aC);fC.prototype.setValue=function(a){if(null!==this.value_||!Ka(a))return!1;this.value_=a;return!0};var gC=function(){this.features_={};this.allowExperiments_=!0;this.forcedFeatures_={}};
gC.prototype.disable=function(){this.allowExperiments_=!1};
gC.prototype.enable=function(){this.allowExperiments_=!0};
gC.prototype.isEnabled=function(){return this.allowExperiments_};
gC.prototype.reset=function(){this.features_={};this.allowExperiments_=!0;this.forcedFeatures_={}};
var hC=function(a,b,c){a.features_[b]||(a.features_[b]=new dC(c));return a.features_[b]};
gC.prototype.defineStringFeature=function(a){this.features_[a]||(this.features_[a]=new fC);return this.features_[a]};
var iC=function(a,b,c){(a=a.features_[b])&&a.setValue(c)},jC=function(a,b){if(u.containsKey(a.forcedFeatures_,b))return a.forcedFeatures_[b];
if(a=a.features_[b])return a.getValue()},kC=function(a){var b={},c=u.filter(a.features_,function(d){return d.addsToPing_});
u.forEach(c,function(d,e){d=void 0!==a.forcedFeatures_[e]?String(a.forcedFeatures_[e]):d.addsToPing_&&null!==d.value_?String(d.value_):"";0<d.length&&(b[e]=d)},a);
return b};
gC.prototype.getEnabledFeaturesAsStrings=function(){var a=kC(this),b=[];u.forEach(a,function(c,d){d in Object.prototype||"undefined"==typeof c||(c=[d,":",c].join(""),b.push(c))});
return b};
var lC=function(a,b){if(!a.allowExperiments_)return b;b=b.split("&");for(var c=b.length-1;0<=c;c--){var d=b[c].split("="),e=d[0];d=1<d.length?parseInt(d[1],10):1;isNaN(d)||(e=a.features_[e])&&e.setValue(d)&&e.consumesParameter_&&b.splice(c,1)}return b.join("&")};
gC.prototype.setExperimentIds=function(a){this.allowExperiments_&&mb(u.getValues(this.features_),function(b){return b.setExperimentIds(a)})};
var dha=function(a,b){a.allowExperiments_&&b&&Ka(b)&&(b=b.match(/[&;?]eid=([^&;]+)/))&&2===b.length&&(b=decodeURIComponent(b[1]).split(","),b=pb(b,function(c){return Number(c)}),a.setExperimentIds(b))};var eha=!Ne&&!Rc(),mC=function(a,b){if(/-[a-z]/.test(b))return null;if(eha&&a.dataset){if(Sc()&&!(b in a.dataset))return null;a=a.dataset[b];return void 0===a?null:a}return a.getAttribute("data-"+Dd(b))},nC=function(a,b){return /-[a-z]/.test(b)?!1:eha&&a.dataset?b in a.dataset:a.hasAttribute?a.hasAttribute("data-"+Dd(b)):!!a.getAttribute("data-"+Dd(b))};var fha=function(){this.monitoredElement=this.markedUpElement=null;this.creativeSearchState=this.likelyCandidateCount=this.adkMatchCount=this.elementCount=0},oC=function(a){if(!a)return!1;
try{var b=a.getBoundingClientRect();return b&&30<=b.height&&30<=b.width}catch(c){return!1}},gha=function(a){return nb(a,function(b){return oC(b)})},hha=function(a){return nb(a,function(b){return"SCRIPT"!=b.nodeName&&"FONT"!=b.nodeName})},iha=function(a){if(!a.length)return null;
var b=gha(a);return 0<b.length?b[0]:a[0]},jha=function(a){if(!a)return null;
if(!a.children)return a;for(var b=hha(Cb(a.children));b.length;){var c=gha(b);if(1==c.length)return c[0];if(1<c.length)break;b=qaa(b,function(d){return hha(Cb(d.children))})}return a},kha=function(a,b){return Jb(pb(b,function(c){return Cb(eh(c,a))}))},lha=function(a,b){var c=!0;
c=void 0===c?!1:c;b=void 0===b?!1:b;a.monitoredElement=a.markedUpElement;a.creativeSearchState=1;if(!oC(a.markedUpElement)){var d=jha(a.markedUpElement);oC(d)?(a.monitoredElement=d,a.creativeSearchState=3):c&&(b||Ge!==Ge.top)&&(b=kha(Ge.document.body,["GoogleActiveViewInnerContainer"]),1==b.length&&(a.monitoredElement=b[0],a.creativeSearchState=2))}};
fha.prototype.findMarkedUpElement=function(a){var b=null;var c=ch("SCRIPT",Ge.document);0<c.length&&(c=c[c.length-1])&&c.parentElement&&(b=c.parentElement);b||(b=Ge.document.body);if(b){a=String(a);c=kha(b,["GoogleActiveViewClass","GoogleActiveViewElement"]);for(var d=[],e=[],g=k(c),h=g.next();!h.done;h=g.next())h=h.value,nC(h,"googleAvAdk")?mC(h,"googleAvAdk")==a&&d.push(h):e.push(h);2==d.length&&(Kh(d[0],d[1])?d=[d[1]]:Kh(d[1],d[0])&&(d=[d[0]]));this.elementCount=c.length;this.adkMatchCount=d.length;
this.likelyCandidateCount=d.length+e.length;this.markedUpElement=(this.markedUpElement=1==d.length?d[0]:iha(d)||iha(e))||jha(b)}};var pC=function(a,b){this.adKey_=(void 0===a?0:a)||0;this.awbidKey_=(void 0===b?"":b)||""};
pC.prototype.isValid=function(){return!!this.adKey_||!!this.awbidKey_};
pC.prototype.toString=function(){return this.adKey_+(this.awbidKey_?"-":"")+this.awbidKey_};
pC.prototype.toUrlParameters=function(){var a=[];this.adKey_&&a.push("adk="+this.adKey_);this.awbidKey_&&a.push("exk="+this.awbidKey_);return a};
pC.prototype.matches=function(a){return this.awbidKey_||a.awbidKey_?this.awbidKey_==a.awbidKey_:this.adKey_||a.adKey_?this.adKey_==a.adKey_:!1};var qC=function(){};
qC.prototype.now=function(){return 0};
qC.prototype.getTotalHeapSize=function(){return 0};
qC.prototype.getUsedHeapSize=function(){return 0};
qC.prototype.getHeapSizeLimit=function(){return 0};var sC=function(){if(!rC())throw Error()};
l(sC,qC);var rC=function(){return!(!Ge||!Ge.performance)};
sC.prototype.now=function(){return rC()&&Ge.performance.now?Ge.performance.now():qC.prototype.now.call(this)};
sC.prototype.getTotalHeapSize=function(){return rC()&&Ge.performance.memory?Ge.performance.memory.totalJSHeapSize||0:qC.prototype.getTotalHeapSize.call(this)};
sC.prototype.getUsedHeapSize=function(){return rC()&&Ge.performance.memory?Ge.performance.memory.usedJSHeapSize||0:qC.prototype.getUsedHeapSize.call(this)};
sC.prototype.getHeapSizeLimit=function(){return rC()&&Ge.performance.memory?Ge.performance.memory.jsHeapSizeLimit||0:qC.prototype.getHeapSizeLimit.call(this)};var tC=function(){};
tC.prototype.isVisible=function(){return 1===yl(Fe)};
tC.prototype.isUnknown=function(){return 0===yl(Fe)};
tC.prototype.registerStateChangeHandler=function(a){var b=zl();return b?Pi(Fe,b,a,{capture:!1}):!1};
tC.prototype.removeStateChangeHandler=function(a){var b=zl();b&&Qi(Fe,b,a)};var uC=function(a,b){this.urlAndMetadata=a;this.depth=b},nha=function(){var a=TA(),b=Math.max(a.length-1,0),c=UA(a);
a=c.topFullUrl;var d=c.topOriginOnly,e=c.ampCacheUrl,g=[];c=function(m,n){return null==m?n:m};
e&&g.push(new uC([e.url,e.isOriginOnly?2:0],c(e.depth,1)));d&&d!=e&&g.push(new uC([d.url,2],0));a.url&&a!=e&&g.push(new uC([a.url,0],c(a.depth,b)));var h=pb(g,function(m,n){return g.slice(0,g.length-n)});
!a.url||(e||d)&&a!=e||(d=Uba(a.url))&&h.push([new uC([d,1],c(a.depth,b))]);h.push([]);return pb(h,function(m){return mha(b,m)})};
function mha(a,b){var c=qb(b,function(e,g){return Math.max(e,g.depth)},-1),d=naa(c+2);
d[0]=a;mb(b,function(e){return d[e.depth+1]=e.urlAndMetadata});
return d}
var oha=function(){var a=nha();return pb(a,function(b){return ZA(b)})};var vC=function(){this.pageVisibility=new tC;this.performance_=rC()?new sC:new qC};
f=vC.prototype;f.checkActiveViewRequirements=function(){var a=Ge.document;return!!(a&&a.body&&a.body.getBoundingClientRect&&Za(Ge.setInterval)&&Za(Ge.clearInterval)&&Za(Ge.setTimeout)&&Za(Ge.clearTimeout))};
f.setInterval=function(a,b){return Ge.setInterval(a,b)};
f.clearInterval=function(a){Ge.clearInterval(a)};
f.setTimeout=function(a,b){return Ge.setTimeout(a,b)};
f.clearTimeout=function(a){Ge.clearTimeout(a)};
var pha=function(a){wC();var b=Ti()||Ge;Ri(b,a,null,!1)};
vC.prototype.getPageSignals=function(){return oha()};
Ua(vC);var xC=function(){};
xC.prototype.getContext=function(){if(!this.context_){if(!Ge)throw Error("Context has not been set and window is undefined.");this.context_=vC.getInstance()}return this.context_};
xC.prototype.setContext=function(a){this.context_=a};
Ua(xC);var wC=function(){return xC.getInstance().getContext()};var yC=function(a){eg(this,a,0,null,null)};
t(yC,$f);f=yC.prototype;f.toObject=function(a){var b={accumulatedTime:lg(this,1),usedHeapSize:D(this,2,0),totalHeapSize:D(this,3,0),heapSizeLimit:D(this,4,0),threadEntryCount:D(this,5,0)};a&&(b.$jspbMessageInstance=this);return b};
f.serializeBinary=function(){var a=new Hf;var b=this.getAccumulatedTime();0!==b&&a.writeDouble(1,b);b=this.getUsedHeapSize();0!==b&&a.writeInt64(2,b);b=this.getTotalHeapSize();0!==b&&a.writeInt64(3,b);b=this.getHeapSizeLimit();0!==b&&a.writeInt64(4,b);b=this.getThreadEntryCount();0!==b&&a.writeInt32(5,b);return Nf(a)};
f.getAccumulatedTime=function(){return lg(this,1)};
f.getUsedHeapSize=function(){return D(this,2,0)};
f.getTotalHeapSize=function(){return D(this,3,0)};
f.getHeapSizeLimit=function(){return D(this,4,0)};
f.getThreadEntryCount=function(){return D(this,5,0)};var PC=function(a){this.context_=a;this.enterTime_=-1;this.threadEntryCount_=this.accumulatedTime_=0},QC=function(a,b){return function(c){for(var d=[],e=0;e<arguments.length;++e)d[e-0]=arguments[e];
if(-1<a.enterTime_)return b.apply(null,ka(d));try{return a.enterTime_=a.context_.performance_.now(),b.apply(null,ka(d))}finally{a.accumulatedTime_+=a.context_.performance_.now()-a.enterTime_,a.enterTime_=-1,a.threadEntryCount_+=1}}};
PC.prototype.getAccumulatedTime=function(){var a=0;-1<this.enterTime_&&(a=this.context_.performance_.now()-this.enterTime_);return this.accumulatedTime_+a};
PC.prototype.getThreadEntryCount=function(){return-1<this.enterTime_?this.threadEntryCount_+1:this.threadEntryCount_};var qha=function(a,b){this.context_=a;this.featureSet_=b;this.stopwatch_=new PC(a)},rha=function(){var a=RC();
if(!a.isEnabled_())return{};var b=new yC;var c=a.stopwatch_.getAccumulatedTime();b=og(b,1,c,0);c=a.stopwatch_.getThreadEntryCount();b=pg(b,5,c);c=a.context_.performance_.getUsedHeapSize();b=pg(b,2,c);c=a.context_.performance_.getTotalHeapSize();b=pg(b,3,c);a=a.context_.performance_.getHeapSizeLimit();a=pg(b,4,a);b={};return b.pf=jf(a.serializeBinary()),b};
qha.prototype.isEnabled_=function(){return 1==jC(this.featureSet_,"prf")};var SC=function(){this.pollingFrequencyScheme=void 0;this.nextAdBlockId=0;this.enclosingElementBlockId=new pC(0,"");this.binaryContext=0;this.nativeMeasurementStrategy=this.measurementStrategy="ns";this.firstPollingTime=this.measurementStrategySelectionTime=-1;this.messagedActiveViewMetadata="";this.featureSet=new gC;cC(bC(hC(this.featureSet,"mv",Yga)),Zga);hC(this.featureSet,"omid",$B);bC(hC(this.featureSet,"epoh",$B));bC(hC(this.featureSet,"epph",$B));cC(bC(hC(this.featureSet,"umt",$B)),Wga);cC(bC(hC(this.featureSet,
"gmpd",$B)),Xga);cC(bC(hC(this.featureSet,"sel",$B)),Vga);cC(bC(hC(this.featureSet,"buvpe",$B)),aha);cC(bC(hC(this.featureSet,"imams",$B)),bha);cC(bC(hC(this.featureSet,"gms",$B)),cha);bC(hC(this.featureSet,"phel",$B));bC(hC(this.featureSet,"phell",$B));bC(hC(this.featureSet,"oseid",bca));bC(hC(this.featureSet,"xdi",$B));bC(hC(this.featureSet,"amp",$B));bC(hC(this.featureSet,"prf",$B));bC(hC(this.featureSet,"uup",$B));bC(hC(this.featureSet,"gtx",$B));bC(hC(this.featureSet,"mvp_lv",$B));cC(bC(hC(this.featureSet,
"aspsfv",$B)),$ga);bC(hC(this.featureSet,"lvio",$B));bC(hC(this.featureSet,"omnigm",$B));var a=this.featureSet;a.features_.oms||(a.features_.oms=new eC);bC(a.features_.oms);this.monitor_=new qha(wC(),this.featureSet);this.unmeasurableReason=null;this.isInMobiStrategy=!1},RC=function(){return SC.getInstance().monitor_};
SC.prototype.processActiveViewMetadata=function(a){Ka(a)&&0!=a.length&&(this.messagedActiveViewMetadata=lC(this.featureSet,a))};
Ua(SC);var TC=function(){var a="https:";Ge&&Ge.location&&"http:"===Ge.location.protocol&&(a="http:");this.protocol_=a;this.domain_="pagead2.googlesyndication.com";this.path_="/pagead/gen_204?id=";this.defaultReportFreq_=.01;this.staticReportThreshold_=Math.random()};
TC.prototype.setDefaultReportingFrequency=function(a){this.defaultReportFreq_=a};
TC.prototype.maybeSendReport=function(a,b,c,d){if(this.shouldSendReport(!!c,d))try{if(b instanceof YA)var e=b;else e=new YA,Ji(b,function(h,m){aB(e,m,h)});
var g=e.getUrl(this.protocol_,this.domain_,this.path_+a+"&","");g&&pha(g)}catch(h){}};
TC.prototype.shouldSendReport=function(a,b){return(a?this.staticReportThreshold_:Math.random())<(b||this.defaultReportFreq_)};var sha=function(){var a=UC;this.pinger_=VC;this.errorTypeId_="jserror";this.silenceErrors_=!0;this.addParamsToErrorsFn_=null;this.errorHandler_=this.maybeReportError;this.timer_=void 0===a?null:a;this.useStaticThresholdForErrors_=!1};
f=sha.prototype;f.pinger=function(){return this.pinger_};
f.setErrorHandler=function(a){this.errorHandler_=a};
f.setAddParamsOnErrorFn=function(a){this.addParamsToErrorsFn_=a};
f.setErrorTypeId=function(a){this.errorTypeId_=a};
f.getSilenceErrors=function(){return this.silenceErrors_};
f.setSilenceErrors=function(a){this.silenceErrors_=a};
f.setUseStaticThresholdForErrors=function(a){this.useStaticThresholdForErrors_=a};
f.protectAndRun=function(a,b,c){var d=this;return QC(RC().stopwatch_,function(){try{if(d.timer_&&d.timer_.collectionEnabled){var e=d.timer_.start(a.toString(),3);var g=b();d.timer_.end(e)}else g=b()}catch(n){var h=d.silenceErrors_;try{mB(e);var m=new WC(XC(n));h=d.errorHandler_(a,m,void 0,c)}catch(p){d.maybeReportError(217,p)}if(!h)throw n}return g})()};
f.protectFunction=function(a,b,c,d){var e=this;return QC(RC().stopwatch_,function(g){for(var h=[],m=0;m<arguments.length;++m)h[m-0]=arguments[m];return e.protectAndRun(a,function(){return b.apply(c,h)},d)})};
f.maybeReportError=function(a,b,c,d,e){e=e||this.errorTypeId_;try{var g=new YA;g.allowHardTrunctation_=!0;$A(g,1,"context",a);b.error&&b.meta&&b.id||(b=new WC(XC(b)));b.msg&&$A(g,2,"msg",b.msg.substring(0,512));var h=b.meta||{};this.addCustomParams(h,d);b=[h];g.allPriorities_.push(3);g.allPriorityLists_[3]=b;var m=UA();m.topOriginOnly&&$A(g,4,"top",m.topOriginOnly.url||"");$A(g,5,"url",m.topFullUrl.url||"");this.pinger_.maybeSendReport(e,g,this.useStaticThresholdForErrors_,c)}catch(n){try{this.pinger_.maybeSendReport(e,
{context:"ecmserr",rctx:a,msg:XC(n),url:m&&m.topFullUrl.url},this.useStaticThresholdForErrors_,c)}catch(p){}}return this.silenceErrors_};
f.addCustomParams=function(a,b){if(this.addParamsToErrorsFn_)try{this.addParamsToErrorsFn_(a)}catch(c){}if(b)try{b(a)}catch(c){}};
var XC=function(a){var b=a.toString();a.name&&-1==b.indexOf(a.name)&&(b+=": "+a.name);a.message&&-1==b.indexOf(a.message)&&(b+=": "+a.message);if(a.stack){a=a.stack;var c=b;try{-1==a.indexOf(c)&&(a=c+"\n"+a);for(var d;a!=d;)d=a,a=a.replace(/((https?:\/..*\/)[^\/:]*:\d+(?:.|\n)*)\2/,"$1");b=a.replace(/\n */g,"\n")}catch(e){b=c}}return b},WC=function(a){PA.call(this,Error(a),{message:a})};
l(WC,PA);var VC,YC,UC=new lB(Ti()),tha=function(){var a=Ti();a&&"undefined"!=typeof a.google_measure_js_timing&&(a.google_measure_js_timing||UC.disable())};
(function(){VC=new TC;YC=new sha;var a=Ti();a&&a.document&&("complete"==a.document.readyState?tha():UC.collectionEnabled&&Pi(a,"load",function(){tha()}))})();
var uha=function(a){YC.setAddParamsOnErrorFn(function(b){mb(a,function(c){c(b)})})},vha=function(a,b){return YC.protectAndRun(a,b,void 0)},ZC=function(a,b){return YC.protectFunction(a,b,void 0,void 0)},$C=function(a,b,c,d){YC.maybeReportError(a,b,c,d)};var wha=fb(),aD=-1,bD=-1,cD=!1,dD=function(){return fb()-wha},xha=function(){var a=SC.getInstance().pollingFrequencyScheme,b=0<=bD?dD()-bD:-1,c=cD?dD()-aD:-1;
if(947190542==a)return 100;if(79463069==a)return 200;a=[2E3,4E3];var d=[250,500,1E3];$C(637,Error(),.001);var e=b;-1!=c&&c<b&&(e=c);for(b=0;b<a.length;++b)if(e<a[b]){var g=d[b];break}void 0===g&&(g=d[a.length]);return g};var yha=function(a){var b=a!==a.top,c=a.top===CB(a,!1).win;if(b&&c&&null!=a.top.mraid)return{mraid:a.top.mraid,situation:3};a=a.mraid;return null!=a?b?c?{mraid:a,situation:2}:{mraid:a,situation:1}:{mraid:a,situation:0}:null};var zha=function(a){a=Ej(a);return!(!a||!a.observeIntersection)},eD=function(a){return(a=a.document)&&Za(a.elementFromPoint)};if(Fe&&Fe.URL){var Aha,Ni=Fe.URL;Aha=!!Ni&&0<Vba().length;YC.setSilenceErrors(!Aha)}var fD=function(a,b,c,d,e){e=void 0===e?!1:e;c=ZC(d,c);Pi(a,b,c,{capture:e});return c},Bha=function(a){var b=["IMG",
"FRAME","IFRAME"];return rb(b,function(c){return a.nodeName==String(c)})?[a]:qb(b,function(c,d){return c.concat(Cb(ch(d,a)))},[])},Cha=function(a,b){if(a){var c=0,d=null;
a=Bha(a);for(var e=0;e<a.length;e++){var g=!1;d=a[e];switch(d.nodeName){case"IMG":var h=d;if(h.complete||h.naturalWidth)g=!0;break;case"FRAME":case"IFRAME":h=d;try{if(h.readyState)g="complete"==h.readyState;else{var m=h.contentWindow||h.contentDocument;m.document&&(m=m.document);g=m&&m.readyState?"complete"==m.readyState:!1}}catch(n){g=!1}}g||(c++,fD(d,"load",function(){c--;c||b(null)},177))}a=d=null;
!c&&b(null)}},Dha=function(a,b){var c=function(d){Qi(a,d,c);
b(d)};
return fD(a,"DOMNodeRemoved",c,156,!1)},Eha=function(a){var b=0,c=function(){a();
b++;11>b&&wC().setTimeout(ZC(174,c),100)};
c()};var Fha=function(a){var b=[];u.forEach(a,function(c,d){d=encodeURIComponent(d);Ka(c)&&(c=encodeURIComponent(c));b.push(d+"="+c)});
b.push("24="+fb());return b.join("\n")};var Gha=function(){this.creativeElement=null;this.status=0};var Hha=["GoogleActiveViewElement","GoogleActiveViewClass","DfaVisibilityIdentifier"];var Iha=0,Jha=function(a,b){try{Iha++,b.postMessage(a,"*")}catch(c){}},Kha=function(a,b){b&&(a(b),b.frames&&mb(b.frames,function(c){Kha(a,c)}))},Lha=function(a,b,c){a=a.exec(b);
return!(!a||!a[1]||c!=Mi(a[1]))},Mha=function(a,b){0==a.length?(b.creativeElement=null,b.status=1):(a=Oh.apply(null,a),b.creativeElement=!a||a.tagName?a:a.parentElement,b.creativeElement||(b.status=-2))},Nha=function(a,b,c){var d=new RegExp("(?:(?:[?&]|%26|&3[f]|%2526|%253[f])"+b+"(?:=|%3[d]|%253[d]))([a-z0-9-_]*)","i"),e=new Gha;
if(""==b||-1==c)return e.status=-1,e;try{b=[];for(var g=k(ch("A",a.document)),h=g.next();!h.done;h=g.next()){var m=h.value;Lha(d,m.href,c)&&(e.status=3,b.push(m))}if(0<b.length)return Mha(b,e),e;var n=k(ch("EMBED",a.document));for(h=n.next();!h.done;h=n.next()){var p=h.value;Lha(d,p.src,c)&&(0==p.getBoundingClientRect().height&&p.parentElement&&"OBJECT"==p.parentElement.tagName?(e.status=5,b.push(p.parentElement)):(e.status=4,b.push(p)))}if(0<b.length)return Mha(b,e),e}catch(x){return e.status=7,
e}e.status=1;return e},gD=function(a){return new Ui(a.top,a.right,a.bottom,a.left)},Oha=function(){var a=wC().pageVisibility;
return a.isUnknown()?-1:a.isVisible()?0:1},hD=function(a){return[a.top,
a.left,a.bottom,a.right].join("-")},Pha=function(a,b,c){if(b&&a)if(c&&0<c.length){c=nb(c,function(g){var h=g.parent&&g.parent!==g;
return g===Ge.top||h});
a=k(c);for(var d=a.next();!d.done;d=a.next())Jha(b,d.value)}else{c=[];var e=Qh(a);e&&c.push(e);if(0===c.length)try{d=dh(document,"IFRAME".toString().toLowerCase(),void 0,a),c=pb(d,function(g){return Qh(g)})}catch(g){}a=k(c);
for(d=a.next();!d.done;d=a.next()){d=d.value;try{b&&Kha(db(Jha,b),d)}catch(g){}}}};function Qha(){var a=Kc;return a?rb("Android TV;AppleTV;Apple TV;GoogleTV;HbbTV;NetCast.TV;Opera TV;POV_TV;SMART-TV;SmartTV;TV Store;AmazonWebAppPlatform;OMI/".split(";"),function(b){return qc(a,b)})?!0:qc(a,"Presto")&&qc(a,"Linux")&&!qc(a,"X11")&&!qc(a,"Android")&&!qc(a,"Mobi"):!1}
function Rha(){var a=Kc;return qc(a,"AppleTV")||qc(a,"Apple TV")||qc(a,"CFNetwork")||qc(a,"tvOS")}
function Sha(){var a=Kc;return qc(a,"sdk_google_atv_x86")||qc(a,"Android TV")}
;var iD=function(){this.isAppInactive=!1;this.insideCrossDomainIframe=!Ii(Ge.top);this.shouldOsdMeasureForClient=!this.insideCrossDomainIframe||zha(Ge);this.isMobileDevice=ii()||ji();var a=TA();this.domain=0<a.length&&null!=a[a.length-1]&&null!=a[a.length-1].url?oi(a[a.length-1].url)||"":"";this.browserViewportBox=new Ui(0,0,0,0);this.screenSize=new Yg(0,0);this.documentSize=new Yg(0,0);this.frameViewportBox=new Ui(0,0,0,0);this.frameOffset=new Wg(0,0);this.isWindowGeometryProvidedByExternalSource=
!1;this.externallySuppliedViewBox=null;this.isPageLoaded=!1;this.visibleGeometry=null;this.fullscreenAdblockCount_=0;this.mustAssumeTabVisible=!1;this.inAppContext=!(!Ge||!yha(Ge));this.update(Ge)};
f=iD.prototype;f.useExternallyProvidedGeometry=function(){return this.isWindowGeometryProvidedByExternalSource&&this.insideCrossDomainIframe};
f.measureScreenSize=function(a){a&&a.screen&&(this.screenSize=new Yg(a.screen.width,a.screen.height))};
f.measureVisibleGeometry=function(){this.visibleGeometry=this.browserViewportBox};
f.measureBrowserViewportBox=function(a){this.browserViewportBox=Qj(!0,a,this.isMobileDevice)};
f.measureFrameViewportBox=function(a){this.frameViewportBox=Qj(!1,a,this.isMobileDevice)};
f.measureDocumentSize=function(a){var b=this.browserViewportBox?new Yg(this.browserViewportBox.getWidth(),this.browserViewportBox.getHeight()):new Yg(0,0);a=void 0===a?Ge:a;Oj(a)&&(a=a.top);var c=0,d=0;try{var e=a.document,g=e.body,h=e.documentElement;if("CSS1Compat"==e.compatMode&&h.scrollHeight)c=h.scrollHeight!=b.height?h.scrollHeight:h.offsetHeight,d=h.scrollWidth!=b.width?h.scrollWidth:h.offsetWidth;else{var m=h.scrollHeight,n=h.scrollWidth,p=h.offsetHeight,x=h.offsetWidth;h.clientHeight!=p&&(
m=g.scrollHeight,n=g.scrollWidth,p=g.offsetHeight,x=g.offsetWidth);m>b.height?m>p?(c=m,d=n):(c=p,d=x):m<p?(c=m,d=n):(c=p,d=x)}var y=new Yg(d,c)}catch(B){y=new Yg(-12245933,-12245933)}this.documentSize=y};
f.update=function(a){a&&a.document&&(this.measureFrameViewportBox(a),this.measureBrowserViewportBox(a),this.measureVisibleGeometry(),this.measureDocumentSize(a),this.measureScreenSize(a))};
f.enableWindowGeometryProvidedByExternalSource=function(){this.isWindowGeometryProvidedByExternalSource=!0};
var Tha=function(){var a=iD.getInstance();if(0<a.fullscreenAdblockCount_||a.mustAssumeTabVisible)return!0;var b=wC().pageVisibility;a=b.isVisible();b=b.isUnknown();return a||b};
Ua(iD);var Uha=new Ui(0,0,0,0),Vha=function(a,b){try{try{var c=gD(a.getBoundingClientRect())}catch(n){c=new Ui(0,0,0,0)}var d=c.right-c.left,e=c.bottom-c.top,g=kj(a,b),h=g.x,m=g.y;return new Ui(Math.round(m),Math.round(h+d),Math.round(m+e),Math.round(h))}catch(n){return Uha.clone()}},jD=function(a,b){return a.left<=b.right&&b.left<=a.right&&a.top<=b.bottom&&b.top<=a.bottom?new Ui(Math.max(a.top,b.top),Math.min(a.right,b.right),Math.min(a.bottom,b.bottom),Math.max(a.left,b.left)):new Ui(0,0,0,0)},lD=function(a,
b){b=kD(b);
return 0===b?0:kD(a)/b},kD=function(a){return Math.max(a.bottom-a.top,0)*Math.max(a.right-a.left,0)},Wha=function(a,b){if(!a||!b)return!1;
for(var c=0;null!==a&&100>c++;){if(a===b)return!0;try{if(a=Jh(a)||a){var d=$g(a),e=d&&ph(d),g=e&&e.frameElement;g&&(a=g)}}catch(h){break}}return!1},Xha=function(a,b,c){if(!a||!b)return!1;
b=a.clone().translate(-b.left,-b.top);a=(b.left+b.right)/2;b=(b.top+b.bottom)/2;var d=Ti();Ii(d.top)&&d.top&&d.top.document&&(d=d.top);if(!eD(d))return!1;a=d.document.elementFromPoint(a,b);if(!a)return!1;b=(b=(b=$g(c))&&b.defaultView&&b.defaultView.frameElement)&&Wha(b,a);d=a===c;a=!d&&a&&ei(a,function(e){return e===c});
return!(b||d||a)},Yha=function(a,b,c,d){return iD.getInstance().insideCrossDomainIframe?!1:0>=a.getWidth()||0>=a.getHeight()?!0:c&&d?vha(208,function(){return Xha(a,b,c)}):!1};var mD=function(a,b,c){var d=new Ui(0,0,0,0);this.time=a;this.volume=null;this.tabVisible=b;this.visibleGeometry=d;this.frameExposure=null;this.originatingProvider=c};
mD.prototype.equals=function(a,b){return!!a&&(!(void 0===b?0:b)||this.volume==a.volume)&&this.tabVisible==a.tabVisible&&Vi(this.visibleGeometry,a.visibleGeometry)&&this.frameExposure==a.frameExposure};var nD=function(a,b,c,d,e,g,h,m){this.viewportObservation_=a;this.element_=b;this.elementGeometry_=c;this.visibleGeometry_=d;this.visibleFraction_=e;this.viewportShare_=g;this.timestamp_=h;this.screenShare_=m};
nD.prototype.getViewportObservation=function(){return this.viewportObservation_};
nD.prototype.getElement=function(){return this.element_};
nD.prototype.getTimestamp=function(){return this.timestamp_};
nD.prototype.equals=function(a,b){return this.viewportObservation_.equals(a.viewportObservation_,void 0===b?!1:b)&&this.element_==a.element_&&Vi(this.elementGeometry_,a.elementGeometry_)&&Vi(this.visibleGeometry_,a.visibleGeometry_)&&this.visibleFraction_==a.visibleFraction_&&this.viewportShare_==a.viewportShare_&&this.timestamp_==a.timestamp_&&this.screenShare_==a.screenShare_};var oD=function(a){this.sampledObject_=a;this.samplingCount_=0;this.nextSampleTimeoutId_=null};
oD.prototype.cancel=function(){wC().clearTimeout(this.nextSampleTimeoutId_);this.nextSampleTimeoutId_=null};
oD.prototype.schedule=function(){var a=this;this.nextSampleTimeoutId_=wC().setTimeout(QC(RC().stopwatch_,ZC(143,function(){a.samplingCount_++;a.sampledObject_.sample()})),xha())};var pD=function(a,b,c){this.win=a;this.name_=void 0===c?"na":c;this.observationListeners=[];this.isInitialized=!1;this.currentObservation=new mD(-1,!0,this);this.effectiveViewportProvider=this;this.inherentVisibleGeometryCapability=this.effectiveVisibleGeometryCapability=b;this.pollingRequired_=this.volumeRequired_=!1;this.sampler=new oD(this);this.providerHasFailed=this.alwaysSendUpdates=!1;this.failureCode="uk";this.disposed_=!1};
f=pD.prototype;f.shouldBeUsedForMeasurement=function(){return this.canBeUsed()};
f.canBeUsed=function(){return!1};
f.initialize=function(){this.isInitialized=!0};
f.getFailureCode=function(){return this.failureCode};
f.hasFailed=function(){return this.providerHasFailed};
var qD=function(a,b){a.providerHasFailed||(a.providerHasFailed=!0,a.failureCode=b,a.inherentVisibleGeometryCapability=0,a.effectiveViewportProvider==a&&(a.effectiveVisibleGeometryCapability=0,Zha(a)))};
f=pD.prototype;f.getWindow=function(){return this.win};
f.setName=function(a){this.name_=a};
f.getName=function(){return this.effectiveViewportProvider==this?this.name_:this.effectiveViewportProvider.getName()};
f.getLogParams=function(){return{}};
f.getVisibleGeometryCapability=function(){return this.effectiveVisibleGeometryCapability};
var rD=function(a,b){wb(a.observationListeners,b)||(a.observationListeners.push(b),b.handleViewportProviderStatusUpdate(a.effectiveViewportProvider),b.handleViewportObservationUpdate(a.currentObservation),b.requiresVolume()&&(a.volumeRequired_=!0))};
f=pD.prototype;f.measureBrowserViewportBox=function(){iD.getInstance().measureBrowserViewportBox(this.win)};
f.measureScreenSize=function(){iD.getInstance().measureScreenSize(this.win)};
f.measureDocumentSize=function(){iD.getInstance().measureDocumentSize(this.win)};
f.measureFrameViewportBox=function(){iD.getInstance().measureFrameViewportBox(this.win)};
f.measureVisibleGeometry=function(){this.currentObservation.visibleGeometry=this.getUpdatedVisibleGeometry()};
f.getUpdatedVisibleGeometry=function(){return this.currentObservation.visibleGeometry};
var sD=function(a){a=a.effectiveViewportProvider;a.measureScreenSize();a.measureBrowserViewportBox();a.measureFrameViewportBox();a.measureDocumentSize();a.measureVisibleGeometry()},tD=function(a){var b=dD(),c=Tha();
return new mD(b,c,a)};
pD.prototype.sample=function(){if(this.pollingRequired_&&this.effectiveViewportProvider==this){this.sampler&&this.sampler.cancel();var a=tD(this);a.volume=this.currentObservation.volume;a.visibleGeometry=this.getUpdatedVisibleGeometry();uD(this,a);this.pollingRequired_&&this.sampler&&this.sampler.schedule()}};
pD.prototype.setPollingRequired=function(a){this.pollingRequired_!=a&&((this.pollingRequired_=a)?this.sampler.schedule():this.sampler.cancel())};
var $ha=function(a){a.volumeRequired_=a.observationListeners.length?rb(a.observationListeners,function(b){return b.requiresVolume()}):!1};
pD.prototype.shutdown=function(){};
pD.prototype.getViewportObservation=function(){return this.currentObservation};
pD.prototype.getViewportObservationListeners=function(){return this.observationListeners};
var aia=function(a){var b=Cb(a.observationListeners);mb(b,function(c){c.handleViewportObservationUpdate(a.currentObservation)})},Zha=function(a){var b=Cb(a.observationListeners);
mb(b,function(c){c.handleViewportProviderStatusUpdate(a.effectiveViewportProvider)});
a.effectiveViewportProvider!=a||aia(a)};
pD.prototype.handleViewportProviderStatusUpdate=function(a){var b=this.effectiveVisibleGeometryCapability,c=a.getVisibleGeometryCapability();this.effectiveViewportProvider=c<this.inherentVisibleGeometryCapability?this:a;this.effectiveVisibleGeometryCapability=this.effectiveViewportProvider!=this?c:this.inherentVisibleGeometryCapability;this.effectiveVisibleGeometryCapability!=b&&Zha(this)};
var uD=function(a,b){var c=a.alwaysSendUpdates||!a.currentObservation.equals(b,a.volumeRequired_);a.currentObservation=b;c&&aia(a)};
pD.prototype.handleViewportObservationUpdate=function(a){this.effectiveViewportProvider!=this&&uD(this,a)};
pD.prototype.requiresVolume=function(){return this.volumeRequired_};
pD.prototype.dispose=function(){this.disposed_=!0};
pD.prototype.isDisposed=function(){return this.disposed_};var vD=function(a,b,c,d){this.element=a;this.elementGeometry=new Ui(0,0,0,0);this.frameVisibleGeometry=new Ui(0,0,0,0);this.activeProvider=this.viewportProvider=b;this.featureSet=c;this.viewportObservationListener=d;this.disposed_=!1;this.isEventBasedMeasurement=!0;this.timestamp=-1;this.currentMeasurement=new nD(b.getViewportObservation(),this.element,this.elementGeometry,new Ui(0,0,0,0),0,0,dD(),0)};
f=vD.prototype;f.observe=function(){return!0};
f.unobserve=function(){};
f.calculateElementGeometry=function(){this.element&&(this.elementGeometry=Vha(this.element,this.viewportProvider.getWindow()))};
f.calculateFrameVisibleGeometry=function(){this.frameVisibleGeometry=this.viewportProvider.getViewportObservation().visibleGeometry};
f.calculateMeasurement=function(){this.calculateElementGeometry();this.currentMeasurement=new nD(this.viewportProvider.getViewportObservation(),this.element,this.elementGeometry,this.currentMeasurement.visibleGeometry_,this.currentMeasurement.visibleFraction_,this.currentMeasurement.viewportShare_,dD(),this.currentMeasurement.screenShare_)};
f.dispose=function(){if(!this.isDisposed()){var a=this.viewportProvider;zb(a.observationListeners,this);a.volumeRequired_&&this.requiresVolume()&&$ha(a);this.disposed_=!0}};
f.isDisposed=function(){return this.disposed_};
f.getLogParams=function(){return this.activeProvider.getLogParams()};
f.getVisibleGeometryCapability=function(){return this.activeProvider.getVisibleGeometryCapability()};
f.getFailureCode=function(){return this.activeProvider.getFailureCode()};
f.hasFailed=function(){return this.activeProvider.hasFailed()};
f.handleViewportProviderStatusUpdate=function(a){this.activeProvider=a;this.viewportObservationListener.handleViewportProviderStatusUpdate(this)};
f.handleViewportObservationUpdate=function(){this.calculateMeasurement()};
f.requiresVolume=function(){return this.viewportObservationListener.requiresVolume()};var wD=function(a){this.disposed_=!1;this.viewportProvider=a};
f=wD.prototype;f.getVisibleGeometryCapability=function(){return this.viewportProvider.getVisibleGeometryCapability()};
f.getFailureCode=function(){return this.viewportProvider.getFailureCode()};
f.hasFailed=function(){return this.viewportProvider.hasFailed()};
f.create=function(a,b,c){var d=null;this.viewportProvider&&(d=this.createInstance(a,b,c),rD(this.viewportProvider,d));return d};
f.shouldBeUsedForMeasurement=function(){return this.canBeUsed()};
f.canBeUsed=function(){return!1};
f.init=function(){return!0};
f.dispose=function(){this.disposed_=!0};
f.isDisposed=function(){return this.disposed_};
f.getLogParams=function(){return{}};var xD=function(a,b,c){this.priority_=void 0===c?0:c;this.key_=a;this.value_=null==b?"":b};
xD.prototype.getParameter=function(){return this.key_};
xD.prototype.getPriority=function(){return this.priority_};
var bia=function(a){switch(Math.trunc(a.priority_)){case-16:return-16;case-8:return-8;case 0:return 0;case 8:return 8;case 16:return 16;default:return 16;}};
xD.prototype.lessThan=function(a){return this.priority_<a.priority_?!0:this.priority_>a.priority_?!1:this.key_<a.key_?!0:this.key_>a.key_?!1:typeof this.value_<typeof a.value_?!0:typeof this.value_>typeof a.value_?!1:this.value_<a.value_};var yD=function(){this.insertionCount_=0;this.queryParameters_=[];this.sortMayBeRequired_=!1};
yD.prototype.add=function(a,b,c){++this.insertionCount_;a=new xD(a,b,c);this.queryParameters_.push(new xD(a.key_,a.value_,a.priority_+this.insertionCount_/4096));this.sortMayBeRequired_=!0;return this};
yD.prototype.addAll=function(a){var b=this;mb(a.queryParameters_,function(c){b.add(c.getParameter(),c.value_,bia(c))});
return this};
var zD=function(a,b,c,d){c=void 0===c?0:c;d=void 0===d?!0:d;Ji(b,function(e,g){d&&void 0===e||a.add(g,e,c)});
return a},AD=function(a){var b=cia;
a.sortMayBeRequired_&&(Hb(a.queryParameters_,function(c,d){return d.lessThan(c)?1:c.lessThan(d)?-1:0}),a.sortMayBeRequired_=!1);
return qb(a.queryParameters_,function(c,d){d=b(d);return""+c+(""!=c&&""!=d?"&":"")+d},"")};var cia=function(a){var b=a.getParameter();a=a.value_;return""===a?b:La(a)?a?b:"":Wa(a)?0===a.length?b:b+"="+a.join():b+"="+(wb(["mtos","tos","p"],b)?a:encodeURIComponent(a))};var BD=function(a){var b=void 0===b?!0:b;this.prefix_="//pagead2.googlesyndication.com//pagead/gen_204";this.queryParameters_=new yD;void 0!==a&&this.queryParameters_.addAll(a);b&&this.queryParameters_.add("v",IA,-16)};
BD.prototype.addMapToQuery=function(a,b,c){zD(this.queryParameters_,a,void 0===b?0:b,void 0===c?!0:c)};
BD.prototype.toString=function(){var a=this.prefix_,b=AD(this.queryParameters_);0<b.length&&(a+="?"+b);return a};var CD=function(a,b,c,d,e,g){var h=[];if(b.length)return h=pb(b,function(m){return(g?m.replace(/^((http[s]?:)?\/\/[^\/]+)([^?]+)/,"$1"+g):m)+"&id="+a});
b="//"+(e||"pagead2.googlesyndication.com")+(g||"/activeview");e=[];c&&e.push("avi="+c);d&&e.push("cid="+d);e.push("id="+a);h.push(b+"?"+e.join("&"));return h},DD=function(a){var b=[],c=[];
(0,u.forEach)(a,function(d,e){if(!(e in Object.prototype)&&"undefined"!=typeof d)switch(Wa(d)&&(d=d.join(",")),d=[e,"=",d].join(""),e){case"adk":case"r":case"tt":case"error":case"mtos":case"tos":case"p":case"bs":case"aio":case"nio":case"iem":b.unshift(d);break;case"req":case"url":case"referrer":case"iframe_loc":c.push(d);break;default:b.push(d);}});
return b.concat(c)},eia=function(a){var b=Ti()||Ge;
if(!b.navigator||!b.navigator.sendBeacon)return!1;a=dia(a.toString()).split("?");return b.navigator.sendBeacon(a[0],a[1])},fia=function(){if(IA&&"unreleased"!==IA)return IA},dia=function(a){if(/&v=[^&]+/.test(a))return a;
var b=fia();return b?a+"&v="+encodeURIComponent(b):a},ED=function(a){var b=void 0===b?4E3:b;
a=dia(a.toString());a=a.substring(0,b);pha(a)};var gia=function(){this.sentPingCount_=0};
Ua(gia);var FD=function(a){this.verificationGen204Type_=a;this.hasSentPing_=!1};
FD.prototype.setCurrentFrameMeasurements=function(a,b){this.baseMeasurement=a;this.verificationMeasurement=b};var GD=function(){FD.call(this,"capability")};
l(GD,FD);GD.prototype.shouldSendVerificationPing=function(){return!0};
GD.prototype.buildVerificationPing=function(){var a={};return a.b_name=this.baseMeasurement.strategyName,a.v_name=this.verificationMeasurement.strategyName,a};var HD=function(){FD.call(this,"diff")};
l(HD,FD);HD.prototype.shouldSendVerificationPing=function(){return!(.02>=Math.abs(this.verificationMeasurement.exposure-this.baseMeasurement.exposure))};
HD.prototype.buildVerificationPing=function(){var a={};return a.b_name=this.baseMeasurement.strategyName,a.v_name=this.verificationMeasurement.strategyName,a.b_vp_off=JSON.stringify(this.baseMeasurement.offsetInViewport),a.v_vp_off=JSON.stringify(this.verificationMeasurement.offsetInViewport),a.b_vp_sz=JSON.stringify(this.baseMeasurement.viewportSize),a.v_vp_sz=JSON.stringify(this.verificationMeasurement.viewportSize),a.b_exp=this.baseMeasurement.exposure,a.v_exp=this.verificationMeasurement.exposure,
a.efp_occ=this.baseMeasurement.usedEfpOcclusion,a.sbv=this.baseMeasurement.shouldUseViewportShareBasedVisibility,a};var ID=function(){FD.call(this,"capt");this.base_exposures_=[];this.verification_exposures_=[]};
l(ID,FD);ID.prototype.setCurrentFrameMeasurements=function(a,b){FD.prototype.setCurrentFrameMeasurements.call(this,a,b);20<=this.verification_exposures_.length||(this.base_exposures_.push(a.exposure),this.verification_exposures_.push(b.exposure))};
ID.prototype.shouldSendVerificationPing=function(){return 20===this.verification_exposures_.length};
ID.prototype.buildVerificationPing=function(){var a=hia(this.base_exposures_,this.verification_exposures_),b=iia(this.base_exposures_,this.verification_exposures_),c={};return c.b_name=this.baseMeasurement.strategyName,c.v_name=this.verificationMeasurement.strategyName,c.b_exp=this.base_exposures_.join(","),c.v_exp=this.verification_exposures_.join(","),c.diff=a,c.diff_buckets=b,c};
var hia=function(a,b){return laa(oaa(a,b),function(c){return c[0]!==c[1]})},iia=function(a,b){var c=function(d){return .25*Math.floor(d/.25)};
return hia(pb(a,c),pb(b,c))};var JD=function(a,b,c,d,e){e=void 0===e?[new GD,new HD,new ID]:e;lk.call(this);this.verificationStrategy_=a.createInstance(b,c,this);this.verificationStrategy_.observe();this.verifications_=e;this.adKey_=d};
l(JD,lk);JD.prototype.disposeInternal=function(){this.verificationStrategy_&&(this.verificationStrategy_.unobserve(),this.verificationStrategy_.dispose())};
var jia=function(a,b,c){mb(a.verifications_,function(d){var e=a.adKey_;if(!d.hasSentPing_&&(d.setCurrentFrameMeasurements(b,c),d.shouldSendVerificationPing())){d.hasSentPing_=!0;var g=d.buildVerificationPing(),h=new yD;h.add("id","av-js");h.add("type","verif");h.add("vtype",d.verificationGen204Type_);d=gia.getInstance();h.add("i",d.sentPingCount_++);h.add("adk",e);zD(h,g);e=new BD(h);ED(e)}})};
JD.prototype.handleViewportObservationUpdate=function(){};
JD.prototype.handleViewportProviderStatusUpdate=function(){};
JD.prototype.requiresVolume=function(){return!1};var KD=function(){this.delta_=this.maxConsecutive_=this.currentConsecutive_=this.total_=0};
f=KD.prototype;f.getTotal=function(){return this.total_};
f.getMaxConsecutive=function(){return this.maxConsecutive_};
f.getCurrentConsecutive=function(){return this.currentConsecutive_};
f.getDelta=function(){return this.delta_};
f.resetDelta=function(){this.delta_=0};
f.update=function(a,b,c){a&&(this.total_+=b,this.delta_+=b,this.currentConsecutive_+=b,this.maxConsecutive_=Math.max(this.maxConsecutive_,this.currentConsecutive_));if(void 0===c?!a:c)this.currentConsecutive_=0};var kia=[1,.75,.5,.3,0],LD=function(a){this.thresholds_=a=void 0===a?kia:a;this.buckets_=pb(this.thresholds_,function(){return new KD})};
LD.prototype.getTotal=function(a){return MD(this,function(b){return b.getTotal()},void 0===a?!0:a)};
var lia=function(a,b){return ND(a,b,function(c){return c.getTotal()})};
LD.prototype.getMaxConsecutive=function(a){return MD(this,function(b){return b.getMaxConsecutive()},void 0===a?!0:a)};
var mia=function(a,b){return ND(a,b,function(c){return c.getMaxConsecutive()})};
f=LD.prototype;f.getCurrentConsecutive=function(){return MD(this,function(a){return a.getCurrentConsecutive()},!0)};
f.getDelta=function(){return MD(this,function(a){return a.getDelta()},!0)};
f.getDeltaForThreshold=function(a){return ND(this,a,function(b){return b.getDelta()})};
f.resetDelta=function(){mb(this.buckets_,function(a){return a.resetDelta()})};
f.update=function(a,b,c,d,e,g){g=void 0===g?!0:g;b=e?Math.min(a,b):b;for(e=0;e<this.thresholds_.length;e++){var h=this.thresholds_[e],m=0<b&&b>=h;h=!(0<a&&a>=h)||c;this.buckets_[e].update(g&&m,d,!g||h)}};
var MD=function(a,b,c){a=pb(a.buckets_,function(d){return b(d)});
return c?a:nia(a)},ND=function(a,b,c){var d=vb(a.thresholds_,function(e){return b<=e});
return-1==d?0:c(a.buckets_[d])},nia=function(a){return pb(a,function(b,c,d){return 0<c?d[c]-d[c-1]:d[c]})};var OD=function(){this.timeOnScreen=new LD;this.viewTime_=new KD;this.maxExposure_=this.minExposure_=-1;this.requiredViewTime=1E3;this.screenShareBuckets_=new LD([1,.9,.8,.7,.6,.5,.4,.3,.2,.1,0]);this.maxScreenShare_=this.minScreenShare_=-1};
f=OD.prototype;f.getMinExposure=function(){return this.minExposure_};
f.getCurrentTimeOnScreen=function(){return this.timeOnScreen.getCurrentConsecutive()};
f.getTimeOnScreenForThreshold=function(a){return lia(this.timeOnScreen,a)};
f.getMaxTimeOnScreenForThreshold=function(a){return mia(this.timeOnScreen,a)};
f.getScreenShareBuckets=function(){return this.screenShareBuckets_.getTotal(!1)};
f.getMinScreenShare=function(){return this.minScreenShare_};
f.getMaxScreenShare=function(){return this.maxScreenShare_};
f.update=function(a,b,c,d){this.minExposure_=-1!=this.minExposure_?Math.min(this.minExposure_,b.exposure):b.exposure;this.maxExposure_=Math.max(this.maxExposure_,b.exposure);this.minScreenShare_=-1!=this.minScreenShare_?Math.min(this.minScreenShare_,b.screenShare):b.screenShare;this.maxScreenShare_=Math.max(this.maxScreenShare_,b.screenShare);this.screenShareBuckets_.update(b.screenShare,c.screenShare,b.tabHidden,a,d);this.timeOnScreen.update(b.exposure,c.exposure,b.tabHidden,a,d);c=d||c.isLargeAd!=
b.isLargeAd?c.isVisible()&&b.isVisible():c.isVisible();b=!b.isVisible()||b.tabHidden;this.viewTime_.update(c,a,b)};
f.isViewed=function(){return this.viewTime_.getMaxConsecutive()>=this.requiredViewTime};
f.isCurrentlyViewable=function(){return this.viewTime_.getCurrentConsecutive()>=this.requiredViewTime};var PD=new Ui(0,0,0,0),QD=function(a,b,c){lk.call(this);this.position=PD.clone();this.measurementData=new OD;this.loadTimeExposure=-2;this.timeCreated=fb();this.timestampViewedByUser=-1;this.lastUpdateTime=b;this.elementLoaded_=-1!=b;this.offsetInViewport=null;this.opacity=-1;this.requestSource=c;this.unmeasurableImpressionCallback=this.measurementUpdateCallback=Ta;this.creativeSearchResults=new fha;this.creativeSearchResults.markedUpElement=a;this.creativeSearchResults.monitoredElement=a;this.isUnmeasurableImpression=
!1;this.contextualEventHandlers_={mouseOver:null,mouseOut:null};this.shouldSendTimeOnScreenPing=!0;this.strategyVerifier_=null;this.inFullscreenMode=this.isPedestalAd=!1;this.adBlockId=SC.getInstance().nextAdBlockId++;this.lastComputedExposure_=0;this.lastAdState=new ZB;this.timeLastSeen=this.timeFirstSeen=-1;this.hoverTime_=0;this.hoverStartTime_=-1;this.measurementStrategy=null;this.visibleBox=new Ui(0,0,0,0);this.isCoReRequest=!1;a=this.featureSet=new gC;hC(a,"od",Uga);bC(hC(a,"opac",$B));hC(a,
"ue",$B);hC(a,"ud",$B);bC(hC(a,"gcm",$B));bC(hC(a,"cm",$B));bC(hC(a,"sela",$B));bC(hC(a,"sbeos",$B));bC(hC(a,"prf",$B));bC(hC(a,"mwt",$B));bC(hC(a,"lcs",$B));hC(a,"iogeo",$B);(a=this.creativeSearchResults.markedUpElement)&&a.getAttribute&&nC(a,"googleAvInapp")&&(iD.getInstance().inAppContext=!0);1==this.requestSource?iC(this.featureSet,"od",1):iC(this.featureSet,"od",0)};
l(QD,lk);f=QD.prototype;
f.disposeInternal=function(){RD(this);this.strategyVerifier_&&this.strategyVerifier_.dispose();this.measurementStrategy&&this.measurementStrategy.dispose();delete this.measurementData;delete this.measurementUpdateCallback;delete this.unmeasurableImpressionCallback;delete this.creativeSearchResults.markedUpElement;delete this.creativeSearchResults.monitoredElement;delete this.contextualEventHandlers_;delete this.strategyVerifier_;delete this.measurementStrategy;delete this.featureSet;lk.prototype.disposeInternal.call(this)};
f.getMeasurementStrategy=function(){return this.measurementStrategy};
f.getPosition=function(){return this.measurementStrategy?this.measurementStrategy.elementGeometry:this.position};
f.processActiveViewMetadata=function(a){SC.getInstance().processActiveViewMetadata(a)};
f.handleViewportObservationUpdate=function(){};
f.handleViewportProviderStatusUpdate=function(){};
f.requiresVolume=function(){return!1};
f.setElementLoaded=function(){this.elementLoaded_=!0};
f.isReadyForMeasurement=function(){return this.elementLoaded_};
f.resetFractionOnScreenValues=function(){this.lastAdState.exposure=0};
f.resetTimeOnScreenTimers=function(){this.measurementData=new OD};
f.setFullscreenMode=function(a){if(a!=this.inFullscreenMode){this.inFullscreenMode=a;var b=iD.getInstance();a?b.fullscreenAdblockCount_++:0<b.fullscreenAdblockCount_&&b.fullscreenAdblockCount_--}};
f.updateExposure=function(a,b){this.lastAdState.exposure=Ug(a,0,1);this.lastComputedExposure_=this.lastAdState.exposure;this.lastAdState.screenShare=Ug(b,0,1)};
f.maybeRequestNativeMeasurement=function(){};
f.maybeRequestAdMobVideoMeasurement=function(){};
f.handleAdMobVideoSdkMeasurement=function(){};
f.updateUsingAppProvidedMeasurements=function(a,b,c,d,e,g){g=void 0===g?{}:g;d||(this.position=a);var h=this.lastAdState.exposure;this.updateInternal(a,b,c,d,e,g);return{exposure:this.lastAdState.exposure,lastExposure:h}};
f.updateUsingNativeMeasurement=function(){};
var oia=function(a,b,c){var d=a.lastAdState.screenShare,e=c?a.lastAdState.exposure:a.lastComputedExposure_,g=a.getPosition();a.visibleBox&&!Vi(a.visibleBox,new Ui(0,0,0,0))&&(e=a.visibleBox.clone().translate(g.left,g.top));a.updateInternal(g,e,b,c,!1,{},void 0,d)},SD=function(a){return a.measurementStrategy?a.measurementStrategy.getName():SC.getInstance().measurementStrategy},pia=function(a,b){b=b.create(a.creativeSearchResults.monitoredElement,a.featureSet,a);
if(b=null!=b&&b.observe()?b:null)a.measurementStrategy=b},qia=function(a,b,c){if(a.measurementStrategy){a.measurementStrategy.calculateMeasurement();
var d=a.measurementStrategy.currentMeasurement,e=d.getViewportObservation(),g=e.visibleGeometry;if(null!=d.visibleGeometry_){var h=d.elementGeometry_;a.offsetInViewport=new Wg(h.left-g.left,h.top-g.top);a.visibleBox=d.visibleGeometry_}g=a.shouldUseViewportShareBasedVisibility()?Math.max(d.visibleFraction_,d.viewportShare_):d.visibleFraction_;h={};null!==e.volume&&(h.volume=e.volume);a.updateInternal(a.getPosition(),g,b,c,!a.measurementStrategy.isEventBasedMeasurement,h,void 0,d.screenShare_)}},ria=
function(a){if(a.isReadyForMeasurement()&&a.strategyVerifier_){var b=1==jC(a.featureSet,"od"),c=iD.getInstance().browserViewportBox,d=a.strategyVerifier_,e=SD(a),g=new Yg(c.getWidth(),c.getHeight());
c=a.shouldUseViewportShareBasedVisibility();a={strategyName:e,offsetInViewport:a.offsetInViewport,viewportSize:g,shouldUseViewportShareBasedVisibility:c,exposure:a.lastAdState.exposure,usedEfpOcclusion:b};if(b=d.verificationStrategy_){b.calculateMeasurement();e=b.currentMeasurement;g=e.getViewportObservation().visibleGeometry;var h=null,m=null;null!=e.visibleGeometry_&&g&&(h=e.elementGeometry_,h=new Wg(h.left-g.left,h.top-g.top),m=new Yg(g.right-g.left,g.bottom-g.top));e=c?Math.max(e.visibleFraction_,
e.viewportShare_):e.visibleFraction_;c={strategyName:b.getName(),offsetInViewport:h,viewportSize:m,shouldUseViewportShareBasedVisibility:c,usedEfpOcclusion:!1,exposure:e}}else c=null;c&&jia(d,a,c)}};
QD.prototype.updateInternal=function(a,b,c,d,e,g,h,m){void 0===h&&(-1==this.lastUpdateTime?h=0:(h=c-this.lastUpdateTime||1,h=1E4<h?1:h));m=void 0===m?-1:m;if(!this.isUnmeasurableImpression){Ma(b)||(this.offsetInViewport=new Wg(a.left-b.left,a.top-b.top));if(this.isReadyForMeasurement()){g=m;g=void 0===g?-1:g;m=new ZB;m.tabHidden=d;m.backgroundedState=Oha();Ma(b)?(m.exposure=TD(this,b),m.screenShare=g):(m.exposure=TD(this,a,b),m.screenShare=0<=g?g:m.exposure*kD(a)/(Ge.screen.height*Ge.screen.width));
m.isLargeAd=this.isLargeAd();e=e&&this.lastAdState.exposure>=(this.isLargeAd()?.3:.5);this.measurementData.update(h,m,this.lastAdState,e);this.lastUpdateTime=c;0<m.exposure&&(-1===this.timeFirstSeen&&(this.timeFirstSeen=c),this.timeLastSeen=c);-1==this.timestampViewedByUser&&this.isViewed()&&(this.timestampViewedByUser=c);if(-2==this.loadTimeExposure)try{a:{var n=Ma(b)?null:b;if(a&&a!=PD&&0!=kD(this.getPosition())){var p=iD.getInstance();if(!n){if(!p.browserViewportBox){var x=-1;break a}n=new Ui(0,
p.browserViewportBox.getWidth(),p.browserViewportBox.getHeight(),0)}x=n.getWidth&&0<n.getWidth()&&n.getHeight&&0<n.getHeight()?TD(this,a,n):-1}else x=-1}this.loadTimeExposure=x}catch(y){$C(207,y)}this.lastAdState=m;d&&(this.lastAdState.exposure=0)}this.measurementUpdateCallback(this)}};
var TD=function(a,b,c){if(0===a.opacity&&1===jC(a.featureSet,"opac"))return 0;if(Ma(b))return b;b=jD(b,c);var d=1==jC(a.featureSet,"od");if(0>=kD(a.getPosition())||Yha(b,c,a.creativeSearchResults.monitoredElement,d))return 0;d=kD(b)/kD(a.getPosition());c=lD(b,c);return a.shouldUseViewportShareBasedVisibility()?Math.max(d,c):d};
f=QD.prototype;f.isLargeAd=function(){return!1};
f.shouldUseViewportShareBasedVisibility=function(){return this.isCoReRequest||this.isPedestalAd};
f.getRequestSource=function(){return this.requestSource};
f.updatePositionAndArea=function(a,b,c){if(c)this.position=c;else{a=b?a:a.top;this.position=PD.clone();try{this.creativeSearchResults.monitoredElement&&(this.position=Vha(this.creativeSearchResults.monitoredElement,a))}catch(d){}}};
f.isViewed=function(){return this.measurementData.isViewed()};
f.isCurrentlyViewable=function(){return this.measurementData.isCurrentlyViewable()};
f.getCurrentViewableArea=function(){return UD(this.lastAdState.exposure)};
var UD=function(a){var b=Math.pow(10,2);return Math.floor(a*b)/b},sia=function(a){a.creativeSearchResults.monitoredElement&&(a.contextualEventHandlers_.mouseOver=fD(a.creativeSearchResults.monitoredElement,"mouseover",function(){var b=dD();
a.hoverStartTime_=b},149),a.contextualEventHandlers_.mouseOut=fD(a.creativeSearchResults.monitoredElement,"mouseout",function(){var b=dD();
-1==a.hoverStartTime_||b<a.hoverStartTime_||(a.hoverTime_+=b-a.hoverStartTime_);a.hoverStartTime_=-1},150))},RD=function(a){a.creativeSearchResults.monitoredElement&&(a.contextualEventHandlers_.mouseOver&&(Qi(a.creativeSearchResults.monitoredElement,"mouseover",a.contextualEventHandlers_.mouseOver),a.contextualEventHandlers_.mouseOver=null),a.contextualEventHandlers_.mouseOut&&(Qi(a.creativeSearchResults.monitoredElement,"mouseout",a.contextualEventHandlers_.mouseOut),a.contextualEventHandlers_.mouseOut=
null))};
QD.prototype.setLastUpdateTime=function(a){this.lastUpdateTime=a};
QD.prototype.isHoverActive=function(){return-1!=this.hoverStartTime_};
var tia=function(a,b,c){if(c=void 0===c?Ta:c)a.unmeasurableImpressionCallback=c;switch(b){case"geo":case"iem":return!0;}return!1};var VD=function(){this.isVisible_=!0;this.stateChangeCallbacks_=[]};
VD.prototype.isVisible=function(){return this.isVisible_};
VD.prototype.isUnknown=function(){return!1};
VD.prototype.registerStateChangeHandler=function(a){this.stateChangeCallbacks_.push(a);return!0};
VD.prototype.removeStateChangeHandler=function(a){this.stateChangeCallbacks_=this.stateChangeCallbacks_.filter(function(b){return a!==b})};
Ua(VD);var uia=function(a){return Rc()?(a=(a=$g(a))&&ph(a),!!(a&&a.location&&a.location.ancestorOrigins&&0<a.location.ancestorOrigins.length&&a.location.origin==a.location.ancestorOrigins[0])):!0};var WD=function(a,b){this.iterateUpIntoFriendlyIframes_=b;this.sequenceExhausted_=null==a;this.nextCursorPosition_=a};
l(WD,wk);WD.prototype.next=function(){if(this.sequenceExhausted_)throw vk;var a=this.nextCursorPosition_||null;this.sequenceExhausted_=null==a;var b;if(b=a){b=this.iterateUpIntoFriendlyIframes_;if(Le(a,"parentElement")&&null!=a.parentElement&&a!=a.parentElement)var c=a.parentElement;else if(b){var d=void 0===d?uia:d;if(d(a))try{var e=$g(a),g=e&&ph(e),h=g&&g.frameElement;c=null==h?null:h}catch(m){c=null}else c=null}else c=null;b=c}this.nextCursorPosition_=b;return a};var via=function(a){var b=1;a=tca(new WD(a,!0));a=sca(a,function(){return 0<b});
return rca(a,function(c,d){var e=1;if(Le(d,"style")&&d.style){var g=parseFloat,h=bj(d,"opacity");h||(h=d.style[Cd("opacity")],h="undefined"!==typeof h?h:d.style[Zi(d,"opacity")]||"");d=g(h);Ma(d)&&!isNaN(d)&&(e=d)}return b=c*e})};var XD=function(){this.sent_=!1};
XD.prototype.maybeSend=function(a,b){b=void 0===b?{}:b;this.sent_||(this.sent_=this.maybeSendOneTimePing(a,b))};
XD.prototype.maybeSendOneTimePing=function(){return!1};var YD=function(a,b,c,d,e,g,h,m){g=void 0===g?Ta:g;h=void 0===h?[]:h;m=void 0===m?[]:m;QD.call(this,c,d,e);this.adUrl=b;this.adf=this.adk=0;this.awbidKey=null;this.avihost_=this.avi_="";this.avicxn_=[];this.avieoscxn_=[];this.aviextcxn_="";this.clickstring_=null;this.activeviewCid_="";this.immediatePingEnabled=!1;this.listenerMode=4;this.listenerContacted=!1;this.listenerWindows=[];this.cpmavViewUrl="";this.dedupExperimentPingSent=this.isFromCopiedInstance=this.activeviewImmediatePingSent=this.activeviewPingSent=
this.cpmavViewUrlInvoked=!1;this.timeIframeLoaded=-1;this.adBlockLocatorParameter_="";this.adBlockLocatorHash_=-1;this.creativeRelocationStatus_=0;this.timeCreativeDOMRemoved_=-1;this.largeAdState_=0;this.wasBackgrounded_=this.backgroundedAtStart_=Oha();this.measurementDeferralState_=0;this.metricsChangeCallback_=g;this.shouldAppendAdfUrlParameter_=this.recheckedActiveViewDivs_=!1;this.maxScrollDepthAfterLoad_=this.renderStartScrollDepth_=this.timeElementLoadedFromEpoch_=this.timeAdDomLoadingFromEpoch_=
this.timeRenderStartedFromEpoch_=-1;this.externalSignals_={};this.messages=h;this.pings_=m;wia(this,this.creativeSearchResults.markedUpElement);this.adUrl&&Ka(this.adUrl)&&(b=this.adUrl.match(/fa=([^&;]+)/))&&2==b.length&&b[1]==30 .toString()&&(this.isPedestalAd=!0);dha(SC.getInstance().featureSet,this.adUrl);b=iD.getInstance();this.updatePositionAndArea(a,b.insideCrossDomainIframe)};
l(YD,QD);var xia=function(a,b,c){return(a=String(a[b]||mC(a,c)||""))?a.split("|"):[]},wia=function(a,b){if(b){if(0==a.adk){if(a.creativeSearchResults.markedUpElement){var c=a.creativeSearchResults.markedUpElement._adk_;
c||(c=(c=mC(a.creativeSearchResults.markedUpElement,"googleAvAdk"))&&!/[^0-9]/.test(c)?parseInt(c,10):0)}else c=0;}else c=a.adk;a.adk=c;""==a.avi_&&(a.avi_=String(b._avi_||""));""==a.avihost_&&(a.avihost_=b._avihost_?String(b._avihost_):"pagead2.googlesyndication.com");a.avicxn_.length||(a.avicxn_=xia(b,"_avicxn_","googleAvCxn"));a.avieoscxn_.length||(a.avieoscxn_=xia(b,"_avieoscxn_","googleEOSAvCxn"));""==a.aviextcxn_&&(a.aviextcxn_=String(b._aviextcxn_||mC(b,"googleAvExtCxn")||""));""==a.activeviewCid_&&(
a.activeviewCid_=String(b._cid_||""));a.immediatePingEnabled||(a.immediatePingEnabled=!!b._imm_||nC(b,"googleAvImmediate"));""==a.cpmavViewUrl&&(a.cpmavViewUrl=String(b._cvu_||mC(b,"googleAvCpmav")||""));a.processActiveViewMetadata(String(b._avm_||mC(b,"googleAvMetadata")||""))}};
YD.prototype.disposeInternal=function(){ZD(this);delete this.listenerWindows;delete this.messages;delete this.domRemovalEventHandler_;delete this.domMutationObserver_;QD.prototype.disposeInternal.call(this)};
var yia=function(a,b){mb(a.messages,function(c){return c.maybeSend(a,b,0)})},zia=function(a){var b={};
mb(a.pings_,function(c){return c.maybeSend(a,b)})};
YD.prototype.isReadyForMeasurement=function(){return this.elementLoaded_&&!(1==this.measurementDeferralState_||3==this.measurementDeferralState_)};
YD.prototype.getDeferralState=function(){return this.measurementDeferralState_};
YD.prototype.setDeferralState=function(a){this.measurementDeferralState_==a||2==this.measurementDeferralState_||1==this.measurementDeferralState_&&3==a||(this.measurementDeferralState_=a,1!=this.measurementDeferralState_&&3!=this.measurementDeferralState_||this.resetTimeOnScreenTimers())};
var ZD=function(a){a.domRemovalEventHandler_&&Qi(a.creativeSearchResults.markedUpElement,"DOMNodeRemoved",a.domRemovalEventHandler_);a.domMutationObserver_&&a.domMutationObserver_.disconnect()},Aia=function(a){a.creativeSearchResults.markedUpElement&&(ZD(a),a.timeCreativeDOMRemoved_=-1,q.MutationObserver?(a.domMutationObserver_=new q.MutationObserver(function(b,c){for(var d=0;d<b.length;d++)if("childList"==b[d].type&&b[d].removedNodes.length){a.timeCreativeDOMRemoved_=dD();
c.disconnect();break}}),a.domMutationObserver_.observe(a.creativeSearchResults.markedUpElement,{childList:!0,
subtree:!0})):a.domRemovalEventHandler_=Dha(a.creativeSearchResults.markedUpElement,function(){a.timeCreativeDOMRemoved_=dD()}))};
YD.prototype.resetFractionOnScreenValues=function(){QD.prototype.resetFractionOnScreenValues.call(this);this.visibleBox=new Ui(0,0,0,0)};
YD.prototype.resetTimeOnScreenTimers=function(){QD.prototype.resetTimeOnScreenTimers.call(this);this.visibleBox=new Ui(0,0,0,0)};
YD.prototype.setElementLoaded=function(){if(!this.elementLoaded_){this.timeElementLoadedFromEpoch_=hB();this.timeIframeLoaded=dD();var a=this.metricsChangeCallback_(!1,this.loadTimeExposure);a&&Bia(this,a)}QD.prototype.setElementLoaded.call(this);Cia(this)};
var Cia=function(a){if(a.elementLoaded_&&q==q.top){var b=q.pageYOffset;null!=b&&(a.maxScrollDepthAfterLoad_=Math.max(b,a.maxScrollDepthAfterLoad_))}};
YD.prototype.processActiveViewMetadata=function(a){if(Ka(a)&&0!=a.length){var b=new gC,c=SC.getInstance();hC(b,"omid",$B);lC(b,a);b=jC(b,"omid");null!==b&&(c.featureSet.forcedFeatures_.omid=b);a=lC(this.featureSet,a);c=a.split("&");for(b=0;b<c.length;b++){var d=c[b];"ts=0"==d?this.shouldSendTimeOnScreenPing=!1:ec(d,"la=")?(d=d.split("=")[1],"0"==d?this.largeAdState_=2:"1"==d&&(this.largeAdState_=1)):ec(d,"cr=")?"1"==d.split("=")[1]&&(this.isCoReRequest=!0):ec(d,"alp=")?this.adBlockLocatorParameter_=
d.split("=")[1]:ec(d,"alh=")?(d=parseInt(d.split("=")[1],10),isNaN(d)||(this.adBlockLocatorHash_=d)):"adf=1"==d&&(this.shouldAppendAdfUrlParameter_=!0)}this.lastAdState.isLargeAd=this.isLargeAd();QD.prototype.processActiveViewMetadata.call(this,a)}};
YD.prototype.updateInternal=function(a,b,c,d,e,g){g=void 0===g?{}:g;var h=this.isViewed(),m=Math.floor(100*this.lastAdState.exposure);this.largeAdState_=242500<=(a.right-a.left)*(a.bottom-a.top)?1:2;QD.prototype.updateInternal.call(this,a,b,c,d,e,g);-1==this.wasBackgrounded_&&-1!=this.lastAdState.backgroundedState?this.wasBackgrounded_=this.lastAdState.backgroundedState:0==this.wasBackgrounded_&&1==this.lastAdState.backgroundedState&&(this.wasBackgrounded_=1);Ma(b)||(0<this.lastAdState.exposure?(b=
jD(a,b),this.visibleBox=0>=kD(this.getPosition())||b.top>=b.bottom||b.left>=b.right?new Ui(0,0,0,0):b.translate(-a.left,-a.top)):this.visibleBox=new Ui(0,0,0,0));a=this.isViewed();b=Math.floor(100*this.lastAdState.exposure);(!h&&a||b!=m)&&(h=this.metricsChangeCallback_(a,b))&&Bia(this,h);try{this.opacity=via(this.creativeSearchResults.monitoredElement)}catch(n){}Cia(this)};
YD.prototype.isLargeAd=function(){return rba?!1:1==this.largeAdState_};
var Dia=function(a,b){var c=void 0===c?{}:c;var d={},e=$D(a);c&&u.extend(e,c);e.adk=a.adk;a.shouldAppendAdfUrlParameter_&&a.adf&&(e.adf=a.adf);c=a.isUnmeasurableImpression;var g=SC.getInstance();if(!h&&c&&g.unmeasurableReason)var h=g.unmeasurableReason;h&&(e.r=h);0===a.opacity&&(e.invis=1);h=DD(e).join("&");d[3]=h;d[11]=c;d[29]=SC.getInstance().binaryContext;d[0]=b;d[7]=a.lastAdState.exposure;d[9]=hD(a.visibleBox);d[28]=a.requestSource;d[32]=SD(a);d[5]=a.isViewed()&&4!=a.listenerMode;d[13]=a.measurementData.timeOnScreen.getMaxConsecutive(!0).join(",");
d[18]=0==kD(a.getPosition());null!=a.offsetInViewport&&(d[20]=a.offsetInViewport.y,d[21]=a.offsetInViewport.x);b=iD.getInstance();null!=b.frameViewportBox&&(d[22]=b.frameViewportBox.getWidth(),d[23]=b.frameViewportBox.getHeight());null!=b.browserViewportBox&&(d[30]=b.browserViewportBox.getWidth(),d[31]=b.browserViewportBox.getHeight(),d[38]=hD(b.browserViewportBox));h=b.frameOffset;e=a.getPosition();d[37]=hD(new Ui(e.top+h.y,e.right+h.x,e.bottom+h.y,e.left+h.x));b.documentSize&&(b=b.documentSize,
d[39]=b.width+"-"+b.height);-1!=a.opacity&&(d[25]=a.opacity);a=new pC(a.adk,a.awbidKey);a.adKey_&&(d[4]=a.adKey_);a.awbidKey_&&(d[12]=a.awbidKey_);return d};
YD.prototype.messageForListenerMode=function(){var a=Dia(this,"goog_get_mode"),b=this.creativeSearchResults.markedUpElement;try{var c=Fha(a);Pha(b,c,void 0)}catch(d){}};
YD.prototype.messageMonitoringAcknowledgement=function(){var a=iD.getInstance(),b=Dia(this,"goog_acknowledge_monitoring");b[8]=a.insideCrossDomainIframe;b[36]=a.shouldOsdMeasureForClient;a=this.creativeSearchResults.markedUpElement;var c=this.listenerWindows;try{var d=Fha(b);Pha(a,d,c)}catch(e){}};
YD.prototype.updatePositionAndArea=function(a,b,c){if(!b&&(-1!=this.timeIframeLoaded||-1!=this.timeCreativeDOMRemoved_)&&2!=this.creativeRelocationStatus_&&1!=this.creativeRelocationStatus_&&-1!=this.creativeRelocationStatus_&&7!=this.creativeRelocationStatus_){var d=null;try{d=this.creativeSearchResults.monitoredElement&&this.creativeSearchResults.monitoredElement.getBoundingClientRect()}catch(g){}if(!d||0==d.width||0==d.height)if(d=Nha(a.top,this.adBlockLocatorParameter_,this.adBlockLocatorHash_),
this.creativeRelocationStatus_=d.status,d.creativeElement)if(d.creativeElement==this.creativeSearchResults.monitoredElement)this.creativeRelocationStatus_=2;else if(d=d.creativeElement,ZD(this),RD(this),this.creativeSearchResults.monitoredElement=d,sia(this),wia(this,d),Aia(this),this.measurementStrategy){var e=this.measurementStrategy;e.unobserve();e.element=d;e.observe();e.calculateMeasurement()}}QD.prototype.updatePositionAndArea.call(this,a,b,c)};
var Eia=function(a,b){switch(b){case 1:if(a.avicxn_.length)return a.avicxn_;break;case 2:if(a.avieoscxn_.length)return a.avieoscxn_;if(a.avicxn_.length)return a.avicxn_;}return[]};
f=YD.prototype;f.buildExternalPingPrefix=function(a){return CD(a,this.aviextcxn_?[this.aviextcxn_]:[],"","","","")};
f.canSendActiveviewPing=function(){return!(!this.avicxn_.length&&!this.avi_)};
f.canSendExternalActiveviewPing=function(){return!!this.aviextcxn_};
f.setConnectionInfo=function(a,b,c,d){b=void 0===b?[]:b;d=void 0===d?[]:d;this.avicxn_.length||(this.avi_=a,b&&(this.avicxn_=b),this.activeviewCid_=void 0===c?"":c,this.clickstring_=null);!this.avieoscxn_.length&&d&&(this.avieoscxn_=d)};
f.setExtConnectionInfo=function(a){this.aviextcxn_||(this.aviextcxn_=void 0===a?"":a)};
f.getClickstring=function(){if(!this.clickstring_)if(this.avicxn_.length){for(var a=k(this.avicxn_),b=a.next();!b.done;b=a.next())if((b=b.value.match(/[\?&](avi|xai)=([^&]+)/))&&3==b.length)return this.clickstring_=b[2];this.clickstring_=""}else this.clickstring_=this.avi_||"";return this.clickstring_};
f.isPcsInitialized=function(){return rb(this.avicxn_,function(a){return-1!=a.indexOf("/pcs/activeview")})};
var $D=function(a){var b=iD.getInstance(),c=kC(a.featureSet),d=b.frameOffset,e=a.getPosition();c.p=[e.top+d.y,e.left+d.x,e.bottom+d.y,e.right+d.x];d=a.measurementData;c.tos=d.timeOnScreen.getTotal(!1);c.mtos=d.timeOnScreen.getMaxConsecutive(!0);c.mcvt=d.viewTime_.getMaxConsecutive();c.rs=a.requestSource;(e=5==a.requestSource)||(c.ht=a.hoverTime_);0<=a.timeFirstSeen&&(c.tfs=a.timeFirstSeen,c.tls=a.timeLastSeen);c.mc=UD(d.maxExposure_);c.lte=UD(a.loadTimeExposure);c.bas=a.backgroundedAtStart_;c.bac=
a.wasBackgrounded_;b.insideCrossDomainIframe&&(c["if"]=a.isUnmeasurableImpression?0:1);c.met=a.creativeSearchResults.creativeSearchState;e&&a.adUrl&&(c.req=encodeURIComponent(a.adUrl).substring(0,100));a.isFromCopiedInstance&&(c.ci="1");a.isLargeAd()&&(c.la="1");a.isPedestalAd&&(c.pa="1");c.avms=SD(a);a.measurementStrategy&&u.extend(c,a.measurementStrategy.getLogParams());a.recheckedActiveViewDivs_&&(c.radf="1");0!=a.measurementDeferralState_&&(c.md=a.measurementDeferralState_);b=a.timeRenderStartedFromEpoch_;
0<b&&(c.rst=b);b=a.timeRenderStartedFromEpoch_;b=-1==b||a.timeAdDomLoadingFromEpoch_<b?-1:a.timeAdDomLoadingFromEpoch_-b;0<=b&&(c.dlt=b);b=-1==a.timeRenderStartedFromEpoch_||a.timeElementLoadedFromEpoch_<a.timeRenderStartedFromEpoch_?-1:a.timeElementLoadedFromEpoch_-a.timeRenderStartedFromEpoch_;0<=b&&(c.rpt=b);0<=a.renderStartScrollDepth_&&(c.isd=a.renderStartScrollDepth_);0<=a.maxScrollDepthAfterLoad_&&(c.msd=a.maxScrollDepthAfterLoad_);c.lm=a.listenerMode;(a=Fia(a))&&(c.ext=a);return c};
YD.prototype.getStats=function(){var a=$D(this);return DD(a)};
var Gia=function(a){return 0>=kD(a.getPosition())?!1:null!=a.cpmavViewUrl&&null!=a.cpmavViewUrl.match(/\/pagead\/adview\?.*ai=.*&vt=\d+/i)&&!a.cpmavViewUrlInvoked};
f=YD.prototype;f.shouldSendImmediatePing=function(){return this.immediatePingEnabled&&!this.activeviewImmediatePingSent};
f.isGpt=function(){return 3==this.requestSource};
f.setRenderStartTimeFromEpoch=function(a){-1==this.timeRenderStartedFromEpoch_&&(this.timeRenderStartedFromEpoch_=a)};
f.setAdDomLoadingTimeFromEpoch=function(a){-1==this.timeAdDomLoadingFromEpoch_&&(this.timeAdDomLoadingFromEpoch_=a)};
f.setScrollDepthAtRenderStart=function(a){this.renderStartScrollDepth_=a};
f.getScrollDepthAtRenderStart=function(){return this.renderStartScrollDepth_};
var Fia=function(a){return a.externalSignals_&&0<Ki(a.externalSignals_).length?encodeURIComponent(pb(Ki(a.externalSignals_),function(b){return b+"="+a.externalSignals_[b]}).join("&")):null},Bia=function(a,b){b&&Ji(b,function(c,d){null==c?delete a.externalSignals_[d]:a.externalSignals_[d]=c})};var aE=function(a){this.reporter_=a;this.key="goog_update_data";this.validEvent=0;this.viewedMessageSent_=!1};
aE.prototype.maybeSend=function(a,b,c){if(c!=this.validEvent||!new pC(a.adk,a.awbidKey).isValid())return!1;c={};c=(c[0]=this.key,c);(0,u.extend)(c,b);b=1==a.listenerMode;var d=a.isViewed();if(b)return d&&!this.viewedMessageSent_?(this.viewedMessageSent_=d,this.reporter_.report(a,0,c)):!1;this.viewedMessageSent_=d;return this.reporter_.report(a,0,c)};var Hia=function(a){aE.call(this,a);this.key="goog_image_request";this.validEvent=2};
l(Hia,aE);var bE=function(a){aE.call(this,a);this.key="goog_image_request";this.validEvent=1};
l(bE,aE);bE.prototype.maybeSend=function(a,b,c){var d=a.isViewed()&&a.shouldSendTimeOnScreenPing,e=!a.activeviewPingSent;if(d||e){if(b=aE.prototype.maybeSend.call(this,a,b,c))if(a.isViewed()||(a.activeviewPingSent=!0),a.isViewed()||a.shouldSendTimeOnScreenPing)a.shouldSendTimeOnScreenPing=!1;return b}return!1};var cE=function(){this.videoInstreamAdBlocks_=[];this.displayAdBlocks_=[]};
cE.prototype.findDisplayAdBlockByAdBlockId=function(a){return ub(this.displayAdBlocks_,function(b){return a.matches(new pC(b.adk,b.awbidKey))})};
var dE=function(a,b){return b?ub(a.displayAdBlocks_,function(c){return c.creativeSearchResults.markedUpElement==b}):null},Iia=function(a,b){return ub(a.videoInstreamAdBlocks_,function(c){return c.queryID==b})},Jia=function(a,b){return b?ub(a.videoInstreamAdBlocks_,function(c){return c.creativeSearchResults.markedUpElement==b}):null},Kia=function(a){return ub(a.displayAdBlocks_,function(){return!1})};
cE.prototype.findAdBlockByQueryID=function(a){return Iia(this,a)||Kia(this)};
var eE=function(a){return 0==a.videoInstreamAdBlocks_.length?a.displayAdBlocks_:0==a.displayAdBlocks_.length?a.videoInstreamAdBlocks_:Bb(a.displayAdBlocks_,a.videoInstreamAdBlocks_)};
cE.prototype.reset=function(){this.videoInstreamAdBlocks_=[];this.displayAdBlocks_=[]};
cE.prototype.addVideoAdBlock=function(a){this.videoInstreamAdBlocks_.push(a)};
var Lia=function(a,b){a=a.displayAdBlocks_;var c=tb(a,function(d){return d==b});
return-1!=c?(a.splice(c,1),b.measurementStrategy&&b.measurementStrategy.unobserve(),b.dispose(),!0):!1},Mia=function(a){var b=fE;
if(Lia(b,a)){a=function(){return null};
a=function(){return Kia(b)};
for(var c=a();c;c=a())Lia(b,c)}};
cE.prototype.mergeIntoVideoAdBlocks=function(a,b){var c=this;a=nb(a,(void 0===b?0:b)?function(d){return!Iia(c,d.queryID)}:function(d){return!Jia(c,d.creativeSearchResults.markedUpElement)});
this.videoInstreamAdBlocks_.push.apply(this.videoInstreamAdBlocks_,ka(a));return a};
var Nia=function(a){var b=fE,c=[];mb(a,function(d){d.creativeSearchResults.markedUpElement&&null==dE(b,d.creativeSearchResults.markedUpElement)&&(b.displayAdBlocks_.push(d),c.push(d))})};
cE.prototype.mergeIntoFlashVideoAdBlocks=function(a){var b=this,c=[];mb(a,function(d){rb(b.videoInstreamAdBlocks_,function(e){return e.creativeSearchResults.markedUpElement===d.creativeSearchResults.markedUpElement&&e.sdkID===d.sdkID&&e.queryID===d.queryID})||(b.videoInstreamAdBlocks_.push(d),c.push(d))});
return c};
cE.prototype.hasAdBlockInFullscreenMode=function(){return rb(eE(this),function(a){return a.inFullscreenMode})};
Ua(cE);var fE=cE.getInstance();var gE=function(a,b,c,d){vD.call(this,a,b,c,d);this.currentMeasurement=new nD(b.getViewportObservation(),this.element,new Ui(0,0,0,0),new Ui(0,0,0,0),1,1,dD(),1)};
l(gE,vD);gE.prototype.getName=function(){return"a100"};var hE=function(a){wD.call(this,new pD(a,2))};
l(hE,wD);hE.prototype.getName=function(){return"a100"};
hE.prototype.shouldBeUsedForMeasurement=function(){return!0};
hE.prototype.createInstance=function(a,b,c){return new gE(a,this.viewportProvider,b,c)};var iE=function(){this.selectedStrategy_=this.availableStrategies_=null};
iE.prototype.selectStrategy=function(a){var b=this;if(null==this.availableStrategies_)return!1;var c=function(d,e){b.selectedStrategy_=null;a(d,e)};
(this.selectedStrategy_=ub(this.availableStrategies_,function(d){return null!=d&&d.shouldBeUsedForMeasurement()&&d.init(c)}))&&sD(this.selectedStrategy_.viewportProvider);
return null!=this.selectedStrategy_};
Ua(iE);var jE=function(a,b,c,d){vD.call(this,a,b,c,d)};
l(jE,vD);jE.prototype.isElementHidden=function(a){var b=1==jC(this.featureSet,"od");return Yha(a,this.frameVisibleGeometry,this.element,b)};
jE.prototype.calculateMeasurement=function(){var a=this.viewportProvider.getViewportObservation();this.timestamp=-1===a.time?dD():a.time;this.calculateElementGeometry();this.calculateFrameVisibleGeometry();a=jD(this.elementGeometry,this.frameVisibleGeometry);var b=a.top>=a.bottom||a.left>=a.right?new Ui(0,0,0,0):a;a=this.viewportProvider.getViewportObservation();var c=0,d=0,e=0;0<(this.elementGeometry.bottom-this.elementGeometry.top)*(this.elementGeometry.right-this.elementGeometry.left)&&(this.isElementHidden(b)?
b=new Ui(0,0,0,0):(c=iD.getInstance().screenSize,e=new Ui(0,c.height,c.width,0),c=lD(b,this.elementGeometry),d=lD(b,iD.getInstance().browserViewportBox),e=lD(b,e)));b=b.top>=b.bottom||b.left>=b.right?new Ui(0,0,0,0):b.translate(-this.elementGeometry.left,-this.elementGeometry.top);this.currentMeasurement=new nD(a,this.element,this.elementGeometry,b,c,d,this.timestamp,e)};
jE.prototype.hasFailed=function(){return this.activeProvider.hasFailed()};
jE.prototype.getName=function(){return this.activeProvider.getName()};var kE=function(a){var b=Oia(a);wD.call(this,b.length?b[b.length-1]:new pD(Ge,0));this.selectedProviders_=b;this.failureCallback=Ta;this.activeProvider_=null;this.availableProviders_=a};
l(kE,wD);f=kE.prototype;f.getAvailableProviders=function(){return[].concat(this.availableProviders_)};
f.getName=function(){return(this.activeProvider_?this.activeProvider_:this.viewportProvider).getName()};
f.getLogParams=function(){return(this.activeProvider_?this.activeProvider_:this.viewportProvider).getLogParams()};
f.getVisibleGeometryCapability=function(){return(this.activeProvider_?this.activeProvider_:this.viewportProvider).getVisibleGeometryCapability()};
f.init=function(a){this.failureCallback=a;mb(this.selectedProviders_,function(b){return b.initialize()});
rD(this.viewportProvider,this);return!0};
f.dispose=function(){mb(this.selectedProviders_,function(a){a.dispose()});
wD.prototype.dispose.call(this)};
f.shouldBeUsedForMeasurement=function(){return rb(this.selectedProviders_,function(a){return a.shouldBeUsedForMeasurement()})};
f.canBeUsed=function(){return rb(this.selectedProviders_,function(a){return a.canBeUsed()})};
f.createInstance=function(a,b,c){return new jE(a,this.viewportProvider,b,c)};
f.handleViewportProviderStatusUpdate=function(a){0==a.getVisibleGeometryCapability()&&this.failureCallback(a.getFailureCode(),this)};
f.handleViewportObservationUpdate=function(a){this.activeProvider_=a.originatingProvider};
f.requiresVolume=function(){return!1};
var Oia=function(a){if(!a.length)return[];a=nb(a,function(c){return null!=c&&c.shouldBeUsedForMeasurement()});
for(var b=1;b<a.length;b++)rD(a[b-1],a[b]);return a};var lE=function(a,b,c,d){vD.call(this,a,b,c,d);this.observationStart_=this.firstObservation_=null};
l(lE,jE);lE.prototype.observe=function(){var a=this;this.observationStart_||(this.observationStart_=dD());if(vha(298,function(){return Pia(a)}))return!0;
qD(this.viewportProvider,"msf");return!1};
var mE=function(a,b){try{if(b.length){a.firstObservation_||(a.firstObservation_=dD());var c=Qia(b);if(1==jC(a.featureSet,"iogeo")){var d=kj(a.element,a.viewportProvider.getWindow()),e=d.x,g=d.y;a.elementGeometry=new Ui(Math.round(g),Math.round(e)+c.boundingClientRect.width,Math.round(g)+c.boundingClientRect.height,Math.round(e))}else a.elementGeometry=gD(c.boundingClientRect);var h=gD(c.intersectionRect);a.frameVisibleGeometry=h.translate(a.elementGeometry.left-h.left,a.elementGeometry.top-h.top)}}catch(m){a.unobserve(),
$C(299,m)}},Qia=function(a){return qb(a,function(b,c){return b.time>c.time?b:c},a[0])};
lE.prototype.calculateElementGeometry=function(){};
lE.prototype.isElementHidden=function(){return!1};
lE.prototype.calculateFrameVisibleGeometry=function(){};
lE.prototype.getLogParams=function(){var a={};return Object.assign(this.viewportProvider.getLogParams(),(a.niot_obs=this.observationStart_,a.niot_cbk=this.firstObservation_,a))};var Ria={threshold:[0,.3,.5,.75,1]},nE=function(a,b,c,d){lE.call(this,a,b,c,d);this.mutationObserver_=this.resizeObserver_=this.observer_=null};
l(nE,lE);nE.prototype.getName=function(){return"nio"};
nE.prototype.unobserve=function(){if(this.observer_&&this.element)try{this.observer_.unobserve(this.element),this.resizeObserver_?(this.resizeObserver_.unobserve(this.element),this.resizeObserver_=null):this.mutationObserver_&&(this.mutationObserver_.disconnect(),this.mutationObserver_=null)}catch(a){}};
var oE=function(a){return a.observer_&&a.observer_.takeRecords?a.observer_.takeRecords():[]},Pia=function(a){if(!a.element)return!1;
var b=a.element,c=a.viewportProvider.getWindow(),d=RC().stopwatch_;a.observer_=new c.IntersectionObserver(QC(d,function(e){return mE(a,e)}),Ria);
d=QC(d,function(){a.observer_.unobserve(b);a.observer_.observe(b);mE(a,oE(a))});
c.ResizeObserver?(a.resizeObserver_=new c.ResizeObserver(d),a.resizeObserver_.observe(b)):c.MutationObserver&&(a.mutationObserver_=new q.MutationObserver(d),a.mutationObserver_.observe(b,{attributes:!0,childList:!0,characterData:!0,subtree:!0}));a.observer_.observe(b);mE(a,oE(a));return!0};
nE.prototype.calculateMeasurement=function(){var a=oE(this);0<a.length&&mE(this,a);lE.prototype.calculateMeasurement.call(this)};var pE=function(a){a=void 0===a?Ge:a;wD.call(this,new pD(a,2))};
l(pE,wD);pE.prototype.getName=function(){return"nio"};
pE.prototype.canBeUsed=function(){return"exc"!==SC.getInstance().measurementStrategy&&!iD.getInstance().inAppContext&&null!=this.viewportProvider.getWindow().IntersectionObserver};
pE.prototype.createInstance=function(a,b,c){return new nE(a,this.viewportProvider,b,c)};var qE=function(){var a=Sia();pD.call(this,Ge.top,a,"geo")};
l(qE,pD);qE.prototype.getUpdatedVisibleGeometry=function(){return iD.getInstance().browserViewportBox};
qE.prototype.canBeUsed=function(){this.inherentVisibleGeometryCapability=Sia();return 2==this.inherentVisibleGeometryCapability};
var Sia=function(){if(SC.getInstance().isInMobiStrategy)return 2;var a=iD.getInstance();return a.insideCrossDomainIframe||a.inAppContext?0:2};
Ua(qE);var rE={},Tia=(rE[1]=function(){return new pE},rE[2]=function(){return new kE([qE.getInstance()])},rE);var sE=function(){this.selectedStrategy_=null;this.strategyMap_=Tia};
sE.prototype.hasSelectedStrategy=function(){return null!=this.selectedStrategy_};
sE.prototype.selectStrategy=function(){a:{var a=jC(SC.getInstance().featureSet,"mv");if(null!=a&&(a=this.strategyMap_[a])&&(a=a())&&a.canBeUsed())break a;a=null}this.selectedStrategy_=a;return null!=this.selectedStrategy_};
sE.prototype.getSelectedStrategy=function(){return this.selectedStrategy_};
Ua(sE);var tE=function(){this.done=!1;this.dbg={adBlocksRegistered:0,adBlocksFound:0,scrollTime:0,displayUpdates:0,initTime:-1,creativeOnLoadSearches:0,creativeOnDCLSearches:0,creativesAfterFirstSearch:0};this.protectedHandleTabVisibilityEvent_=this.resizeThrottler_=this.handleResizeEvent_=this.scrollThrottler_=this.handleScrollEvent_=null;this.isMonitoring=this.startMonitored_=!1;this.pingId_="";this.currentPageStats_=null;this.tabInViewTime_=0;this.sampler=new oD(this)},Uia=function(){var a=SC.getInstance().measurementStrategy;
return"nio"===a||"aio"===a||"omid"===a},Wia=function(){var a=uE;
if(!a.startMonitored_){a.startMonitored_=!0;if(!a.handleScrollEvent_&&!Uia()){var b=ZC(137,function(c){for(var d=[],e=0;e<arguments.length;++e)d[e-0]=arguments[e];return a.handleDisplayChange.apply(a,ka(d))});
a.scrollThrottler_=new Cw(b,100);a.handleScrollEvent_=fD(Ge,"scroll",function(c){for(var d=[],e=0;e<arguments.length;++e)d[e-0]=arguments[e];null!==a.scrollThrottler_&&a.scrollThrottler_.fire.apply(a.scrollThrottler_,ka(d))},138)}a.handleResizeEvent_||Uia()||(b=ZC(140,function(c){for(var d=[],e=0;e<arguments.length;++e)d[e-0]=arguments[e];
return a.handleDisplayChange.apply(a,ka(d))}),a.resizeThrottler_=new Cw(b,100),a.handleResizeEvent_=fD(Ge,"resize",function(c){for(var d=[],e=0;e<arguments.length;++e)d[e-0]=arguments[e];
null!==a.resizeThrottler_&&a.resizeThrottler_.fire.apply(a.resizeThrottler_,ka(d))},141));
Via(a,function(c){for(var d=[],e=0;e<arguments.length;++e)d[e-0]=arguments[e];return a.handleTabVisibilityChange.apply(a,ka(d))});
a.handleTabVisibilityChange()}};
tE.prototype.handleDisplayChange=function(){vE(this,eE(fE),!1)};
tE.prototype.sample=function(){vE(this,eE(fE),!1)};
var Xia=function(){var a=sE.getInstance();null!=a.selectedStrategy_&&a.selectedStrategy_.viewportProvider&&sD(a.selectedStrategy_.viewportProvider);a=iE.getInstance();null!=a.selectedStrategy_&&a.selectedStrategy_.viewportProvider?sD(a.selectedStrategy_.viewportProvider):iD.getInstance().update(Ge)},vE=function(a,b,c){if(!a.done)if(a.sampler.cancel(),0==b.length)a.isMonitoring=!1;else
{a.currentPageStats_=null;try{Xia();var d=dD(),e=SC.getInstance();e.firstPollingTime=d;if(null!=iE.getInstance().selectedStrategy_)for(e=0;e<b.length;e++)qia(b[e],d,c);else switch(e.measurementStrategy){case"exc":for(e=0;e<b.length;e++)oia(b[e],d,c);break;case"nis":for(e=0;e<b.length;e++);break;case"gsv":for(e=0;e<b.length;e++);}for(e=0;e<b.length;e++)ria(b[e]);a.dbg.scrollTime+=dD()-d;++a.dbg.displayUpdates;Yia(a)}finally{c?mb(b,function(g){return g.resetFractionOnScreenValues()}):a.sampler.schedule()}}},
Via=function(a,b){a.protectedHandleTabVisibilityEvent_||(b=ZC(142,b),wC().pageVisibility.registerStateChangeHandler(b)&&(a.protectedHandleTabVisibilityEvent_=b))};
tE.prototype.handleTabVisibilityChange=function(){var a=Tha(),b=dD();a?(cD||(aD=b,mb(fE.videoInstreamAdBlocks_,function(c){return c.measurementData.updateVideoHiddenTime(b,!c.isMeasuring())})),cD=!0):(this.tabInViewTime_=Zia(this,b),cD=!1,mb(fE.videoInstreamAdBlocks_,function(c){c.isReadyForMeasurement()&&c.measurementData.setTimeVideoBecameHidden(b)}));
this.isMonitoring=!0;vE(this,eE(fE),!a)};
tE.prototype.checkActiveViewRequirements=function(){return!1};
var wE=function(a,b,c){if(!a.currentPageStats_||c){c=b.document;var d=0<=bD?dD()-bD:-1,e=dD();-1==a.dbg.initTime&&(d=e);var g=iD.getInstance(),h=SC.getInstance(),m=kC(h.featureSet),n=eE(fE);try{if(0<n.length){var p=g.browserViewportBox;p&&(m.bs=[p.getWidth(),p.getHeight()]);var x=g.documentSize;x&&(m.ps=[x.width,x.height]);b.screen&&(m.ss=[b.screen.width,b.screen.height])}else m.url=encodeURIComponent(b.location.href.substring(0,512)),c.referrer&&(m.referrer=encodeURIComponent(c.referrer.substring(0,
512)));m.tt=d;m.pt=bD;m.bin=h.binaryContext;switch(SC.getInstance().measurementStrategy){case"iem":m.iem=1;break;case"aio":m.aio=1;break;case"nio":m.nio=1;}void 0!==b.google_osd_load_pub_page_exp&&(m.olpp=b.google_osd_load_pub_page_exp);m.deb=[1,a.dbg.adBlocksRegistered,a.dbg.adBlocksFound,a.dbg.scrollTime,a.dbg.displayUpdates,a.dbg.initTime,Iha,a.sampler.samplingCount_,a.dbg.creativeOnLoadSearches,a.dbg.creativeOnDCLSearches,a.dbg.creativesAfterFirstSearch].join("-");m.tvt=Zia(a,e);g.inAppContext&&(
m.inapp=1);if(Oj(b)){0<n.length&&(m.iframe_loc=encodeURIComponent(b.location.href.substring(0,512)));var y=g.frameViewportBox;m.is=[y.getWidth(),y.getHeight()]}}catch(B){m.error=1}a.currentPageStats_=m}a=u.clone(a.currentPageStats_);u.extend(a,rha());return a};
f=tE.prototype;f.getPageStats=function(a,b){a=wE(this,a,b);return DD(a)};
f.getPingId=function(){return this.pingId_};
f.enableExternalMeasurements=function(){SC.getInstance().measurementStrategy="exc"};
f.enableWindowGeometryProvidedByExternalSource=function(){iD.getInstance().isWindowGeometryProvidedByExternalSource=!0};
f.enableNativeImaSdk=function(){SC.getInstance().measurementStrategy="nis";SC.getInstance().nativeMeasurementStrategy="nis";SC.getInstance().pollingFrequencyScheme=79463069;iD.getInstance().inAppContext=!0};
f.enableGmaSdkVideo=function(){SC.getInstance().measurementStrategy="gsv";SC.getInstance().nativeMeasurementStrategy="gsv";SC.getInstance().pollingFrequencyScheme=79463069;iD.getInstance().inAppContext=!0};
var $ia=function(a){if(a.creativeSearchResults.markedUpElement){var b=a.adk||0,c=sE.getInstance();if(b=c.selectedStrategy_?new JD(c.selectedStrategy_,a.creativeSearchResults.monitoredElement,a.featureSet,b):null)a.strategyVerifier_=b}},aja=function(){mb(eE(fE),function(a){return $ia(a)})},bja=function(){var a=iE.getInstance();
if(null!=a.selectedStrategy_){var b=a.selectedStrategy_;mb(eE(fE),function(c){return pia(c,b)})}};
tE.prototype.setUpMeasurementStrategyForAdblockList=function(a,b,c,d){d=void 0===d?Ta:d;var e=!1;mb(c,function(g){tia(g,b,d)&&(e=!0)});
return e};
var Yia=function(a){"osd"==a.pingId_&&mb(fE.displayAdBlocks_,function(b){var c={};yia(b,(c.r=void 0,c))})},Zia=function(a,b){a=a.tabInViewTime_;
cD&&(a+=b-aD);return a};
tE.prototype.getAdkFromUrl=function(a){return(a=a.match(/[&\?;](?:dc_)?adk=([0-9]+)/))&&2==a.length?parseInt(a[1],10):0};
tE.prototype.getAdfFromUrl=function(a){return(a=a.match(/[&\?;]adf=([0-9]+)/))&&2==a.length?parseInt(a[1],10):0};
tE.prototype.alwaysReport100=function(){iE.getInstance().availableStrategies_=[new hE(Ge)]};
var cja=function(){var a=uE;var b=void 0===b?function(){return{}}:b;
YC.setErrorTypeId("av-js");VC.setDefaultReportingFrequency(.01);uha([function(c){var d=SC.getInstance(),e={};u.extend(c,(e.bin=d.binaryContext,e.type="error",e),kC(d.featureSet),wE(a,Ge),b());if(d=fia())e={},u.extend(c,(e.v=encodeURIComponent(d),e))}])};
tE.prototype.getMessagesForListenerMode=function(a,b){var c=new aE(b),d=new bE(b);b=new Hia(b);switch(a){case 0:case 5:return[];default:return[c,d,b];}};
Ua(tE);var uE=tE.getInstance();var dja=null,eja=function(a){var b=dja||Ge;if(!b)return"";var c=[];if(void 0===a||!a){if(!b.location||!b.location.href)return"";c.push("url="+encodeURIComponent(b.location.href.substring(0,512)))}b.document&&b.document.referrer&&c.push("referrer="+encodeURIComponent(b.document.referrer.substring(0,512)));return c.join("&")};var fja=function(){};var gja=function(){},hja=function(a){var b={};
b.adk=a.adk||1;u.extend(b,$D(a));uE.dbg.adBlocksRegistered=Ge.__google_lidar_;var c=wE(uE,Ge);u.extend(b,c);c=eja(void 0!==c.url);ti(c,function(d,e){return b[d]=e});
b.itpl=Number(mC(a.creativeSearchResults.markedUpElement,"googleAvItpl"))||0;return b};var ija=/(?:\[|%5B)([a-zA-Z0-9_]+)(?:\]|%5D)/g,xE=function(a,b){return a.replace(ija,function(c,d){try{var e=u.get(b,d);if(null==e)return c;e=e.toString();if(""==e||!gc(xd(e)))return encodeURIComponent(e).replace(/%2C/g,",")}catch(g){}return c})};var yE=function(a){this.payloadBuilder_=new fja;this.buildAdMetrics_=a};
yE.prototype.buildUrl_=function(a,b,c){return 14===c.requestSource||16===c.requestSource?(c={},c.VIEWABILITY=b,xE(a,c)):a+"&"+b};
yE.prototype.report=function(a,b,c){var d=this.buildAdMetrics_(a);(0,u.extend)(d,(0,u.filter)(c,function(e,g){return"id"!=g}));
d=Ia(d)?AD(zD(new yD,d)):"";b=CD(c.id,Eia(a,b),a.avi_,a.activeviewCid_,a.avihost_,void 0);b=k(b);for(c=b.next();!c.done;c=b.next())if(c=c.value)c=this.buildUrl_(c,d,a),1==jC(a.featureSet,"sbeos")?eia(c)||ED(c.toString()+"&sberr=1"):ED(c);return!0};var zE=function(){var a=new gja;this.payloadBuilder_=new fja;this.metricsBuilder_=a};
zE.prototype.buildUrl_=function(a,b,c){return 14===c.requestSource||16===c.requestSource?(c={},c.VIEWABILITY=b,xE(a,c)):a+"&"+b};
zE.prototype.report=function(a,b,c){var d=hja(a);(0,u.extend)(d,(0,u.filter)(c,function(e,g){return"id"!=g}));
d=Ia(d)?AD(zD(new yD,d)):"";b=CD(c.id,Eia(a,b),a.avi_,a.activeviewCid_,a.avihost_,void 0);b=k(b);for(c=b.next();!c.done;c=b.next())if(c=c.value)c=this.buildUrl_(c,d,a),ED(c);return!0};var AE=function(a,b){this.sent_=!1;this.reporter_=a;this.pingId_=b};
l(AE,XD);AE.prototype.maybeSendOneTimePing=function(a,b){b.id=this.pingId_;var c="lidar2"===this.pingId_?1:2;return this.meetsCriteria(a)?this.reporter_.report(a,c,b):!1};
AE.prototype.meetsCriteria=function(){return!0};var BE=function(a){AE.call(this,a,"lidartos")};
l(BE,AE);BE.prototype.meetsCriteria=function(a){return a.shouldSendTimeOnScreenPing&&!a.isUnmeasurableImpression&&a.isViewed()};var CE=function(a){AE.call(this,a,"lidar2")};
l(CE,AE);CE.prototype.meetsCriteria=function(a){return a.isUnmeasurableImpression};var jja=function(){},kja=function(a){return 1==!jC(a.featureSet,"ud")||1==jC(a.featureSet,"ue")},lja=function(a,b,c){var d=eja(void 0!==b.url);
ti(d,function(e,g){return b[e]=g});
mb(a,function(e,g){if(3!=(e.isUnmeasurableImpression||0>=kD(e.getPosition())?2:e.isViewed()?4:3)||kja(e)||5!=e.requestSource){b.adk=e.adk||g+1;u.extend(b,$D(e));c&&(b.avms=c.getName());b.itpl=Number(mC(e.creativeSearchResults.markedUpElement,"googleAvItpl"))||0;var h=e.shouldSendTimeOnScreenPing&&!e.isUnmeasurableImpression&&e.isViewed();g=new yE(function(){return u.clone(b)});
h?(h={},g.report(e,2,(h.id="lidar2",h.tsf=1,h)),e.shouldSendTimeOnScreenPing=!1):(h={},g.report(e,1,(h.id="lidar2",h)),e.activeviewPingSent=!0)}})};
jja.prototype.sendNoAdsFoundPing=function(a,b){b.nd=a;ED("//pagead2.googlesyndication.com/pagead/gen_204?id=lidar2&"+(Ia(b)?AD(zD(new yD,b)):""))};
var mja=function(a,b){mb(a,function(c,d){new BE(new yE(function(){b.adk=c.adk||d+1;u.extend(b,$D(c));b.itpl=Number(mC(c.creativeSearchResults.markedUpElement,"googleAvItpl"))||0;return b})).maybeSend(c);
c.shouldSendTimeOnScreenPing=!1})};var DE=function(a){AE.call(this,a,"lidar2")};
l(DE,AE);DE.prototype.maybeSend=function(a,b){b=void 0===b?{}:b;b.r="v";AE.prototype.maybeSend.call(this,a,b);a.activeviewPingSent=a.activeviewPingSent||this.sent_};
DE.prototype.meetsCriteria=function(a){return a.isViewed()&&!a.activeviewPingSent};var EE=function(){this.hasStarted=this.isInitialized_=this.suppressNoAdBlockPingDueToOsdMonitoring=!1;this.pingDispatcher_=new jja;cja()};
EE.prototype.hasLidarStarted=function(){return this.hasStarted};
EE.prototype.initialize=function(){if(!this.isInitialized_){this.isInitialized_=!0;var a=SC.getInstance();a.binaryContext=2;uE.pingId_="lidar";fD(Ge,"unload",function(){FE("u")},171);
1==jC(a.featureSet,"phell")&&fD(Ge,"pagehide",function(){FE("ph")},498)}};
var nja=function(){return rb(fE.displayAdBlocks_,function(a){return!a.activeviewPingSent||a.shouldSendTimeOnScreenPing||Gia(a)})},oja=function(){if(!nja()){uE.done=!0;
fE.reset();var a=uE;a.startMonitored_=!1;Ij(a.handleScrollEvent_)&&(Qi(Ge,"scroll",a.handleScrollEvent_),a.handleScrollEvent_=null);a.scrollThrottler_&&(a.scrollThrottler_.dispose(),a.scrollThrottler_=null);Ij(a.handleResizeEvent_)&&(Qi(Ge,"resize",a.handleResizeEvent_),a.handleResizeEvent_=null);a.resizeThrottler_&&(a.resizeThrottler_.dispose(),a.resizeThrottler_=null);a.protectedHandleTabVisibilityEvent_&&(wC().pageVisibility.removeStateChangeHandler(a.protectedHandleTabVisibilityEvent_),a.protectedHandleTabVisibilityEvent_=
null);a=eE(fE);for(var b,c=0;c<a.length;++c)b=a[c],b.creativeSearchResults.monitoredElement&&RD(b);a=iE.getInstance();null!=a.selectedStrategy_&&(a.selectedStrategy_.dispose(),a.selectedStrategy_=null)}},pja=function(a,b){if(SC.getInstance().unmeasurableReason){var c=SC.getInstance().unmeasurableReason;
a.handleUnmeasurableImpression_(b,c)}else b.setElementLoaded(),b.updatePositionAndArea(Ge,iD.getInstance().insideCrossDomainIframe)},IE=function(a){var b=void 0===b?!0:b;
try{if(qja(a)){a.hasStarted=!0;var c=iD.getInstance(),d=dD();bD=d;var e=SC.getInstance();e.pollingFrequencyScheme=947190542;dja=CB(Ge,!1).win;var g=uE.dbg;g.initTime=dD()-d;g.adBlocksFound=0;b&&GE(a,d,a.getActiveViewDivs());var h=fE.displayAdBlocks_;g.adBlocksFound=h.length;Ge.__google_lidar_adblocks_count_=h.length;if(c.inAppContext||qc(Kc,"CrKey")||qc(Kc,"PlayStation")||qc(Kc,"Roku")||Qha()||qc(Kc,"Xbox")||Rha()||Sha()||!wC().pageVisibility.isUnknown()){if(1>h.length)a.suppressNoAdBlockPingDueToOsdMonitoring?
uE.done=!0:FE("n");else{aja();var m=iE.getInstance();if(null==m.availableStrategies_){var n=rja(e.featureSet);m.availableStrategies_=n}m.selectStrategy(function(p,x){return FE(p,x)})?uE.done||(sja(),bja(),Wia()):c.inAppContext?(HE(h,"w"),FE("w")):(HE(h,"i"),FE("i"))}}else HE(h,"pv"),FE("pv")}}catch(p){throw fE.reset(),FE("x"),p;
}},HE=function(a,b){SC.getInstance().unmeasurableReason=b;
mb(a,function(c){return c.isUnmeasurableImpression=!0})},sja=function(){wC().setTimeout(ZC(176,function(){return FE("t")}),36E5)},qja=function(a){return a.hasStarted||uE.done?!1:wC().checkActiveViewRequirements()?!0:(FE("c"),!1)},FE=function(a,b){uE.sampler.cancel();
if(!uE.done){var c=fE.displayAdBlocks_;vE(uE,c,!0);if(!uE.done){var d=nb(c,function(g){return!g.activeviewPingSent}),e={};
a=(e.r=a,e);b&&u.extend(a,b.getLogParams());uE.dbg.adBlocksRegistered=Ge.__google_lidar_;e=wE(uE,Ge,!1);u.extend(a,e);0==d.length||lja(d,a,b);mja(c,a);uE.done=!0}}},tja=function(a,b,c,d){var e=new YD(Ge,"",b,d,c,Ta,[],[new DE(new zE())]);
e.measurementUpdateCallback=function(g){for(var h=[],m=0;m<arguments.length;++m)h[m-0]=arguments[m];return a.handleMeasurementUpdate_.apply(a,ka(h))};
e.unmeasurableImpressionCallback=function(g){for(var h=[],m=0;m<arguments.length;++m)h[m-0]=arguments[m];return a.handleUnmeasurableImpression_.apply(a,ka(h))};
d=RC().stopwatch_;e.measurementUpdateCallback=QC(d,e.measurementUpdateCallback);e.unmeasurableImpressionCallback=QC(d,e.unmeasurableImpressionCallback);Nia([e]);Cha(b,QC(d,function(){pja(a,e);1==jC(e.featureSet,"lcs")&&e.creativeSearchResults.markedUpElement&&lha(e.creativeSearchResults,8==c);if(a.hasStarted){var g=iE.getInstance();null!=g.selectedStrategy_?pia(e,g.selectedStrategy_):(g=SC.getInstance(),tia(e,g.measurementStrategy,function(h){for(var m=[],n=0;n<arguments.length;++n)m[n-0]=arguments[n];
return a.handleUnmeasurableImpression_.apply(a,ka(m))}));
$ia(e)}else IE(a)}));
return e},wja=function(a,b,c){c=void 0===c?dD():c;
a.initialize();!b._avi_&&b.id&&u.forEach(Ge[b.id+"_avData"],function(e,g){g in Object.prototype||"undefined"==typeof e||(b[g]=e)});
var d=uja(b);if(0==d||null!=dE(fE,b))return null;14===d&&(SC.getInstance().binaryContext=8);return vja(b,d)?(a.suppressNoAdBlockPingDueToOsdMonitoring=!0,null):tja(a,b,d,c)};
EE.prototype.getActiveViewDivs=function(){return[]};
var GE=function(a,b,c){var d=[];mb(c,function(e){(e=wja(a,e,b))&&d.push(e)});
return d},vja=function(a,b){var c=Ge.osdpcls;
if(a){var d=String(a._avi_||"");a=String(a._avicxn_||mC(a,"googleAvCxn")||"");d=""==a?d:a}else d="";return 5==b&&d&&c&&Za(c)?c(d):!1},uja=function(a){if(!a)return 0;
var b=mC(a,"googleAvRs");if(null!=b)switch(Number(b)){case 6:return 5;case 9:if((b=mC(a,"googleAvMetadata"))&&-1!==b.indexOf("gcm=1"))return 8;b=new yD;b.add("r","lidar_gma_unexpected_element");b.add("cxn",mC(a,"googleAvCxn"));b.add("adk",mC(a,"googleAvAdk"));b.add("itpl",mC(a,"googleAvItpl"));a=new BD(b);ED(a);return 0;case 15:return 14;case 16:return 15;case 17:return 16;default:return 0;}if(!a.id)return 0;a=a.id;return ec(a,"DfaVisibilityIdentifier")?5:ec(a,"YtKevlarVisibilityIdentifier")?14:ec(a,
"YtSparklesVisibilityIdentifier")?16:0};
EE.prototype.handleUnmeasurableImpression_=function(a,b){if(a&&!uE.done&&(a.isUnmeasurableImpression=!0,!a.activeviewPingSent)){var c=new CE(new zE()),d={};c.maybeSend(a,(d.r=b,d));a.activeviewPingSent=c.sent_}oja()};
EE.prototype.handleMeasurementUpdate_=function(a){if(a){if(!uE.done&&a instanceof YD&&(zia(a),!uE.done&&a.isViewed()&&Gia(a)&&a.cpmavViewUrl)){var b=a.cpmavViewUrl;if($ba())Ri(window,b,null,!0);else{var c=q.document;if(c.body){var d=c.getElementById("goog-srcless-iframe");d||(d=new Zg(c).createElement("IFRAME"),d.style.display="none",d.id="goog-srcless-iframe",c.body.appendChild(d));c=d}else c=null;c&&c.contentWindow&&Ri(c.contentWindow,b,null,!0)}a.cpmavViewUrlInvoked=!0}oja()}};var JE=function(a,b,c){vD.call(this,null,a,b,c)};
l(JE,jE);JE.prototype.getName=function(){return"omid"};
JE.prototype.handleViewportObservationUpdate=function(a){this.elementGeometry=iD.getInstance().frameViewportBox||new Ui(0,0,0,0);jE.prototype.handleViewportObservationUpdate.call(this,a)};var KE={},xja=(KE.notFound=!0,KE.hidden=!0,KE.backgrounded=!0,KE),LE=function(){pD.call(this,Ge,2,"omid");this.verificationClient_=WB.getInstance();var a=WB.getInstance();this.isOmidSupported_=!(!a.communication&&!a.omid3p);iC(SC.getInstance().featureSet,"oms",this.isOmidSupported_?1:0);this.reasons_=[];this.sessionType_=this.integrationPartner_=this.appInfo_=this.verificationParameters_=this.externalVideoEventCallback_=void 0;this.lastPlayerState_="normal"};
l(LE,pD);var zja=function(a){a.verificationClient_.addEventListener("geometryChange",function(b){ME(397,function(){return yja(a,b)})})},Bja=function(a){var b=function(c){ME(399,function(){return Aja(a,c)})};
mb("loaded start firstQuartile midpoint thirdQuartile complete pause resume bufferStart bufferFinish skipped volumeChange playerStateChange adUserInteraction impression".split(" "),function(c){a.verificationClient_.addEventListener(c,b)})},Dja=function(a){Oga(a.verificationClient_,function(b){ME(398,function(){return Cja(a,b)})})},yja=function(a,b){NE(b,function(c,d,e,g){e=g.viewport;
c=iD.getInstance().screenSize;d=iD.getInstance().browserViewportBox;null!=e&&null!=e.width&&null!=e.height&&(c=new Yg(e.width,e.height).floor(),d=new Ui(0,e.width,e.height,0).floor());var h=g.adView,m=h.geometry,n=h.onScreenGeometry;g=new Ui(0,0,0,0);e=new Ui(0,0,0,0);var p=null;Eja(n)&&Eja(m)&&(g=new Ui(n.y,n.x+n.width,n.y+n.height,n.x).floor(),e=new Ui(m.y,m.x+m.width,m.y+m.height,m.x).floor(),null!=h.percentageInView&&(p=h.percentageInView/100));a.reasons_=h.reasons||[];h=!a.reasons_.some(function(x){return xja[x]});
Fja(a,c,d,e,g,p,h,a.currentObservation.volume)})},Aja=function(a,b){NE(b,function(c,d,e,g){if("impression"!=e){var h=a.currentObservation.volume,m=!1;
if(wb(["start","volumeChange"],e)){h=g.videoPlayerVolume;var n=g.deviceVolume;h=Ma(h)&&Ma(n)?h*n:null;null!=h&&(a.currentObservation.volume=h,m=!0)}"playerStateChange"==e&&null!=g.state&&(a.lastPlayerState_=g.state,m=!0);n=iD.getInstance();m&&Fja(a,n.screenSize,n.browserViewportBox,n.frameViewportBox,a.currentObservation.visibleGeometry,a.currentObservation.frameExposure,a.currentObservation.tabVisible,h)}Za(a.externalVideoEventCallback_)&&a.externalVideoEventCallback_(c,d,e,g)})},Cja=function(a,
b){NE(b,function(c,d,e,g){"sessionStart"==e&&g.context&&(a.verificationParameters_=g.verificationParameters,a.appInfo_=g.context.app,a.sessionType_=g.context.adSessionType,g.context.omidNativeInfo&&g.context.omidNativeInfo.partnerName&&(a.integrationPartner_=g.context.omidNativeInfo.partnerName))})},Eja=function(a){return null!=a&&sb(["x",
"y","width","height"],function(b){return a.hasOwnProperty(b)})},NE=function(a,b){null!=a&&null!=a.adSessionId&&null!=a.timestamp&&null!=a.type?b(a.adSessionId,a.timestamp,a.type,a.data||{}):(a=Error("OMSDK event missing some data: "+JSON.stringify(a)),$C(543,a))},ME=function(a,b){try{b.apply()}catch(c){$C(a,c)}},Fja=function(a,b,c,d,e,g,h,m){var n=VD.getInstance();
if(n.isVisible_!==h){n.isVisible_=h;n=k(n.stateChangeCallbacks_);for(var p=n.next();!p.done;p=n.next())p=p.value,p(null)}"minimized"==a.lastPlayerState_&&(e=new Ui(0,0,0,0));n=iD.getInstance();e=e||new Ui(0,0,0,0);p=tD(a);n.screenSize=b;n.browserViewportBox=c;n.frameViewportBox=d;p.visibleGeometry=e;p.frameExposure=g;p.tabVisible=h;p.volume=m;uD(a,p)};
f=LE.prototype;f.setVideoEventCallback=function(a){this.externalVideoEventCallback_=a};
f.getVerificationParameters=function(){return this.verificationParameters_};
f.measureBrowserViewportBox=function(){};
f.measureScreenSize=function(){};
f.measureDocumentSize=function(){};
f.measureFrameViewportBox=function(){};
f.shouldBeUsedForMeasurement=function(){var a=SC.getInstance();return 6===a.binaryContext||5===a.binaryContext?this.canBeUsed():1==jC(a.featureSet,"omid")&&this.canBeUsed()};
f.canBeUsed=function(){return this.isOmidSupported_};
f.getLogParams=function(){var a={};this.canBeUsed()&&(Xa(this.reasons_)&&0<this.reasons_.length&&(a.omidr=pb(this.reasons_.slice(0,5),function(b){return String(b).slice(0,2)}).join(",")),this.appInfo_&&(this.appInfo_.libraryVersion&&(a.omidv=this.appInfo_.libraryVersion),this.appInfo_.appId&&(a.omida=this.appInfo_.appId)),this.integrationPartner_&&(a.omidp=this.integrationPartner_),this.sessionType_&&(a.omids=this.sessionType_.charAt(0)));
return a};
f.initialize=function(){var a=this;!this.isInitialized&&this.isOmidSupported_&&(this.isInitialized=!0,ME(391,function(){return Dja(a)}),ME(390,function(){return zja(a)}),ME(392,function(){return Bja(a)}))};
Ua(LE);var OE=function(){wD.call(this,LE.getInstance())};
l(OE,wD);f=OE.prototype;f.getName=function(){return"omid"};
f.createInstance=function(a,b,c){return new JE(this.viewportProvider,b,c)};
f.canBeUsed=function(){return this.viewportProvider.canBeUsed()};
f.shouldBeUsedForMeasurement=function(){return this.viewportProvider.shouldBeUsedForMeasurement()};
f.init=function(){this.viewportProvider.initialize();return!0};
f.dispose=function(){this.viewportProvider.dispose();wD.prototype.dispose.call(this)};var PE=function(){pD.call(this,Ge,2,"iem")};
l(PE,pD);PE.prototype.getUpdatedVisibleGeometry=function(){var a=this,b=new Ui(0,this.win.innerWidth||this.win.width,this.win.innerHeight||this.win.height,0),c=oh(document),d=function(B,G){return!!a.win.document.elementFromPoint(B,G)},e=Math.floor(b.left-c.x),g=Math.floor(b.top-c.y),h=Math.floor(b.right-c.x),m=Math.floor(b.bottom-c.y);
b=d(e,g);c=d(h,m);if(b&&c)return new Ui(g,h,m,e);var n=d(h,g),p=d(e,m);if(b)m=QE(g,m,function(B){return d(e,B)}),h=QE(e,h,function(B){return d(B,g)});else
if(n)m=QE(g,m,function(B){return d(h,B)}),e=QE(h,e,function(B){return d(B,g)});else
if(p)g=QE(m,g,function(B){return d(e,B)}),h=QE(e,h,function(B){return d(B,m)});else
if(c)g=QE(m,g,function(B){return d(h,B)}),e=QE(h,e,function(B){return d(B,m)});else
{var x=Math.floor((e+h)/2),y=Math.floor((g+m)/2);if(!d(x,y))return new Ui(0,0,0,0);g=QE(y,g,function(B){return d(x,B)});
m=QE(y,m,function(B){return d(x,B)});
e=QE(x,e,function(B){return d(B,y)});
h=QE(x,h,function(B){return d(B,y)})}return new Ui(g,h,m,e)};
var QE=function(a,b,c){if(c(b))return b;for(var d=15;d--;){var e=Math.floor((a+b)/2);if(e==a||e==b)break;c(e)?a=e:b=e}return a};
f=PE.prototype;f.canBeUsed=function(){var a;if(a=iD.getInstance().insideCrossDomainIframe)a=this.win,a=Ne&&$e(8)&&eD(a);return a};
f.measureBrowserViewportBox=function(){};
f.measureScreenSize=function(){};
f.measureDocumentSize=function(){};
f.measureFrameViewportBox=function(){};
Ua(PE);var Gja={ADD_EVENT_LISTENER:"addEventListener",GET_MAX_SIZE:"getMaxSize",GET_SCREEN_SIZE:"getScreenSize",GET_STATE:"getState",GET_VERSION:"getVersion",REMOVE_EVENT_LISTENER:"removeEventListener"},RE=function(){pD.call(this,Ge,2,"mraid");var a=this;this.mraidVersion_=0;this.receivedMraidCustomEvent_=this.usingMraidCustomMeasurement_=!1;this.secondaryErrorCode_=null;this.waitedForPageLoad_=!1;this.readyTimeout_=0;this.situation_=-1;this.mraid_=null;var b=yha(this.win);b&&(this.mraid_=b.mraid,this.situation_=
b.situation);this.mraid_&&!u.every(Gja,function(c){return Za(a.mraid_[c])})&&(this.mraid_=null,this.situation_=-1);
this.currentObservation.visibleGeometry=new Ui(0,0,0,0)};
l(RE,pD);RE.prototype.canBeUsed=function(){return null!=this.mraid_};
RE.prototype.getLogParams=function(){var a={};this.mraidVersion_&&(a.mraid=this.mraidVersion_);this.usingMraidCustomMeasurement_&&(a.mlc=1);this.situation_&&(a.mtop=this.situation_);this.secondaryErrorCode_&&(a.mse=this.secondaryErrorCode_);return a};
RE.prototype.safelyCallMraid_=function(a,b){for(var c=[],d=1;d<arguments.length;++d)c[d-1]=arguments[d];try{return this.mraid_[a].apply(this.mraid_,c)}catch(e){$C(538,e,.01,function(g){g.method=a})}};
RE.prototype.getMraidVersion=function(){if(this.mraidVersion_)return this.mraidVersion_;var a=this.safelyCallMraid_("getVersion"),b=NaN;if(Ka(a)||Ma(a))b=Ed(a);return this.mraidVersion_=isFinite(b)?b:-1};
var SE=function(a,b,c){a.safelyCallMraid_("removeEventListener",b,c)};
RE.prototype.getWaitedForPageLoad=function(){return this.waitedForPageLoad_};
RE.prototype.initialize=function(){var a=this;if(!this.isInitialized){this.isInitialized=!0;a:switch(this.situation_){case 0:case 3:var b=!0;break a;default:b=!1;}b?(iD.getInstance().mustAssumeTabVisible=!0,this.win.document.readyState&&"complete"==this.win.document.readyState?(this.waitedForPageLoad_=!1,Hja(this)):(this.waitedForPageLoad_=!0,fD(this.win,"load",function(){wC().setTimeout(ZC(292,function(){return Hja(a)}),100)},292))):qD(this,"i")}};
var Hja=function(a){"loading"===a.safelyCallMraid_("getState")?(Ija(a),a.safelyCallMraid_("addEventListener","ready",TE)):Jja(a)},Ija=function(a){0==a.readyTimeout_&&(a.readyTimeout_=wC().setTimeout(ZC(293,function(){a.readyTimeout_=-1;
SE(a,"ready",TE);$C(539,Error());a.secondaryErrorCode_="rt";qD(a,"w")}),500))},Jja=function(a){a.readyTimeout_=-1;
Ka(a.mraid_.AFMA_LIDAR)?(a.usingMraidCustomMeasurement_=!0,Kja(a)):(a.secondaryErrorCode_="nc",qD(a,"w"))},Kja=function(a){a.receivedMraidCustomEvent_=!1;
wC().setTimeout(ZC(524,function(){a.receivedMraidCustomEvent_||(Lja(a),$C(540,Error()),a.secondaryErrorCode_="mt",qD(a,"w"))}),500);
Ia(a.mraid_.AFMA_LIDAR_EXP_1)&&(a.mraid_.AFMA_LIDAR_EXP_1=!0);a.safelyCallMraid_("addEventListener",a.mraid_.AFMA_LIDAR,Mja)},Lja=function(a){SE(a,a.mraid_.AFMA_LIDAR,Mja);
a.usingMraidCustomMeasurement_=!1};
RE.prototype.measureBrowserViewportBox=function(){var a=iD.getInstance(),b=Nja(this,"getMaxSize");a.browserViewportBox=new Ui(0,b.width,b.height,0)};
RE.prototype.measureScreenSize=function(){iD.getInstance().screenSize=Nja(this,"getScreenSize")};
var Nja=function(a,b){if("loading"===a.safelyCallMraid_("getState"))return new Yg(-1,-1);b=a.safelyCallMraid_(b);if(!b)return new Yg(-1,-1);a=parseInt(b.width,10);b=parseInt(b.height,10);return isNaN(a)||isNaN(b)?new Yg(-1,-1):new Yg(a,b)};
RE.prototype.dispose=function(){Lja(this);pD.prototype.dispose.call(this)};
var TE=function(){try{var a=RE.getInstance();0<a.readyTimeout_&&wC().clearTimeout(a.readyTimeout_);SE(a,"ready",TE);Jja(a)}catch(b){$C(541,b)}},Mja=function(a,b){try{var c=RE.getInstance();
c.receivedMraidCustomEvent_=!0;var d=a?new Ui(a.y,a.x+a.width,a.y+a.height,a.x):new Ui(0,0,0,0);var e=tD(c);e.visibleGeometry=d;e.volume=b;uD(c,e)}catch(g){$C(542,g)}};
Ua(RE);var UE=function(){EE.call(this);this.waitForActiveViewDivStartTime_=0};
l(UE,EE);UE.prototype.lidarMain=function(){var a=this;if(Ge.__google_lidar_){if(Ge.__google_lidar_+=1,Ge.__google_lidar_adblocks_count_){var b=Ge.__google_lidar_radf_;b&&Za(b)&&b()}}else{Ge.__google_lidar_=1;this.initialize();b=RC().stopwatch_;Ge.__google_lidar_radf_=QC(b,function(d){for(var e=[],g=0;g<arguments.length;++g)e[g-0]=arguments[g];return a.recheckActiveViewDivs_.apply(a,ka(e))});
var c=Ge.document.readyState;c&&"complete"===c?this.waitForActiveViewDivAndInit_():(Pi(Ge,"load",QC(b,function(){wC().setTimeout(ZC(172,function(d){for(var e=[],g=0;g<arguments.length;++g)e[g-0]=arguments[g];return a.handlePageLoad_.apply(a,ka(e))}),100)})),fD(Ge,"DOMContentLoaded",function(d){for(var e=[],g=0;g<arguments.length;++g)e[g-0]=arguments[g];
return a.handleDomContentLoaded_.apply(a,ka(e))},173))}};
UE.prototype.handlePageLoad_=function(){var a=this;mb(fE.displayAdBlocks_,function(b){return pja(a,b)});
this.waitForActiveViewDivAndInit_()};
UE.prototype.handleDomContentLoaded_=function(){var a=this;qja(this)&&Eha(QC(RC().stopwatch_,function(){if(!a.hasStarted){var b=uE.dbg;b.creativeOnDCLSearches+=1;var c=a.getActiveViewDivs();if(c.length)try{var d=GE(a,-1,c);1<b.creativeOnDCLSearches&&(b.creativesAfterFirstSearch+=nb(d,function(e){return null!=e}).length)}catch(e){}}}))};
UE.prototype.waitForActiveViewDivAndInit_=function(){var a=this,b=dD(),c=uE.dbg;c.creativeOnLoadSearches+=1;var d=this.getActiveViewDivs();if(d.length){if(this.hasStarted)try{var e=GE(this,b,d);1<c.creativeOnLoadSearches&&(c.creativesAfterFirstSearch+=nb(e,function(g){return null!=g}).length)}catch(g){}else IE(this);}else
this.waitForActiveViewDivStartTime_||(this.waitForActiveViewDivStartTime_=b),1E3<=b-this.waitForActiveViewDivStartTime_?IE(this):wC().setTimeout(ZC(175,function(g){for(var h=[],m=0;m<arguments.length;++m)h[m-0]=arguments[m];return a.waitForActiveViewDivAndInit_.apply(a,ka(h))}),100)};
var rja=function(a){if(1==jC(a,"omid"))return[new OE];a=[PE.getInstance(),RE.getInstance()];var b=[qE.getInstance()];return[new kE(a),new pE(Ge),new kE(b)]};
UE.prototype.recheckActiveViewDivs_=function(){var a=this.getActiveViewDivs();if(a.length)try{var b=dD(),c=GE(this,b,a);mb(c,function(d){d.recheckedActiveViewDivs_=!0})}catch(d){}};
UE.prototype.getActiveViewDivs=function(){return Jb(pb(Hha,function(a){a=eh(a,void 0);return Cb(a)}))};
Ua(UE);var Oja=function(a,b){Hj(a,function(c,d){b[d]=c})},Pja=function(a){var b=a.location.href;
if(a==a.top)return{url:b,isTopUrl:!0};var c=!1,d=a.document;d&&d.referrer&&(b=d.referrer,a.parent==a.top&&(c=!0));(a=a.location.ancestorOrigins)&&(a=a[a.length-1])&&-1==b.indexOf(a)&&(c=!1,b=a);return{url:b,isTopUrl:c}},Qja=function(){var a=Ti();
if(a==a.top)return 0;for(;a&&a!=a.top&&Ii(a);a=a.parent){if(a.sf_)return 2;if(a.$sf)return 3;if(a.inGptIF)return 4;if(a.inDapIF)return 5}return 1};var Rja={google:1,googlegroups:1,gmail:1,googlemail:1,googleimages:1,googleprint:1},Sja=/(corp|borg)\.google\.com:\d+$/;var VE=function(a){a=a.google_reactive_ad_format;return u.contains(nga,a)?""+a:null},Tja=function(a){return!!VE(a)||null!=a.google_pgb_reactive};var Uja=function(a,b){if(b=VE(b)){if("32"==b)return 1;if("30"==b)return 0}a:{for(b=Ti();b&&Ii(b);){if(b.name&&-1!=b.name.indexOf("google_ifsl_cifr")){b=!0;break a}if(b.parent==b)break;b=b.parent}b=!1}if(b)return 3;if(!Ii(a))return 0;a=uB(a);return a.stateForType[32]?2:a.stateForType[30]?4:0};var Vja={9:"<<<RESPONSIVE_LINK_UNIT_HEIGHT_LIMIT_LOWER>>>",10:"<<<RESPONSIVE_LINK_UNIT_HEIGHT_LIMIT_WIDTH>>>",13:"<<<LATENCY_REPORTING_FRACTION>>>",22:"<<<JS_RNG_EXP_FRACTION>>>",24:"<<<ENABLE_CMS_DETECTION_EXP_FRACTION>>>",28:"<<<OSD_ACTIVEVIEW_MEASURABLE_FRACTION>>>",29:"<<<PAGE_LATENCY_REPORTING_FRACTION>>>",34:"<<<SANDBOX_IFRAME_FRACTION>>>",60:"<<<REAL_USER_MONITORING_FRACTION>>>",66:"<<<REAL_USER_MONITORING_WITH_FLAGS_FRACTION>>>",78:"<<<SANDBOX_IFRAME_CHROME_58_NON_DESKTOP_FRACTION>>>",79:"<<<CONTENT_RECOMMENDATION_PEDESTAL_MAX_WIDTH>>>",
82:"<<<VIEW_OPTIMIZED_MOBILE_SCALING_FACTOR>>>",96:"<<<FIXED_SIZE_TO_AUTO_RESPONSIVE_SLOT_MOD_LOWER>>>",97:"<<<FIXED_SIZE_TO_AUTO_RESPONSIVE_SLOT_MOD_WIDTH>>>",98:"<<<FULL_WIDTH_RESPONSIVE_ELIGIBILITY_FRACTION>>>",99:"<<<FULL_WIDTH_RESPONSIVE_CORE_MOD_LOWER>>>",100:"<<<FULL_WIDTH_RESPONSIVE_CORE_MOD_WIDTH>>>",103:"<<<OSD_START_ON_ELEMENT_LOADED_FRACTION>>>",111:"<<<SANDBOX_IFRAME_TOP_NAVIGATION_USER_GESTURE_FRACTION>>>",118:"<<<DISABLE_LAZY_LOAD>>>",120:"<<<FIXED_SIZE_TO_AUTO_RESPONSIVE_SLOT_HOLDBACK_MOD_LOWER>>>",
121:"<<<FIXED_SIZE_TO_AUTO_RESPONSIVE_SLOT_HOLDBACK_MOD_WIDTH>>>",126:"<<<ACTIVE_VIEW_MEASUREMENT_STRATEGY_VERIFICATION_FRACTION>>>",128:"<<<SHOULD_USE_IAB_CMPS>>>",129:"<<<USE_IAB_CMPS_EXP_FRACTION>>>",135:"<<<RUM_ENABLE_PPRUE_COLLECTION_FRACTION>>>",136:"<<<FULL_WIDTH_MANUAL_RESPONSIVE_DISABLED_FRACTION>>>",137:"<<<RUM_SCROLL_METRICS_FRACTION>>>",142:"<<<OBSERVE_OVERLAP_FREQUENCY>>>",149:"<<<AUTO_PAGE_LEVEL_TAG_LAB_MOD_LOWER>>>",150:"<<<AUTO_PAGE_LEVEL_TAG_LAB_MOD_WIDTH>>>",152:"<<<FIXED_SIZE_TO_AUTO_RESPONSIVE_SLOT_GA_HOLDBACK_MOD_LOWER>>>",
153:"<<<FIXED_SIZE_TO_AUTO_RESPONSIVE_SLOT_GA_HOLDBACK_MOD_WIDTH>>>",155:"<<<IMPROVE_COLLISION_DETECTION_HOLDBACK_FRACTION>>>",157:"<<<HARMONIZE_RESPONSIVE_BEHAVIOUR_MOD_LOWER>>>",158:"<<<HARMONIZE_RESPONSIVE_BEHAVIOUR_MOD_WIDTH>>>",160:"<<<BIG_FORMAT_AD_MOD_LOWER>>>",161:"<<<BIG_FORMAT_AD_MOD_WIDTH>>>",162:"<<<REMOVE_ASWIFT_REACTIVE_SLOTS_FRACTION>>>",165:"<<<REMOVE_ASWIFT_ALL_SLOTS_FRACTION>>>",173:"<<<RESPONSIVE_CORE_TO_RESPONSIVE_AUTO_MOD_LOWER>>>",174:"<<<RESPONSIVE_CORE_TO_RESPONSIVE_AUTO_MOD_WIDTH>>>",
176:"<<<LAZY_LOAD_FIRST_SLOT_FRACTION>>>",177:"<<<PAGE_HEIGHT_LOGGING_FRACTION>>>",179:"<<<AUTO_REACTIVE_REQUEST_MOD_LOWER>>>",180:"<<<AUTO_REACTIVE_REQUEST_MOD_WIDTH>>>",182:"<<<INTERSTITIAL_AD_ACCESSIBILITY_FRACTION>>>",185:"<<<REMOVE_CHROME_WORKAROUND_FRACTION>>>",189:"<<<ANTMAN_SIZELESS_ADS_MOD_LOWER>>>",190:"<<<ANTMAN_SIZELESS_ADS_MOD_WIDTH>>>",191:"<<<LAZY_LOAD_V2_FRACTION>>>",192:"<<<GFP_COOKIE_FRACTION>>>",193:"<<<INARTICLE_SPACE_RESERVATION_MOD_LOWER>>>",194:"<<<INARTICLE_SPACE_RESERVATION_MOD_WIDTH>>>",
197:"<<<IS_HARMONIZE_RESPONSIVE_EXPERIMENT_LAUNCHED>>>"};var WE=null,Wja=function(){this.dictionary_=Vja};
Wja.prototype.getBoolean=function(a){return /^true$/.test(this.dictionary_[a])};var XE={},Xja=(XE[16]=4,XE[27]=512,XE[26]=128,XE[32]=16,XE),Yja=function(a,b,c){switch(c){case 1:case 2:var d=0;try{d|=vB(a);var e=Math.min(a.screen.width||0,a.screen.height||0);d|=e?320>e?8192:0:2048;var g;if(g=a.navigator){var h=a.navigator.userAgent;g=/Firefox/.test(h)||/Android 2/.test(h)||/iPhone OS [34]_/.test(h)||/Windows Phone (?:OS )?[67]/.test(h)}d|=g?1048576:0}catch(x){d|=32}var m=0;try{m|=a.innerHeight>=a.innerWidth?0:8,m|=xB(a,pga),m|=yB(a)}catch(x){m|=32}if(2==c){a:{c=a.document;h=a.innerWidth;
e=uB(a).improveCollisionDetection;var n=Math.round(a.innerWidth/320*50+15);g=[];for(var p=0;3>p;p++)for(b=0;3>b;b++)g.push({x:b/2*h,y:p/2*n});for(h=0;h<g.length;h++){if((p=n=c.elementFromPoint(g[h].x,g[h].y))&&!(p="fixed"==dj(n))&&(p=1==e))b:{p=a.document;for(n=n.offsetParent;n&&n!=p.body;n=n.offsetParent)if("fixed"==dj(n)){p=!0;break b}p=!1}if(p){a=!0;break a}}a=!1}a&&(m|=16777216)}return d|m;case 8:d=0;try{d|=vB(a),d|=a.navigator&&/Android 2/.test(a.navigator.userAgent)?1048576:0}catch(x){d|=32}m=
0;try{m|=xB(a,pga),m|=yB(a),m|=a.innerHeight>=a.innerWidth?0:8}catch(x){m|=32}return d|m;case 9:d=0;try{d|=vB(a),d|=yB(a),d|=xB(a),d|=a.innerHeight>=a.innerWidth?0:8,d|=a.navigator&&/Android 2/.test(a.navigator.userAgent)?1048576:0}catch(x){d|=32}return d;case 32:d=0;try{d|=vB(a)}catch(x){d|=32}return d;case 16:return b.google_ad_resizable&&!b.google_reactive_ad_format&&a.navigator&&/iPhone|iPod|iPad|Android|BlackBerry/.test(a.navigator.userAgent)&&a.top==a?0:8388608;case 30:c=0;try{c|=vB(a);c|=a.getComputedStyle?
0:2097152;ji()||(c|=1048576);n=Math.floor(a.document.body.getBoundingClientRect().width);WE||(WE=new Wja);p=parseFloat(WE.dictionary_[79]);n<=(isNaN(p)?0:p)||(c|=32768);a:{m=a.document.getElementsByClassName("adsbygoogle");for(a=0;a<m.length;a++)if("autorelaxed"==mC(m[a],"adFormat")){d=!0;break a}d=!1}d&&(c|=33554432)}catch(x){c|=32}return c;case 26:d=0;try{d|=vB(a),d|=a.getComputedStyle?0:2097152,d|=a.document.querySelectorAll&&a.document.querySelector?0:4194304,d|=xB(a,1E4)}catch(x){d|=32}return d;
case 27:d=0;try{d|=vB(a),d|=a.getComputedStyle?0:2097152,d|=xB(a,1E4)}catch(x){d|=32}return d;default:return 32;}},Zja=function(a){if(!a.hash)return null;
var b=null;Hj(zga,function(c){!b&&Cga(a,c)&&(b=Aga[c])});
return b},aka=function(a,b){if(!b)return null;
var c=uB(b);if(!c.wasReactiveAdConfigHandlerRegistered)return null;var d=0;Hj(nga,function(e){var g=Xja[e];g&&0===$ja(a,b,e)&&(d|=g)});
c.wasPlaTagProcessed&&(d|=256);c.isReactiveTagFirstOnPage&&(d|=1024);return d?""+d:null},$ja=function(a,b,c){if(!b)return 256;
var d=0,e=uB(b),g=qga(e,c);if(a.google_reactive_ad_format==c||26!=c&&27!=c&&g)d|=64;var h=!1;Hj(e.reactiveTypeDisabledByPublisher,function(m,n){String(c)===n&&(h=!0)});
h&&Zja(b.location)!==c&&(d|=128);return d|Yja(b,a,c)};var bka={HTTPS_LAUNCH:5,EXTRA_REPORTING:7,JS_RNG:17,CMS_DETECTION:41,REACTIVE_MESSAGE_VERIFICATION:62,OSD_MEASURABLE:67,REQUEST_ANIMATION_FRAME:82,REQUEST_ANIMATION_FRAME_CAPABLE:83,PAGE_LATENCY_REPORTING:87,SANDBOX:88,CONTENT_RECOMMENDATION_PEDESTAL:89,DEPRECATE_IE89_FOR_AV:103,IDENTITY_TOKEN:106,VISIBILITY_HIDDEN:107,FORCE_HTTP:108,INTERSTITIAL_AD_ACCESSIBILITY_HOLDBACK:141,OSD_START_ON_ELEMENT_LOADED:114,ACTIVE_VIEW_MEASUREMENT_STRATEGY_VERIFICATION:124,USE_IAB_CMPS:126,ADSENSE_OSD_CREATIVE_TIMING_MASTER:128,
IMPROVE_COLLISION_DETECTION:132,REMOVE_ASWIFT_REACTIVE_SLOTS:134,LAZY_LOAD:138,PAGE_HEIGHT_LOGGING:139},YE=null,cka=function(a){try{return!!a&&Ke(!0)}catch(b){return!1}},dka=function(){if(cka(YE))return!0;
var a=HB();if(a=IB(a,3,null)){var b=void 0===b?!0:b;if(a&&a.dfltBktExt&&a.lrsExt){var c=new EB;c.defaultBucket=a.dfltBktExt;c.dfltBktExt=c.defaultBucket;c.layers=a.lrsExt;c.lrsExt=c.layers;b&&(c.experimentsFinalized_=!0);a=c}else a=null;a||(a=new EB,b={context:"ps::gpes::cf",url:Ti().location.href},mga("jserror",b))}b=a;return cka(b)?(YE=b,!0):!1},dga=function(){if(dka())return YE;
var a=HB(),b=new EB(Li(bka));return YE=a.S[sga[3]||"google_ps_3"]=b},ZE=null,eB=function(){ZE||(ZE=ega());
return ZE},eka={};
cga=!1;var fka=function(a){a=void 0===a?eB():a;return Jj(gB(a),function(b){return!!eka[b]})},gka=function(a){a=void 0===a?eB():a;
return Jj(gB(a),function(b){return!eka[b]})};Ke("script");/*
Copyright 2019 The AMP HTML Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS-IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
var hka={"image-top":0,"image-middle":1,"image-side":2,"text-only":3,"in-article":4};var $E=function(a){this.queue_=[];this.window_=a||window;this.state_=0;this.queuePauseTimeout_=null;this.timeoutCount_=0},aF;
f=$E.prototype;f.enqueue_=function(a,b){0!=this.state_||0!=this.queue_.length||b&&b!=window?this.enqueueForceAsync_(a,b):(this.state_=2,this.runJob_(new ika(a,window)))};
f.enqueueForceAsync_=function(a,b){this.queue_.push(new ika(a,b||this.window_));bF(this)};
f.pauseQueue_=function(a){this.state_=1;if(a){var b=tB(188,r(this.resumeQueue_,this,!0));this.queuePauseTimeout_=this.window_.setTimeout(b,a)}};
f.resumeQueue_=function(a){a&&++this.timeoutCount_;1==this.state_&&(null!=this.queuePauseTimeout_&&(this.window_.clearTimeout(this.queuePauseTimeout_),this.queuePauseTimeout_=null),this.state_=0);bF(this)};
f.statusz_=function(){return!(!window||!Array)};
f.getTimeoutCount_=function(){return this.timeoutCount_};
var bF=function(a){var b=tB(189,r(a.tryToRun_,a));a.window_.setTimeout(b,0)};
$E.prototype.tryToRun_=function(){if(0==this.state_&&this.queue_.length){var a=this.queue_.shift();this.state_=2;var b=tB(190,r(this.runJob_,this,a));a.win.setTimeout(b,0);bF(this)}};
$E.prototype.runJob_=function(a){this.state_=0;a.fn()};
var jka=function(a){try{return a.sz()}catch(b){return!1}};
$E.prototype.nq=$E.prototype.enqueue_;$E.prototype.nqa=$E.prototype.enqueueForceAsync_;$E.prototype.al=$E.prototype.pauseQueue_;$E.prototype.rl=$E.prototype.resumeQueue_;$E.prototype.sz=$E.prototype.statusz_;$E.prototype.tc=$E.prototype.getTimeoutCount_;var ika=function(a,b){this.fn=a;this.win=b};var lka=function(a,b,c,d,e){var g={};g.context=a;g.msg=b.substring(0,512);c&&(g.file=c);0<d&&(g.line=d.toString());g.sw=1;kka(g,e);return!0},kka=function(a,b,c){try{if(Math.random()<(b||.01)){var d="https://pagead2.googlesyndication.com/pagead/gen_204?id=jserror"+mka(a);
d=d.substring(0,2E3);var e=q.fetch(d,{mode:"no-cors"});c&&e.then(c,c)}}catch(g){}},mka=function(a){var b="";
Object.getOwnPropertyNames(a).forEach(function(c){var d=a[c];if(0===d||d)b+="&"+c+"="+encodeURIComponent(String(d))});
return b};var nka="adsafe channel client description_url durl google_ad_channel h h_ch iu kfa page_slots prev_ius prev_slotnames slotname tfcd video_url_to_fetch w".split(" "),oka=function(a){var b=!0;try{var c=a()}catch(h){try{var d=pB(h);a="";h.fileName&&(a=h.fileName);var e=-1;h.lineNumber&&(e=h.lineNumber);b=lka("cache_key.js",d,a,e)}catch(m){d=m;try{var g=pB(d);a="";d.fileName&&(a=d.fileName);e=-1;d.lineNumber&&(e=d.lineNumber);lka("pAR",g,a,e,void 0)}catch(n){kka({context:"mRE",msg:n.toString()+"\n"+(
n.stack||""),sw:1},void 0,void 0)}}if(!b)throw h}finally{}return c?String(c):""},pka=function(a){a=a.url;
return oi(Ka(a)?a:"")||""},qka=function(a,b){mb(nka,function(c){var d=a[c];
if(d||0===d||!1===d)La(d)&&(d=Number(d)),b(c,d)})},rka=function(a){return oka(function(){var b={};
qka(a,function(d,e){return b[d]=e});
b.domain=pka(a);var c=xi(b);return String(Mi(c))})};var cF=function(a,b,c){a-=b;return a>=(void 0===c?1E5:c)?"M":0<=a?a:"-M"};od("var i=this.id,s=window.google_iframe_oncopy,H=s&&s.handlers,h=H&&H[i],w=this.contentWindow,d;try{d=w.document}catch(e){}if(h&&d&&(!d.body||!d.body.firstChild)){if(h.call){setTimeout(h,0)}else if(h.match){try{h=s.upd(h,i)}catch(e){}w.location.replace(h)}}");var ska=/^\.google\.(com?\.)?[a-z]{2,3}$/,tka=/\.(cn|com\.bi|do|sl|ba|by|ma|am)$/,dF=q,eF,fF,gF=function(){dF=q;eF=dF.googleToken=dF.googleToken||{};var a=fb();eF[1]&&eF[3]>a&&0<eF[2]||(eF[1]="",eF[2]=-1,eF[3]=-1,eF[4]="",eF[6]="");fF=dF.googleIMState=dF.googleIMState||{};a=fF[1];ska.test(a)&&!tka.test(a)||(fF[1]=".google.com");Wa(fF[5])||(fF[5]=[]);La(fF[6])||(fF[6]=!1);Wa(fF[7])||(fF[7]=[]);Ma(fF[8])||(fF[8]=0)};Ke("script");var uka=tB(215,function(a){var b=a.google_sa_queue,c=b.shift();a.google_sa_impl||mga("shimpl",{t:"no_fn"});Za(c)&&qB.protectAndRun(216,c,void 0);b.length&&a.setTimeout(function(){return uka(a)},0)});var vka=/^blogger$/,wka=/^wordpress(.|\s|$)/i,xka=/^joomla!/i,yka=/^drupal/i,zka=/\/wp-content\//,Aka=/\/wp-content\/plugins\/advanced-ads/,Bka=/\/wp-content\/themes\/genesis/,Cka=/\/wp-content\/plugins\/genesis/,Dka=function(a){for(var b=a.getElementsByTagName("script"),c=b.length,d=0;d<c;++d){var e=b[d];if(e.hasAttribute("src")){e=e.getAttribute("src");if(Aka.test(e))return 5;if(Cka.test(e))return 6}}b=a.getElementsByTagName("link");c=b.length;for(d=0;d<c;++d)if(e=b[d],e.hasAttribute("href")&&(e=
e.getAttribute("href"),Bka.test(e)||Cka.test(e)))return 6;a=a.getElementsByTagName("meta");d=a.length;for(e=0;e<d;++e){var g=a[e];if("generator"==g.getAttribute("name")&&g.hasAttribute("content")){g=g.getAttribute("content");if(vka.test(g))return 1;if(wka.test(g))return 2;if(xka.test(g))return 3;if(yka.test(g))return 4}}for(a=0;a<c;++a)if(d=b[a],"stylesheet"==d.getAttribute("rel")&&d.hasAttribute("href")&&(d=d.getAttribute("href"),zka.test(d)))return 2;return 0};for(var hF="margin-left margin-right padding-left padding-right border-left-width border-right-width".split(" "),Eka=0;Eka<hF.length;Eka++);hF="margin-top margin-bottom padding-top padding-bottom border-top-width border-bottom-width".split(" ");for(var Fka=0;Fka<hF.length;Fka++);var Gka=/[+, ]/,Hka=function(a){try{if(a.parentNode)return a.parentNode}catch(e){return null}if(9===a.nodeType)a:{try{var b=ph(a);if(b){var c=b.frameElement;if(c&&Ii(b.parent)){var d=c;break a}}}catch(e){}d=null}else d=null;return d},Ika=function(a,b){if(a=a.consentStatus)a.requestNpa&&(b.npa=1),a.guci&&(b.guci=a.guci),a.vendorConsentData&&(b.vcd=a.vendorConsentData,a.googleVendorConsentData&&(b.gvcd=a.googleVendorConsentData))},Jka=function(a,b){var c=a.slotVars;
Hj(MA,function(d,e){b[d]=c[e]});
Ika(a,b);Hj(KA,function(d,e){b[d]=c[e]});
Hj(OA,function(d,e){b[d]=c[e]});
Tja(c)&&(a=VE(c),b.fa=a)},Kka=/YtLoPri/;var Lka=function(a){this.servicePromise_=a;this.resolvedService_=null;a.then(r(function(b){this.resolvedService_=b},this));
this.logger_=null},Nka=function(a,b,c){for(var d=Array(arguments.length-2),e=2;e<arguments.length;e++)d[e-2]=arguments[e];
e=Mka(a,b).then(function(g){return g.apply(null,d)});
return new Lka(e)},Oka={},Mka=function(a,b){var c=Oka[b];
if(c)return c;c=(c=Sa(b))?bw(c):new Yv(function(d,e){var g=new Zg(document).createElement("SCRIPT");g.async=!0;jd(g,dc(a));g.onload=g.onreadystatechange=function(){g.readyState&&"loaded"!=g.readyState&&"complete"!=g.readyState||d()};
g.onerror=e;(document.head||document.getElementsByTagName("head")[0]).appendChild(g)}).then(function(){var d=Sa(b);
if(!d)throw Error("Failed to load "+b+" from "+a);return d});
return Oka[b]=c},iF=function(a,b,c){a.servicePromise_.then(function(d){var e=d[b];
if(!e)throw Error("Method not found: "+b);return e.apply(d,c)})},Pka=function(a,b,c){if(a=a.resolvedService_)if(b=a[b])return b.apply(a,c)};var Qka=function(a){this.loader_=a},Rka=Sb("https://www.gstatic.com/feedback/js/help/prod/service/lazy.min.js");
f=Qka.prototype;f.startFeedback=function(a){iF(this.loader_,"startFeedback",arguments)};
f.startGuide=function(a,b){iF(this.loader_,"startGuide",arguments)};
f.stopGuide=function(){iF(this.loader_,"stopGuide",arguments)};
f.startHelp=function(a){iF(this.loader_,"startHelp",arguments)};
f.loadChatSupport=function(a){iF(this.loader_,"loadChatSupport",arguments)};
f.requestSurvey=function(a){iF(this.loader_,"requestSurvey",arguments)};
f.presentSurvey=function(a){iF(this.loader_,"presentSurvey",arguments)};
f.registerHelpAction=function(a,b,c){iF(this.loader_,"registerHelpAction",arguments)};
f.executeHelpAction=function(a,b){Pka(this.loader_,"executeHelpAction",arguments)};
f.isHelpActionApplicable=function(a){return!!Pka(this.loader_,"isHelpActionApplicable",arguments)};var jF=function(a){eg(this,a,0,null,null)};
t(jF,$f);jF.prototype.toObject=function(a){return kF(a,this)};
var kF=function(a,b){var c,d={id:null==(c=C(b,1))?void 0:c,receivedTimeMicros:null==(c=C(b,2))?void 0:c};a&&(d.$jspbMessageInstance=b);return d};
jF.prototype.serializeBinary=function(){var a=new Hf;lF(this,a);return Nf(a)};
var lF=function(a,b){var c=C(a,1);null!=c&&b.writeString(1,c);c=C(a,2);null!=c&&b.writeInt64(2,c)};
f=jF.prototype;f.getId=function(){return C(this,1)};
f.setId=function(a){return mg(this,1,a)};
f.clearId=function(){return mg(this,1,void 0)};
f.hasId=function(){return null!=C(this,1)};
f.getReceivedTimeMicros=function(){return C(this,2)};
f.clearReceivedTimeMicros=function(){return mg(this,2,void 0)};
f.hasReceivedTimeMicros=function(){return null!=C(this,2)};var mF=function(a){eg(this,a,0,Ska,null)};
t(mF,$f);var Ska=[2];f=mF.prototype;f.toObject=function(a){var b,c={acknowledgment:(b=E(this,jF,1))&&kF(a,b),ackList:fg(wg(this,jF,2),kF,a)};a&&(c.$jspbMessageInstance=this);return c};
f.serializeBinary=function(){var a=new Hf;var b=E(this,jF,1);null!=b&&Rf(a,1,b,lF);b=wg(this,jF,2);0<b.length&&Tf(a,2,b,lF);return Nf(a)};
f.clearAcknowledgment=function(){return xg(this,1,void 0)};
f.hasAcknowledgment=function(){return null!=C(this,1)};
f.addAck=function(a){Ag(this,2,a,jF,void 0)};
f.clearAckList=function(){return zg(this,2,[])};var nF=function(a){eg(this,a,0,null,null)};
t(nF,$f);nF.prototype.toObject=function(a){var b={};a&&(b.$jspbMessageInstance=this);return b};
nF.prototype.serializeBinary=function(){return Nf(new Hf)};var oF=function(a){eg(this,a,0,null,null)};
t(oF,$f);oF.prototype.toObject=function(a){return pF(a,this)};
var pF=function(a,b){var c,d={topicName:null==(c=C(b,1))?void 0:c,subscriber:ig(C(b,3)),kind:null==(c=C(b,4))?void 0:c,subscriptionName:ig(C(b,5))};a&&(d.$jspbMessageInstance=b);return d};
oF.prototype.serializeBinary=function(){var a=new Hf;qF(this,a);return Nf(a)};
var qF=function(a,b){var c=C(a,1);null!=c&&b.writeString(1,c);c=C(a,3);null!=c&&b.writeBytes(3,c);c=C(a,4);null!=c&&b.writeEnum(4,c);c=C(a,5);null!=c&&b.writeBytes(5,c)};
f=oF.prototype;f.getTopicName=function(){return C(this,1)};
f.setTopicName=function(a){mg(this,1,a)};
f.clearTopicName=function(){return mg(this,1,void 0)};
f.hasTopicName=function(){return null!=C(this,1)};
f.getSubscriber_asU8=function(){return jg(C(this,3))};
f.clearSubscriber=function(){return mg(this,3,void 0)};
f.hasSubscriber=function(){return null!=C(this,3)};
f.getKind=function(){return C(this,4)};
f.clearKind=function(){return mg(this,4,void 0)};
f.hasKind=function(){return null!=C(this,4)};
f.getSubscriptionName_asU8=function(){return jg(C(this,5))};
f.clearSubscriptionName=function(){return mg(this,5,void 0)};
f.hasSubscriptionName=function(){return null!=C(this,5)};var rF=function(a){eg(this,a,0,null,null)};
t(rF,$f);f=rF.prototype;f.toObject=function(a){var b,c={subscription:(b=this.getSubscription())&&pF(a,b),isPrivatePerUser:null==(b=hg(this,2))?void 0:b};a&&(c.$jspbMessageInstance=this);return c};
f.serializeBinary=function(){var a=new Hf;var b=this.getSubscription();null!=b&&Rf(a,1,b,qF);b=C(this,2);null!=b&&a.writeBool(2,b);return Nf(a)};
f.getSubscription=function(){return E(this,oF,1)};
f.setSubscription=function(a){return xg(this,1,a)};
f.clearSubscription=function(){return this.setSubscription(void 0)};
f.hasSubscription=function(){return null!=C(this,1)};
f.getIsPrivatePerUser=function(){return hg(this,2)};
f.clearIsPrivatePerUser=function(){return mg(this,2,void 0)};
f.hasIsPrivatePerUser=function(){return null!=C(this,2)};var sF=function(a){eg(this,a,0,null,null)};
t(sF,$f);f=sF.prototype;f.toObject=function(a){var b,c={commitTimestamp:null==(b=C(this,1))?void 0:b,fullTopicName:null==(b=C(this,2))?void 0:b};a&&(c.$jspbMessageInstance=this);return c};
f.serializeBinary=function(){var a=new Hf;var b=C(this,1);null!=b&&a.writeInt64String(1,b);b=C(this,2);null!=b&&a.writeString(2,b);return Nf(a)};
f.setCommitTimestamp=function(a){return mg(this,1,a)};
f.clearCommitTimestamp=function(){return mg(this,1,void 0)};
f.hasCommitTimestamp=function(){return null!=C(this,1)};
f.setFullTopicName=function(a){return mg(this,2,a)};
f.clearFullTopicName=function(){return mg(this,2,void 0)};var tF=function(a){eg(this,a,0,null,null)};
t(tF,$f);f=tF.prototype;f.toObject=function(a){var b,c={subscription:(b=this.getSubscription())&&pF(a,b)};a&&(c.$jspbMessageInstance=this);return c};
f.serializeBinary=function(){var a=new Hf;var b=this.getSubscription();null!=b&&Rf(a,1,b,qF);return Nf(a)};
f.getSubscription=function(){return E(this,oF,1)};
f.setSubscription=function(a){return xg(this,1,a)};
f.clearSubscription=function(){return this.setSubscription(void 0)};
f.hasSubscription=function(){return null!=C(this,1)};var uF=function(a){eg(this,a,0,null,null)};
t(uF,$f);uF.prototype.toObject=function(a){var b={};a&&(b.$jspbMessageInstance=this);return b};
uF.prototype.serializeBinary=function(){return Nf(new Hf)};var vF=function(a){eg(this,a,0,null,null)};
t(vF,$f);vF.prototype.toObject=function(a){return Tka(a,this)};
var Tka=function(a,b){var c={typeUrl:D(b,1,""),value:ig(b.getValue())};a&&(c.$jspbMessageInstance=b);return c};
vF.prototype.serializeBinary=function(){var a=new Hf;Uka(this,a);return Nf(a)};
var Uka=function(a,b){var c=D(a,1,"");0<c.length&&b.writeString(1,c);c=jg(a.getValue());0<c.length&&b.writeBytes(2,c)};
f=vF.prototype;f.getValue=function(){return D(this,2,"")};
f.setValue=function(a){return og(this,2,a,"")};
f.getTypeName=function(){return D(this,1,"").split("/").pop()};
f.pack=function(a,b,c){c||(c="type.googleapis.com/");"/"!=c.substr(-1)?rg(this,1,c+"/"+b):rg(this,1,c+b);this.setValue(a)};
f.packJspb=function(a,b,c){c||(c="type.googleapis.com/");"/"!=c.substr(-1)?rg(this,1,c+"/"+b):rg(this,1,c+b);mg(this,2,a.toArray())};
f.unpack=function(a,b){return this.getTypeName()==b?a(jg(this.getValue())):null};
f.unpackJspbCompat=function(a,b,c){return this.getTypeName()==c?(c=C(this,2),Array.isArray(c)?new a(c):b(jg(this.getValue()))):null};
f.unpackJspb=function(a,b){return this.getTypeName()==b?(b=D(this,2,[]),new a(b)):null};var wF=function(a){eg(this,a,0,Vka,null)};
t(wF,$f);var Vka=[3];f=wF.prototype;f.toObject=function(a){var b={code:D(this,1,0),message:D(this,2,""),detailsList:fg(wg(this,vF,3),Tka,a)};a&&(b.$jspbMessageInstance=this);return b};
f.serializeBinary=function(){var a=new Hf;var b=this.getCode();0!==b&&a.writeInt32(1,b);b=this.getMessage();0<b.length&&a.writeString(2,b);b=wg(this,vF,3);0<b.length&&Tf(a,3,b,Uka);return Nf(a)};
f.getCode=function(){return D(this,1,0)};
f.setCode=function(a){pg(this,1,a)};
f.getMessage=function(){return D(this,2,"")};
f.setMessage=function(a){rg(this,2,a)};
f.addDetails=function(a,b){return Ag(this,3,a,vF,b)};
f.clearDetailsList=function(){return zg(this,3,[])};var xF=function(a,b,c,d,e){a=new cx(a);0!=b&&Xw(a,"authuser",b);null!=c&&Xw(a,"pageId",c);null!=d&&Xw(a,"service",d);this.servletUri=a.toString();this.handler=e;this.nextRequestId=0};
xF.prototype.start=function(){var a=this.handler;a.xpcOpen_=!0;rA(a,!0,!1)};
xF.prototype.send=function(a,b,c){var d=new cx(this.servletUri),e;for(e in c)Xw(d,e,c[e]);Hx(d.toString(),r(this.handleSendResult_,this,this.nextRequestId++),"POST",a,b,void 0,!0)};
xF.prototype.handleSendResult_=function(a,b){b=b.target;if(b.isSuccess())this.handler.onSuccess(a);else this.handler.onFailure(a,b.getResponseText())};var yF=function(){J.call(this)};
t(yF,J);var Wka=null;f=yF.prototype;f.getMajorVersion=function(){return L(this,1)};
f.getMajorVersionOrDefault=function(){return M(this,1)};
f.setMajorVersion=function(a){N(this,1,a)};
f.hasMajorVersion=function(){return K(this,1)};
f.majorVersionCount=function(){return Q(this,1)};
f.clearMajorVersion=function(){O(this,1)};
f.getMinorVersion=function(){return L(this,2)};
f.getMinorVersionOrDefault=function(){return M(this,2)};
f.setMinorVersion=function(a){N(this,2,a)};
f.hasMinorVersion=function(){return K(this,2)};
f.minorVersionCount=function(){return Q(this,2)};
f.clearMinorVersion=function(){O(this,2)};
var zF=function(){J.call(this)};
t(zF,J);var Xka=null;f=zF.prototype;f.getVersion=function(){return L(this,1)};
f.getVersionOrDefault=function(){return M(this,1)};
f.setVersion=function(a){N(this,1,a)};
f.hasVersion=function(){return K(this,1)};
f.versionCount=function(){return Q(this,1)};
f.clearVersion=function(){O(this,1)};
var AF=function(){J.call(this)};
t(AF,J);var Yka=null;f=AF.prototype;f.getVersion=function(){return L(this,1)};
f.getVersionOrDefault=function(){return M(this,1)};
f.setVersion=function(a){N(this,1,a)};
f.hasVersion=function(){return K(this,1)};
f.versionCount=function(){return Q(this,1)};
f.clearVersion=function(){O(this,1)};
f.getPlatform=function(){return L(this,2)};
f.getPlatformOrDefault=function(){return M(this,2)};
f.setPlatform=function(a){N(this,2,a)};
f.hasPlatform=function(){return K(this,2)};
f.platformCount=function(){return Q(this,2)};
f.clearPlatform=function(){O(this,2)};
f.getLanguage=function(){return L(this,3)};
f.getLanguageOrDefault=function(){return M(this,3)};
f.setLanguage=function(a){N(this,3,a)};
f.hasLanguage=function(){return K(this,3)};
f.languageCount=function(){return Q(this,3)};
f.clearLanguage=function(){O(this,3)};
f.getApplicationInfo=function(){return L(this,4)};
f.getApplicationInfoOrDefault=function(){return M(this,4)};
f.setApplicationInfo=function(a){N(this,4,a)};
f.hasApplicationInfo=function(){return K(this,4)};
f.applicationInfoCount=function(){return Q(this,4)};
f.clearApplicationInfo=function(){O(this,4)};
var BF=function(){J.call(this)};
t(BF,J);var Zka=null;f=BF.prototype;f.getCode=function(){return L(this,1)};
f.getCodeOrDefault=function(){return M(this,1)};
f.setCode=function(a){N(this,1,a)};
f.hasCode=function(){return K(this,1)};
f.codeCount=function(){return Q(this,1)};
f.clearCode=function(){O(this,1)};
f.getDescription=function(){return L(this,2)};
f.getDescriptionOrDefault=function(){return M(this,2)};
f.setDescription=function(a){N(this,2,a)};
f.hasDescription=function(){return K(this,2)};
f.descriptionCount=function(){return Q(this,2)};
f.clearDescription=function(){O(this,2)};
var $ka={SUCCESS:1,TRANSIENT_FAILURE:2,PERMANENT_FAILURE:3},CF=function(){J.call(this)};
t(CF,J);var ala=null;f=CF.prototype;f.getSource=function(){return L(this,1)};
f.getSourceOrDefault=function(){return M(this,1)};
f.setSource=function(a){N(this,1,a)};
f.hasSource=function(){return K(this,1)};
f.sourceCount=function(){return Q(this,1)};
f.clearSource=function(){O(this,1)};
f.getName=function(){return L(this,2)};
f.getNameOrDefault=function(){return M(this,2)};
f.setName=function(a){N(this,2,a)};
f.hasName=function(){return K(this,2)};
f.nameCount=function(){return Q(this,2)};
f.clearName=function(){O(this,2)};
var DF=function(){J.call(this)};
t(DF,J);var bla=null;f=DF.prototype;f.getClientType=function(){return L(this,1)};
f.getClientTypeOrDefault=function(){return M(this,1)};
f.setClientType=function(a){N(this,1,a)};
f.hasClientType=function(){return K(this,1)};
f.clientTypeCount=function(){return Q(this,1)};
f.clearClientType=function(){O(this,1)};
f.getClientName=function(){return L(this,2)};
f.getClientNameOrDefault=function(){return M(this,2)};
f.hasClientName=function(){return K(this,2)};
f.clientNameCount=function(){return Q(this,2)};
f.clearClientName=function(){O(this,2)};
var EF=function(){J.call(this)};
t(EF,J);var cla=null;f=EF.prototype;f.getObjectId=function(){return L(this,1)};
f.getObjectIdOrDefault=function(){return M(this,1)};
f.setObjectId=function(a){N(this,1,a)};
f.hasObjectId=function(){return K(this,1)};
f.objectIdCount=function(){return Q(this,1)};
f.clearObjectId=function(){O(this,1)};
f.getIsKnownVersionOrDefault=function(){return M(this,2)};
f.setIsKnownVersion=function(a){N(this,2,a)};
f.hasIsKnownVersion=function(){return K(this,2)};
f.isKnownVersionCount=function(){return Q(this,2)};
f.clearIsKnownVersion=function(){O(this,2)};
f.getVersion=function(){return L(this,3)};
f.getVersionOrDefault=function(){return M(this,3)};
f.setVersion=function(a){N(this,3,a)};
f.hasVersion=function(){return K(this,3)};
f.versionCount=function(){return Q(this,3)};
f.clearVersion=function(){O(this,3)};
f.setIsTrickleRestart=function(a){N(this,6,a)};
f.isTrickleRestartCount=function(){return Q(this,6)};
f.clearIsTrickleRestart=function(){O(this,6)};
f.getPayload=function(){return L(this,4)};
f.getPayloadOrDefault=function(){return M(this,4)};
f.setPayload=function(a){N(this,4,a)};
f.payloadCount=function(){return Q(this,4)};
var FF=function(){J.call(this)};
t(FF,J);var dla=null;f=FF.prototype;f.getObjectId=function(){return L(this,1)};
f.getObjectIdOrDefault=function(){return M(this,1)};
f.setObjectId=function(a){N(this,1,a)};
f.hasObjectId=function(){return K(this,1)};
f.objectIdCount=function(){return Q(this,1)};
f.clearObjectId=function(){O(this,1)};
f.getOpTypeOrDefault=function(){return M(this,2)};
f.hasOpType=function(){return K(this,2)};
f.opTypeCount=function(){return Q(this,2)};
f.clearOpType=function(){O(this,2)};
var ela={REGISTER:1,UNREGISTER:2},GF=function(){J.call(this)};
t(GF,J);var fla=null;f=GF.prototype;f.getNumRegistrations=function(){return L(this,1)};
f.getNumRegistrationsOrDefault=function(){return M(this,1)};
f.hasNumRegistrations=function(){return K(this,1)};
f.numRegistrationsCount=function(){return Q(this,1)};
f.clearNumRegistrations=function(){O(this,1)};
f.getRegistrationDigest=function(){return L(this,2)};
f.getRegistrationDigestOrDefault=function(){return M(this,2)};
f.hasRegistrationDigest=function(){return K(this,2)};
f.registrationDigestCount=function(){return Q(this,2)};
f.clearRegistrationDigest=function(){O(this,2)};
var HF=function(){J.call(this)};
t(HF,J);var gla=null;f=HF.prototype;f.getProtocolVersion=function(){return L(this,1)};
f.getProtocolVersionOrDefault=function(){return M(this,1)};
f.setProtocolVersion=function(a){N(this,1,a)};
f.hasProtocolVersion=function(){return K(this,1)};
f.protocolVersionCount=function(){return Q(this,1)};
f.clearProtocolVersion=function(){O(this,1)};
f.getClientToken=function(){return L(this,2)};
f.getClientTokenOrDefault=function(){return M(this,2)};
f.setClientToken=function(a){N(this,2,a)};
f.hasClientToken=function(){return K(this,2)};
f.clientTokenCount=function(){return Q(this,2)};
f.clearClientToken=function(){O(this,2)};
f.getRegistrationSummary=function(){return L(this,3)};
f.getRegistrationSummaryOrDefault=function(){return M(this,3)};
f.setRegistrationSummary=function(a){N(this,3,a)};
f.registrationSummaryCount=function(){return Q(this,3)};
f.clearRegistrationSummary=function(){O(this,3)};
f.getClientTimeMs=function(){return L(this,4)};
f.getClientTimeMsOrDefault=function(){return M(this,4)};
f.setClientTimeMs=function(a){N(this,4,a)};
f.hasClientTimeMs=function(){return K(this,4)};
f.clientTimeMsCount=function(){return Q(this,4)};
f.clearClientTimeMs=function(){O(this,4)};
f.getMaxKnownServerTimeMs=function(){return L(this,5)};
f.getMaxKnownServerTimeMsOrDefault=function(){return M(this,5)};
f.setMaxKnownServerTimeMs=function(a){N(this,5,a)};
f.hasMaxKnownServerTimeMs=function(){return K(this,5)};
f.maxKnownServerTimeMsCount=function(){return Q(this,5)};
f.clearMaxKnownServerTimeMs=function(){O(this,5)};
f.getMessageId=function(){return L(this,6)};
f.getMessageIdOrDefault=function(){return M(this,6)};
f.setMessageId=function(a){N(this,6,a)};
f.hasMessageId=function(){return K(this,6)};
f.messageIdCount=function(){return Q(this,6)};
f.clearMessageId=function(){O(this,6)};
f.getClientType=function(){return L(this,7)};
f.getClientTypeOrDefault=function(){return M(this,7)};
f.setClientType=function(a){N(this,7,a)};
f.hasClientType=function(){return K(this,7)};
f.clientTypeCount=function(){return Q(this,7)};
f.clearClientType=function(){O(this,7)};
var IF=function(){J.call(this)};
t(IF,J);var hla=null;f=IF.prototype;f.getHeader=function(){return L(this,1)};
f.getHeaderOrDefault=function(){return M(this,1)};
f.setHeader=function(a){N(this,1,a)};
f.hasHeader=function(){return K(this,1)};
f.headerCount=function(){return Q(this,1)};
f.clearHeader=function(){O(this,1)};
f.getInitializeMessage=function(){return L(this,2)};
f.getInitializeMessageOrDefault=function(){return M(this,2)};
f.setInitializeMessage=function(a){N(this,2,a)};
f.initializeMessageCount=function(){return Q(this,2)};
f.clearInitializeMessage=function(){O(this,2)};
f.getRegistrationMessage=function(){return L(this,3)};
f.getRegistrationMessageOrDefault=function(){return M(this,3)};
f.hasRegistrationMessage=function(){return K(this,3)};
f.registrationMessageCount=function(){return Q(this,3)};
f.clearRegistrationMessage=function(){O(this,3)};
f.getRegistrationSyncMessage=function(){return L(this,4)};
f.getRegistrationSyncMessageOrDefault=function(){return M(this,4)};
f.hasRegistrationSyncMessage=function(){return K(this,4)};
f.registrationSyncMessageCount=function(){return Q(this,4)};
f.clearRegistrationSyncMessage=function(){O(this,4)};
f.getInvalidationAckMessage=function(){return L(this,5)};
f.getInvalidationAckMessageOrDefault=function(){return M(this,5)};
f.hasInvalidationAckMessage=function(){return K(this,5)};
f.invalidationAckMessageCount=function(){return Q(this,5)};
f.clearInvalidationAckMessage=function(){O(this,5)};
f.getInfoMessage=function(){return L(this,6)};
f.getInfoMessageOrDefault=function(){return M(this,6)};
f.setInfoMessage=function(a){N(this,6,a)};
f.hasInfoMessage=function(){return K(this,6)};
f.infoMessageCount=function(){return Q(this,6)};
f.clearInfoMessage=function(){O(this,6)};
var JF=function(){J.call(this)};
t(JF,J);var ila=null;f=JF.prototype;f.getClientType=function(){return L(this,1)};
f.getClientTypeOrDefault=function(){return M(this,1)};
f.setClientType=function(a){N(this,1,a)};
f.hasClientType=function(){return K(this,1)};
f.clientTypeCount=function(){return Q(this,1)};
f.clearClientType=function(){O(this,1)};
f.getNonce=function(){return L(this,2)};
f.getNonceOrDefault=function(){return M(this,2)};
f.hasNonce=function(){return K(this,2)};
f.nonceCount=function(){return Q(this,2)};
f.clearNonce=function(){O(this,2)};
f.getApplicationClientId=function(){return L(this,3)};
f.getApplicationClientIdOrDefault=function(){return M(this,3)};
f.hasApplicationClientId=function(){return K(this,3)};
f.applicationClientIdCount=function(){return Q(this,3)};
f.clearApplicationClientId=function(){O(this,3)};
f.getDigestSerializationType=function(){return L(this,4)};
f.getDigestSerializationTypeOrDefault=function(){return M(this,4)};
f.hasDigestSerializationType=function(){return K(this,4)};
f.digestSerializationTypeCount=function(){return Q(this,4)};
f.clearDigestSerializationType=function(){O(this,4)};
var jla={BYTE_BASED:1,NUMBER_BASED:2},KF=function(){J.call(this)};
t(KF,J);var kla=null;f=KF.prototype;f.getRegistration=function(a){return L(this,1,a)};
f.getRegistrationOrDefault=function(a){return M(this,1,a)};
f.addRegistration=function(a){uu(this,1,a)};
f.registrationArray=function(){return tu(this,1)};
f.hasRegistration=function(){return K(this,1)};
f.registrationCount=function(){return Q(this,1)};
f.clearRegistration=function(){O(this,1)};
var LF=function(){J.call(this)};
t(LF,J);var lla=null;f=LF.prototype;f.getSubtree=function(a){return L(this,1,a)};
f.getSubtreeOrDefault=function(a){return M(this,1,a)};
f.subtreeArray=function(){return tu(this,1)};
f.hasSubtree=function(){return K(this,1)};
f.subtreeCount=function(){return Q(this,1)};
f.clearSubtree=function(){O(this,1)};
var MF=function(){J.call(this)};
t(MF,J);var mla=null;f=MF.prototype;f.getRegisteredObject=function(a){return L(this,1,a)};
f.getRegisteredObjectOrDefault=function(a){return M(this,1,a)};
f.registeredObjectArray=function(){return tu(this,1)};
f.hasRegisteredObject=function(){return K(this,1)};
f.registeredObjectCount=function(){return Q(this,1)};
f.clearRegisteredObject=function(){O(this,1)};
var NF=function(){J.call(this)};
t(NF,J);var nla=null;f=NF.prototype;f.getClientVersion=function(){return L(this,1)};
f.getClientVersionOrDefault=function(){return M(this,1)};
f.setClientVersion=function(a){N(this,1,a)};
f.hasClientVersion=function(){return K(this,1)};
f.clientVersionCount=function(){return Q(this,1)};
f.clearClientVersion=function(){O(this,1)};
f.getConfigParameter=function(a){return L(this,2,a)};
f.getConfigParameterOrDefault=function(a){return M(this,2,a)};
f.addConfigParameter=function(a){uu(this,2,a)};
f.configParameterArray=function(){return tu(this,2)};
f.hasConfigParameter=function(){return K(this,2)};
f.configParameterCount=function(){return Q(this,2)};
f.clearConfigParameter=function(){O(this,2)};
f.getPerformanceCounter=function(a){return L(this,3,a)};
f.getPerformanceCounterOrDefault=function(a){return M(this,3,a)};
f.performanceCounterArray=function(){return tu(this,3)};
f.hasPerformanceCounter=function(){return K(this,3)};
f.performanceCounterCount=function(){return Q(this,3)};
f.clearPerformanceCounter=function(){O(this,3)};
f.getServerRegistrationSummaryRequested=function(){return L(this,4)};
f.getServerRegistrationSummaryRequestedOrDefault=function(){return M(this,4)};
f.hasServerRegistrationSummaryRequested=function(){return K(this,4)};
f.serverRegistrationSummaryRequestedCount=function(){return Q(this,4)};
f.clearServerRegistrationSummaryRequested=function(){O(this,4)};
f.getClientConfig=function(){return L(this,5)};
f.getClientConfigOrDefault=function(){return M(this,5)};
f.setClientConfig=function(a){N(this,5,a)};
f.hasClientConfig=function(){return K(this,5)};
f.clientConfigCount=function(){return Q(this,5)};
f.clearClientConfig=function(){O(this,5)};
var OF=function(){J.call(this)};
t(OF,J);var ola=null;f=OF.prototype;f.getName=function(){return L(this,1)};
f.getNameOrDefault=function(){return M(this,1)};
f.setName=function(a){N(this,1,a)};
f.hasName=function(){return K(this,1)};
f.nameCount=function(){return Q(this,1)};
f.clearName=function(){O(this,1)};
f.getValue=function(){return L(this,2)};
f.getValueOrDefault=function(){return M(this,2)};
f.setValue=function(a){N(this,2,a)};
f.hasValue=function(){return K(this,2)};
f.valueCount=function(){return Q(this,2)};
f.clearValue=function(){O(this,2)};
var PF=function(){J.call(this)};
t(PF,J);var pla=null;f=PF.prototype;f.getProtocolVersion=function(){return L(this,1)};
f.getProtocolVersionOrDefault=function(){return M(this,1)};
f.setProtocolVersion=function(a){N(this,1,a)};
f.hasProtocolVersion=function(){return K(this,1)};
f.protocolVersionCount=function(){return Q(this,1)};
f.clearProtocolVersion=function(){O(this,1)};
f.getClientToken=function(){return L(this,2)};
f.getClientTokenOrDefault=function(){return M(this,2)};
f.setClientToken=function(a){N(this,2,a)};
f.hasClientToken=function(){return K(this,2)};
f.clientTokenCount=function(){return Q(this,2)};
f.clearClientToken=function(){O(this,2)};
f.getRegistrationSummary=function(){return L(this,3)};
f.getRegistrationSummaryOrDefault=function(){return M(this,3)};
f.setRegistrationSummary=function(a){N(this,3,a)};
f.hasRegistrationSummary=function(){return K(this,3)};
f.registrationSummaryCount=function(){return Q(this,3)};
f.clearRegistrationSummary=function(){O(this,3)};
f.getServerTimeMs=function(){return L(this,4)};
f.getServerTimeMsOrDefault=function(){return M(this,4)};
f.setServerTimeMs=function(a){N(this,4,a)};
f.hasServerTimeMs=function(){return K(this,4)};
f.serverTimeMsCount=function(){return Q(this,4)};
f.clearServerTimeMs=function(){O(this,4)};
f.getMessageId=function(){return L(this,5)};
f.getMessageIdOrDefault=function(){return M(this,5)};
f.setMessageId=function(a){N(this,5,a)};
f.hasMessageId=function(){return K(this,5)};
f.messageIdCount=function(){return Q(this,5)};
f.clearMessageId=function(){O(this,5)};
var QF=function(){J.call(this)};
t(QF,J);var qla=null;f=QF.prototype;f.getHeader=function(){return L(this,1)};
f.getHeaderOrDefault=function(){return M(this,1)};
f.setHeader=function(a){N(this,1,a)};
f.hasHeader=function(){return K(this,1)};
f.headerCount=function(){return Q(this,1)};
f.clearHeader=function(){O(this,1)};
f.getTokenControlMessageOrDefault=function(){return M(this,2)};
f.setTokenControlMessage=function(a){N(this,2,a)};
f.tokenControlMessageCount=function(){return Q(this,2)};
f.clearTokenControlMessage=function(){O(this,2)};
f.getInvalidationMessageOrDefault=function(){return M(this,3)};
f.setInvalidationMessage=function(a){N(this,3,a)};
f.invalidationMessageCount=function(){return Q(this,3)};
f.clearInvalidationMessage=function(){O(this,3)};
f.getRegistrationStatusMessageOrDefault=function(){return M(this,4)};
f.setRegistrationStatusMessage=function(a){N(this,4,a)};
f.registrationStatusMessageCount=function(){return Q(this,4)};
f.clearRegistrationStatusMessage=function(){O(this,4)};
f.getRegistrationSyncRequestMessageOrDefault=function(){return M(this,5)};
f.setRegistrationSyncRequestMessage=function(a){N(this,5,a)};
f.registrationSyncRequestMessageCount=function(){return Q(this,5)};
f.clearRegistrationSyncRequestMessage=function(){O(this,5)};
f.getConfigChangeMessageOrDefault=function(){return M(this,6)};
f.setConfigChangeMessage=function(a){N(this,6,a)};
f.configChangeMessageCount=function(){return Q(this,6)};
f.clearConfigChangeMessage=function(){O(this,6)};
f.getInfoRequestMessageOrDefault=function(){return M(this,7)};
f.setInfoRequestMessage=function(a){N(this,7,a)};
f.infoRequestMessageCount=function(){return Q(this,7)};
f.clearInfoRequestMessage=function(){O(this,7)};
f.getErrorMessage=function(){return L(this,8)};
f.getErrorMessageOrDefault=function(){return M(this,8)};
f.setErrorMessage=function(a){N(this,8,a)};
f.errorMessageCount=function(){return Q(this,8)};
f.clearErrorMessage=function(){O(this,8)};
var RF=function(){J.call(this)};
t(RF,J);var rla=null;RF.prototype.getNewTokenOrDefault=function(){return M(this,1)};
RF.prototype.setNewToken=function(a){N(this,1,a)};
RF.prototype.newTokenCount=function(){return Q(this,1)};
RF.prototype.clearNewToken=function(){O(this,1)};
var SF=function(){J.call(this)};
t(SF,J);var sla=null;f=SF.prototype;f.getRegistration=function(){return L(this,1)};
f.getRegistrationOrDefault=function(){return M(this,1)};
f.setRegistration=function(a){N(this,1,a)};
f.hasRegistration=function(){return K(this,1)};
f.registrationCount=function(){return Q(this,1)};
f.clearRegistration=function(){O(this,1)};
f.getStatus=function(){return L(this,2)};
f.getStatusOrDefault=function(){return M(this,2)};
f.setStatus=function(a){N(this,2,a)};
f.hasStatus=function(){return K(this,2)};
f.statusCount=function(){return Q(this,2)};
f.clearStatus=function(){O(this,2)};
var TF=function(){J.call(this)};
t(TF,J);var tla=null;f=TF.prototype;f.getRegistrationStatus=function(a){return L(this,1,a)};
f.getRegistrationStatusOrDefault=function(a){return M(this,1,a)};
f.addRegistrationStatus=function(a){uu(this,1,a)};
f.hasRegistrationStatus=function(){return K(this,1)};
f.registrationStatusCount=function(){return Q(this,1)};
f.clearRegistrationStatus=function(){O(this,1)};
var UF=function(){J.call(this)};
t(UF,J);var ula=null,VF=function(){J.call(this)};
t(VF,J);var vla=null;VF.prototype.getInvalidation=function(){return L(this,1,void 0)};
VF.prototype.getInvalidationOrDefault=function(a){return M(this,1,a)};
VF.prototype.invalidationCount=function(){return Q(this,1)};
VF.prototype.clearInvalidation=function(){O(this,1)};
var WF=function(){J.call(this)};
t(WF,J);var wla=null;f=WF.prototype;f.getInfoType=function(a){return L(this,1,a)};
f.getInfoTypeOrDefault=function(a){return M(this,1,a)};
f.addInfoType=function(a){uu(this,1,a)};
f.hasInfoType=function(){return K(this,1)};
f.infoTypeCount=function(){return Q(this,1)};
f.clearInfoType=function(){O(this,1)};
var xla={GET_PERFORMANCE_COUNTERS:1},XF=function(){J.call(this)};
t(XF,J);var yla=null;f=XF.prototype;f.getWindowMs=function(){return L(this,1)};
f.getWindowMsOrDefault=function(){return M(this,1)};
f.hasWindowMs=function(){return K(this,1)};
f.windowMsCount=function(){return Q(this,1)};
f.clearWindowMs=function(){O(this,1)};
f.getCount=function(){return L(this,2)};
f.getCountOrDefault=function(){return M(this,2)};
f.setCount=function(a){N(this,2,a)};
f.hasCount=function(){return K(this,2)};
f.countCount=function(){return Q(this,2)};
f.clearCount=function(){O(this,2)};
var YF=function(){J.call(this)};
t(YF,J);var zla=null;f=YF.prototype;f.getBatchingDelayMs=function(){return L(this,1)};
f.setBatchingDelayMs=function(a){N(this,1,a)};
f.hasBatchingDelayMs=function(){return K(this,1)};
f.batchingDelayMsCount=function(){return Q(this,1)};
f.clearBatchingDelayMs=function(){O(this,1)};
f.getRateLimit=function(a){return L(this,2,a)};
f.getRateLimitOrDefault=function(a){return M(this,2,a)};
f.rateLimitArray=function(){return tu(this,2)};
f.hasRateLimit=function(){return K(this,2)};
f.rateLimitCount=function(){return Q(this,2)};
f.clearRateLimit=function(){O(this,2)};
var ZF=function(){J.call(this)};
t(ZF,J);var Ala=null;f=ZF.prototype;f.getVersion=function(){return L(this,1)};
f.getVersionOrDefault=function(){return M(this,1)};
f.setVersion=function(a){N(this,1,a)};
f.hasVersion=function(){return K(this,1)};
f.versionCount=function(){return Q(this,1)};
f.clearVersion=function(){O(this,1)};
f.getNetworkTimeoutDelayMs=function(){return L(this,2)};
f.setNetworkTimeoutDelayMs=function(a){N(this,2,a)};
f.hasNetworkTimeoutDelayMs=function(){return K(this,2)};
f.networkTimeoutDelayMsCount=function(){return Q(this,2)};
f.clearNetworkTimeoutDelayMs=function(){O(this,2)};
f.getWriteRetryDelayMs=function(){return L(this,3)};
f.setWriteRetryDelayMs=function(a){N(this,3,a)};
f.hasWriteRetryDelayMs=function(){return K(this,3)};
f.writeRetryDelayMsCount=function(){return Q(this,3)};
f.clearWriteRetryDelayMs=function(){O(this,3)};
f.getHeartbeatIntervalMs=function(){return L(this,4)};
f.setHeartbeatIntervalMs=function(a){N(this,4,a)};
f.hasHeartbeatIntervalMs=function(){return K(this,4)};
f.heartbeatIntervalMsCount=function(){return Q(this,4)};
f.clearHeartbeatIntervalMs=function(){O(this,4)};
f.getPerfCounterDelayMs=function(){return L(this,5)};
f.setPerfCounterDelayMs=function(a){N(this,5,a)};
f.hasPerfCounterDelayMs=function(){return K(this,5)};
f.perfCounterDelayMsCount=function(){return Q(this,5)};
f.clearPerfCounterDelayMs=function(){O(this,5)};
f.getMaxExponentialBackoffFactor=function(){return L(this,6)};
f.setMaxExponentialBackoffFactor=function(a){N(this,6,a)};
f.hasMaxExponentialBackoffFactor=function(){return K(this,6)};
f.maxExponentialBackoffFactorCount=function(){return Q(this,6)};
f.clearMaxExponentialBackoffFactor=function(){O(this,6)};
f.getSmearPercent=function(){return L(this,7)};
f.setSmearPercent=function(a){N(this,7,a)};
f.hasSmearPercent=function(){return K(this,7)};
f.smearPercentCount=function(){return Q(this,7)};
f.clearSmearPercent=function(){O(this,7)};
f.getIsTransient=function(){return L(this,8)};
f.getIsTransientOrDefault=function(){return M(this,8)};
f.setIsTransient=function(a){N(this,8,a)};
f.hasIsTransient=function(){return K(this,8)};
f.isTransientCount=function(){return Q(this,8)};
f.clearIsTransient=function(){O(this,8)};
f.getInitialPersistentHeartbeatDelayMs=function(){return L(this,9)};
f.setInitialPersistentHeartbeatDelayMs=function(a){N(this,9,a)};
f.hasInitialPersistentHeartbeatDelayMs=function(){return K(this,9)};
f.initialPersistentHeartbeatDelayMsCount=function(){return Q(this,9)};
f.clearInitialPersistentHeartbeatDelayMs=function(){O(this,9)};
f.getProtocolHandlerConfig=function(){return L(this,10)};
f.hasProtocolHandlerConfig=function(){return K(this,10)};
f.protocolHandlerConfigCount=function(){return Q(this,10)};
f.clearProtocolHandlerConfig=function(){O(this,10)};
f.getChannelSupportsOfflineDelivery=function(){return L(this,11)};
f.getChannelSupportsOfflineDeliveryOrDefault=function(){return M(this,11)};
f.setChannelSupportsOfflineDelivery=function(a){N(this,11,a)};
f.hasChannelSupportsOfflineDelivery=function(){return K(this,11)};
f.channelSupportsOfflineDeliveryCount=function(){return Q(this,11)};
f.clearChannelSupportsOfflineDelivery=function(){O(this,11)};
f.getOfflineHeartbeatThresholdMs=function(){return L(this,12)};
f.setOfflineHeartbeatThresholdMs=function(a){N(this,12,a)};
f.hasOfflineHeartbeatThresholdMs=function(){return K(this,12)};
f.offlineHeartbeatThresholdMsCount=function(){return Q(this,12)};
f.clearOfflineHeartbeatThresholdMs=function(){O(this,12)};
f.getAllowSuppression=function(){return L(this,13)};
f.setAllowSuppression=function(a){N(this,13,a)};
f.hasAllowSuppression=function(){return K(this,13)};
f.allowSuppressionCount=function(){return Q(this,13)};
f.clearAllowSuppression=function(){O(this,13)};
var $F=function(){J.call(this)};
t($F,J);var Bla=null;$F.prototype.getNextMessageDelayMs=function(){return L(this,1)};
$F.prototype.setNextMessageDelayMs=function(a){N(this,1,a)};
$F.prototype.nextMessageDelayMsCount=function(){return Q(this,1)};
$F.prototype.clearNextMessageDelayMs=function(){O(this,1)};
var aG=function(){J.call(this)};
t(aG,J);var Cla=null;f=aG.prototype;f.getCode=function(){return L(this,1)};
f.getCodeOrDefault=function(){return M(this,1)};
f.setCode=function(a){N(this,1,a)};
f.hasCode=function(){return K(this,1)};
f.codeCount=function(){return Q(this,1)};
f.clearCode=function(){O(this,1)};
f.getDescription=function(){return L(this,2)};
f.getDescriptionOrDefault=function(){return M(this,2)};
f.setDescription=function(a){N(this,2,a)};
f.hasDescription=function(){return K(this,2)};
f.descriptionCount=function(){return Q(this,2)};
f.clearDescription=function(){O(this,2)};
var Dla={AUTH_FAILURE:1,UNKNOWN_FAILURE:1E4};yF.prototype.getDescriptor=function(){var a=Wka;a||(Wka=a=xu(yF,{0:{name:"Version",fullName:"ipc.invalidation.Version"},1:{name:"major_version",fieldType:5,type:Number},2:{name:"minor_version",fieldType:5,type:Number}}));return a};
yF.getDescriptor=yF.prototype.getDescriptor;zF.prototype.getDescriptor=function(){var a=Xka;a||(Xka=a=xu(zF,{0:{name:"ProtocolVersion",fullName:"ipc.invalidation.ProtocolVersion"},1:{name:"version",fieldType:11,type:yF}}));return a};
zF.getDescriptor=zF.prototype.getDescriptor;AF.prototype.getDescriptor=function(){var a=Yka;a||(Yka=a=xu(AF,{0:{name:"ClientVersion",fullName:"ipc.invalidation.ClientVersion"},1:{name:"version",fieldType:11,type:yF},2:{name:"platform",fieldType:9,type:String},3:{name:"language",fieldType:9,type:String},4:{name:"application_info",fieldType:9,type:String}}));return a};
AF.getDescriptor=AF.prototype.getDescriptor;BF.prototype.getDescriptor=function(){var a=Zka;a||(Zka=a=xu(BF,{0:{name:"StatusP",fullName:"ipc.invalidation.StatusP"},1:{name:"code",fieldType:14,defaultValue:1,type:$ka},2:{name:"description",fieldType:9,type:String}}));return a};
BF.getDescriptor=BF.prototype.getDescriptor;CF.prototype.getDescriptor=function(){var a=ala;a||(ala=a=xu(CF,{0:{name:"ObjectIdP",fullName:"ipc.invalidation.ObjectIdP"},1:{name:"source",fieldType:5,type:Number},2:{name:"name",fieldType:12,type:String}}));return a};
CF.getDescriptor=CF.prototype.getDescriptor;DF.prototype.getDescriptor=function(){var a=bla;a||(bla=a=xu(DF,{0:{name:"ApplicationClientIdP",fullName:"ipc.invalidation.ApplicationClientIdP"},1:{name:"client_type",fieldType:5,type:Number},2:{name:"client_name",fieldType:12,type:String}}));return a};
DF.getDescriptor=DF.prototype.getDescriptor;EF.prototype.getDescriptor=function(){var a=cla;a||(cla=a=xu(EF,{0:{name:"InvalidationP",fullName:"ipc.invalidation.InvalidationP"},1:{name:"object_id",fieldType:11,type:CF},2:{name:"is_known_version",fieldType:8,type:Boolean},3:{name:"version",fieldType:3,type:String},6:{name:"is_trickle_restart",fieldType:8,defaultValue:!0,type:Boolean},4:{name:"payload",fieldType:12,type:String}}));return a};
EF.getDescriptor=EF.prototype.getDescriptor;FF.prototype.getDescriptor=function(){var a=dla;a||(dla=a=xu(FF,{0:{name:"RegistrationP",fullName:"ipc.invalidation.RegistrationP"},1:{name:"object_id",fieldType:11,type:CF},2:{name:"op_type",fieldType:14,defaultValue:1,type:ela}}));return a};
FF.getDescriptor=FF.prototype.getDescriptor;GF.prototype.getDescriptor=function(){var a=fla;a||(fla=a=xu(GF,{0:{name:"RegistrationSummary",fullName:"ipc.invalidation.RegistrationSummary"},1:{name:"num_registrations",fieldType:5,type:Number},2:{name:"registration_digest",fieldType:12,type:String}}));return a};
GF.getDescriptor=GF.prototype.getDescriptor;
HF.prototype.getDescriptor=function(){var a=gla;a||(gla=a=xu(HF,{0:{name:"ClientHeader",fullName:"ipc.invalidation.ClientHeader"},1:{name:"protocol_version",fieldType:11,type:zF},2:{name:"client_token",fieldType:12,type:String},3:{name:"registration_summary",fieldType:11,type:GF},4:{name:"client_time_ms",fieldType:3,type:Number},5:{name:"max_known_server_time_ms",fieldType:3,type:Number},6:{name:"message_id",fieldType:9,type:String},7:{name:"client_type",fieldType:5,type:Number}}));return a};
HF.getDescriptor=HF.prototype.getDescriptor;IF.prototype.getDescriptor=function(){var a=hla;a||(hla=a=xu(IF,{0:{name:"ClientToServerMessage",fullName:"ipc.invalidation.ClientToServerMessage"},1:{name:"header",fieldType:11,type:HF},2:{name:"initialize_message",fieldType:11,type:JF},3:{name:"registration_message",fieldType:11,type:KF},4:{name:"registration_sync_message",fieldType:11,type:LF},5:{name:"invalidation_ack_message",fieldType:11,type:VF},6:{name:"info_message",fieldType:11,type:NF}}));return a};
IF.getDescriptor=IF.prototype.getDescriptor;JF.prototype.getDescriptor=function(){var a=ila;a||(ila=a=xu(JF,{0:{name:"InitializeMessage",fullName:"ipc.invalidation.InitializeMessage"},1:{name:"client_type",fieldType:5,type:Number},2:{name:"nonce",fieldType:12,type:String},3:{name:"application_client_id",fieldType:11,type:DF},4:{name:"digest_serialization_type",fieldType:14,defaultValue:1,type:jla}}));return a};
JF.getDescriptor=JF.prototype.getDescriptor;KF.prototype.getDescriptor=function(){var a=kla;a||(kla=a=xu(KF,{0:{name:"RegistrationMessage",fullName:"ipc.invalidation.RegistrationMessage"},1:{name:"registration",repeated:!0,fieldType:11,type:FF}}));return a};
KF.getDescriptor=KF.prototype.getDescriptor;LF.prototype.getDescriptor=function(){var a=lla;a||(lla=a=xu(LF,{0:{name:"RegistrationSyncMessage",fullName:"ipc.invalidation.RegistrationSyncMessage"},1:{name:"subtree",repeated:!0,fieldType:11,type:MF}}));return a};
LF.getDescriptor=LF.prototype.getDescriptor;MF.prototype.getDescriptor=function(){var a=mla;a||(mla=a=xu(MF,{0:{name:"RegistrationSubtree",fullName:"ipc.invalidation.RegistrationSubtree"},1:{name:"registered_object",repeated:!0,fieldType:11,type:CF}}));return a};
MF.getDescriptor=MF.prototype.getDescriptor;NF.prototype.getDescriptor=function(){var a=nla;a||(nla=a=xu(NF,{0:{name:"InfoMessage",fullName:"ipc.invalidation.InfoMessage"},1:{name:"client_version",fieldType:11,type:AF},2:{name:"config_parameter",repeated:!0,fieldType:11,type:OF},3:{name:"performance_counter",repeated:!0,fieldType:11,type:OF},4:{name:"server_registration_summary_requested",fieldType:8,type:Boolean},5:{name:"client_config",fieldType:11,type:ZF}}));return a};
NF.getDescriptor=NF.prototype.getDescriptor;OF.prototype.getDescriptor=function(){var a=ola;a||(ola=a=xu(OF,{0:{name:"PropertyRecord",fullName:"ipc.invalidation.PropertyRecord"},1:{name:"name",fieldType:9,type:String},2:{name:"value",fieldType:5,type:Number}}));return a};
OF.getDescriptor=OF.prototype.getDescriptor;PF.prototype.getDescriptor=function(){var a=pla;a||(pla=a=xu(PF,{0:{name:"ServerHeader",fullName:"ipc.invalidation.ServerHeader"},1:{name:"protocol_version",fieldType:11,type:zF},2:{name:"client_token",fieldType:12,type:String},3:{name:"registration_summary",fieldType:11,type:GF},4:{name:"server_time_ms",fieldType:3,type:Number},5:{name:"message_id",fieldType:9,type:String}}));return a};
PF.getDescriptor=PF.prototype.getDescriptor;
QF.prototype.getDescriptor=function(){var a=qla;a||(qla=a=xu(QF,{0:{name:"ServerToClientMessage",fullName:"ipc.invalidation.ServerToClientMessage"},1:{name:"header",fieldType:11,type:PF},2:{name:"token_control_message",fieldType:11,type:RF},3:{name:"invalidation_message",fieldType:11,type:VF},4:{name:"registration_status_message",fieldType:11,type:TF},5:{name:"registration_sync_request_message",fieldType:11,type:UF},6:{name:"config_change_message",fieldType:11,type:$F},7:{name:"info_request_message",
fieldType:11,type:WF},8:{name:"error_message",fieldType:11,type:aG}}));return a};
QF.getDescriptor=QF.prototype.getDescriptor;RF.prototype.getDescriptor=function(){var a=rla;a||(rla=a=xu(RF,{0:{name:"TokenControlMessage",fullName:"ipc.invalidation.TokenControlMessage"},1:{name:"new_token",fieldType:12,type:String}}));return a};
RF.getDescriptor=RF.prototype.getDescriptor;SF.prototype.getDescriptor=function(){var a=sla;a||(sla=a=xu(SF,{0:{name:"RegistrationStatus",fullName:"ipc.invalidation.RegistrationStatus"},1:{name:"registration",fieldType:11,type:FF},2:{name:"status",fieldType:11,type:BF}}));return a};
SF.getDescriptor=SF.prototype.getDescriptor;TF.prototype.getDescriptor=function(){var a=tla;a||(tla=a=xu(TF,{0:{name:"RegistrationStatusMessage",fullName:"ipc.invalidation.RegistrationStatusMessage"},1:{name:"registration_status",repeated:!0,fieldType:11,type:SF}}));return a};
TF.getDescriptor=TF.prototype.getDescriptor;UF.prototype.getDescriptor=function(){var a=ula;a||(ula=a=xu(UF,{0:{name:"RegistrationSyncRequestMessage",fullName:"ipc.invalidation.RegistrationSyncRequestMessage"}}));return a};
UF.getDescriptor=UF.prototype.getDescriptor;VF.prototype.getDescriptor=function(){var a=vla;a||(vla=a=xu(VF,{0:{name:"InvalidationMessage",fullName:"ipc.invalidation.InvalidationMessage"},1:{name:"invalidation",repeated:!0,fieldType:11,type:EF}}));return a};
VF.getDescriptor=VF.prototype.getDescriptor;WF.prototype.getDescriptor=function(){var a=wla;a||(wla=a=xu(WF,{0:{name:"InfoRequestMessage",fullName:"ipc.invalidation.InfoRequestMessage"},1:{name:"info_type",repeated:!0,fieldType:14,defaultValue:1,type:xla}}));return a};
WF.getDescriptor=WF.prototype.getDescriptor;XF.prototype.getDescriptor=function(){var a=yla;a||(yla=a=xu(XF,{0:{name:"RateLimitP",fullName:"ipc.invalidation.RateLimitP"},1:{name:"window_ms",fieldType:5,type:Number},2:{name:"count",fieldType:5,type:Number}}));return a};
XF.getDescriptor=XF.prototype.getDescriptor;YF.prototype.getDescriptor=function(){var a=zla;a||(zla=a=xu(YF,{0:{name:"ProtocolHandlerConfigP",fullName:"ipc.invalidation.ProtocolHandlerConfigP"},1:{name:"batching_delay_ms",fieldType:5,defaultValue:500,type:Number},2:{name:"rate_limit",repeated:!0,fieldType:11,type:XF}}));return a};
YF.getDescriptor=YF.prototype.getDescriptor;
ZF.prototype.getDescriptor=function(){var a=Ala;a||(Ala=a=xu(ZF,{0:{name:"ClientConfigP",fullName:"ipc.invalidation.ClientConfigP"},1:{name:"version",fieldType:11,type:yF},2:{name:"network_timeout_delay_ms",fieldType:5,defaultValue:6E4,type:Number},3:{name:"write_retry_delay_ms",fieldType:5,defaultValue:1E4,type:Number},4:{name:"heartbeat_interval_ms",fieldType:5,defaultValue:12E5,type:Number},5:{name:"perf_counter_delay_ms",fieldType:5,defaultValue:216E5,type:Number},6:{name:"max_exponential_backoff_factor",
fieldType:5,defaultValue:500,type:Number},7:{name:"smear_percent",fieldType:5,defaultValue:20,type:Number},8:{name:"is_transient",fieldType:8,defaultValue:!1,type:Boolean},9:{name:"initial_persistent_heartbeat_delay_ms",fieldType:5,defaultValue:2E3,type:Number},10:{name:"protocol_handler_config",fieldType:11,type:YF},11:{name:"channel_supports_offline_delivery",fieldType:8,defaultValue:!1,type:Boolean},12:{name:"offline_heartbeat_threshold_ms",fieldType:5,defaultValue:6E4,type:Number},13:{name:"allow_suppression",
fieldType:8,defaultValue:!0,type:Boolean}}));return a};
ZF.getDescriptor=ZF.prototype.getDescriptor;$F.prototype.getDescriptor=function(){var a=Bla;a||(Bla=a=xu($F,{0:{name:"ConfigChangeMessage",fullName:"ipc.invalidation.ConfigChangeMessage"},1:{name:"next_message_delay_ms",fieldType:3,type:Number}}));return a};
$F.getDescriptor=$F.prototype.getDescriptor;aG.prototype.getDescriptor=function(){var a=Cla;a||(Cla=a=xu(aG,{0:{name:"ErrorMessage",fullName:"ipc.invalidation.ErrorMessage"},1:{name:"code",fieldType:14,defaultValue:1,type:Dla},2:{name:"description",fieldType:9,type:String}}));return a};
aG.getDescriptor=aG.prototype.getDescriptor;var bG=function(a,b){this.low_=a|0;this.high_=b|0},eG=function(a){return 0<a?0x7fffffffffffffff<=a?Ela:new bG(a,a/4294967296):0>a?-9223372036854776000>=a?cG:new bG(-a,-a/4294967296).negate():dG},fG=function(a,b){return new bG(a,b)},gG=function(a,b){if("-"==a.charAt(0))return gG(a.substring(1),b).negate();
var c=parseInt(a,b||10);if(9007199254740991>=c)return new bG(c%4294967296|0,c/4294967296|0);if(0==a.length)throw Error("number format error: empty string");if(0<=a.indexOf("-"))throw Error("number format error: interior \"-\" character: "+a);b=b||10;if(2>b||36<b)throw Error("radix out of range: "+b);c=eG(Math.pow(b,8));for(var d=dG,e=0;e<a.length;e+=8){var g=Math.min(8,a.length-e),h=parseInt(a.substring(e,e+g),b);8>g?(g=eG(Math.pow(b,g)),d=d.multiply(g).add(eG(h))):(d=d.multiply(c),d=d.add(eG(h)))}return d},
dG=fG(0,0),hG=fG(1,0),iG=fG(-1,-1),Ela=fG(4294967295,2147483647),cG=fG(0,2147483648);
bG.prototype.toInt=function(){return this.low_};
var jG=function(a){return 4294967296*a.high_+(a.low_>>>0)};
f=bG.prototype;f.isSafeInteger=function(){var a=this.high_>>21;return 0==a||-1==a&&!(0==this.low_&&-2097152==this.high_)};
f.toString=function(a){a=a||10;if(2>a||36<a)throw Error("radix out of range: "+a);if(this.isSafeInteger()){var b=jG(this);return 10==a?""+b:b.toString(a)}b=14-(a>>2);var c=Math.pow(a,b),d=fG(c,c/4294967296);c=this.div(d);d=Math.abs(jG(kG(this,c.multiply(d))));var e=10==a?""+d:d.toString(a);e.length<b&&(e="0000000000000".substr(e.length-b)+e);d=jG(c);return(10==a?d:d.toString(a))+e};
f.getHighBits=function(){return this.high_};
f.getLowBits=function(){return this.low_};
f.isZero=function(){return 0==this.low_&&0==this.high_};
f.isOdd=function(){return 1==(this.low_&1)};
f.equals=function(a){return this.low_==a.low_&&this.high_==a.high_};
f.notEquals=function(a){return!this.equals(a)};
f.lessThan=function(a){return 0>this.compare(a)};
f.compare=function(a){return this.high_==a.high_?this.low_==a.low_?0:this.low_>>>0>a.low_>>>0?1:-1:this.high_>a.high_?1:-1};
f.negate=function(){var a=~this.low_+1|0;return fG(a,~this.high_+!a|0)};
f.add=function(a){var b=this.high_>>>16,c=this.high_&65535,d=this.low_>>>16,e=a.high_>>>16,g=a.high_&65535,h=a.low_>>>16;a=(this.low_&65535)+(a.low_&65535);h=(a>>>16)+(d+h);d=h>>>16;d+=c+g;b=(d>>>16)+(b+e)&65535;return fG((h&65535)<<16|a&65535,b<<16|d&65535)};
var kG=function(a,b){return a.add(b.negate())};
f=bG.prototype;f.multiply=function(a){if(this.isZero())return this;if(a.isZero())return a;var b=this.high_>>>16,c=this.high_&65535,d=this.low_>>>16,e=this.low_&65535,g=a.high_>>>16,h=a.high_&65535,m=a.low_>>>16;a=a.low_&65535;var n=e*a;var p=(n>>>16)+d*a;var x=p>>>16;p=(p&65535)+e*m;x+=p>>>16;x+=c*a;var y=x>>>16;x=(x&65535)+d*m;y+=x>>>16;x=(x&65535)+e*h;y=y+(x>>>16)+(b*a+c*m+d*h+e*g)&65535;return fG((p&65535)<<16|n&65535,y<<16|x&65535)};
f.div=function(a){if(a.isZero())throw Error("division by zero");if(0>this.high_){if(this.equals(cG)){if(a.equals(hG)||a.equals(iG))return cG;if(a.equals(cG))return hG;var b=1;if(0==b)b=this;else{var c=this.high_;b=32>b?fG(this.low_>>>b|c<<32-b,c>>b):fG(c>>b-32,0<=c?0:-1)}b=b.div(a).shiftLeft(1);if(b.equals(dG))return 0>a.high_?hG:iG;c=kG(this,a.multiply(b));return b.add(c.div(a))}return 0>a.high_?this.negate().div(a.negate()):this.negate().div(a).negate()}if(this.isZero())return dG;if(0>a.high_)return a.equals(cG)?
dG:this.div(a.negate()).negate();var d=dG;for(c=this;0<=c.compare(a);){b=Math.max(1,Math.floor(jG(c)/jG(a)));var e=Math.ceil(Math.log(b)/Math.LN2);e=48>=e?1:Math.pow(2,e-48);for(var g=eG(b),h=g.multiply(a);0>h.high_||0<h.compare(c);)b-=e,g=eG(b),h=g.multiply(a);g.isZero()&&(g=hG);d=d.add(g);c=kG(c,h)}return d};
f.modulo=function(a){return kG(this,this.div(a).multiply(a))};
f.not=function(){return fG(~this.low_,~this.high_)};
f.and=function(a){return fG(this.low_&a.low_,this.high_&a.high_)};
f.or=function(a){return fG(this.low_|a.low_,this.high_|a.high_)};
f.xor=function(a){return fG(this.low_^a.low_,this.high_^a.high_)};
f.shiftLeft=function(a){a&=63;if(0==a)return this;var b=this.low_;return 32>a?fG(b<<a,this.high_<<a|b>>>32-a):fG(0,b<<a-32)};
f.shiftRightUnsigned=function(a){a&=63;if(0==a)return this;var b=this.high_;return 32>a?fG(this.low_>>>a|b<<32-a,b>>>a):32==a?fG(b,0):fG(b>>>a-32,0)};var Fla=function(){this.highestAckedVersionMap_=new Ak};
Fla.prototype.getKey_=function(a){return a.getSource().toString()+":"+a.getName()};var lG=function(){J.call(this)};
t(lG,J);var Gla=null;f=lG.prototype;f.getInvalidation=function(){return L(this,1)};
f.getInvalidationOrDefault=function(){return M(this,1)};
f.hasInvalidation=function(){return K(this,1)};
f.invalidationCount=function(){return Q(this,1)};
f.clearInvalidation=function(){O(this,1)};
var mG=function(){J.call(this)};
t(mG,J);var Hla=null;f=mG.prototype;f.getClientToken=function(){return L(this,1)};
f.getClientTokenOrDefault=function(){return M(this,1)};
f.setClientToken=function(a){N(this,1,a)};
f.hasClientToken=function(){return K(this,1)};
f.clientTokenCount=function(){return Q(this,1)};
f.clearClientToken=function(){O(this,1)};
f.getLastMessageSendTimeMs=function(){return L(this,2)};
f.getLastMessageSendTimeMsOrDefault=function(){return M(this,2)};
f.setLastMessageSendTimeMs=function(a){N(this,2,a)};
f.hasLastMessageSendTimeMs=function(){return K(this,2)};
f.lastMessageSendTimeMsCount=function(){return Q(this,2)};
f.clearLastMessageSendTimeMs=function(){O(this,2)};
var nG=function(){J.call(this)};
t(nG,J);var Ila=null;f=nG.prototype;f.getTiclStateOrDefault=function(){return M(this,1)};
f.hasTiclState=function(){return K(this,1)};
f.ticlStateCount=function(){return Q(this,1)};
f.clearTiclState=function(){O(this,1)};
f.getAuthenticationCodeOrDefault=function(){return M(this,2)};
f.hasAuthenticationCode=function(){return K(this,2)};
f.authenticationCodeCount=function(){return Q(this,2)};
f.clearAuthenticationCode=function(){O(this,2)};
lG.prototype.getDescriptor=function(){var a=Gla;a||(Gla=a=xu(lG,{0:{name:"AckHandleP",fullName:"ipc.invalidation.AckHandleP"},1:{name:"invalidation",fieldType:11,type:EF}}));return a};
lG.getDescriptor=lG.prototype.getDescriptor;mG.prototype.getDescriptor=function(){var a=Hla;a||(Hla=a=xu(mG,{0:{name:"PersistentTiclState",fullName:"ipc.invalidation.PersistentTiclState"},1:{name:"client_token",fieldType:12,type:String},2:{name:"last_message_send_time_ms",fieldType:3,defaultValue:"0",type:String}}));return a};
mG.getDescriptor=mG.prototype.getDescriptor;nG.prototype.getDescriptor=function(){var a=Ila;a||(Ila=a=xu(nG,{0:{name:"PersistentStateBlob",fullName:"ipc.invalidation.PersistentStateBlob"},1:{name:"ticl_state",fieldType:11,type:mG},2:{name:"authentication_code",fieldType:12,type:String}}));return a};
nG.getDescriptor=nG.prototype.getDescriptor;var oG=function(){this.currentState_=1};
oG.prototype.start=function(){this.currentState_=2};
oG.prototype.stop=function(){this.currentState_=3};
oG.prototype.isStarted=function(){return 2==this.currentState_};
oG.prototype.isStopped=function(){return 3==this.currentState_};var pG=function(a,b){this.name_=a;this.operation_=b};
pG.prototype.getName=function(){return this.name_};
pG.prototype.run=function(){this.operation_()};
pG.prototype.toString=function(){return this.name_};var qG=function(a,b){null!=a&&this.append.apply(this,arguments)};
f=qG.prototype;f.buffer_="";f.set=function(a){this.buffer_=""+a};
f.append=function(a,b,c){this.buffer_+=String(a);if(null!=b)for(var d=1;d<arguments.length;d++)this.buffer_+=arguments[d];return this};
f.clear=function(){this.buffer_=""};
f.getLength=function(){return this.buffer_.length};
f.toString=function(){return this.buffer_};var rG=function(){};
rG.prototype.toString=function(){var a=new qG,b=!0,c;for(c in this){var d=this[c];Za(d)||(b||a.append(", "),b=!1,a.append(c+" = "+d))}return a.toString()};var sG=function(a,b){this.source_=a;this.name_=b;for(a=0;a<b.length;a++);};
t(sG,rG);Na("invalidation.Types.ObjectId",sG,void 0);sG.prototype.getSource=function(){return this.source_};
sG.prototype.getSource=sG.prototype.getSource;sG.prototype.getName=function(){return this.name_};
sG.prototype.getName=sG.prototype.getName;sG.prototype.equals=function(a){return this==a?!0:this.source_==a.source_&&this.name_==a.name_};
var tG=function(a,b,c,d){this.objectId_=a;this.version_=b;this.payload_=c||null;this.isTrickleRestart_=void 0!==d?d:!0};
t(tG,rG);Na("invalidation.Types.Invalidation",tG,void 0);tG.prototype.getObjectId=function(){return this.objectId_};
tG.prototype.getObjectId=tG.prototype.getObjectId;tG.prototype.getVersion=function(){return this.version_};
tG.prototype.getVersion=tG.prototype.getVersion;tG.prototype.getIsTrickleRestartForInternalUse=function(){return this.isTrickleRestart_};
tG.prototype.getIsTrickleRestartForInternalUse=tG.prototype.getIsTrickleRestartForInternalUse;tG.prototype.getPayload=function(){return this.payload_};
tG.prototype.getPayload=tG.prototype.getPayload;var uG=function(a,b){this.code_=a;this.message_=b};
t(uG,rG);Na("invalidation.Types.Status",uG,void 0);var vG=function(){return new uG(0,"")};
Na("invalidation.Types.newSuccessStatus",vG,void 0);Na("invalidation.Types.newTransientFailureStatus",function(a){return new uG(1,a)},void 0);
var Jla=function(a){return new uG(2,a)};
Na("invalidation.Types.newPermanentFailureStatus",Jla,void 0);uG.prototype.getCode=function(){return this.code_};
uG.prototype.getCode=uG.prototype.getCode;uG.prototype.getMessage=function(){return this.message_};
uG.prototype.getMessage=uG.prototype.getMessage;uG.prototype.isSuccess=function(){return 0==this.code_};
uG.Code={SUCCESS:0,TRANSIENT_FAILURE:1,PERMANENT_FAILURE:2};var wG=function(a,b,c,d){this.errorReason_=a;this.isTransient_=b;this.errorMessage_=c;this.context_=d};
t(wG,rG);Na("invalidation.Types.ErrorInfo",wG,void 0);wG.prototype.getErrorReason=function(){return this.errorReason_};
wG.prototype.getErrorReason=wG.prototype.getErrorReason;wG.prototype.isTransient=function(){return this.isTransient_};
wG.prototype.isTransient=wG.prototype.isTransient;wG.prototype.getErrorMessage=function(){return this.errorMessage_||"(no description)"};
wG.prototype.getErrorMessage=wG.prototype.getErrorMessage;wG.prototype.getContext=function(){return this.context_};
wG.prototype.getContext=wG.prototype.getContext;Na("invalidation.Types.ErrorContext",function(){},void 0);
wG.ErrorReason={AUTH_FAILURE:1,UNKNOWN_FAILURE:-1};var xG=function(a){this.clientName_=a};
t(xG,rG);Na("invalidation.Types.ApplicationClientId",xG,void 0);xG.prototype.getClientName=function(){return this.clientName_};
xG.prototype.getClientName=xG.prototype.getClientName;var yG=function(a){this.handleData_=a};
t(yG,rG);Na("invalidation.Types.AckHandle",yG,void 0);yG.prototype.getHandleData=function(){return this.handleData_};
yG.prototype.getHandleData=yG.prototype.getHandleData;yG.prototype.equals=function(a){return a instanceof yG&&this.handleData_===a.getHandleData()};
yG.prototype.equals=yG.prototype.equals;var zG=function(){};
Na("invalidation.SystemResources",zG,void 0);zG.prototype.start=zG.prototype.start;zG.prototype.stop=zG.prototype.stop;zG.prototype.isStarted=zG.prototype.isStarted;zG.prototype.getPlatform=zG.prototype.getPlatform;zG.prototype.getLogger=zG.prototype.getLogger;zG.prototype.getStorage=zG.prototype.getStorage;zG.prototype.getNetwork=zG.prototype.getNetwork;zG.prototype.getInternalScheduler=zG.prototype.getInternalScheduler;zG.prototype.getListenerScheduler=zG.prototype.getListenerScheduler;
zG.ResourceComponent=function(){};
var AG=function(){};
zG.Logger=AG;AG.prototype.severe=AG.prototype.severe;AG.prototype.warning=AG.prototype.warning;AG.prototype.info=AG.prototype.info;AG.prototype.fine=AG.prototype.fine;AG.prototype.isLoggable=AG.prototype.isLoggable;var BG=function(){};
zG.Scheduler=BG;BG.prototype.schedule=BG.prototype.schedule;BG.prototype.getCurrentTimeMs=BG.prototype.getCurrentTimeMs;var CG=function(){};
zG.NetworkChannel=CG;CG.prototype.sendMessage=CG.prototype.sendMessage;CG.prototype.setMessageReceiver=CG.prototype.setMessageReceiver;CG.prototype.addNetworkStatusReceiver=CG.prototype.addNetworkStatusReceiver;var DG=function(){};
zG.Storage=DG;DG.prototype.writeKey=DG.prototype.writeKey;DG.prototype.readKey=DG.prototype.readKey;DG.prototype.deleteKey=DG.prototype.deleteKey;DG.prototype.readAllKeys=DG.prototype.readAllKeys;var EG=function(a,b,c,d,e){this.internalScheduler_=b;this.listenerScheduler_=c;this.logger_=a;this.network_=d;this.storage_=e;this.runState_=new oG;this.internalScheduler_.setSystemResources(this);this.listenerScheduler_.setSystemResources(this);this.logger_&&this.logger_.setSystemResources(this);this.network_.setSystemResources(this);this.storage_.setSystemResources(this)};
f=EG.prototype;f.start=function(){this.runState_.start()};
f.stop=function(){this.runState_.stop();this.network_.stop()};
f.isStarted=function(){return this.runState_.isStarted()};
f.getPlatform=function(){return uz};
f.getLogger=function(){return this.logger_};
f.getStorage=function(){return this.storage_};
f.getNetwork=function(){return this.network_};
f.getInternalScheduler=function(){return this.internalScheduler_};
f.getListenerScheduler=function(){return this.listenerScheduler_};var Kla=new zF,FG=new yF;FG.setMajorVersion(3);FG.setMinorVersion(2);Kla.setVersion(FG);var GG=new yF;GG.setMajorVersion(3);GG.setMinorVersion(2);var HG=new yF;HG.setMajorVersion(3);HG.setMinorVersion(20150820);var IG=new CF;IG.setName("");IG.setSource(1);var Lla={PROTOBUF_BINARY_FORMAT:1,PROTOBUF_JSON_FORMAT:2},JG=function(){J.call(this)};
t(JG,J);var Mla=null;f=JG.prototype;f.getNetworkAddress=function(){return L(this,1)};
f.getNetworkAddressOrDefault=function(){return M(this,1)};
f.hasNetworkAddress=function(){return K(this,1)};
f.networkAddressCount=function(){return Q(this,1)};
f.clearNetworkAddress=function(){O(this,1)};
f.getClientAddress=function(){return L(this,2)};
f.getClientAddressOrDefault=function(){return M(this,2)};
f.hasClientAddress=function(){return K(this,2)};
f.clientAddressCount=function(){return Q(this,2)};
f.clearClientAddress=function(){O(this,2)};
f.getIsOffline=function(){return L(this,3)};
f.getIsOfflineOrDefault=function(){return M(this,3)};
f.setIsOffline=function(a){N(this,3,a)};
f.hasIsOffline=function(){return K(this,3)};
f.isOfflineCount=function(){return Q(this,3)};
f.clearIsOffline=function(){O(this,3)};
var Nla={TEST:1,BUZZ:111,STUBBY:112,ANDROID:113,LCS:114,TIPS_GCM:115,PROBER:116,TIPS_GCM_STAGING:117,TIPS_GCM_DEV:118};JG.prototype.getDescriptor=function(){var a=Mla;a||(Mla=a=xu(JG,{0:{name:"NetworkEndpointId",fullName:"ipc.invalidation.NetworkEndpointId"},1:{name:"network_address",fieldType:14,defaultValue:1,type:Nla},2:{name:"client_address",fieldType:12,type:String},3:{name:"is_offline",fieldType:8,type:Boolean}}));return a};
JG.getDescriptor=JG.prototype.getDescriptor;var KG=function(){J.call(this)};
t(KG,J);var Ola=null;f=KG.prototype;f.getIsClientToServer=function(){return L(this,1)};
f.getIsClientToServerOrDefault=function(){return M(this,1)};
f.hasIsClientToServer=function(){return K(this,1)};
f.isClientToServerCount=function(){return Q(this,1)};
f.clearIsClientToServer=function(){O(this,1)};
f.getServiceContext=function(){return L(this,2)};
f.getServiceContextOrDefault=function(){return M(this,2)};
f.setServiceContext=function(a){N(this,2,a)};
f.hasServiceContext=function(){return K(this,2)};
f.serviceContextCount=function(){return Q(this,2)};
f.clearServiceContext=function(){O(this,2)};
f.getRpcSchedulingHash=function(){return L(this,3)};
f.getRpcSchedulingHashOrDefault=function(){return M(this,3)};
f.setRpcSchedulingHash=function(a){N(this,3,a)};
f.hasRpcSchedulingHash=function(){return K(this,3)};
f.rpcSchedulingHashCount=function(){return Q(this,3)};
f.clearRpcSchedulingHash=function(){O(this,3)};
f.getProtocolVersion=function(){return L(this,5)};
f.getProtocolVersionOrDefault=function(){return M(this,5)};
f.setProtocolVersion=function(a){N(this,5,a)};
f.hasProtocolVersion=function(){return K(this,5)};
f.protocolVersionCount=function(){return Q(this,5)};
f.clearProtocolVersion=function(){O(this,5)};
f.getMessageType=function(){return L(this,6)};
f.getMessageTypeOrDefault=function(){return M(this,6)};
f.hasMessageType=function(){return K(this,6)};
f.messageTypeCount=function(){return Q(this,6)};
f.clearMessageType=function(){O(this,6)};
f.getEncoding=function(){return L(this,7)};
f.getEncodingOrDefault=function(){return M(this,7)};
f.hasEncoding=function(){return K(this,7)};
f.encodingCount=function(){return Q(this,7)};
f.clearEncoding=function(){O(this,7)};
f.getClientEndpointId=function(){return L(this,8)};
f.getClientEndpointIdOrDefault=function(){return M(this,8)};
f.hasClientEndpointId=function(){return K(this,8)};
f.clientEndpointIdCount=function(){return Q(this,8)};
f.clearClientEndpointId=function(){O(this,8)};
f.getServiceEndpointId=function(){return L(this,9)};
f.getServiceEndpointIdOrDefault=function(){return M(this,9)};
f.setServiceEndpointId=function(a){N(this,9,a)};
f.hasServiceEndpointId=function(){return K(this,9)};
f.serviceEndpointIdCount=function(){return Q(this,9)};
f.clearServiceEndpointId=function(){O(this,9)};
f.getNetworkMessage=function(){return L(this,4)};
f.getNetworkMessageOrDefault=function(){return M(this,4)};
f.hasNetworkMessage=function(){return K(this,4)};
f.networkMessageCount=function(){return Q(this,4)};
f.clearNetworkMessage=function(){O(this,4)};
f.getDebugInfo=function(){return L(this,10)};
f.getDebugInfoOrDefault=function(){return M(this,10)};
f.hasDebugInfo=function(){return K(this,10)};
f.debugInfoCount=function(){return Q(this,10)};
f.clearDebugInfo=function(){O(this,10)};
var Pla={CLIENT_TO_SERVER:1,SERVER_TO_CLIENT:2,DISCONNECT:3,TIPS_CLIENT_TO_SERVER:4,SERVER_TO_TIPS_CLIENT:5};
KG.prototype.getDescriptor=function(){var a=Ola;a||(Ola=a=xu(KG,{0:{name:"ClientGatewayMessage",fullName:"ipc.invalidation.ClientGatewayMessage"},1:{name:"is_client_to_server",fieldType:8,type:Boolean},2:{name:"service_context",fieldType:12,type:String},3:{name:"rpc_scheduling_hash",fieldType:3,type:String},5:{name:"protocol_version",fieldType:11,type:zF},6:{name:"message_type",fieldType:14,defaultValue:1,type:Pla},7:{name:"encoding",fieldType:14,defaultValue:1,type:Lla},8:{name:"client_endpoint_id",
fieldType:11,type:JG},9:{name:"service_endpoint_id",fieldType:12,type:String},4:{name:"network_message",fieldType:12,type:String},10:{name:"debug_info",fieldType:9,type:String}}));return a};
KG.getDescriptor=KG.prototype.getDescriptor;var Qla=function(a,b){var c=new FF;c.setObjectId(a);N(c,2,b?1:2);return c},Rla=function(a){var b=new mG;
b.setClientToken(a);return b};var Sla=function(a){var b=a.a,c=a.b,d=a.c;b=b-c-d^d>>>13;c=c-d-b^b<<8;d-=b;d=d-c^c>>>13;b-=c;b-=d;b^=d>>>12;c=c-d-b^b<<16;d-=b;d=d-c^c>>>5;b-=c;b-=d;b^=d>>>3;c=c-d-b^b<<10;d-=b;d=d-c^c>>>15;a.a=b;a.b=c;return a.c=d},MG=function(a,b){return LG(a[b+0])+(LG(a[b+1])<<8)+(LG(a[b+2])<<16)+(LG(a[b+3])<<24)},LG=function(a){return 127<a?a-256:a};Na("invalidation.ConcurrentStore",function(){},void 0);
var NG=function(a,b){this.logger_=b;this.storeName_=a;this.uniqueId_=this.createUniqueId_();this.lastRemoverStorage_=(this.storage_=cl("google_notification_values_"+this.storeName_))?cl("google_notification_remover_"+this.storeName_):null;this.raceDetectionDelayMillis_=100};
NG.prototype.add=function(a){if(null!=this.storage_&&!(10<=this.storage_.getCount())){var b=String;var c=He(a);var d=0,e=c.length,g={a:-1640531527,b:-1640531527,c:314159265},h;for(h=e;12<=h;h-=12,d+=12)g.a+=MG(c,d),g.b+=MG(c,d+4),g.c+=MG(c,d+8),Sla(g);g.c+=e;switch(h){case 11:g.c+=c[d+10]<<24;case 10:g.c+=(c[d+9]&255)<<16;case 9:g.c+=(c[d+8]&255)<<8;case 8:g.b+=MG(c,d+4);g.a+=MG(c,d);break;case 7:g.b+=(c[d+6]&255)<<16;case 6:g.b+=(c[d+5]&255)<<8;case 5:g.b+=c[d+4]&255;case 4:g.a+=MG(c,d);break;case 3:g.a+=
(c[d+2]&255)<<16;case 2:g.a+=(c[d+1]&255)<<8;case 1:g.a+=c[d+0]&255;}c=Sla(g);Tla(this,b(c),a)}};
var Vla=function(a,b){if(0==b)return Promise.resolve(null);var c=a.storage_?zk(a.storage_.__iterator__(!0)):[];return 0==c.length?Promise.resolve(null):Ula(a,c[Math.floor(Math.random()*c.length)]).then(function(d){return null!=d?d:Vla(a,b-1)})},Ula=function(a,b){var c=!1,d=function(g){g=g.event_;
g.key=="google_notification_remover_"+a.storeName_+"::"+b&&g.newValue!=a.uniqueId_&&(c=!0)};
Hv(self,"storage",d);Wla(a,b,a.uniqueId_);var e=a.storage_.get(b);Tla(a,b,null);return new Promise(function(g){xw(function(){Mv(self,"storage",d);Wla(a,b,null);c?g(null):g(e)},a.raceDetectionDelayMillis_)})},Tla=function(a,b,c){null!=c?a.storage_.set(b,c):a.storage_.remove(b)},Wla=function(a,b,c){c?a.lastRemoverStorage_.set(b,c):a.lastRemoverStorage_.remove(b)};
NG.prototype.setLocalStorageForTest=function(a,b){this.storage_=a;this.lastRemoverStorage_=b};
NG.prototype.createUniqueId_=function(){return zd()};
NG.prototype.setUniqueIdFunctionForTest=function(a){this.createUniqueId_=a;this.uniqueId_=this.createUniqueId_()};
NG.prototype.setRaceDetectionDelayMillisForTest=function(a){this.raceDetectionDelayMillis_=a};var OG=function(){this.logger_=this.resources_=null};
OG.prototype.getCurrentTimeMs=function(){return fb()};
OG.prototype.schedule=function(a,b){var c=r(function(){this.resources_.isStarted()&&b.run()},this);
xw(c,a)};
OG.prototype.setSystemResources=function(a){this.resources_=a;this.logger_=this.resources_.getLogger()};
var PG=function(){this.logger_=null};
t(PG,Ru);PG.prototype.setSystemResources=function(){};
var QG=function(){this.logger_=this.internalScheduler_=null;this.persistentState_=new Ak};
f=QG.prototype;f.setSystemResources=function(a){this.internalScheduler_=a.getInternalScheduler();this.logger_=a.getLogger()};
f.writeKey=function(a,b,c){var d=r(function(){this.persistentState_.set(a,b);c(vG())},this);
this.internalScheduler_.schedule(0,new pG("writeKey",d))};
f.readKey=function(a,b){var c=r(function(){var d=this.persistentState_.get(a);d?b(vG(),d):b(Jla("No value present in map for "+a),"")},this);
this.internalScheduler_.schedule(0,new pG("readKey",c))};
f.deleteKey=function(a,b){var c=r(function(){this.persistentState_.remove(a);b(!0)},this);
this.internalScheduler_.schedule(0,new pG("deleteKey",c))};
f.readAllKeys=function(a){var b=r(function(){for(var c=this.persistentState_.getKeys(),d=0;d<c.length;d++)a(vG(),c[d])},this);
this.internalScheduler_.schedule(0,new pG("readAllKeys",b))};Na("invalidation.DigestFunction",function(){},void 0);
var RG=function(a){this.value_=a};
RG.prototype.serialize=function(){return jf(this.value_)};
RG.prototype.equals=function(a){return Ib(this.value_,a.value_)};
RG.prototype.toString=function(){return Qu("Digest: <%s, %s>",this.serialize(),this.value_.toString())};Na("invalidation.DigestStore",function(){},void 0);var SG=function(){this.sha1_=new jk;this.resetNeeded_=!1};
SG.prototype.reset=function(){this.resetNeeded_=!1;this.sha1_.reset()};
SG.prototype.update=function(a){this.sha1_.update(a)};
SG.prototype.getDigest=function(){this.resetNeeded_=!0;var a=this.sha1_.digest();return new RG(a)};
var TG=function(a,b){b.reset();for(var c=[],d=a.getSource(),e=0;4>e;e++)c[e]=d&255,d>>=8;b.update(c);b.update(a.getName());return b.getDigest()};var Yla=function(a,b){b=Xla(a,b).serialize();var c=new nG;N(c,1,a);N(c,2,b);return pv(c)},Xla=function(a,b){b.reset();
b.update(pv(a));return b.getDigest()};var VG=function(){this.sentMessageTypes_=new Ak;this.receivedMessageTypes_=new Ak;this.incomingOperationTypes_=new Ak;this.listenerEventTypes_=new Ak;this.clientErrorTypes_=new Ak;UG(this.sentMessageTypes_,u.getValues(Zla));UG(this.receivedMessageTypes_,u.getValues($la));UG(this.incomingOperationTypes_,u.getValues(ama));UG(this.listenerEventTypes_,u.getValues(bma));UG(this.clientErrorTypes_,u.getValues(cma))},UG=function(a,b){for(var c=0;c<b.length;c++)a.set(b[c],0)};
VG.prototype.getCopyForTest=function(){var a=new VG;a.sentMessageTypes_.addAll(this.sentMessageTypes_);a.receivedMessageTypes_.addAll(this.receivedMessageTypes_);a.incomingOperationTypes_.addAll(this.incomingOperationTypes_);a.listenerEventTypes_.addAll(this.listenerEventTypes_);a.clientErrorTypes_.addAll(this.clientErrorTypes_);return a};
VG.prototype.getClientErrorCounterForTest=function(a){return this.clientErrorTypes_.get(a)};
VG.prototype.getReceivedMessageCounterForTest=function(a){return this.receivedMessageTypes_.get(a)};
var XG=function(a,b){WG(a.clientErrorTypes_,b)},YG=function(a,b,c){for(var d=a.getKeys(),e=0;e<d.length;e++){var g=d[e],h=a.get(g);
g=c+"."+g;0<h&&b.set(g,h)}},WG=function(a,b){a.set(b,a.get(b)+1)},Zla={INFO:"INFO",
INITIALIZE:"INITIALIZE",INVALIDATION_ACK:"INVALIDATION_ACK",REGISTRATION:"REGISTRATION",REGISTRATION_SYNC:"REGISTRATION_SYNC",TOTAL:"TOTAL"},$la={INFO_REQUEST:"INFO_REQUEST",INVALIDATION:"INVALIDATION",REGISTRATION_STATUS:"REGISTRATION_STATUS",REGISTRATION_SYNC_REQUEST:"REGISTRATION_SYNC_REQUEST",TOKEN_CONTROL:"TOKEN_CONTROL",ERROR:"ERROR",CONFIG_CHANGE:"CONFIG_CHANGE",STALE_INVALIDATION:"STALE_INVALIDATION",TOTAL:"TOTAL"},ama={ACKNOWLEDGE:"ACKNOWLEDGE",REGISTRATION:"REGISTRATION",UNREGISTRATION:"UNREGISTRATION"},
bma={INFORM_ERROR:"INFORM_ERROR",INFORM_REGISTRATION_FAILURE:"INFORM_REGISTRATION_FAILURE",INFORM_REGISTRATION_STATUS:"INFORM_REGISTRATION_STATUS",INVALIDATE:"INVALIDATE",INVALIDATE_ALL:"INVALIDATE_ALL",INVALIDATE_UNKNOWN:"INVALIDATE_UNKNOWN",REISSUE_REGISTRATIONS:"REISSUE_REGISTRATIONS"},cma={ACKNOWLEDGE_HANDLE_FAILURE:"ACKNOWLEDGE_HANDLE_FAILURE",INCOMING_MESSAGE_FAILURE:"INCOMING_MESSAGE_FAILURE",OUTGOING_MESSAGE_FAILURE:"OUTGOING_MESSAGE_FAILURE",PERSISTENT_DESERIALIZATION_FAILURE:"PERSISTENT_DESERIALIZATION_FAILURE",
PERSISTENT_READ_FAILURE:"PERSISTENT_READ_FAILURE",PERSISTENT_WRITE_FAILURE:"PERSISTENT_WRITE_FAILURE",PROTOCOL_VERSION_FAILURE:"PROTOCOL_VERSION_FAILURE",REGISTRATION_DISCREPANCY:"REGISTRATION_DISCREPANCY",NONCE_MISMATCH:"NONCE_MISMATCH",TOKEN_MISMATCH:"TOKEN_MISMATCH",TOKEN_MISSING_FAILURE:"TOKEN_MISSING_FAILURE",TOKEN_TRANSIENT_FAILURE:"TOKEN_TRANSIENT_FAILURE",NETWORK_DISCONNECTED:"NETWORK_DISCONNECTED"};var ZG=function(a){this.logger=a;a=function(){return!0};
var b=r(this.required,this),c=r(function(g){return r(this.greaterOrEqualTo,this,g)},this),d=c(0),e=r(this.nonEmpty,this);
this.specifications_={Version:{major_version:[b,d],minor_version:[b,d]},ProtocolVersion:{version:[b]},ObjectIdP:{name:[b],source:[b,d]},InvalidationP:{object_id:[b],is_known_version:[b],version:[b,d],payload:[a],is_trickle_restart:[a]},RegistrationP:{object_id:[b],op_type:[b]},RegistrationSummary:{num_registrations:[b,d],registration_digest:[b,e]},InvalidationMessage:{invalidation:[b]},ClientHeader:{protocol_version:[b],client_token:[a,e],registration_summary:[a],client_time_ms:[b],max_known_server_time_ms:[b],
client_type:[a],message_id:[a]},ApplicationClientIdP:{client_type:[b],client_name:[b,e]},InitializeMessage:{client_type:[b],nonce:[b,e],digest_serialization_type:[b],application_client_id:[b]},RegistrationMessage:{registration:[b]},ClientVersion:{version:[b],platform:[b],language:[b],application_info:[b]},PropertyRecord:{name:[b],value:[b]},InfoMessage:{client_version:[b],config_parameter:[a],performance_counter:[a],client_config:[a],server_registration_summary_requested:[a]},ClientConfigP:{version:[b],
network_timeout_delay_ms:[a],write_retry_delay_ms:[a],heartbeat_interval_ms:[a],perf_counter_delay_ms:[a],max_exponential_backoff_factor:[a],smear_percent:[a],is_transient:[a],initial_persistent_heartbeat_delay_ms:[a],channel_supports_offline_delivery:[a],protocol_handler_config:[b],offline_heartbeat_threshold_ms:[a],allow_suppression:[a]},ProtocolHandlerConfigP:{batching_delay_ms:[a],rate_limit:[a]},RateLimitP:{window_ms:[b,c(1E3)],count:[b]},RegistrationSubtree:{registered_object:[a]},RegistrationSyncMessage:{subtree:[b]},
ClientToServerMessage:{header:[b],info_message:[a],initialize_message:[a],invalidation_ack_message:[a],registration_message:[a],registration_sync_message:[a]},ServerHeader:{protocol_version:[b],client_token:[b,e],registration_summary:[a],server_time_ms:[b,d],message_id:[a,e]},StatusP:{code:[b],description:[a]},TokenControlMessage:{new_token:[a]},ErrorMessage:{code:[b],description:[b]},RegistrationStatus:{registration:[b],status:[b]},RegistrationStatusMessage:{registration_status:[b]},RegistrationSyncRequestMessage:{},
InfoRequestMessage:{info_type:[b]},ConfigChangeMessage:{next_message_delay_ms:[a,c(1)]},ServerToClientMessage:{header:[b],token_control_message:[a],invalidation_message:[a],registration_status_message:[a],registration_sync_request_message:[a],config_change_message:[a],info_request_message:[a],error_message:[a]}}};
t(ZG,nA);ZG.prototype.getSpecifications=function(){return this.specifications_};
ZG.prototype.isClientMessageValid=function(a){if(!this.validate(a))return!1;var b=L(a,1).hasClientToken();return K(a,2)?!b:b};
ZG.prototype.isServerMessageValid=function(a){return this.validate(a)};var aH=function(a,b,c,d,e,g){var h=a.getPlatform()+"",m=new AF;m.setVersion(HG);m.setPlatform(h);m.setLanguage("JS");m.setApplicationInfo(d);this.clientVersion_=m;this.logger=a.getLogger();this.internalScheduler=a.getInternalScheduler();this.network_=a.getNetwork();this.listener_=e;this.msgValidator_=g;this.messageId_=1;this.nextMessageSendTimeMs_=this.lastKnownServerTimeMs_=0;this.statistics_=b;this.batcher_=new $G(a,b);this.clientType_=c},$G=function(a,b){this.statistics_=b;
this.resources_=a;this.pendingRegistrations_=new Ak;this.pendingAckedInvalidations_=new Ak;this.pendingRegSubtrees_=new Ak;this.pendingInfoMessage_=this.pendingInitializeMessage_=null};
$G.prototype.setInitializeMessage=function(a){this.pendingInitializeMessage_=a};
$G.prototype.setInfoMessage=function(a){this.pendingInfoMessage_=a};
$G.prototype.addRegistration=function(a,b){b=Qla(a,b);this.pendingRegistrations_.set(pv(a),b)};
$G.prototype.addAck=function(a){this.pendingAckedInvalidations_.set(pv(a),a)};
var dma=function(a,b){this.token=a;this.registrationSummary=b};
dma.prototype.toString=function(){return Qu("Token: %s, Summary: %s",null==this.token?"null":this.token,this.registrationSummary.toString())};
var ema=function(a){var b=L(a,1);this.header=new dma(b.getClientToken(),K(b,3)?b.getRegistrationSummary():null);this.tokenControlMessage=K(a,2)?L(a,2):null;this.invalidationMessage=K(a,3)?L(a,3):null;this.registrationStatusMessage=K(a,4)?L(a,4):null;this.registrationSyncRequestMessage=K(a,5)?L(a,5):null;this.configChangeMessage=K(a,6)?L(a,6):null;this.infoRequestMessage=K(a,7)?L(a,7):null;this.errorMessage=K(a,8)?a.getErrorMessage():null};
aH.prototype.getNextMessageSendTimeMsForTest=function(){return this.nextMessageSendTimeMs_};
var fma=function(a,b){b=a.deserializeMessage(b);if(null==b)return null;if(!a.msgValidator_.isServerMessageValid(b))return XG(a.statistics_,"INCOMING_MESSAGE_FAILURE"),null;var c=L(b,1);if(3!=c.getProtocolVersion().getVersion().getMajorVersion())return XG(a.statistics_,"PROTOCOL_VERSION_FAILURE"),null;if(K(b,6))return b=L(b,6),WG(a.statistics_.receivedMessageTypes_,"CONFIG_CHANGE"),K(b,1)&&(a.nextMessageSendTimeMs_=a.internalScheduler.getCurrentTimeMs()+M(b,1)),null;a.lastKnownServerTimeMs_=Math.max(a.lastKnownServerTimeMs_,
L(c,4));return new ema(b)};
aH.prototype.sendMessageToServer=function(){if(this.nextMessageSendTimeMs_>this.internalScheduler.getCurrentTimeMs())this.internalScheduler.getCurrentTimeMs();else{var a=null!=this.listener_.getClientToken();var b=this.batcher_;var c=new IF;null!=b.pendingInitializeMessage_&&(WG(b.statistics_.sentMessageTypes_,"INITIALIZE"),c.setInitializeMessage(b.pendingInitializeMessage_),b.pendingInitializeMessage_=null);if(a||K(c,2)){if(!b.pendingAckedInvalidations_.isEmpty()){a=b.pendingAckedInvalidations_.getValues();
b.pendingAckedInvalidations_.clear();for(var d=new VF,e=0;e<a.length;e++)uu(d,1,a[e]);N(c,5,d);WG(b.statistics_.sentMessageTypes_,"INVALIDATION_ACK")}if(!b.pendingRegistrations_.isEmpty()){a=b.pendingRegistrations_.getValues();b.pendingRegistrations_.clear();d=new KF;for(e=0;e<a.length;e++)d.addRegistration(a[e]);N(c,3,d);WG(b.statistics_.sentMessageTypes_,"REGISTRATION")}if(!b.pendingRegSubtrees_.isEmpty()){a=new LF;d=b.pendingRegSubtrees_.getValues();for(e=0;e<d.length;e++)uu(a,1,d[e]);N(c,4,a);
b.pendingRegSubtrees_.clear();WG(b.statistics_.sentMessageTypes_,"REGISTRATION_SYNC")}null!=b.pendingInfoMessage_&&(WG(b.statistics_.sentMessageTypes_,"INFO"),c.setInfoMessage(b.pendingInfoMessage_),b.pendingInfoMessage_=null);b=c}else XG(b.statistics_,"TOKEN_MISSING_FAILURE"),b=null;null!=b&&(b.setHeader(gma(this)),this.messageId_++,this.msgValidator_.isClientMessageValid(b)?(WG(this.statistics_.sentMessageTypes_,"TOTAL"),b=pv(b),this.network_.sendMessage(b),b=this.listener_,b.lastMessageSendTimeMs_=
b.internalScheduler_.getCurrentTimeMs()):XG(this.statistics_,"OUTGOING_MESSAGE_FAILURE"))}};
var gma=function(a){var b=new HF;b.setProtocolVersion(Kla);b.setClientTimeMs(a.internalScheduler.getCurrentTimeMs());b.setMessageId(a.messageId_.toString());b.setMaxKnownServerTimeMs(a.lastKnownServerTimeMs_);b.setRegistrationSummary(a.listener_.getRegistrationSummary());b.setClientType(a.clientType_);a=a.listener_.getClientToken();null!=a&&b.setClientToken(a);return b};
aH.prototype.deserializeMessage=function(a){var b=QF.getDescriptor();return rv(b,a)};var bH=function(a){return new sG(a.getSource(),a.getName())};var dH=function(a,b,c,d,e,g,h){this.name_=a;this.logger=c;this.scheduler=b;this.initialDelayMs_=g;this.timeoutDelayMs_=h;this.smearer=d;this.delayGenerator_=e;this.isScheduled_=!1;this.task_=new pG(a,r(function(){this.isScheduled_=!1;this.runTask()?cH(this,!0):null!=e&&this.delayGenerator_.reset()},this))};
t(dH,rG);dH.prototype.getSmearer=function(){return this.smearer};
dH.prototype.getDelayGenerator=function(){return this.delayGenerator_};
var cH=function(a,b){a.isScheduled_||(b=b?null!=a.delayGenerator_?a.timeoutDelayMs_+Ou(a.delayGenerator_):a.timeoutDelayMs_+eH(a.smearer,a.initialDelayMs_):eH(a.smearer,a.initialDelayMs_),a.scheduler.getCurrentTimeMs(),a.scheduler.schedule(b,a.task_),a.isScheduled_=!0)};var fH=function(a){this.comparator_=a||hma;this.maxNode_=this.minNode_=this.root_=null},hma=function(a,b){return String(a)<String(b)?-1:String(a)>String(b)?1:0};
function gH(a){return a?a.height:0}
function hH(a){return a?(a.left?a.left.height:0)-(a.right?a.right.height:0):0}
var kma=function(a,b){var c=hH(b);return 1<c?(0>hH(b.left)&&ima(a,b.left),jma(a,b)):-1>c?(0<hH(b.right)&&jma(a,b.right),ima(a,b)):b},iH=function(a,b,c){var d=a.comparator_(b,c.value),e=!1;
0<d?c.right?e=iH(a,b,c.right):(c.right=new jH(b,c),e=!0,c==a.maxNode_&&(a.maxNode_=c.right)):0>d&&(c.left?e=iH(a,b,c.left):(c.left=new jH(b,c),e=!0,c==a.minNode_&&(a.minNode_=c.left)));e&&(c.count++,c.height=Math.max(gH(c.left),gH(c.right))+1,kma(a,c));return e};
fH.prototype.add=function(a){return this.root_?iH(this,a,this.root_):(this.maxNode_=this.minNode_=this.root_=new jH(a),!0)};
function lma(a){return a?a.count:0}
var kH=function(a,b,c){if(!c)return{value:null,root:null};var d=a.comparator_(c.value,b);if(0<d)d=kH(a,b,c.left),c.left=d.root,b=d.value;else if(0>d)d=kH(a,b,c.right),c.right=d.root,b=d.value;else if(b=c.value,c.left&&c.right){b=c.value;var e=c.right;lH(a,function(g){return g.left?e=g.left:null},c.right);
c.value=e.value;d=kH(a,e.value,c.right);c.right=d.root}else{d=c.left?c.left:c.right;if(!d)return a.maxNode_==c&&(a.maxNode_=c.parent),a.minNode_==c&&(a.minNode_=c.parent),{value:b,root:null};a.maxNode_==c&&(a.maxNode_=d);a.minNode_==c&&(a.minNode_=d);d.parent=c.parent;c=d}c.count=lma(c.left)+lma(c.right)+1;c.height=Math.max(gH(c.left),gH(c.right))+1;return{root:kma(a,c),value:b}};
f=fH.prototype;f.remove=function(a){a=kH(this,a,this.root_);this.root_=a.root;return a.value};
f.clear=function(){this.maxNode_=this.minNode_=this.root_=null};
f.contains=function(a){var b=!1;lH(this,function(c){var d=null,e=this.comparator_(c.value,a);0<e?d=c.left:0>e?d=c.right:b=!0;return d});
return b};
f.indexOf=function(a){var b=-1,c=0;lH(this,function(d){var e=this.comparator_(d.value,a);if(0<e)return d.left;d.left&&(c+=d.left.count);if(0>e)return c++,d.right;b=c;return null});
return b};
f.getCount=function(){return this.root_?this.root_.count:0};
f.getKthValue=function(a){return 0>a||a>=this.getCount()?null:mH(this,a).value};
f.getMinimum=function(){return this.minNode_.value};
f.getMaximum=function(){return this.maxNode_.value};
f.getHeight=function(){return this.root_?this.root_.height:0};
f.getValues=function(){var a=[];mma(this,function(b){a.push(b)});
return a};
var mma=function(a,b){if(a.root_){a=a.minNode_;for(var c=a.left?a.left:a;null!=a;)if(null!=a.left&&a.left!=c&&a.right!=c)a=a.left;else{if(a.right!=c&&b(a.value))break;var d=a;a=null!=a.right&&a.right!=c?a.right:a.parent;c=d}}};
fH.prototype.reverseOrderTraverse=function(a,b){if(this.root_){if(void 0!==b){if(lH(this,r(function(h){var m=null,n=this.comparator_(h.value,b);0<n?m=h.left:(0>n&&(m=h.right),c=h);return m},this)),!c)return}else var c=this.maxNode_;
for(var d=c,e=c.right?c.right:c;null!=d;)if(null!=d.right&&d.right!=e&&d.left!=e)d=d.right;else{if(d.left!=e&&a(d.value))break;var g=d;d=null!=d.left&&d.left!=e?d.left:d.parent;e=g}}};
var lH=function(a,b,c){for(c=c?c:a.root_;c&&null!=c;)c=b.call(a,c)},ima=function(a,b){b.parent&&b.parent.left==b?(b.parent.left=b.right,b.right.parent=b.parent):b.parent&&b.parent.right==b?(b.parent.right=b.right,b.right.parent=b.parent):(a.root_=b.right,a.root_.parent=null);
a=b.right;b.right=b.right.left;null!=b.right&&(b.right.parent=b);a.left=b;b.parent=a;a.count=b.count;b.count-=(a.right?a.right.count:0)+1;nH(b);nH(a);return a},jma=function(a,b){b.parent&&b.parent.left==b?(b.parent.left=b.left,b.left.parent=b.parent):b.parent&&b.parent.right==b?(b.parent.right=b.left,b.left.parent=b.parent):(a.root_=b.left,a.root_.parent=null);
a=b.left;b.left=b.left.right;null!=b.left&&(b.left.parent=b);a.right=b;b.parent=a;a.count=b.count;b.count-=(a.left?a.left.count:0)+1;nH(b);nH(a);return a},mH=function(a,b,c){c=c||a.root_;
var d=c.left?c.left.count:0;return b<d?mH(a,b,c.left):b==d?c:mH(a,b-d-1,c.right)};
fH.prototype.copy=function(a){var b=new fH(this.comparator_);if(!this.root_)return b;a=this.root_.copy(null,this.comparator_,a);b.root_=a.root;b.minNode_=a.leftMost;b.maxNode_=a.rightMost;return b};
var jH=function(a,b){this.value=a;this.parent=b?b:null;this.count=1;this.right=this.left=null;this.height=1},nH=function(a){a.height=Math.max(a.left?a.left.height:0,a.right?a.right.height:0)+1};
jH.prototype.copy=function(a,b,c){var d=c?c(this.value):this.value;a=new jH(d,a);a.count=this.count;a.height=this.height;var e=d=a;this.left&&(d=this.left.copy(a,b,c),a.left=d.root,d=d.leftMost);this.right&&(b=this.right.copy(a,b,c),a.right=b.root,e=b.rightMost);return{root:a,leftMost:d,rightMost:e}};var pH=function(a){this.registrations_=new fH(nma);this.digestFunction_=a;oH(this)},qH=function(a,b){this.digest=a;
this.objectId=b};
qH.prototype.toString=function(){return Qu("[%s, %s]",this.digest.toString(),this.objectId.toString())};
var nma=function(a,b){a:{a=a.digest.value_;b=b.digest.value_;for(var c=Gb,d=Math.min(a.length,b.length),e=0;e<d;e++){var g=c(a[e],b[e]);if(0!=g){a=g;break a}}a=Gb(a.length,b.length)}return a};
f=pH.prototype;f.add=function(a){for(var b=[],c=0;c<a.length;c++){var d=a[c],e=TG(d,this.digestFunction_);e=new qH(e,d);this.registrations_.contains(e)||(this.registrations_.add(e),b.push(d))}0<b.length&&oH(this);return b};
f.remove=function(a){for(var b=[],c=0;c<a.length;c++){var d=a[c],e=TG(d,this.digestFunction_);e=new qH(e,d);this.registrations_.contains(e)&&(this.registrations_.remove(e),b.push(d))}0<b.length&&oH(this);return b};
f.removeAll=function(){for(var a=[],b=this.registrations_.getValues(),c=0;c<b.length;c++)a.push(b[c].objectId);this.registrations_.clear();oH(this);return a};
f.contains=function(a){var b=TG(a,this.digestFunction_);return this.registrations_.contains(new qH(b,a))};
f.size=function(){return this.registrations_.getCount()};
f.getDigest=function(){return this.digest_};
f.getElements=function(){for(var a=[],b=this.registrations_.getValues(),c=0;c<b.length;c++)a.push(b[c].objectId);return a};
var oH=function(a){for(var b=[],c=a.registrations_.getValues(),d=0;d<c.length;d++)b.push(c[d].digest);c=a.digestFunction_;c.reset();for(d=0;d<b.length;d++)c.update(b[d].value_);b=c.getDigest();a.digest_=b};
pH.prototype.toString=function(){return Qu("Digest: %s, Regs: %s",this.digest_.toString(),this.registrations_.getValues().toString())};var rH=function(){J.call(this)};
t(rH,J);var oma=null;f=rH.prototype;f.getClientSummary=function(){return L(this,1)};
f.getClientSummaryOrDefault=function(){return M(this,1)};
f.hasClientSummary=function(){return K(this,1)};
f.clientSummaryCount=function(){return Q(this,1)};
f.clearClientSummary=function(){O(this,1)};
f.getServerSummary=function(){return L(this,2)};
f.getServerSummaryOrDefault=function(){return M(this,2)};
f.hasServerSummary=function(){return K(this,2)};
f.serverSummaryCount=function(){return Q(this,2)};
f.clearServerSummary=function(){O(this,2)};
f.getRegisteredObjects=function(a){return L(this,3,a)};
f.getRegisteredObjectsOrDefault=function(a){return M(this,3,a)};
f.registeredObjectsArray=function(){return tu(this,3)};
f.hasRegisteredObjects=function(){return K(this,3)};
f.registeredObjectsCount=function(){return Q(this,3)};
f.clearRegisteredObjects=function(){O(this,3)};
f.getDescriptor=function(){var a=oma;a||(oma=a=xu(rH,{0:{name:"ClientTestRegistrationManagerStateP",fullName:"ipc.invalidation.ClientTestRegistrationManagerStateP"},1:{name:"client_summary",fieldType:11,type:GF},2:{name:"server_summary",fieldType:11,type:GF},3:{name:"registered_objects",repeated:!0,fieldType:11,type:CF}}));return a};
rH.getDescriptor=rH.prototype.getDescriptor;var sH=function(a,b,c){this.emptyPrefix_="";this.desiredRegistrations_=new pH(c);this.statistics_=b;this.lastKnownServerSummary_=this.getRegistrationSummary();this.pendingOperations_=new Ak;this.logger_=a};
f=sH.prototype;f.getRegistrationManagerStateCopyForTest=function(){var a=new rH,b=this.getRegistrationSummary();N(a,1,b);N(a,2,this.lastKnownServerSummary_);b=this.desiredRegistrations_.getElements();for(var c=0;c<b.length;c++)uu(a,3,b[c]);return a};
f.setDigestStoreForTest=function(a){this.desiredRegistrations_=a;this.lastKnownServerSummary_=this.getRegistrationSummary()};
f.getRegisteredObjectsForTest=function(){return this.desiredRegistrations_.getElements()};
f.getRegistrations=function(){for(var a=new MF,b=this.desiredRegistrations_.getElements(),c=0;c<b.length;c++)uu(a,1,b[c]);return a};
f.handleRegistrationStatus=function(a){for(var b=[],c=0;c<a.length;c++){var d=a[c],e=d.getRegistration().getObjectId();this.pendingOperations_.remove(pv(e));var g=!0;if(1==d.getStatus().getCode()){var h=this.desiredRegistrations_.contains(e);1==L(d.getRegistration(),2)!=h&&(this.desiredRegistrations_.remove([e]),XG(this.statistics_,"REGISTRATION_DISCREPANCY"),g=!1)}else this.desiredRegistrations_.remove([e]),g=!1;b.push(g)}return b};
f.getRegistrationSummary=function(){var a=new GF,b=this.desiredRegistrations_.size();N(a,1,b);b=this.desiredRegistrations_.getDigest().serialize();N(a,2,b);return a};
var tH=function(a){return a.lastKnownServerSummary_.equals(a.getRegistrationSummary())};
sH.prototype.toString=function(){return Qu("Last known digest: %s, Requested regs: %s",this.lastKnownServerSummary_.toString(),this.desiredRegistrations_.toString())};var pma=function(a,b){this.random_=a;this.smearFraction_=b/100},eH=function(a,b){a=(2*a.random_()-1)*a.smearFraction_;
return Math.ceil(b+b*a)};var uH=function(){};
Na("invalidation.Client",uH,void 0);uH.prototype.start=uH.prototype.start;uH.prototype.stop=uH.prototype.stop;uH.prototype.register=uH.prototype.register;uH.prototype.unregister=uH.prototype.unregister;uH.prototype.acknowledge=uH.prototype.acknowledge;uH.prototype.getAppClientIdForTest=uH.prototype.getAppClientIdForTest;uH.prototype.getConfigForTest=uH.prototype.getConfigForTest;uH.prototype.getSystemResourcesForTest=uH.prototype.getSystemResourcesForTest;var AH=function(a,b,c,d,e,g,h){this.random_=null==b?Math.random:b;this.clientTokenKey_="ClientToken";this.resources_=a;this.internalScheduler_=a.getInternalScheduler();this.logger_=a.getLogger();this.listener_=h;this.config_=e;b=new DF;b.setClientType(c);N(b,2,d);this.applicationClientId_=b;this.statistics_=new VG;this.digestFn_=new SG;this.registrationManager_=new sH(this.logger_,this.statistics_,this.digestFn_);this.msgValidator_=new ZG(this.logger_);this.smearer_=new pma(this.random_,M(e,7));M(e,
10);this.protocolHandler_=new aH(a,this.statistics_,c,g,this,this.msgValidator_);this.ticlState_=new oG;this.nonce_=this.clientToken_=null;this.shouldSendRegistrations_=!1;this.clientStartTimeMs_=a.getInternalScheduler().getCurrentTimeMs();this.isOnline_=!0;this.lastNetworkTransitionTimeMs_=this.clientStartTimeMs_;this.lastMessageSendTimeMs_=this.pastNetworkDowntimeMs_=this.pastNetworkUptimeMs_=0;this.acquireTokenTask_=new vH(this);this.regSyncHeartbeatTask_=new wH(this);this.persistentWriteTask_=
new xH(this);this.heartbeatTask_=new yH(this);a=M(this.config_,10);this.batchingTask_=new zH(this.internalScheduler_,this.logger_,this.smearer_,M(a,1),this.protocolHandler_);this.resources_.getNetwork().setMessageReceiver(r(this.handleIncomingMessage_,this));this.resources_.getNetwork().addNetworkStatusReceiver(r(this.handleNetworkStatusChange_,this));this.ackCache_=new Fla},vH=function(a){var b=a.config_,c=BH(a,M(b,2));
dH.call(this,"AcquireToken",a.internalScheduler_,a.logger_,a.smearer_,c,0,M(b,2));this.client_=a};
t(vH,dH);vH.prototype.runTask=function(){var a=this.client_;if(null==a.clientToken_){CH(a,(0,this.client_.random_)().toString());var b=a.protocolHandler_,c=a.applicationClientId_;a=a.nonce_;var d=this.client_.batchingTask_;c.getClientType();var e=b.clientType_,g=new JF;g.setClientType(e);N(g,3,c);N(g,4,2);N(g,2,a);b.batcher_.setInitializeMessage(g);cH(d,!1);return!0}return!1};
var wH=function(a){var b=M(a.config_,2),c=BH(a,b);dH.call(this,"RegSyncHeartbeat",a.internalScheduler_,a.logger_,a.smearer_,c,b,b);this.client_=a};
t(wH,dH);wH.prototype.runTask=function(){var a=this.client_;if(tH(a.registrationManager_))return!1;a.sendInfoMessageToServer_(!1,!0);return!0};
var xH=function(a){var b=a.config_,c=BH(a,M(b,3));dH.call(this,"PersistentWrite",a.internalScheduler_,a.logger_,a.smearer_,c,0,M(b,3));this.client_=a;this.lastWrittenToken_=null};
t(xH,dH);xH.prototype.runTask=function(){var a=this.client_,b=a.clientToken_,c=Rla(b),d=Yla(c,a.digestFn_);if(null==b||b==this.lastWrittenToken_)return!1;b=function(e){e.isSuccess()?this.lastWrittenToken_=c.getClientToken():XG(a.statistics_,"PERSISTENT_WRITE_FAILURE")}.bind(this);
a.resources_.getStorage().writeKey("ClientToken",d,b);return!0};
var yH=function(a){dH.call(this,"Heartbeat",a.internalScheduler_,a.logger_,a.smearer_,null,M(a.config_,4),0);this.client_=a;this.nextPerformanceSendTimeMs_=0};
t(yH,dH);yH.prototype.runTask=function(){var a=this.client_,b=this.nextPerformanceSendTimeMs_<=a.internalScheduler_.getCurrentTimeMs();if(b){var c=M(a.config_,5);this.nextPerformanceSendTimeMs_=a.internalScheduler_.getCurrentTimeMs()+eH(this.smearer,c)}a.sendInfoMessageToServer_(b,!tH(a.registrationManager_));return!0};
var zH=function(a,b,c,d,e){dH.call(this,"Batching",a,b,c,null,d,0);this.protocolHandler_=e};
t(zH,dH);zH.prototype.runTask=function(){this.protocolHandler_.sendMessageToServer();return!1};
AH.prototype.start=function(){this.ticlState_.isStarted()||(CH(this,(0,this.random_)().toString()),qma(this))};
AH.prototype.stop=function(){this.ticlState_.isStarted()&&this.ticlState_.stop()};
AH.prototype.register=function(a){rma(this,Array.prototype.slice.call(arguments),1)};
AH.prototype.unregister=function(a){rma(this,Array.prototype.slice.call(arguments),2)};
var rma=function(a,b,c){if(!a.ticlState_.isStopped())if(a.ticlState_.isStarted()){var d=[];for(h=0;h<b.length;h++){var e=m=b[h];m=e.getSource();e=e.getName();var g=new CF;g.setSource(m);g.setName(e);m=g;WG(a.statistics_.incomingOperationTypes_,1==c?"REGISTRATION":"UNREGISTRATION");d.push(m)}b=a.registrationManager_;for(h=0;h<d.length;h++)b.pendingOperations_.set(pv(d[h]),c);d=1==c?b.desiredRegistrations_.add(d):b.desiredRegistrations_.remove(d);if(a.shouldSendRegistrations_&&0<d.length){b=a.protocolHandler_;
h=a.batchingTask_;c=1==c;for(m=0;m<d.length;m++)b.batcher_.addRegistration(d[m],c);cH(h,!1)}cH(a.regSyncHeartbeatTask_,!1)}else for(var h=0;h<b.length;h++){var m=b[h];a.listener_.informRegistrationFailure(m,!0,"Client not yet ready")}};
f=AH.prototype;
f.acknowledge=function(a){a=rv(lG.getDescriptor(),a.getHandleData());if(null==a)XG(this.statistics_,"ACKNOWLEDGE_HANDLE_FAILURE");else{var b;if(b=K(a,1))b=a.getInvalidation(),b=this.msgValidator_.validate(b);if(b){var c=a.getInvalidation();O(c,4);WG(this.statistics_.incomingOperationTypes_,"ACKNOWLEDGE");a=this.batchingTask_;this.protocolHandler_.batcher_.addAck(c);cH(a,!1);a=this.ackCache_;if(L(c,6)&&L(c,2)){b=a.getKey_(c.getObjectId());c=gG(c.getVersion());var d=a.highestAckedVersionMap_.get(b,iG);
0<c.compare(d)&&a.highestAckedVersionMap_.set(b,c)}}else XG(this.statistics_,"ACKNOWLEDGE_HANDLE_FAILURE")}};
f.getConfigForTest=function(){return this.config_};
f.getAppClientIdForTest=function(){return this.applicationClientId_};
f.getSystemResourcesForTest=function(){return this.resources_};
f.getRegistrationSummary=function(){return this.registrationManager_.getRegistrationSummary()};
f.getClientToken=function(){return this.clientToken_};
f.handleNetworkStatusChange_=function(a,b){var c=this.isOnline_;(this.isOnline_=a)&&!c&&(b||this.internalScheduler_.getCurrentTimeMs()>this.lastMessageSendTimeMs_+M(this.config_,12))&&(this.internalScheduler_.getCurrentTimeMs(),this.sendInfoMessageToServer_(!0,!tH(this.registrationManager_)));a!=c&&(a=this.resources_.getInternalScheduler().getCurrentTimeMs(),b=a-this.lastMessageSendTimeMs_,this.lastNetworkTransitionTimeMs_=a,c?(this.pastNetworkUptimeMs_+=b,XG(this.statistics_,"NETWORK_DISCONNECTED")):
this.pastNetworkDowntimeMs_+=b)};
f.handleIncomingMessage_=function(a){WG(this.statistics_.receivedMessageTypes_,"TOTAL");a=fma(this.protocolHandler_,a);if(null!=a&&sma(this,a)){if(null!=a.tokenControlMessage){WG(this.statistics_.receivedMessageTypes_,"TOKEN_CONTROL");var b=a.header.token,c=K(a.tokenControlMessage,1)?L(a.tokenControlMessage,1):null;if(null!=c){var d=b==this.clientToken_;if(b==this.nonce_||d)cH(this.heartbeatTask_,!1),CH(this,null),DH(this,c),cH(this.persistentWriteTask_,!1)}else DH(this,null),cH(this.acquireTokenTask_,
!1)}if(null!=this.clientToken_){b=a.header;if(null!=b.registrationSummary){this.shouldSendRegistrations_=!0;c=this.registrationManager_;b=b.registrationSummary;null!=b&&(c.lastKnownServerSummary_=b);b=[];if(tH(c)){d=c.pendingOperations_.getKeys();for(var e=new CF().getDescriptor(),g=0;g<d.length;g++){var h=rv(e,d[g]),m=1==c.pendingOperations_.get(d[g]);h=Qla(h,m);b.push(h)}c.pendingOperations_.clear()}for(c=0;c<b.length;c++)e=b[c],d=bH(e.getObjectId()),e=1==L(e,2)?0:1,this.listener_.informRegistrationStatus(d,
e)}if(null!=a.invalidationMessage)for(WG(this.statistics_.receivedMessageTypes_,"INVALIDATION"),b=tu(a.invalidationMessage,1),c=0;c<b.length;c++)if(e=d=b[c],g=new lG,N(g,1,e),e=pv(g),e=new yG(e),g=this.ackCache_,m=d,L(m,2)?(h=g.getKey_(m.getObjectId()),m=gG(m.getVersion()),g=0<=g.highestAckedVersionMap_.get(h,iG).compare(m)):g=!1,g)this.acknowledge(e),WG(this.statistics_.receivedMessageTypes_,"STALE_INVALIDATION");else if(d.getObjectId().equals(IG))this.listener_.invalidateAll(this,e),WG(this.statistics_.listenerEventTypes_,
"INVALIDATE_ALL");else{var n=d;g=bH(n.getObjectId());h=parseInt(n.getVersion(),10);m=K(n,4)?n.getPayload():void 0;n=K(n,6)?L(n,6):!0;g=new tG(g,h,m,n);h=M(d,6);m=M(this.config_,13);L(d,2);!L(d,2)||h&&!m?this.listener_.invalidateUnknownVersion(this,g.getObjectId(),e):this.listener_.invalidate(this,g,e)}if(null!=a.registrationStatusMessage)for(WG(this.statistics_.receivedMessageTypes_,"REGISTRATION_STATUS"),b=tu(a.registrationStatusMessage,1),c=this.registrationManager_.handleRegistrationStatus(b),
d=0;d<b.length;++d)g=b[d],h=c[d],e=g.getRegistration().getObjectId(),e=bH(e),h?(g=1==L(g.getRegistration(),2)?0:1,this.listener_.informRegistrationStatus(e,g)):(h=g.getStatus(),g=1==h.getCode()?"Registration discrepancy detected":g.getStatus().getDescription(),h=3==h.getCode(),this.listener_.informRegistrationFailure(e,!h,g));null!=a.registrationSyncRequestMessage&&(WG(this.statistics_.receivedMessageTypes_,"REGISTRATION_SYNC_REQUEST"),b=this.registrationManager_.getRegistrations("",0),c=this.batchingTask_,
this.protocolHandler_.batcher_.pendingRegSubtrees_.set(pv(b),b),cH(c,!1));if(null!=a.infoRequestMessage){WG(this.statistics_.receivedMessageTypes_,"INFO_REQUEST");b=tu(a.infoRequestMessage,1);c=!1;for(d=0;d<b.length&&!(c=1==b[d]);d++);this.sendInfoMessageToServer_(c,!tH(this.registrationManager_))}if(null!=a.errorMessage&&(WG(this.statistics_.receivedMessageTypes_,"ERROR"),b=a.errorMessage.getCode(),a=a.errorMessage.getDescription(),1==b)){c=this.registrationManager_;d=new Ak;e=c.desiredRegistrations_.removeAll();
for(b=0;b<e.length;b++)d.set(pv(e[b]),"");e=c.pendingOperations_.getKeys();for(b=0;b<e.length;b++)d.set(e[b],"");c.pendingOperations_.clear();c=[];d=d.getKeys();e=new CF().getDescriptor();for(b=0;b<d.length;b++)g=rv(e,d[b]),c.push(g);for(b=0;b<c.length;b++)d=bH(c[b]),this.listener_.informRegistrationFailure(d,!1,"Auth error: "+a)}}}};
var sma=function(a,b){return null!=a.clientToken_?a.clientToken_!=b.header.token?(XG(a.statistics_,"TOKEN_MISMATCH"),!1):!0:null!=a.nonce_?a.nonce_!=b.header.token?(XG(a.statistics_,"NONCE_MISMATCH"),!1):!0:!1};
AH.prototype.sendInfoMessageToServer_=function(a,b){var c=new Ak,d=null;if(a){a=this.statistics_;YG(a.sentMessageTypes_,c,"SentMessageType");YG(a.receivedMessageTypes_,c,"ReceivedMessageType");YG(a.incomingOperationTypes_,c,"IncomingOperationType");YG(a.listenerEventTypes_,c,"ListenerEventType");YG(a.clientErrorTypes_,c,"ClientErrorType");a=this.resources_.getInternalScheduler().getCurrentTimeMs();c.set("NonCounterType.CLIENT_UPTIME_MS",a-this.clientStartTimeMs_);a-=this.lastNetworkTransitionTimeMs_;
d=this.pastNetworkUptimeMs_;var e=this.pastNetworkDowntimeMs_;if(this.isOnline_){d+=a;var g=1}else e+=a,g=0;c.set("NonCounterType.IS_NETWORK_ONLINE",g);c.set("NonCounterType.NETWORK_STATUS_DURATION_MS",a);c.set("NonCounterType.TOTAL_NETWORK_UPTIME_MS",d);c.set("NonCounterType.TOTAL_NETWORK_DOWNTIME_MS",e);d=this.config_}a=this.protocolHandler_;g=d;d=this.batchingTask_;e=new NF;e.setClientVersion(a.clientVersion_);null!=g&&e.setClientConfig(g);g=c.getKeys();for(var h=0;h<g.length;h++){var m=g[h],n=
c.get(g[h]),p=new OF;p.setName(m);p.setValue(n);uu(e,3,p)}N(e,4,b);a.batcher_.setInfoMessage(e);cH(d,!1)};
var qma=function(a){a.resources_.getStorage().readKey(a.clientTokenKey_,r(function(b,c){c=b.isSuccess()?c:null;b.isSuccess()||(XG(this.statistics_,"PERSISTENT_READ_FAILURE"),b.getMessage());if(null==c)b=null;else{b=this.logger_;var d=this.digestFn_,e=nG.getDescriptor();e=rv(e,c);var g=null==e?null:L(e,1);null==g?b=null:Xla(g,d).serialize()!=L(e,2)?(b&&L(e,2),b=null):b=g}null!=c&&null==b&&XG(this.statistics_,"PERSISTENT_DESERIALIZATION_FAILURE");null!=b?(c=b.getClientToken(),CH(this,null),DH(this,
c),this.shouldSendRegistrations_=!1,c=new pG("SendFirstPersistentInfo",r(this.sendInfoMessageToServer_,this,!1,!0)),b=M(this.config_,9),this.internalScheduler_.schedule(b,c),cH(this.heartbeatTask_,!1)):(this.shouldSendRegistrations_=!0,DH(this,null),cH(this.acquireTokenTask_,!1))},a))},CH=function(a,b){a.nonce_=null==b?null:kf(b)},DH=function(a,b){var c=!a.ticlState_.isStarted()&&null==a.clientToken_&&null!=b;
a.clientToken_=b;c&&(a.ticlState_.start(),a.listener_.ready(a),a.listener_.reissueRegistrations("",0))},BH=function(a,b){return new Nu(a.random_,b,M(a.config_,6))};
AH.prototype.toString=function(){var a=this.clientToken_;return Qu("Client: clientName = %s, token = %s, state = %s",this.applicationClientId_.toString(),null!=a?a.toString():"null",this.ticlState_.toString())};var EH=function(a,b,c,d,e,g,h){AH.call(this,a,b,c,d,e,g,h)};
t(EH,AH);var FH=function(a,b,c,d,e){this.internalScheduler_=b;this.listenerScheduler_=c;this.logger_=a;this.network_=d;this.storage_=e;this.sealed_=!1};
Na("invalidation.SystemResourcesBuilderImpl.newDefaultBuilder",function(a,b){return new FH(new PG(a),new OG(),new OG(),b,new QG())},void 0);
f=FH.prototype;f.getInternalScheduler=function(){return this.internalScheduler_};
f.getListenerScheduler=function(){return this.listenerScheduler_};
f.getStorage=function(){return this.storage_};
f.getNetwork=function(){return this.network_};
f.getLogger=function(){return this.logger_};
f.setLogger=function(a){this.logger_=a};
FH.prototype.setLogger=FH.prototype.setLogger;FH.prototype.setStorage=function(a){this.storage_=a};
FH.prototype.setStorage=FH.prototype.setStorage;FH.prototype.setInternalScheduler=function(a){this.internalScheduler_=a};
FH.prototype.setInternalScheduler=FH.prototype.setInternalScheduler;FH.prototype.setListenerScheduler=function(a){this.listenerScheduler_=a};
FH.prototype.setListenerScheduler=FH.prototype.setListenerScheduler;FH.prototype.setNetwork=function(a){this.network_=a};
FH.prototype.setNetwork=FH.prototype.setNetwork;FH.prototype.build=function(){this.seal();return new EG(this.logger_,this.internalScheduler_,this.listenerScheduler_,this.network_,this.storage_)};
FH.prototype.build=FH.prototype.build;FH.prototype.seal=function(){this.sealed_=!0};var GH=function(a,b,c,d,e,g,h,m){xF.call(this,a,d,e,g,m);a=new cx(this.servletUri);null!=c&&Xw(a,"oauth_token",c);0!=d&&Xw(a,"authuser",d);null!=e&&Xw(a,"pageId",e);null!=g&&Xw(a,"service",g);c={};c.pu=a.toString();this.xpcIframeCreator_=new fA(c,b,h,r(this.onXpcConnect_,this));this.crossPageChannel_=null;this.logger_=new Ru("XpcSenderClient")};
l(GH,xF);f=GH.prototype;f.onXpcConnect_=function(a){this.crossPageChannel_=a;this.crossPageChannel_.registerService("ss",r(this.sendSucceeded,this));this.crossPageChannel_.registerService("sf",r(this.sendFailed,this),!0);a=this.handler;a.xpcOpen_=!0;rA(a,!0,!1)};
f.start=function(){gA(this.xpcIframeCreator_)};
f.send=function(a,b,c){this.crossPageChannel_.send("s",[a,b,c])};
f.sendSucceeded=function(a){this.handler.onSuccess(a[0])};
f.sendFailed=function(a){this.handler.onFailure(a[0],a[1])};var HH=function(a,b,c,d,e){this.incomingReceiver_=null;this.networkStatusReceivers_=[];this.logger_=new Ru("LcsPushChannel");this.xpcOpen_=this.isOnline_=!1;this.senderUri_=b;this.iframeContainerId_=c||"lcssenderclient";this.bufferedMessages_=[];this.oauthToken_=d||null;this.lcsServiceName_=e||"tango_service";this.appAuthToken_=null;this.channelHandlers_=[];this.channelConfig_=a;this.channel_=BA(a,this);null!=this.oauthToken_&&this.channel_.setOAuthToken(this.oauthToken_);this.channel_.open();this.address_=
this.session_=null;this.counter_=0;b=a.getAuthuser();c=a.getPageId();this.gatewaySender_=a.isIframed()?new GH(this.senderUri_,this.iframeContainerId_,this.oauthToken_,b,c,a.gaiaServiceOverride||null,a.getDomHelper(),this):new xF(this.senderUri_,b,c,a.gaiaServiceOverride||null,this);this.gatewaySender_.start()};
f=HH.prototype;f.setOAuthToken=function(a){this.oauthToken_=a;this.channel_.setOAuthToken(a)};
f.setAppAuthToken=function(a){this.appAuthToken_=a;this.channel_.setAppAuthToken(a)};
f.onOpen=function(a,b){this.session_||(this.session_=a.newSession(this.lcsServiceName_,this),this.session_.open());for(var c=0;c<this.channelHandlers_.length;++c)this.channelHandlers_[c].onOpen(a,b)};
f.setSystemResources=function(a){this.logger_=a.getLogger()};
f.stop=function(){this.channel_.isDisposed()||this.channel_.dispose()};
f.setMessageReceiver=function(a){this.incomingReceiver_=a};
f.sendMessage=function(a){this.isOnline_?this.sendMessage_(a):(10<=this.bufferedMessages_.length&&this.bufferedMessages_.shift(),this.bufferedMessages_.push(a))};
f.addNetworkStatusReceiver=function(a){this.networkStatusReceivers_.push(a)};
f.sendMessage_=function(a){if(this.isOnline_){var b=this.address_,c=new JG;N(c,1,114);N(c,2,b);b=this.counter_.toString();var d=new yF;d.setMinorVersion(2);d.setMajorVersion(3);var e=new zF;e.setVersion(d);d=new KG;d.setProtocolVersion(e);N(d,6,1);N(d,7,2);N(d,4,a);N(d,8,c);N(d,1,!0);N(d,10,b);this.counter_++;a=pv(d);c={"Content-Type":"text/plain"};b={};null!=this.oauthToken_?c.Authorization="OAuth "+this.oauthToken_:null!=this.appAuthToken_&&(b.app_auth=this.appAuthToken_);this.gatewaySender_.send(a,
c,b)}};
f.receive=function(a,b){this.incomingReceiver_&&this.incomingReceiver_(b)};
f.onError=function(a,b){for(var c=0;c<this.channelHandlers_.length;++c)this.channelHandlers_[c].onError(a,b)};
f.onClose=function(a){rA(this,!1,!1);for(var b=0;b<this.channelHandlers_.length;++b)this.channelHandlers_[b].onClose(a)};
f.onStatEvent=function(a,b){for(var c=0;c<this.channelHandlers_.length;++c){var d=this.channelHandlers_[c];if(d.onStatEvent)d.onStatEvent(a,b)}};
f.onSessionError=function(){};
f.onSuccess=function(){};
f.onFailure=function(){};
f.getChannelUriForTest=function(){return this.channelConfig_.uri.toString()};
f.getGatewayUriForTest=function(){return this.senderUri_};
var rA=function(a,b,c){a.isOnline_=b&&null!=a.address_&&a.xpcOpen_;if(a.isOnline_&&0!=a.bufferedMessages_.length){b=k(a.bufferedMessages_);for(var d=b.next();!d.done;d=b.next())a.sendMessage_(d.value);b=a.bufferedMessages_;if(!Wa(b))for(d=b.length-1;0<=d;d--)delete b[d];b.length=0}b=k(a.networkStatusReceivers_);for(d=b.next();!d.done;d=b.next())d=d.value,d(a.isOnline_,c)};
HH.prototype.setChannelHandler=function(a){this.channelHandlers_.push(a)};
HH.prototype.setChannelHandler=HH.prototype.setChannelHandler;HH.prototype.getRawChannel=function(){return this.channel_};
HH.prototype.getRawChannel=HH.prototype.getRawChannel;var tma=function(a,b,c,d,e,g,h,m){a=new mA(a,c,"lcsclient");d&&a.setAuthuser(d);h&&(a.gaiaServiceOverride=h);m&&a.setPageId(m);HH.call(this,a,b,e,g)};
t(tma,HH);var IH=function(a,b,c,d,e){this.client_=a;this.listener_=b;this.logger_=c;this.listenerScheduler_=d;this.pendingClientAckHandles_=[];this.isRecycledClientTokenPromise_=e};
f=IH.prototype;f.getPendingClientAckHandlesForTest=function(){return this.pendingClientAckHandles_};
f.start=function(){var a=this;this.isRecycledClientTokenPromise_.then(function(){a.client_.start()})};
f.stop=function(){this.client_.stop()};
f.register=function(a){var b=this;this.client_.register.apply(this.client_,arguments);for(var c={},d=0;d<arguments.length;c={$jscomp$loop$prop$objectId$1973:c.$jscomp$loop$prop$objectId$1973},d++)c.$jscomp$loop$prop$objectId$1973=arguments[d],this.isRecycledClientTokenPromise_.then(function(e){return function(g){if(g){g=new Nu(Math.random,1E3,1E3);Ou(g);var h="client-ack-handle-"+zd();h=new yG(h);b.pendingClientAckHandles_.push(h);uma(b,e.$jscomp$loop$prop$objectId$1973,h,g)}}}(c))};
f.unregister=function(a){this.client_.unregister.apply(this.client_,arguments)};
f.acknowledge=function(a){var b=vma(this,a);null!=b?(a=this.pendingClientAckHandles_,this.pendingClientAckHandles_=a.slice(0,b).concat(a.slice(b+1))):this.client_.acknowledge(a)};
var uma=function(a,b,c,d){a.listener_.invalidateUnknownVersion(a,b,c);var e=Ou(d);a.listenerScheduler_.schedule(e,new pG("retry invalidation",r(function(){null!=vma(this,c)&&uma(this,b,c,d)},a)))},vma=function(a,b){for(var c=0;c<a.pendingClientAckHandles_.length;c++)if(a.pendingClientAckHandles_[c].equals(b))return c;
return null};
IH.prototype.getConfigForTest=function(){return this.client_.getConfigForTest()};
IH.prototype.getClientForTest=function(){return this.client_};
IH.prototype.getAppClientIdForTest=function(){return this.client_.getAppClientIdForTest()};
IH.prototype.getSystemResourcesForTest=function(){return this.client_.getSystemResourcesForTest()};var xma=function(a,b,c){this.ephemeralStorage_=a;this.clientTokenKey_="ClientToken";this.tokenStore_=b;this.logger_=c;this.clientTokenBlob_=null;this.isRecyledClientTokenPromise_=wma(this)};
f=xma.prototype;f.writeKey=function(a,b,c){this.ephemeralStorage_.writeKey(a,b,c);a==this.clientTokenKey_&&(this.clientTokenBlob_=b)};
f.readKey=function(a,b){return this.ephemeralStorage_.readKey(a,b)};
f.deleteKey=function(a,b){this.ephemeralStorage_.deleteKey(a,b)};
f.readAllKeys=function(a){this.ephemeralStorage_.readAllKeys(a)};
f.setSystemResources=function(a){this.ephemeralStorage_.setSystemResources(a)};
var wma=function(a){return Vla(a.tokenStore_,5).then(function(b){return null!=b?(a.clientTokenBlob_=b,a.writeKey(a.clientTokenKey_,b,function(){}),!0):!1})};var yma=function(a){this.listener_=a;this.client_=null};
f=yma.prototype;f.setClient=function(a){this.client_=a};
f.ready=function(){this.listener_.ready(this.client_)};
f.invalidate=function(a,b,c){this.listener_.invalidate(this.client_,b,c)};
f.invalidateUnknownVersion=function(a,b,c){this.listener_.invalidateUnknownVersion(this.client_,b,c)};
f.invalidateAll=function(a,b){this.listener_.invalidateAll(this.client_,b)};
f.informRegistrationStatus=function(a,b){this.listener_.informRegistrationStatus(a,b)};
f.informRegistrationFailure=function(a,b,c){this.listener_.informRegistrationFailure(a,b,c)};
f.reissueRegistrations=function(a,b){this.listener_.reissueRegistrations(a,b)};
f.informError=function(){};var JH=function(a,b,c){this.clientType_=a;this.clientName_=b;this.applicationName_=c;this.reuseClientTokens_=this.allowSuppression_=!0;a=new ZF;a.setVersion(GG);b=new YF;c=new XF;N(c,1,5E3);c.setCount(3);uu(b,2,c);N(a,10,b);this.clientConfig_=a};
Na("invalidation.ClientFactory.Config",JH,void 0);JH.prototype.getClientType=function(){return this.clientType_};
JH.prototype.getClientType=JH.prototype.getClientType;JH.prototype.getClientName=function(){return this.clientName_};
JH.prototype.getClientName=JH.prototype.getClientName;JH.prototype.getApplicationName=function(){return this.applicationName_};
JH.prototype.getApplicationName=JH.prototype.getApplicationName;JH.prototype.getAllowSuppression=function(){return M(this.clientConfig_,13)};
JH.prototype.getAllowSuppression=JH.prototype.getAllowSuppression;JH.prototype.setAllowSuppression=function(a){this.clientConfig_.setAllowSuppression(a);return this};
JH.prototype.setAllowSuppression=JH.prototype.setAllowSuppression;JH.prototype.getReuseClientTokens=function(){return this.reuseClientTokens_};
JH.prototype.getReuseClientTokens=JH.prototype.getReuseClientTokens;JH.prototype.setReuseClientTokens=function(a){this.reuseClientTokens_=a;return this};
JH.prototype.setReuseClientTokens=JH.prototype.setReuseClientTokens;JH.prototype.getClientConfig=function(){return this.clientConfig_};
JH.prototype.setClientConfig=function(a){this.clientConfig_=a};
var KH=function(a,b,c){var d=a.getLogger(),e=b.getClientConfig(),g=a.getListenerScheduler();if(b.getReuseClientTokens()){var h="tokens-"+b.getClientType();h=new NG(h,d);var m=new xma(a.getStorage(),h,d);Gv(window,"unload",function(){null!=m.clientTokenBlob_&&m.tokenStore_.add(m.clientTokenBlob_)});
h=new EG(d,a.getInternalScheduler(),g,a.getNetwork(),m);h.start();a=new yma(c);b=new EH(h,Math.random,b.getClientType(),b.getClientName(),e,b.getApplicationName(),a);c=new IH(b,c,d,g,m.isRecyledClientTokenPromise_);a.setClient(c);return c}return new EH(a,Math.random,b.getClientType(),b.getClientName(),e,b.getApplicationName(),c)};
Na("invalidation.ClientFactory.createClient",KH,void 0);Na("invalidation.ClientFactory.create",function(a,b,c,d,e){b=new JH(b,c,d);b.setAllowSuppression(!0);b.setReuseClientTokens(!0);return KH(a,b,e)},void 0);var zma=function(a,b,c,d,e){FH.call(this,a,b,c,d,e)};
t(zma,FH);var Ama=function(a,b){return new zma(new PG(a),new OG(),new OG(),b,new QG())};
Na("invalidation.SystemResourcesBuilder.newDefaultBuilder",Ama,void 0);function LH(a){Promise.resolve().then(a)}
function Bma(a){switch(a){case 200:return 0;case 400:return 3;case 401:return 16;case 403:return 7;case 404:return 5;case 409:return 10;case 412:return 9;case 429:return 8;case 501:return 12;case 503:return 14;case 504:return 4;default:return 2;}}
;/*
Copyright (c) 2015-2018 Google, Inc., Netflix, Inc., Microsoft Corp. and contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
var MH=!0,NH={set useDeprecatedSynchronousErrorHandling(a){a?console.warn("DEPRECATED! RxJS was set to use deprecated synchronous error handling behavior by code at: \n"+Error().stack):MH&&console.log("RxJS: Back to a better error behavior. Thank you. <3");MH=a},get useDeprecatedSynchronousErrorHandling(){return MH}};fa();fa();var Cma="function"===typeof Symbol&&Symbol.observable||"@@observable";function OH(a){setTimeout(function(){throw a},0)}
;var PH={closed:!0,next:function(){},
error:function(a){if(NH.useDeprecatedSynchronousErrorHandling)throw a;OH(a)},
complete:function(){}};var QH=function(){function a(b){this.message=b?b.length+" errors occurred during unsubscription:\n"+b.map(function(c,d){return d+1+") "+c.toString()}).join("\n "):"";
this.name="UnsubscriptionError";this.errors=b;return this}
a.prototype=Object.create(Error.prototype);return a}();var Dma=Array.isArray||function(a){return a&&"number"===typeof a.length};function RH(a){return"function"===typeof a}
;var SH=function(a){this.closed=!1;this._subscriptions=this._parentOrParents=null;a&&(this._unsubscribe=a)};
SH.prototype.unsubscribe=function(){if(!this.closed){var a=this._parentOrParents,b=this._unsubscribe,c=this._subscriptions;this.closed=!0;this._subscriptions=this._parentOrParents=null;if(a instanceof SH)a.remove(this);else if(null!==a)for(var d=0;d<a.length;++d)a[d].remove(this);if(RH(b))try{b.call(this)}catch(m){var e=m instanceof QH?Ema(m.errors):[m]}if(Dma(c)){d=-1;for(var g=c.length;++d<g;){var h=c[d];if(null!==h&&"object"===typeof h)try{h.unsubscribe()}catch(m){e=e||[],m instanceof QH?e=e.concat(Ema(m.errors)):
e.push(m)}}}if(e)throw new QH(e)}};
SH.prototype.add=function(a){var b=a;if(!a)return SH.EMPTY;switch(typeof a){case"function":b=new SH(a);case"object":if(b===this||b.closed||"function"!==typeof b.unsubscribe)return b;if(this.closed)return b.unsubscribe(),b;b instanceof SH||(a=b,b=new SH,b._subscriptions=[a]);break;default:throw Error("unrecognized teardown "+a+" added to Subscription.");}var c=b._parentOrParents;if(null===c)b._parentOrParents=this;else if(c instanceof SH){if(c===this)return b;b._parentOrParents=[c,this]}else if(-1===
c.indexOf(this))c.push(this);else return b;a=this._subscriptions;null===a?this._subscriptions=[b]:a.push(b);return b};
SH.prototype.remove=function(a){var b=this._subscriptions;b&&(a=b.indexOf(a),-1!==a&&b.splice(a,1))};
var Fma=new SH;Fma.closed=!0;SH.EMPTY=Fma;function Ema(a){return a.reduce(function(b,c){return b.concat(c instanceof QH?c.errors:c)},[])}
;fa();fa();var TH="function"===typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random();var UH=function(a,b,c){SH.call(this);this.syncErrorValue=null;this.isStopped=this.syncErrorThrowable=this.syncErrorThrown=!1;switch(arguments.length){case 0:this.destination=PH;break;case 1:if(!a){this.destination=PH;break}if("object"===typeof a){a instanceof UH?(this.syncErrorThrowable=a.syncErrorThrowable,this.destination=a,a.add(this)):(this.syncErrorThrowable=!0,this.destination=new VH(this,a));break}default:this.syncErrorThrowable=!0,this.destination=new VH(this,a,b,c);}};
l(UH,SH);UH.EMPTY=SH.EMPTY;UH.prototype[TH]=function(){return this};
UH.create=function(a,b,c){a=new UH(a,b,c);a.syncErrorThrowable=!1;return a};
f=UH.prototype;f.next=function(a){this.isStopped||this._next(a)};
f.error=function(a){this.isStopped||(this.isStopped=!0,this._error(a))};
f.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())};
f.unsubscribe=function(){this.closed||(this.isStopped=!0,SH.prototype.unsubscribe.call(this))};
f._next=function(a){this.destination.next(a)};
f._error=function(a){this.destination.error(a);this.unsubscribe()};
f._complete=function(){this.destination.complete();this.unsubscribe()};
f._unsubscribeAndRecycle=function(){var a=this._parentOrParents;this._parentOrParents=null;this.unsubscribe();this.isStopped=this.closed=!1;this._parentOrParents=a;return this};
var VH=function(a,b,c,d){UH.call(this);this._parentSubscriber=a;var e=this;if(RH(b))var g=b;else b&&(g=b.next,c=b.error,d=b.complete,b!==PH&&(e=Object.create(b),RH(e.unsubscribe)&&this.add(e.unsubscribe.bind(e)),e.unsubscribe=this.unsubscribe.bind(this)));this._context=e;this._next=g;this._error=c;this._complete=d};
l(VH,UH);VH.EMPTY=UH.EMPTY;VH.create=UH.create;f=VH.prototype;f.next=function(a){if(!this.isStopped&&this._next){var b=this._parentSubscriber;NH.useDeprecatedSynchronousErrorHandling&&b.syncErrorThrowable?this.__tryOrSetError(b,this._next,a)&&this.unsubscribe():this.__tryOrUnsub(this._next,a)}};
f.error=function(a){if(!this.isStopped){var b=this._parentSubscriber,c=NH.useDeprecatedSynchronousErrorHandling;if(this._error)c&&b.syncErrorThrowable?this.__tryOrSetError(b,this._error,a):this.__tryOrUnsub(this._error,a),this.unsubscribe();else if(b.syncErrorThrowable)c?(b.syncErrorValue=a,b.syncErrorThrown=!0):OH(a),this.unsubscribe();else{this.unsubscribe();if(c)throw a;OH(a)}}};
f.complete=function(){var a=this;if(!this.isStopped){var b=this._parentSubscriber;if(this._complete){var c=function(){return a._complete.call(a._context)};
NH.useDeprecatedSynchronousErrorHandling&&b.syncErrorThrowable?this.__tryOrSetError(b,c):this.__tryOrUnsub(c)}this.unsubscribe()}};
f.__tryOrUnsub=function(a,b){try{a.call(this._context,b)}catch(c){this.unsubscribe();if(NH.useDeprecatedSynchronousErrorHandling)throw c;OH(c)}};
f.__tryOrSetError=function(a,b,c){if(!NH.useDeprecatedSynchronousErrorHandling)throw Error("bad call");try{b.call(this._context,c)}catch(d){return NH.useDeprecatedSynchronousErrorHandling?(a.syncErrorValue=d,a.syncErrorThrown=!0):OH(d),!0}return!1};
f._unsubscribe=function(){var a=this._parentSubscriber;this._parentSubscriber=this._context=null;a.unsubscribe()};function Gma(){}
;function Hma(a){return a?1===a.length?a[0]:function(b){return a.reduce(function(c,d){return d(c)},b)}:Gma}
;var WH=function(a){this._isScalar=!1;a&&(this._subscribe=a)};
f=WH.prototype;f.lift=function(a){var b=new WH;b.source=this;b.operator=a;return b};
f.subscribe=function(a,b,c){var d=this.operator;a:{if(a){if(a instanceof UH)break a;if(a[TH]){a=a[TH]();break a}}a=a||b||c?new UH(a,b,c):new UH(PH)}d?a.add(d.call(a,this.source)):a.add(this.source||NH.useDeprecatedSynchronousErrorHandling&&!a.syncErrorThrowable?this._subscribe(a):this._trySubscribe(a));if(NH.useDeprecatedSynchronousErrorHandling&&a.syncErrorThrowable&&(a.syncErrorThrowable=!1,a.syncErrorThrown))throw a.syncErrorValue;return a};
f._trySubscribe=function(a){try{return this._subscribe(a)}catch(e){NH.useDeprecatedSynchronousErrorHandling&&(a.syncErrorThrown=!0,a.syncErrorValue=e);var b;a:{for(b=a;b;){var c=b.destination,d=b.isStopped;if(b.closed||d){b=!1;break a}b=c&&c instanceof UH?c:null}b=!0}b?a.error(e):console.warn(e)}};
f.forEach=function(a,b){var c=this;b=Ima(b);return new b(function(d,e){var g=c.subscribe(function(h){try{a(h)}catch(m){e(m),g&&g.unsubscribe()}},e,d)})};
f._subscribe=function(a){var b=this.source;return b&&b.subscribe(a)};
WH.prototype[Cma]=function(){return this};
WH.prototype.pipe=function(a){for(var b=[],c=0;c<arguments.length;++c)b[c-0]=arguments[c];return 0===b.length?this:Hma(b)(this)};
WH.prototype.toPromise=function(a){var b=this;a=Ima(a);return new a(function(c,d){var e;b.subscribe(function(g){return e=g},function(g){return d(g)},function(){return c(e)})})};
WH.create=function(a){return new WH(a)};
function Ima(a){a||(a=Promise);if(!a)throw Error("no Promise impl found");return a}
;var XH=function(a,b){SH.call(this);this.subject=a;this.subscriber=b;this.closed=!1};
l(XH,SH);XH.EMPTY=SH.EMPTY;XH.prototype.unsubscribe=function(){if(!this.closed){this.closed=!0;var a=this.subject,b=a.observers;this.subject=null;!b||0===b.length||a.isStopped||a.closed||(a=b.indexOf(this.subscriber),-1!==a&&b.splice(a,1))}};var YH=function(){function a(){this.message="object unsubscribed";this.name="ObjectUnsubscribedError";return this}
a.prototype=Object.create(Error.prototype);return a}();var ZH=function(a){UH.call(this,a);this.destination=a};
l(ZH,UH);ZH.EMPTY=UH.EMPTY;ZH.create=UH.create;var $H=function(){WH.call(this);this.observers=[];this.hasError=this.isStopped=this.closed=!1;this.thrownError=null};
l($H,WH);$H.prototype[TH]=function(){return new ZH(this)};
f=$H.prototype;f.lift=function(a){var b=new aI(this,this);b.operator=a;return b};
f.next=function(a){if(this.closed)throw new YH;if(!this.isStopped){var b=this.observers,c=b.length;b=b.slice();for(var d=0;d<c;d++)b[d].next(a)}};
f.error=function(a){if(this.closed)throw new YH;this.hasError=!0;this.thrownError=a;this.isStopped=!0;var b=this.observers,c=b.length;b=b.slice();for(var d=0;d<c;d++)b[d].error(a);this.observers.length=0};
f.complete=function(){if(this.closed)throw new YH;this.isStopped=!0;var a=this.observers,b=a.length;a=a.slice();for(var c=0;c<b;c++)a[c].complete();this.observers.length=0};
f.unsubscribe=function(){this.closed=this.isStopped=!0;this.observers=null};
f._trySubscribe=function(a){if(this.closed)throw new YH;return WH.prototype._trySubscribe.call(this,a)};
f._subscribe=function(a){if(this.closed)throw new YH;if(this.hasError)return a.error(this.thrownError),SH.EMPTY;if(this.isStopped)return a.complete(),SH.EMPTY;this.observers.push(a);return new XH(this,a)};
f.asObservable=function(){var a=new WH;a.source=this;return a};
$H.create=function(a,b){return new aI(a,b)};
var aI=function(a,b){$H.call(this);this.destination=a;this.source=b};
l(aI,$H);aI.create=$H.create;aI.prototype.next=function(a){var b=this.destination;b&&b.next&&b.next(a)};
aI.prototype.error=function(a){var b=this.destination;b&&b.error&&this.destination.error(a)};
aI.prototype.complete=function(){var a=this.destination;a&&a.complete&&this.destination.complete()};
aI.prototype._subscribe=function(a){return this.source?this.source.subscribe(a):SH.EMPTY};var bI=function(a){$H.call(this);this._value=a};
l(bI,$H);bI.create=$H.create;bI.prototype._subscribe=function(a){var b=$H.prototype._subscribe.call(this,a);b&&!b.closed&&a.next(this._value);return b};
bI.prototype.getValue=function(){if(this.hasError)throw this.thrownError;if(this.closed)throw new YH;return this._value};
bI.prototype.next=function(a){$H.prototype.next.call(this,this._value=a)};
ea.Object.defineProperties(bI.prototype,{value:{configurable:!0,enumerable:!0,get:function(){return this.getValue()}}});function Jma(a){return a&&"function"===typeof a.schedule}
;function Kma(){var a=Error("Legacy ObjectIds are not supported by this implementation");return new WH(function(b){return b.error(a)})}
;var cI=function(){SH.call(this)};
l(cI,SH);cI.EMPTY=SH.EMPTY;cI.prototype.schedule=function(){return this};var dI=function(a,b){SH.call(this);this.scheduler=a;this.work=b;this.pending=!1};
l(dI,cI);dI.EMPTY=cI.EMPTY;dI.prototype.schedule=function(a,b){b=void 0===b?0:b;if(this.closed)return this;this.state=a;var c=this.id;a=this.scheduler;null!=c&&(this.id=eI(this,c,b));this.pending=!0;this.delay=b;(c=this.id)||(b=void 0===b?0:b,c=setInterval(a.flush.bind(a,this),b));this.id=c;return this};
var eI=function(a,b,c){c=void 0===c?0:c;if(null!==c&&a.delay===c&&!1===a.pending)return b;clearInterval(b)};
dI.prototype.execute=function(a,b){if(this.closed)return Error("executing a cancelled action");this.pending=!1;if(a=this._execute(a,b))return a;!1===this.pending&&null!=this.id&&(this.id=eI(this,this.id,null))};
dI.prototype._execute=function(a){var b=!1,c=void 0;try{this.work(a)}catch(d){b=!0,c=!!d&&d||Error(d)}if(b)return this.unsubscribe(),c};
dI.prototype._unsubscribe=function(){var a=this.id,b=this.scheduler.actions,c=b.indexOf(this);this.state=this.work=null;this.pending=!1;this.scheduler=null;-1!==c&&b.splice(c,1);null!=a&&(this.id=eI(this,a,null));this.delay=null};var fI=function(a,b){b=void 0===b?fI.now:b;this.SchedulerAction=a;this.now=b};
fI.prototype.schedule=function(a,b,c){b=void 0===b?0:b;return new this.SchedulerAction(this,a).schedule(c,b)};
fI.now=function(){return Date.now()};var gI=function(a,b){b=void 0===b?fI.now:b;fI.call(this,a,function(){return gI.delegate&&gI.delegate!==c?gI.delegate.now():b()});
var c=this;this.actions=[];this.active=!1;this.scheduled=void 0};
l(gI,fI);gI.now=fI.now;gI.prototype.schedule=function(a,b,c){b=void 0===b?0:b;return gI.delegate&&gI.delegate!==this?gI.delegate.schedule(a,b,c):fI.prototype.schedule.call(this,a,b,c)};
gI.prototype.flush=function(a){var b=this.actions;if(this.active)b.push(a);else{var c;this.active=!0;do if(c=a.execute(a.state,a.delay))break;while(a=b.shift());this.active=!1;if(c){for(;a=b.shift();)a.unsubscribe();throw c}}};var Lma=new gI(dI);(function(){function a(){this.message="argument out of range";this.name="ArgumentOutOfRangeError";return this}
a.prototype=Object.create(Error.prototype);return a})();(function(){function a(){this.message="no elements in sequence";this.name="EmptyError";return this}
a.prototype=Object.create(Error.prototype);return a})();(function(){function a(){this.message="Timeout has occurred";this.name="TimeoutError";return this}
a.prototype=Object.create(Error.prototype);return a})();var hI=function(a,b,c){this.apiKey=a;this.authUser=b;this.pageId=c};
hI.prototype.getHeaders=function(){var a={},b=yz();null!=b&&(a.Authorization=b.scheme+" "+b.hash);a["X-Goog-AuthUser"]=String(this.authUser||0);(b=this.pageId)&&(a["X-Goog-PageId"]=b);return a};
hI.prototype.getQueryParameters=function(){return{key:this.apiKey}};
hI.prototype.usesCredentialedRequests=function(){return!0};
hI.prototype.getSubscriberKind=function(){return 11};
var iI=function(a,b){this.oauthTokens=a;this.pageId=b};
iI.prototype.getHeaders=function(){var a={};a.Authorization="OAuth "+this.oauthTokens.getValue();var b=this.pageId;b&&(a["X-Goog-PageId"]=b);return a};
iI.prototype.getQueryParameters=function(){return{}};
iI.prototype.usesCredentialedRequests=function(){return!0};
iI.prototype.getSubscriberKind=function(){return 11};
var jI=function(a,b){this.apiKey=a;this.appAuthTokens=b};
jI.prototype.getHeaders=function(){return{}};
jI.prototype.getQueryParameters=function(){return{key:this.apiKey}};
jI.prototype.usesCredentialedRequests=function(){return!1};
jI.prototype.getSubscriberKind=function(){return 13};
var kI=function(){var a=this;this.statusSubscribers=new Set;this.status=new WH(function(b){a.statusSubscribers.add(b);if(4===a.getState())LH(function(){b.complete()});else
{var c=a.lastChannelStatus;c&&LH(function(){b.next(c)})}return function(){return a.statusSubscribers.delete(b)}})};
kI.prototype.stop=function(){this.statusSubscribers.forEach(function(a){LH(function(){a.complete()})});
return Promise.resolve()};
kI.prototype.onOpen=function(){if(tA(this)){var a=new wF;a.setCode(0);this.lastChannelStatus=a;lI(this,a)}};
kI.prototype.onError=function(a,b){tA(this)&&(a=b.getLastHttpStatusCode(),b=new wF,b.setCode(Bma(a)),this.lastChannelStatus=b,lI(this,b))};
kI.prototype.onClose=function(){};
var lI=function(a,b){var c={};a=k(a.statusSubscribers);for(var d=a.next();!d.done;c={$jscomp$loop$prop$subscriber$1979:c.$jscomp$loop$prop$subscriber$1979},d=a.next())c.$jscomp$loop$prop$subscriber$1979=d.value,LH(function(e){return function(){e.$jscomp$loop$prop$subscriber$1979.next(b)}}(c))},tA=function(a){return 1===a.getState()||2===a.getState()},Mma=function(a){this.authMethod=a};var mI=function(a,b,c){this.name=a;this.isPrivateToUser=b;this.legacySource=c};
mI.makePrivateToUser=function(a){return new mI(a,!0)};
mI.prettyPrint=function(a){var b="{";a.legacySource&&(b=b.concat(" legacySource: "+a.legacySource+","));return b=b.concat(" name: \""+encodeURIComponent(a.name)+"\""," "+(a.isPrivateToUser?"(private)":"(public)")+" }")};var Nma={send:function(a,b,c,d,e,g,h){Hx(a,b,c,d,e,g,h)}};var Oma=new Set([1,2]),Pma=new Set([408,429]),nI=function(a,b){var c=void 0===c?Nma:c;this.doormanUri=a;this.authMethod=b;this.xhrIo=c;this.logger=new Ru("DoormanClientImpl")};
nI.prototype.subscribe=function(a){var b=a.getSubscription();mg(b,4,this.authMethod.getSubscriberKind());return oI(this,"/v1/subscriptions",a,sF)};
nI.prototype.unsubscribe=function(a){mg(a,4,this.authMethod.getSubscriberKind());var b=new tF;b.setSubscription(a);return oI(this,"/v1/deleteSubscriptions",b,uF)};
nI.prototype.acknowledge=function(a){var b=new mF;a=k(a);for(var c=a.next();!c.done;c=a.next())b.addAck(c.value);return oI(this,"/v1/acknowledgments",b,nF)};
var oI=function(a,b,c,d){var e=new cx(a.doormanUri);gx(e,b);b=k(Object.entries(a.authMethod.getQueryParameters()));for(var g=b.next();!g.done;g=b.next()){var h=k(g.value);g=h.next().value;h=h.next().value;Xw(e,g,h)}var m={"Content-type":"application/json+protobuf"};Object.assign(m,a.authMethod.getHeaders());var n=c.serialize();return new Promise(function(p,x){a.xhrIo.send(e,function(){var y=-1===this.getStatus()?void 0:this.getStatus();if(this.isSuccess())try{p(Dg(d,this.getResponseText()))}catch(S){x({code:4,
message:"Failed to deserialize response from Doorman server as "+(d+": ")+this.getResponseText(),status:y,isPermanent:!0})}else{var B=this.lastErrorCode_,G=this.getLastError();var P=this.getStatus();P=Oma.has(this.lastErrorCode_)||400<=P&&499>=P&&!Pma.has(P);x({code:B,message:G,status:y,isPermanent:P})}},"POST",n,m,2E4,a.authMethod.usesCredentialedRequests())})};fa();ja();var pI=function(){this.size=0;this.inner=new Map};
f=pI.prototype;f.clear=function(){this.inner.clear();this.size=this.inner.size};
f.delete=function(a){a=this.inner.delete(JSON.stringify(a));this.size=this.inner.size;return a};
f.forEach=function(a,b){var c=this;void 0!==b&&(a=a.bind(b));this.inner.forEach(function(d,e){e=JSON.parse(e);a(d,e,c)})};
f.get=function(a){return this.inner.get(JSON.stringify(a))};
f.has=function(a){return this.inner.has(JSON.stringify(a))};
f.set=function(a,b){this.inner.set(JSON.stringify(a),b);this.size=this.inner.size;return this};
pI.prototype[Symbol.iterator]=function(){return this.entries()};
pI.prototype.entries=function(){return new qI(this.inner.entries(),function(a){var b=k(a);a=b.next().value;b=b.next().value;return[JSON.parse(a),b]})};
pI.prototype.keys=function(){return new qI(this.inner.keys(),JSON.parse)};
pI.prototype.values=function(){return this.inner.values()};
fa();ja();var qI=function(a,b){this.inner=a;this.mapFunc=b};
qI.prototype[Symbol.iterator]=function(){return this};
qI.prototype.next=function(){var a=this.inner.next(),b=a.value;a=a.done;return{value:a?void 0:this.mapFunc(b),done:a}};var sI=function(a,b){var c=this;this.readyTicl=a;this.objectId=b;this.state=0;this.subscribers=new Set;this.signals=new WH(function(d){c.subscribers.add(d);if(4===c.state)LH(function(){d.complete()});else
if(3===c.state)LH(function(){d.error(c.makeFailureStatus())});else
{rI(c);var e=c.initialSignal;e&&LH(function(){d.next(e)})}return function(){return c.subscribers.delete(d)}})},rI=function(a){a.readyTicl.then(function(b){0===a.state&&0<a.subscribers.size&&(b.register(a.objectId),a.state=1)})};
sI.prototype.handleRegistrationStatus=function(a){4!==this.state&&(0===a?this.state=2:(this.state=0,rI(this)))};
sI.prototype.makeFailureStatus=function(){var a=new wF;a.setCode(2);return a};
var Qma=function(a,b){4!==a.state&&(a.state=3,a.subscribers.forEach(function(c){LH(function(){c.error(b)})}))};
sI.prototype.terminate=function(){4!==this.state&&(this.state=4,this.subscribers.forEach(function(a){LH(function(){a.complete()})}))};
var tI=function(a,b){var c=b.version;(!c||!a.highestKnownVersion||c>a.highestKnownVersion)&&a.subscribers.forEach(function(e){LH(function(){e.next(b)})});
if(!a.highestKnownVersion||c&&c>a.highestKnownVersion)a.highestKnownVersion=c;if(a.initialSignal){var d=a.initialSignal.version;d&&(!c||c>d)&&(a.initialSignal=b)}else a.initialSignal=b},uI=function(a,b,c,d,e,g){this.authMethod=a;
this.channel=b;this.tangoClientType=c;this.tangoClientName=d;this.tangoApplicationName=e;this.reuseClientTokens=g};
l(uI,Mma);var vI=function(a){kI.call(this);var b=this;this.config=a;this.state=0;this.registrations=new pI;this.channel=a.channel;this.readyTicl=new Promise(function(c){b.readyTiclResolver=c})};
l(vI,kI);f=vI.prototype;
f.start=function(){var a=this;this.state=1;this.channel.setChannelHandler(this);var b=Ama("Tango",this.channel).build();this.resources=b;var c=new JH(this.config.tangoClientType,this.config.tangoClientName,this.config.tangoApplicationName);c.setAllowSuppression(!0);c.setReuseClientTokens(this.config.reuseClientTokens);this.ticl=c=KH(this.resources,c,this);var d=this.config.authMethod;d instanceof iI?this.tokenSubscription=d.oauthTokens.subscribe(function(e){a.channel.setOAuthToken(e)}):d instanceof
jI&&(this.tokenSubscription=d.appAuthTokens.subscribe(function(e){a.channel.setAppAuthToken(e)}));
b.start();c.start();return this};
f.signalsFor=function(a){var b=new sG(a.legacySource,a.name),c=this.registrations.get(a);c||(c=new sI(this.readyTicl,b),this.registrations.set(a,c));return c.signals};
f.ready=function(){1===this.state&&(this.readyTiclResolver(this.ticl),this.state=2)};
f.invalidate=function(a,b,c){if(tA(this)){var d=b.getObjectId();if(d=this.registrations.get(wI(d)))b={version:eG(b.getVersion()),payload:b.getPayload()||void 0,isSuppressor:b.getIsTrickleRestartForInternalUse()},tI(d,b);a.acknowledge(c)}};
f.invalidateUnknownVersion=function(a,b,c){tA(this)&&((b=this.registrations.get(wI(b)))&&tI(b,{isSuppressor:!0}),a.acknowledge(c))};
f.invalidateAll=function(a,b){tA(this)&&(this.registrations.forEach(function(c){tI(c,{isSuppressor:!0})}),a.acknowledge(b))};
f.informError=function(){};
f.informRegistrationFailure=function(a,b){tA(this)&&(a=this.registrations.get(wI(a)))&&3!==a.state&&4!==a.state&&(b?(a.state=0,rI(a)):(a.state=3,Qma(a,a.makeFailureStatus())))};
f.reissueRegistrations=function(){tA(this)&&this.registrations.forEach(function(a){a.handleRegistrationStatus(1)})};
f.informRegistrationStatus=function(a,b){tA(this)&&(a=this.registrations.get(wI(a)))&&a.handleRegistrationStatus(b)};
f.stop=function(){this.state=3;var a=this.ticl,b=this.resources;this.resources=this.ticl=void 0;this.tokenSubscription&&(this.tokenSubscription.unsubscribe(),this.tokenSubscription=void 0);this.registrations.forEach(function(c){c.terminate()});
kI.prototype.stop.call(this);a&&a.stop();b&&b.stop();this.state=4;return Promise.resolve()};
var wI=function(a){var b=a.getSource();a=a.getName();return new mI(a,!1,b)};
vI.prototype.getState=function(){return this.state};function Rma(a){var b=arguments.length,c=Lma;Jma(arguments[arguments.length-1])&&(c=arguments[arguments.length-1],b--);var d=null;2<=b&&(d=arguments[1]);var e=Number.POSITIVE_INFINITY;3<=b&&(e=arguments[2]);return function(g){return g.lift(new Sma(a,d,e,c))}}
var Sma=function(a,b,c,d){this.bufferTimeSpan=a;this.bufferCreationInterval=b;this.maxBufferSize=c;this.scheduler=d};
Sma.prototype.call=function(a,b){return b.subscribe(new xI(a,this.bufferTimeSpan,this.bufferCreationInterval,this.maxBufferSize,this.scheduler))};
var Tma=function(){this.buffer=[]},xI=function(a,b,c,d,e){UH.call(this,a);
this.bufferTimeSpan=b;this.bufferCreationInterval=c;this.maxBufferSize=d;this.scheduler=e;this.contexts=[];a=yI(this);(this.timespanOnly=null==c||0>c)?this.add(a.closeAction=e.schedule(Uma,b,{subscriber:this,context:a,bufferTimeSpan:b})):(d={bufferTimeSpan:b,bufferCreationInterval:c,subscriber:this,scheduler:e},this.add(a.closeAction=e.schedule(Vma,b,{subscriber:this,context:a})),this.add(e.schedule(Wma,c,d)))};
l(xI,UH);xI.EMPTY=UH.EMPTY;xI.create=UH.create;xI.prototype._next=function(a){for(var b=this.contexts,c=b.length,d,e=0;e<c;e++){var g=b[e],h=g.buffer;h.push(a);h.length==this.maxBufferSize&&(d=g)}d&&(a=d,zI(this,a),a=a.closeAction,a.unsubscribe(),this.remove(a),!this.closed&&this.timespanOnly&&(a=yI(this),b=this.bufferTimeSpan,this.add(a.closeAction=this.scheduler.schedule(Uma,b,{subscriber:this,context:a,bufferTimeSpan:b}))))};
xI.prototype._error=function(a){this.contexts.length=0;UH.prototype._error.call(this,a)};
xI.prototype._complete=function(){for(var a=this.contexts,b=this.destination;0<a.length;){var c=a.shift();b.next(c.buffer)}UH.prototype._complete.call(this)};
xI.prototype._unsubscribe=function(){this.contexts=null};
var yI=function(a){var b=new Tma;a.contexts.push(b);return b},zI=function(a,b){a.destination.next(b.buffer);
a=a.contexts;0<=(a?a.indexOf(b):-1)&&a.splice(a.indexOf(b),1)};
function Uma(a){var b=a.subscriber,c=a.context;c&&zI(b,c);b.closed||(a.context=yI(b),a.context.closeAction=this.schedule(a,a.bufferTimeSpan))}
function Wma(a){var b=a.bufferCreationInterval,c=a.bufferTimeSpan,d=a.subscriber,e=a.scheduler,g=yI(d);d.closed||(d.add(g.closeAction=e.schedule(Vma,c,{subscriber:d,context:g})),this.schedule(a,b))}
function Vma(a){zI(a.subscriber,a.context)}
;var Xma={callOnce:function(a,b){return xw(a,b)},
clear:function(a){yw(a)}},Yma=function(a){this.cancelCallback=a},Zma=function(a,b){var c=!1,d=a.callOnce(function(){c||b()},3E4);
return new Yma(function(){c=!0;a.clear(d)})};
Yma.prototype.cancel=function(){this.cancelCallback()};
var AI=function(a,b,c){c=void 0===c?Xma:c;kI.call(this);this.doorman=a;this.config=b;this.timer=c;this.logger=new Ru("PostmanClientImpl");this.registrations=new pI;this.privatePerUserObjects=new Map;this.state=0;this.delayGenerator=new Nu(Math.random,500,1024);this.acks=new $H;this.channel=b.channelProvider(this)};
l(AI,kI);AI.prototype.start=function(){var a=this;this.config.authMethod instanceof iI?this.tokenSubscription=this.config.authMethod.oauthTokens.subscribe(function(b){a.setOAuthToken(b)}):this.config.authMethod instanceof jI&&(this.tokenSubscription=this.config.authMethod.appAuthTokens.subscribe(function(b){a.channel.setAppAuthToken(b)}));
this.channel.newPostmanSession("tango_web",this).open();this.sendAckBatches=this.acks.pipe(Rma(this.config.ackBatchDelayMs,-1,this.config.ackBatchMaxElements)).subscribe(function(b){0<b.length&&a.doorman.acknowledge(b).catch(function(c){a.logger.warning("Encountered an error sending acks with acks="+(b+": "+JSON.stringify(c)))})});
this.state=2;return this};
AI.prototype.signalsFor=function(a){var b=this;return a.legacySource?Kma():new WH(function(c){var d=b.registrations.get(a);d||(d=new BI(a.isPrivateToUser,function(e){$ma(b,a,e)}),b.registrations.set(a,d),4===b.state&&d.terminate());
return ana(d,c)})};
var $ma=function(a,b,c){if(tA(a)&&a.registrations.get(b)===c)if(0===c.numSubscribers()){if(null==c.deleteSubscriptionTimeout){var d=Zma(a.timer,function(){c.numSubscribers();c.deleteSubscriptionTimeout=void 0;uA(a,c);a.registrations.delete(b);null!=c.fullTopicName&&a.privatePerUserObjects.delete(c.fullTopicName)});
c.deleteSubscriptionTimeout=d}}else c.deleteSubscriptionTimeout&&(c.deleteSubscriptionTimeout.cancel(),c.deleteSubscriptionTimeout=void 0),0===c.state&&null!=a.subscriberInfo&&vA(a,c,b,a.subscriberInfo)};
AI.prototype.setOAuthToken=function(a){this.channel.setOAuthToken(a)};
AI.prototype.onSessionError=function(a,b){this.logger.warning("Received session error: "+JSON.stringify(b));a=new wF;a.setCode(2);a.setMessage(b.description);lI(this,a);b.isTransient&&this.logger.warning("Ignoring transient session error")};
var xA=function(a,b){if(tA(a)){var c=L(b,1),d=L(c,1).getTopicName();d=a.privatePerUserObjects.get(d)||new mI(d,!1);if(d=a.registrations.get(d)){var e=c.getMessage();c=gG(L(e,3));var g=K(e,1)?e.getData():void 0,h=K(e,2)?L(e,2):void 0;e=M(e,4);c={version:c,payload:g,traceId:h,isSynthetic:!1,isSuppressor:e};bna(d,c);d=k(d.subscribers);for(g=d.next();!g.done;g=d.next())g.value.next(c)}else a.logger.warning("Acking and dropping signal on object with no listeners"),null==a.subscriberInfo?a.logger.warning("Got signal for unregistered object before receiving subscriber info"):(
a.logger.warning("Attempting to unsubscribe from unknown object for which we received an invalidation"),c=L(L(b,1),1),d=new oF,d.setTopicName(c.getTopicName()),mg(d,3,a.subscriberInfo),mg(d,4,a.config.authMethod.getSubscriberKind()),c=c.getName(),mg(d,5,c),a.unsubscribe(d));b=L(b,3);d=new Date().getTime();c=new jF;c.setId(b);mg(c,2,1E3*d);a.acks.next(c)}},vA=function(a,b,c,d){b.state=1;
var e=cna();b.subscriptionName=e;var g=new oF;g.setTopicName(c.name);mg(g,3,d);mg(g,5,e);mg(g,4,a.config.authMethod.getSubscriberKind());var h=new rF;h.setSubscription(g);mg(h,2,b.isPrivateToUser);b.subscription=new Promise(function(m,n){dna(a,function(){return a.doorman.subscribe(h)},function(p){var x=g.clone();
null!=C(p,2)&&(b.fullTopicName=C(p,2),x.setTopicName(b.fullTopicName));m(x);if(b.subscriptionName!==e||a.registrations.get(c)!==b)a.logger.warning("Received outdated subscribe response");else if(2===b.state)a.logger.warning("Received duplicate subscribe response");else{null!=C(p,2)&&a.privatePerUserObjects.set(C(p,2),c);b.state=2;p=C(p,1);p={version:gG(p),isSynthetic:!0,isSuppressor:!0};bna(b,p);x=k(b.subscribers);for(var y=x.next();!y.done;y=x.next())y.value.next(p)}},function(p){n(p);
if(d!==a.subscriberInfo||b!==a.registrations.get(c))a.logger.warning("Received outdated subscribe error");else{a.logger.warning("Encountered a permanent error creating subscription to "+(JSON.stringify(c)+": "+JSON.stringify(p)));if(0<b.subscribers.size){p=k(b.subscribers);for(var x=p.next();!x.done;x=p.next())x.value.error(b.makeFailureStatus());b.subscribers.clear();b.numSubscribersChangedCallback(b)}b.state=0;b.subscription=void 0;b.subscriptionName=void 0}},function(){return a.subscriberInfo===
d&&0<b.numSubscribers()})})},uA=function(a,b){b.subscription&&(b.subscription.then(function(c){a.unsubscribe(c)},function(){a.logger.info("Subscribe request failed. Not attempting deletion.")}),b.state=0,b.subscription=void 0,b.subscriptionName=void 0)};
AI.prototype.unsubscribe=function(a){var b=this;this.doorman.unsubscribe(a).then(function(){b.logger.info("Successfully deleted subscription")}).catch(function(c){b.logger.warning("Failed to delete subscription",c)})};
AI.prototype.stop=function(){this.state=3;this.tokenSubscription&&(this.tokenSubscription.unsubscribe(),this.tokenSubscription=void 0);this.sendAckBatches&&(this.sendAckBatches.unsubscribe(),this.sendAckBatches=void 0);kI.prototype.stop.call(this);for(var a=k(this.registrations.values()),b=a.next();!b.done;b=a.next())b=b.value,uA(this,b),b.terminate();this.state=4;return Promise.resolve()};
AI.prototype.getState=function(){return this.state};
var dna=function(a,b,c,d,e){b().then(function(g){a.delayGenerator.reset();c(g)}).catch(function(g){g instanceof Error?a.logger.warning("Unexpected error:",g):g.isPermanent?(a.delayGenerator.reset(),d(g)):(null==e||e())&&a.timer.callOnce(function(){dna(a,b,c,d,e)},Ou(a.delayGenerator))})};
function cna(){for(var a=[];8>a.length;)a.push(Math.floor(256*Math.random()));return jf(a)}
var BI=function(a,b){this.isPrivateToUser=a;this.numSubscribersChangedCallback=b;this.state=0;this.subscribers=new Set};
BI.prototype.numSubscribers=function(){return this.subscribers.size};
var ana=function(a,b){if(3===a.state)return b.complete(),function(){};
a.subscribers.add(b);null!=a.latestSignal&&b.next(a.latestSignal);a.numSubscribersChangedCallback(a);return function(){a.subscribers.delete(b);a.numSubscribersChangedCallback(a)}},bna=function(a,b){if(null==a.latestSignal||0<b.version.compare(a.latestSignal.version))a.latestSignal=b};
BI.prototype.terminate=function(){this.state=3;for(var a=k(this.subscribers),b=a.next();!b.done;b=a.next())b.value.complete();this.subscribers.clear()};
BI.prototype.makeFailureStatus=function(){var a=new wF;a.setCode(2);return a};
var ena=function(a,b,c,d,e){this.authMethod=a;this.channelProvider=b;this.doormanUri=c;this.ackBatchDelayMs=d;this.ackBatchMaxElements=e};
l(ena,Mma);var CI=function(a,b){this.channel=a;this.tangoClientType=b;this.tangoClientName="generic-client";this.tangoApplicationName="unspecified-app";this.reuseClientTokens=!0};
CI.create=function(a,b){return new CI(a,b)};
CI.prototype.withOAuthTokens=function(a){this.oauthTokens=a;this.appAuthTokens=void 0;return this};
CI.prototype.withAppAuthTokens=function(a){this.appAuthTokens=a;this.oauthTokens=void 0};
CI.prototype.build=function(){return new uI(this.oauthTokens?new iI(this.oauthTokens):this.appAuthTokens?new jI("",this.appAuthTokens):new hI(""),this.channel,this.tangoClientType,this.tangoClientName,this.tangoApplicationName,this.reuseClientTokens)};
var DI=function(a,b,c,d,e){this.lcsClientType=a;this.channelUri=b;this.channelUriNoIframe=c;this.doormanUri1p=d;this.doormanUri3p=e;this.useSharedChannel=!1};
DI.forLocalEnv=function(a,b,c){var d=new cx(b);b=new cx(b);gx(b,"/client-channel/channel");c=new cx(c);return new DI(a,d,b,c,c)};
DI.forStagingEnv=function(a){var b=new cx("https://client-channel.sandbox.google.com/client-channel/client"),c=new cx("https://client-channel.sandbox.google.com/client-channel/channel"),d=new cx("https://signaler-staging.sandbox.google.com");return new DI(a,b,c,d,d)};
DI.prototype.enableChannelSharing=function(){this.useSharedChannel=!0;return this};
var fna=function(a,b){a.channelProvider=function(c){b.setChannelHandler(c);return b.getRawChannel()};
return a};
f=DI.prototype;f.withOAuthTokens=function(a){this.oauthTokens=a;return this};
f.withAppAuthTokens=function(a){this.appAuthTokens=a;this.oauthTokens=void 0};
f.withPlainHttpForTest=function(){for(var a=k([this.channelUri,this.channelUriNoIframe,this.doormanUri1p,this.doormanUri3p]),b=a.next();!b.done;b=a.next())b.value.setScheme("http");return this};
f.build=function(){return gna(this,new mA(this.channelUri.toString(),this.lcsClientType,"lcsclient"))};
f.buildWithoutIframe=function(){return gna(this,new zz(this.channelUriNoIframe.toString(),this.lcsClientType))};
var gna=function(a,b){a.channelProvider||(b.setUseSharedChannel(a.useSharedChannel),a.pageId&&b.setPageId(a.pageId),a.authUser&&b.setAuthuser(a.authUser),a.channelProvider=function(d){d=BA(b,d);d.open();return d});
if(a.oauthTokens)var c=new iI(a.oauthTokens,a.pageId);else{if(!a.apiKey)throw Error("An API key is required");c=a.appAuthTokens?new jI(a.apiKey,a.appAuthTokens):new hI(a.apiKey,a.authUser,a.pageId)}return new ena(c,a.channelProvider,c instanceof hI?a.doormanUri1p:a.doormanUri3p,250,20)};/*
gapi.loader.OBJECT_CREATE_TEST_OVERRIDE &&*/
var EI=window,FI=document,hna=EI.location,ina=function(){},jna=/\[native code\]/,GI=function(a,b,c){return a[b]=a[b]||c},Voa=function(a){a=a.sort();
for(var b=[],c=void 0,d=0;d<a.length;d++){var e=a[d];e!=c&&b.push(e);c=e}return b},HI=function(){var a;
if((a=Object.create)&&jna.test(a))a=a(null);else{a={};for(var b in a)a[b]=void 0}return a},II=GI(EI,"gapi",{});var JI;JI=GI(EI,"___jsl",HI());GI(JI,"I",0);GI(JI,"hel",10);var Woa=function(){var a=hna.href;if(JI.dpo)var b=JI.h;else{b=JI.h;var c=/([#].*&|[#])jsh=([^&#]*)/g,d=/([?#].*&|[?#])jsh=([^&#]*)/g;if(a=a&&(c.exec(a)||d.exec(a)))try{b=decodeURIComponent(a[2])}catch(e){}}return b},Xoa=function(a){var b=GI(JI,"PQ",[]);
JI.PQ=[];var c=b.length;if(0===c)a();else for(var d=0,e=function(){++d===c&&a()},g=0;g<c;g++)b[g](e)},KI=function(a){return GI(GI(JI,"H",HI()),a,HI())};var Yoa=function(a){this.obj_=a};
f=Yoa.prototype;f.value=function(){return this.obj_};
f.setWidth=function(a){this.obj_.width=a};
f.getWidth=function(){return this.obj_.width};
f.setHeight=function(a){this.obj_.height=a};
f.getHeight=function(){return this.obj_.height};
f.setStyle=function(a){this.obj_.style=a;return this};
f.getStyle=function(){return this.obj_.style};
f.setOnLoad=function(a){this.obj_.onload=a;return this};
f.getOnLoad=function(){return this.obj_.onload};var Zoa=function(a){this.obj_=a};
f=Zoa.prototype;f.setAnchor=function(a){this.obj_.anchor=a;return this};
f.getAnchor=function(){return this.obj_.anchor};
f.setAnchorPosition=function(a){this.obj_.anchorPosition=a;return this};
f.getAnchorPosition=function(){return this.obj_.anchorPosition};
f.setArrowPosition=function(a){this.obj_.arrowPosition=a;return this};
f.getArrowPosition=function(){return this.obj_.arrowPosition};
f.setCloseClickDetection=function(a){this.obj_.closeClickDetection=a;return this};
f.getCloseClickDetection=function(){return this.obj_.closeClickDetection};
f.setHideClickDetection=function(a){this.obj_.hideClickDetection=a;return this};
f.getHideClickDetection=function(){return this.obj_.hideClickDetection};
f.setMaxExpectedSize=function(a){this.obj_.maxExpectedSize=a;return this};
f.getMaxExpectedSize=function(){return this.obj_.maxExpectedSize};
f.setShowSpinner=function(a){this.obj_.showSpinner=a;return this};
f.getShowSpinner=function(){return this.obj_.showSpinner};
f.setShow=function(a){this.obj_.show=a;return this};
f.getShow=function(){return this.obj_.show};
f.setHeight=function(a){this.obj_.height=a};
f.getHeight=function(){return this.obj_.height};
f.setWidth=function(a){this.obj_.width=a};
f.getWidth=function(){return this.obj_.width};
f.setBubbleType=function(a){this.obj_.bubbletype=a;return this};
f.getBubbleType=function(){return this.obj_.bubbletype};
f.setExpandTo=function(a){this.obj_.expandTo=a;return this};
f.getExpandTo=function(){return this.obj_.expandTo};
f.setContainerStyle=function(a){this.obj_.containerStyle=a;return this};
f.getContainerStyle=function(){return this.obj_.containerStyle};
f.setTrayPosition=function(a){this.obj_.trayPosition=a;return this};
f.getTrayPosition=function(){return this.obj_.trayPosition};
f.setCreateOverlay=function(a){this.obj_.createOverlay=a;return this};
f.getCreateOverlay=function(){return this.obj_.createOverlay};
f.setAnimationRule=function(a){this.obj_.animationRule=a;return this};
f.getAnimationRule=function(){return this.obj_.animationRule};var $oa=function(){this.obj_={}};
f=$oa.prototype;f.value=function(){return this.obj_};
f.setUrl=function(a){this.obj_.url=a;return this};
f.getUrl=function(){return this.obj_.url};
f.getWhere=function(){return this.obj_.where};
f.setStyle=function(a){this.obj_.style=a;return this};
f.getStyle=function(){return this.obj_.style};
f.setId=function(a){this.obj_.id=a;return this};
f.getId=function(){return this.obj_.id};
f.setRpcToken=function(a){this.obj_.rpctoken=a;return this};
f.getRpcToken=function(){return this.obj_.rpctoken};
f.setHintInFragment=function(a){this.obj_.hintInFragment=a;return this};
f.getHintInFragment=function(){return this.obj_.hintInFragment};
f.setDontClear=function(a){this.obj_.dontclear=a;return this};
f.getDontClear=function(){return this.obj_.dontclear};
f.setBeforeNode=function(a){this.obj_.beforeNode=a;return this};
f.getBeforeNode=function(){return this.obj_.beforeNode};
f.getQueryParams=function(){return this.obj_.queryParams};
f.setFragmentParams=function(a){this.obj_.fragmentParams=a;return this};
f.getFragmentParams=function(){return this.obj_.fragmentParams};
f.setParamsSerializer=function(a){this.obj_.paramsSerializer=a;return this};
f.getParamsSerializer=function(){return this.obj_.paramsSerializer};
f.setForcePost=function(a){this.obj_.forcePost=a;return this};
f.getAllowPost=function(){return this.obj_.allowPost};
f.getForcePost=function(){return this.obj_.forcePost};
f.setDropDataPostorigin=function(a){this.obj_.dropDataPostorigin=a;return this};
f.getDropDataPostorigin=function(){return this.obj_.dropDataPostorigin};
f.setRelayOpen=function(a){this.obj_.relayOpen=a;return this};
f.getRelayOpen=function(){return this.obj_.relayOpen};
f.setDisableRelayOpen=function(a){this.obj_.disableRelayOpen=a;return this};
f.getDisableRelayOpen=function(){return this.obj_.disableRelayOpen};
f.getMessageHandlers=function(){return this.obj_.messageHandlers};
f.getMessageHandlersFilter=function(){return this.obj_.messageHandlersFilter};
f.setApis=function(a){this.obj_.apis=a;return this};
f.getApis=function(){return this.obj_.apis};
f.setOpenAsWindow=function(a){this.obj_.openAsWindow=a;return this};
f.getOpenAsWindow=function(){return this.obj_.openAsWindow};
f.setReuseWindow=function(a){this.obj_.reuseWindow=a;return this};
f.getReuseWindow=function(){return this.obj_.reuseWindow};
f.setRpcRelayUrl=function(a){this.obj_.rpcRelayUrl=a;return this};
f.getRpcRelayUrl=function(){return this.obj_.rpcRelayUrl};
f.setOnClose=function(a){this.obj_.onClose=a;return this};
f.getOnClose=function(){return this.obj_.onClose};
f.setOnRestyle=function(a){this.obj_.onRestyle=a;return this};
f.getOnRestyle=function(){return this.obj_.onRestyle};
f.setOnCreate=function(a){this.obj_.onCreate=a;return this};
f.getOnCreate=function(){return this.obj_.onCreate};
f.getContext=function(){return this.obj_.context};
f.getOpenerIframe=function(){return this.obj_.openerIframe};
f.getStyleOptions=function(){return new Zoa(this.obj_)};
f.setController=function(a){this.obj_.controller=a;return this};
f.getController=function(){return this.obj_.controller};
f.setControllerData=function(a){this.obj_.controllerData=a;return this};
f.getControllerData=function(){return this.obj_.controllerData};
f.setCanvasUrl=function(a){this.obj_.canvasUrl=a;return this};
f.getCanvasUrl=function(){return this.obj_.canvasUrl};
f.setWaitForOnload=function(a){this.obj_.waitForOnload=a;return this};
f.getWaitForOnload=function(){return this.obj_.waitForOnload};
f.setConnectWithQueryParams=function(a){this.obj_.connectWithQueryParams=a;return this};
f.getConnectWithQueryParams=function(){return this.obj_.connectWithQueryParams};
f.setHeightPadding=function(a){this.obj_.heightPadding=a;return this};
f.getHeightPadding=function(){return this.obj_.heightPadding};
f.setTimeoutMs=function(a){this.obj_.timeout=a;return this};
f.getTimeoutMs=function(){var a=this.obj_.timeout;return a?a:null};var LI=function(a,b){hb.call(this,b);this.code=a};
l(LI,hb);var apa=function(){var a=px(window.location.href).fragment_;return new kx(a).get("redirect_state",null)};var bpa=new Set(["tos_url","privacy_policy_url","learn_more_url"]),cpa=/(\[.*?\]\(\$\{.*?\}\))/,dpa=/^\[(.*?)\]\(\$\{(.*?)\}\)$/;var MI=function(a){this.validator_=a;this.closedPopupTimeout_=this.reject_=this.resolve_=this.popup_=null};
MI.prototype.open=function(a,b){this.popup_&&(this.reject_(void 0),NI(this));return new Yv(function(c,d){this.resolve_=c;this.reject_=d;this.popup_=kd(a,null,Sb(""),b);Hv(window,"message",this.receiveMessage_,!1,this);epa(this)},this)};
MI.prototype.receiveMessage_=function(a){a=a.event_;if(a.source===this.popup_){var b=a.data;this.validator_(b,a.origin)&&(this.resolve_(b),NI(this))}};
var NI=function(a){a.closedPopupTimeout_&&(a.closedPopupTimeout_.cancel(),a.closedPopupTimeout_=null);a.popup_&&a.popup_.close();Mv(window,"message",a.receiveMessage_,!1,a);a.popup_=null;a.resolve_=null;a.reject_=null},epa=function(a){a.closedPopupTimeout_=zw(100).then(function(){if(a.popup_)a.popup_.closed?fpa(a):epa(a);else
{var b={error:new LI("POPUP_BLOCKED")};a.reject_(b);NI(a)}},function(){})},fpa=function(a){a.closedPopupTimeout_=zw(100).then(function(){a.reject_(void 0);
NI(a)},function(){})};var OI=function(){this.storage_={}};
OI.prototype.get=function(a){return Ia(this.storage_[a])?this.storage_[a]:null};
OI.prototype.set=function(a,b){this.storage_[a]=b};
OI.prototype.remove=function(a){delete this.storage_[a]};var PI=function(){this.storage_=new OI};
PI.prototype.addToken=function(a,b){var c=this.storage_.get(a)||[];c.push(b);this.storage_.set(a,c)};
PI.prototype.getToken=function(a,b){b=b||[];var c=this.storage_.get(a)||[];c=nb(c,function(e){return!(Math.floor(fb()/1E3)>e.expireTime-30)});
this.storage_.set(a,c);for(a=0;a<c.length;a++){var d=c[a];if(gpa(b,d.scopes||[]))return d}return null};
var gpa=function(a,b){b=new Set(b);a=k(a);for(var c=a.next();!c.done;c=a.next())if(!b.has(c.value))return!1;return!0};var hpa=function(){};
hpa.prototype.close=function(){};
var ipa=function(){};var QI=function(a,b,c,d){this.request=a;this.service=b;this.tokenCache=c;this.options=d};
QI.prototype.fetch=function(){var a=this;return this.fetchToken().then(function(b){"COMPLETE"===b.status&&b.token&&a.tokenCache.addToken(a.request.serviceId,b.token);return b})};
QI.prototype.sendRequest=function(a,b){b=b||{};b.gdiState=a;b.serviceId=this.request.serviceId;b.scopes=this.request.scopes;this.request.extraRedirectState&&!gc(this.request.extraRedirectState)&&(b.extraRedirectState=this.request.extraRedirectState);this.request.completionUrl&&!gc(this.request.completionUrl)&&(b.completionUrl=this.request.completionUrl);this.options.bucket&&(b.header={bucket:this.options.bucket});return this.service.getTokenForService(b)};
var jpa=function(a,b){var c=b.tokenInfo;b=c.accessToken;if(!b)throw new LI("INTERNAL_ERROR");b={accessToken:b};a.request.scopes&&(b.scopes=a.request.scopes);if(a=c.expireTime){c=c.expireTime;a=new Sg(2E3);c=hc(c);var d=-1==c.indexOf("T")?" ":"T";c=c.split(d);var e=c[0].match(Hba);if(e){var g=Number(e[2]),h=Number(e[3]),m=Number(e[4]);d=Number(e[5]);var n=Number(e[6])||1;a.setFullYear(Number(e[1]));m?(a.setDate(1),a.setMonth(0),a.add(new Og("d",m-1))):d?(a.setMonth(0),a.setDate(1),e=a.getDay()||7,
a.add(new Og("d",(4>=e?1-e:8-e)+(Number(n)+7*(Number(d)-1))-1))):(g&&(a.setDate(1),a.setMonth(g-1)),h&&a.setDate(h));d=!0}else d=!1;if(d&&!(d=2>c.length)){d=c[1];c=d.match(Jba);if(c)if(d=d.substring(0,d.length-c[0].length),"Z"===c[0])var p=0;else p=60*Number(c[2])+Number(c[3]),p*="-"==c[1]?1:-1;(d=d.match(Iba))?(c?a.setTime(Date.UTC(a.getYear(),a.getMonth(),a.getDate(),Number(d[1]),Number(d[2])||0,Number(d[3])||0,d[4]?1E3*Number(d[4]):0)+6E4*p):(a.setHours(Number(d[1])),a.setMinutes(Number(d[2])||
0),a.setSeconds(Number(d[3])||0),a.setMilliseconds(d[4]?1E3*Number(d[4]):0)),d=!0):d=!1}a=d?a:null}if(p=a)b.expireTime=Math.floor(p.getTime()/1E3);return{status:"COMPLETE",token:b}};var kpa=function(){this.eventListenerKeys_=[]},SI=function(a,b,c,d){RI(a,"click",b,c,d)},RI=function(a,b,c,d,e){c=c.getElementsByClassName(d);
for(d=0;d<c.length;d++){var g=Hv(c[d],b,e,!1);a.eventListenerKeys_.push(g)}};var sj,lpa=Rb(Sb(".goi-dialog{color:rgba(0,0,0,.87);font:14px Roboto,arial,sans-serif;width:100%}.goi-dialog-body{margin:24px}.goi-dialog-form{margin-bottom:24px}.goi-dialog-header{font-size:20px;font-weight:500;margin:0 0 20px 0}.goi-dialog-footer{font-size:12px;font-weight:500}.goi-dialog-action{border-radius:2px;color:#4285f4;display:inline-block;font-size:14px;font-weight:500;float:right;line-height:36px;margin:8px;padding:0 16px;text-decoration:none;text-transform:uppercase}.goi-link{color:#4285f4}.goi-input{border:none;border-bottom:1px solid rgba(0,0,0,.12);font:14px Roboto,arial,sans-serif;padding:0 0 4px;margin-bottom:1px;outline:none}.goi-input:focus{border-bottom:2px solid #4285f4;margin-bottom:0}.goi-input-label{display:block;margin-bottom:8px}.goi-select{background-color:#fff;border:none;color:rgba(0,0,0,.87);font:14px Roboto,arial,sans-serif;width:100%;padding:4px 0}.goi-body-text{margin-bottom:16px}.goi-fineprint{color:rgba(0,0,0,.54);font-size:12px;margin-bottom:16px}.goi-button{border:none;border-radius:2px;cursor:pointer;font:14px Roboto,arial,sans-serif;font-weight:500;outline:none;padding:10px 0;text-transform:uppercase}.goi-blue-button{background-color:#4285f4;color:#fff;text-align:center;width:100%}.goi-transparent-button{background-color:transparent;color:#4285f4;text-align:right;width:100%}.goi-hr{color:#d5d5d5;height:1px;width:100%}.goi-padding-bottom{padding:0 0 18px 0}.goi-padding-top{padding:18px 0 0 0}.goi-inline-error{color:red;display:block;font-size:12px;margin-top:3px;position:absolute}.goi-linkaccount-account-list{list-style:none;margin:0;padding:0}.goi-linkaccount-width{width:100%}.goi-linkaccount-photo-wrapper{display:table-cell;vertical-align:middle}.goi-linkaccount-photo{border-radius:50%;float:left;height:36px;width:36px}.goi-linkaccount-account-info{display:table-cell;padding:18px 0 18px 20px;vertical-align:middle;word-break:break-word}.goi-linkaccount-display-name{color:rgba(0,0,0,.87);font-size:16px;line-height:16px;margin-bottom:2px}.goi-linkaccount-username{color:rgba(0,0,0,.87);font-size:14px;line-height:20px}.goi-phoneentry-country{text-align:center;width:24px}.goi-phoneentry-phone{margin-left:12px;width:200px}.goi-loading-id-page{padding:40px;text-align:center} "));
sj=0===lpa.length?Haa:new Jc().initSecurityPrivateDoNotAccessOrElse_(lpa);var TI=function(){this.stylesheet_=null};
TI.prototype.install=function(){if(!this.stylesheet_){var a=ah(void 0);var b=a.getDocument();if(Ne&&b.createStyleSheet)a=b.createStyleSheet(),tj(a);else{b=a.getElementsByTagNameAndClass("HEAD")[0];if(!b){var c=a.getElementsByTagNameAndClass("BODY")[0];b=a.createDom("HEAD");c.parentNode.insertBefore(b,c)}c=a.createDom("STYLE");tj(c);a.appendChild(b,c);a=c}this.stylesheet_=a}};
TI.prototype.uninstall=function(){if(this.stylesheet_){var a=this.stylesheet_;Dh(a.ownerNode||a.owningElement||a);this.stylesheet_=null}};
Ua(TI);var UI=function(){Wv.call(this);this.element=null;this.eventManager_=new kpa};
l(UI,Wv);UI.prototype.disposeInternal=function(){for(var a=this.eventManager_,b=0;b<a.eventListenerKeys_.length;b++)Nv(a.eventListenerKeys_[b]);a.eventListenerKeys_=[];this.element&&(this.element=null);Wv.prototype.disposeInternal.call(this)};
UI.prototype.render=function(){if(this.element)return this.element;this.element=this.renderElement();this.installEventListeners(this.element);TI.getInstance().install();return this.element};
UI.prototype.installEventListeners=function(a){var b=this;SI(this.eventManager_,a,"goi-dialog-id-primary",function(){b.dispatchEvent(new vv("dialogPrimary"))});
SI(this.eventManager_,a,"goi-dialog-id-cancel",function(){b.dispatchEvent(new vv("dialogCancel"))});
SI(this.eventManager_,a,"goi-dialog-id-back",function(){b.dispatchEvent(new vv("dialogBack"))})};var VI={},mpa={},npa={},WI=function(){throw Error("Do not instantiate directly")};
WI.prototype.contentDir=null;WI.prototype.getContent=function(){return this.content};
WI.prototype.toString=function(){return this.content};
WI.prototype.toSafeUrl=function(){if(this.contentKind!==mpa)throw Error("Sanitized content was not of kind URI.");return xc(this.toString())};
var XI=function(){WI.call(this)};
t(XI,WI);XI.prototype.contentKind=VI;Ne&&$e(8);var opa=function(a){if(null!=a)switch(a.contentDir){case 1:return 1;case-1:return-1;case 0:return 0;}return null},ZI=function(a){return null!=a&&a.contentKind===VI?a:a instanceof Uc?YI(Wc(a),a.getDirection()):YI(od(String(String(a))),opa(a))},YI=function(a){function b(c){this.content=c}
b.prototype=a.prototype;return function(c,d){c=new b(String(c));void 0!==d&&(c.contentDir=d);return c}}(XI),$I=function(a,b){return Za(a)&&Za(b)?a.contentKind!==b.contentKind?!1:a.toString()===b.toString():a instanceof WI&&b instanceof WI?a.contentKind!=b.contentKind?!1:a.toString()==b.toString():a==b},R=function(a){return null!=a&&a.contentKind===VI?String(String(a.getContent()).replace(ppa,"").replace(qpa,"<")).replace(rpa,spa):od(String(a))},tpa={"\0":"�",
"\t":"	","\n":" ","\x0B":"","\f":"","\r":" "," ":" ","\"":""","&":"&","'":"'","-":"-","/":"/","<":"<","=":"=",">":">","`":"`","\x85":"…","\xA0":" ","\u2028":"
","\u2029":"
"},spa=function(a){return tpa[a]},upa={"\0":"%00",
"\x01":"%01","\x02":"%02","\x03":"%03","\x04":"%04","\x05":"%05","\x06":"%06","\x07":"%07","\b":"%08","\t":"%09","\n":"%0A","\x0B":"%0B","\f":"%0C","\r":"%0D","\x0E":"%0E","\x0F":"%0F","\x10":"%10","\x11":"%11","\x12":"%12","\x13":"%13","\x14":"%14","\x15":"%15","\x16":"%16","\x17":"%17","\x18":"%18","\x19":"%19","\x1A":"%1A","\x1B":"%1B","\x1C":"%1C","\x1D":"%1D","\x1E":"%1E","\x1F":"%1F"," ":"%20","\"":"%22","'":"%27","(":"%28",")":"%29","<":"%3C",
">":"%3E","\\":"%5C","{":"%7B","}":"%7D","\x7F":"%7F","\x85":"%C2%85","\xA0":"%C2%A0","\u2028":"%E2%80%A8","\u2029":"%E2%80%A9","\uFF01":"%EF%BC%81","\uFF03":"%EF%BC%83","\uFF04":"%EF%BC%84","\uFF06":"%EF%BC%86","\uFF07":"%EF%BC%87","\uFF08":"%EF%BC%88","\uFF09":"%EF%BC%89","\uFF0A":"%EF%BC%8A","\uFF0B":"%EF%BC%8B","\uFF0C":"%EF%BC%8C","\uFF0F":"%EF%BC%8F","\uFF1A":"%EF%BC%9A","\uFF1B":"%EF%BC%9B","\uFF1D":"%EF%BC%9D","\uFF1F":"%EF%BC%9F","\uFF20":"%EF%BC%A0","\uFF3B":"%EF%BC%BB","\uFF3D":"%EF%BC%BD"},
aJ=function(a){return upa[a]},rpa=/[\x00\x22\x27\x3c\x3e]/g,bJ=/[\x00- \x22\x27-\x29\x3c\x3e\\\x7b\x7d\x7f\x85\xa0\u2028\u2029\uff01\uff03\uff04\uff06-\uff0c\uff0f\uff1a\uff1b\uff1d\uff1f\uff20\uff3b\uff3d]/g,vpa=/^[^&:\/?#]*(?:[\/?#]|$)|^https?:|^data:image\/[a-z0-9+]+;base64,[a-z0-9+\/]+=*$|^blob:/i,ppa=/<(?:!|\/?([a-zA-Z][a-zA-Z0-9:\-]*))(?:[^>'"]|"[^"]*"|'[^']*')*>/g,qpa=/</g;var wpa=function(a){var b=a.account,c=a.serviceName;a="<div class=\""+R("goi-dialog")+" "+R("goi-linkaccount-id-page")+"\"><div class=\""+R("goi-dialog-body")+"\"><h1 class=\""+R("goi-dialog-header")+"\">";c="Link "+(ZI(c)+" to your Google Account");a+=c;c="</h1><ul class=\""+R("goi-linkaccount-account-list")+"\"><li><div class=\""+R("goi-linkaccount-photo-wrapper")+"\"><img class=\""+R("goi-linkaccount-photo")+"\" src=\"";var d=b.photoUrl;null!=d&&d.contentKind===mpa||null!=d&&d.contentKind===npa?d=String(d).replace(bJ,
aJ):d instanceof uc?d=String(wc(d)).replace(bJ,aJ):d instanceof Xb?d=String(Zb(d)).replace(bJ,aJ):(d=String(d),d=vpa.test(d)?d.replace(bJ,aJ):"about:invalid#zSoyz");a+=c+R(d)+"\" alt=\"\"/></div><div class=\""+R("goi-linkaccount-account-info")+"\"><div class=\""+R("goi-linkaccount-display-name")+"\">"+ZI(b.displayName)+"</div><div class=\""+R("goi-linkaccount-username")+"\">"+ZI(b.username)+"</div></div></li><li><button class=\""+R("goi-linkaccount-width")+" "+R("goi-button")+" "+R("goi-blue-button")+" "+R("goi-linkaccount-button")+
"\" data-account-id=\""+R(b.accountId)+"\">";return YI(a+"LINK ACCOUNTS</button></li></ul></div></div>")},xpa=function(a){var b=a.serviceName;
null==a.phoneNumbers||Wa(a.phoneNumbers);var c=a.phoneNumbers;var d=a.selectedPhoneNumber,e=a.addPhoneOptionValue,g=a.consentText;a="<div class=\""+R("goi-dialog")+" "+R("goi-createaccount-id-page")+"\"><div class=\""+R("goi-dialog-body")+"\"><h1 class=\""+R("goi-dialog-header")+" "+R("goi-createaccount-padding")+"\">";var h="Don't have "+(ZI(b)+" account? Create one with your Google Account");a=a+h+"</h1>";if(c){a+="<label for=\"goi-createaccount-phone\" class=\""+R("goi-input-label")+"\">";a=a+"Phone number</label><div class=\""+(
R("goi-dialog-form")+"\"><select class=\""+R("goi-select")+" "+R("goi-createaccount-id-phone-select")+"\">");h=c.length;for(var m=0;m<h;m++){var n=c[m];a+=d&&$I(d,n)?"<option class=\""+R("goi-option")+"\" value=\""+R(n)+"\" selected>"+ZI(n)+"</option>":"<option class=\""+R("goi-option")+"\" value=\""+R(n)+"\">"+ZI(n)+"</option>"}e&&(a+="<option class=\""+R("goi-option")+"\" value=\""+R(e)+"\">",a+="Add new phone number</option>");a+="</select></div>"}a+=(g?"<div class=\""+R("goi-fineprint")+"\">"+ZI(g)+"</div>":
"")+"<button class=\""+R("goi-button")+" "+R("goi-blue-button")+" "+R("goi-dialog-id-primary")+"\">";a=a+"create</button><hr class=\""+(R("goi-hr")+"\"/><button class=\""+R("goi-button")+" "+R("goi-transparent-button")+" "+R("goi-createaccount-id-use-other-email")+"\">");b="I already have "+(ZI(b)+" account");a=a+b+("</button><button class=\""+R("goi-button")+" "+R("goi-transparent-button")+" "+R("goi-dialog-id-cancel")+"\">");a+="Cancel";a+="</button></div></div>";return YI(a)},ypa=function(a){a=a.consentText;
a="<div class=\""+R("goi-dialog")+" "+R("goi-providerconsent-id-page")+"\"><div class=\""+R("goi-dialog-body")+"\"><h1 class=\""+R("goi-dialog-header")+"\">"+ZI(a)+"</h1></div><div class=\""+R("goi-dialog-footer")+"\"><a href=\"javascript:void(0);\" class=\""+R("goi-dialog-action")+" "+R("goi-dialog-id-primary")+"\">";a+="Link";var b="<a href=\"javascript:void(0);\" class=\""+R("goi-dialog-action")+" "+R("goi-dialog-id-cancel")+"\">";b=YI(b+"Cancel</a>");return YI(a+("</a>"+b+"</div></div>"))},zpa=function(){return YI("<div class=\""+
R("goi-dialog")+" "+R("goi-loading-id-page")+"\"><div class=\"mdl-spinner mdl-js-spinner mdl-spinner--single-color is-active\"></div></div>")},Apa=function(a){a=a.errorType;
var b="<div class=\""+R("goi-dialog")+" "+R("goi-genericerror-id-page")+"\"><div class=\""+R("goi-dialog-body")+"\"><h1 class=\""+R("goi-dialog-header")+"\">";b=$I(a,"NETWORK_ERROR")?b+"Can't reach the internet. Check your connection and try again.":b+"Trouble completing request. Try again later.";b+="</h1></div><div class=\""+R("goi-dialog-footer")+"\"><a href=\"javascript:void(0);\" class=\""+R("goi-dialog-action")+" "+R("goi-dialog-id-cancel")+"\">";return YI(b+"Close</a></div></div>")},Bpa=function(){var a=
"<a href=\"javascript:void(0);\" class=\""+R("goi-dialog-action")+" "+R("goi-dialog-id-back")+"\">";
return YI(a+"Back</a>")},Cpa=function(a){var b=a.serviceName;
a="<div class=\""+R("goi-dialog")+" "+R("goi-appauth-id-page")+"\"><div class=\""+R("goi-dialog-body")+"\"><h1 class=\""+R("goi-dialog-header")+"\">";b="We weren't able to link your accounts. Please sign in to "+(ZI(b)+" to continue.");a=a+b+("</h1></div><div class=\""+R("goi-dialog-footer")+"\"><a href=\"javascript:void(0);\" class=\""+R("goi-dialog-action")+" "+R("goi-dialog-id-primary")+"\">");a=a+"Sign in</a><a href=\"javascript:void(0);\" class=\""+(R("goi-dialog-action")+" "+R("goi-dialog-id-cancel")+"\">");
return YI(a+"Cancel</a></div></div>")},Dpa=function(a){a=a||{};
a=a.errorEnterPhoneNumber;var b="<div class=\""+R("goi-dialog")+" "+R("goi-phoneentry-id-page")+"\"><div class=\""+R("goi-dialog-body")+"\"><h1 class=\""+R("goi-dialog-header")+"\">";b=b+"Add your phone number</h1><label for=\"goi-phoneentry-phone\" class=\""+(R("goi-input-label")+"\">");b=b+"Phone number</label><div class=\""+(R("goi-dialog-form")+"\">+<input class=\""+R("goi-input")+" "+R("goi-phoneentry-country")+" "+R("goi-phoneentry-id-country")+"\" type=\"tel\" value=\"1\"/><input autofocus type=\"tel\" name=\"goi-phoneentry-phone\" placeholder=\"(123)456-7890\" class=\""+
R("goi-input")+" "+R("goi-phoneentry-phone")+" "+R("goi-phoneentry-id-phone")+"\"/>");a&&(b+="<span class=\""+R("goi-inline-error")+"\">",b+="Please enter a number.</span>");b+="</div><div class=\""+R("goi-fineprint")+"\">";b=b+"Google will send a one-time text message to confirm that this is your number. Standard rates apply.</div></div><div class=\""+(R("goi-dialog-footer")+"\"><a href=\"javascript:void(0);\" class=\""+R("goi-dialog-action")+" "+R("goi-dialog-id-primary")+"\">");b=b+"Send</a>"+(Bpa()+"</div></div>");
return YI(b)},Epa=function(a){var b=a.phoneNumber;
a=a.incorrectVerificationCode;var c="<div class=\""+R("goi-dialog")+" "+R("goi-phoneverification-id-page")+"\"><div class=\""+R("goi-dialog-body")+"\"><h1 class=\""+R("goi-dialog-header")+"\">";c=c+"Enter the code</h1><p class=\""+(R("goi-body-text")+"\">");b="Enter the verification code from the text message sent to "+ZI(b);c=c+b+("<div class=\""+R("goi-dialog-form")+"\"><input autofocus type=\"tel\" name=\"goi-phoneverification-code\" placeholder=\"123456\" maxlength=\"6\" class=\""+R("goi-input")+" "+R("goi-phoneverification-id-code")+
"\"/>");a&&(c+="<span class=\""+R("goi-inline-error")+"\">",c+="Incorrect verification code</span>");c+="</div></div><div class=\""+R("goi-dialog-footer")+"\"><a href=\"javascript:void(0);\" class=\""+R("goi-dialog-action")+" "+R("goi-dialog-id-primary")+"\">";c=c+"Next</a>"+(Bpa()+"</div></div>");return YI(c)},Fpa=function(a){var b=a.consentText;
null==a.phoneNumbers||Wa(a.phoneNumbers);var c=a.phoneNumbers;var d=a.selectedPhoneNumber;a=a.addPhoneOptionValue;var e="<div class=\""+R("goi-dialog")+" "+R("goi-confirmaccount-id-page")+"\"><div class=\""+R("goi-dialog-body")+"\"><h1 class=\""+R("goi-dialog-header")+"\">";e+="To finish, confirm your details</h1>";if(c){e+="<label for=\"goi-confirmaccount-phone\" class=\""+R("goi-input-label")+"\">";e=e+"Phone number</label><div class=\""+(R("goi-dialog-form")+"\"><select class=\""+R("goi-select")+" "+R("goi-confirmaccount-id-phone-select")+
"\">");for(var g=c.length,h=0;h<g;h++){var m=c[h];e+=d&&$I(d,m)?"<option class=\""+R("goi-option")+"\" value=\""+R(m)+"\" selected>"+ZI(m)+"</option>":"<option class=\""+R("goi-option")+"\" value=\""+R(m)+"\">"+ZI(m)+"</option>"}e+="<option class=\""+R("goi-option")+"\" value=\""+R(a)+"\">";e+="Add new phone number</option></select></div>"}e+="<div class=\""+R("goi-fineprint")+"\">"+ZI(b)+"</div><div><button class=\""+R("goi-button")+" "+R("goi-blue-button")+" "+R("goi-dialog-id-primary")+"\">";e=e+"Finish</button><button class=\""+(
R("goi-button")+" "+R("goi-transparent-button")+" "+R("goi-padding-top")+" "+R("goi-dialog-id-cancel")+"\">");return YI(e+"Cancel</button></div></div></div>")};var cJ=function(a,b){b=a(b||Gpa,void 0,void 0);a=ah().createElement("DIV");if($a(b)){if(b instanceof WI){if(b.contentKind!==VI)throw Error("Sanitized content was not of kind HTML.");b=cd(b.toString(),b.contentDir)}else b=Yc("zSoyz");}else b=Yc(String(b));dd(a,b);1==a.childNodes.length&&(b=a.firstChild,1==b.nodeType&&(a=b));return a},Gpa={};var dJ=function(a){UI.call(this);this.config_=a};
l(dJ,UI);dJ.prototype.renderElement=function(){return cJ(Apa,this.config_)};var eJ=function(a){UI.call(this);this.config_=a};
l(eJ,UI);eJ.prototype.renderElement=function(){return cJ(Cpa,{serviceName:this.config_.serviceName})};var fJ=function(a){UI.call(this);if(a.phoneNumbers&&0===a.phoneNumbers.length)throw new LI("INTERNAL_ERROR","At least one phone number must be provided.");this.config_=a};
l(fJ,UI);fJ.prototype.getPhoneNumber=function(){if(!this.element)return null;var a=gh("goi-confirmaccount-id-phone-select",this.element);return a&&"ADD_NEW"!==a.value?a.value:null};
fJ.prototype.renderElement=function(){return cJ(Fpa,{phoneNumbers:this.config_.phoneNumbers,consentText:this.config_.consentText,addPhoneOptionValue:"ADD_NEW",selectedPhoneNumber:this.config_.selectedPhoneNumber})};
fJ.prototype.handlePhoneNumberSelected_=function(a){"ADD_NEW"===a.target.value?this.dispatchEvent(new vv("addPhoneNumber")):this.dispatchEvent(new vv("changePhoneNumber"))};
fJ.prototype.installEventListeners=function(a){UI.prototype.installEventListeners.call(this,a);RI(this.eventManager_,"change",a,"goi-confirmaccount-id-phone-select",this.handlePhoneNumberSelected_.bind(this))};var gJ=function(a){UI.call(this);if(a.phoneNumbers&&0===a.phoneNumbers.length)throw new LI("INTERNAL_ERROR","At least one phone number must be provided.");this.config_=a};
l(gJ,UI);f=gJ.prototype;f.getPhoneNumber=function(){if(!this.element)return null;var a=gh("goi-createaccount-id-phone-select",this.element);return a&&"ADD_NEW"!==a.value?a.value:null};
f.renderElement=function(){return cJ(xpa,{serviceName:this.config_.serviceName,phoneNumbers:this.config_.phoneNumbers,addPhoneOptionValue:"ADD_NEW",selectedPhoneNumber:this.config_.selectedPhoneNumber,consentText:this.config_.consentText})};
f.handlePhoneNumberSelected_=function(a){"ADD_NEW"===a.target.value?this.dispatchEvent(new vv("addPhoneNumber")):this.dispatchEvent(new vv("changePhoneNumber"))};
f.handleUseOtherAccount_=function(){this.dispatchEvent(new vv("useOtherEmail"))};
f.installEventListeners=function(a){UI.prototype.installEventListeners.call(this,a);RI(this.eventManager_,"change",a,"goi-createaccount-id-phone-select",this.handlePhoneNumberSelected_.bind(this));SI(this.eventManager_,a,"goi-createaccount-id-use-other-email",this.handleUseOtherAccount_.bind(this))};var hJ=function(a){UI.call(this);this.config_=a};
l(hJ,UI);hJ.prototype.renderElement=function(){return cJ(wpa,this.config_)};
hJ.prototype.handleAccountSelected_=function(a){a=mC(a.currentTarget,"accountId")||"";this.dispatchEvent(new Hpa(a))};
hJ.prototype.installEventListeners=function(a){UI.prototype.installEventListeners.call(this,a);SI(this.eventManager_,a,"goi-linkaccount-button",this.handleAccountSelected_.bind(this))};
var Hpa=function(a){vv.call(this,"accountSelected");this.accountId=a};
l(Hpa,vv);var iJ=function(){UI.call(this)};
l(iJ,UI);iJ.prototype.renderElement=function(){return cJ(zpa)};var jJ=function(){UI.call(this)};
l(jJ,UI);jJ.prototype.handleInputKeyPress_=function(a){if(13===a.keyCode){var b=eh("goi-input");b.length&&(a=Array.prototype.indexOf.call(b,a.target),(b=b[a+1])?b.focus():this.dispatchEvent(new vv("dialogPrimary")))}};
jJ.prototype.installEventListeners=function(a){UI.prototype.installEventListeners.call(this,a);RI(this.eventManager_,"keypress",a,"goi-input",this.handleInputKeyPress_.bind(this))};var kJ=function(a){UI.call(this);this.config_=a};
l(kJ,jJ);kJ.prototype.getPhoneNumber=function(){if(!this.element)return null;var a=gh("goi-phoneentry-id-country",this.element),b=gh("goi-phoneentry-id-phone",this.element);return a&&b?"+"+a.value+b.value:null};
kJ.prototype.getPhoneNumberWithoutCountryCode=function(){if(!this.element)return null;var a=gh("goi-phoneentry-id-phone",this.element);return a?a.value:null};
kJ.prototype.renderElement=function(){return cJ(Dpa,{errorEnterPhoneNumber:this.config_.errorEnterPhoneNumber})};var lJ=function(a){UI.call(this);this.config_=a};
l(lJ,jJ);var Ipa=function(a){return a.element?(a=gh("goi-phoneverification-id-code",a.element))?a.value:null:null};
lJ.prototype.renderElement=function(){return cJ(Epa,{phoneNumber:this.config_.phoneNumber,incorrectVerificationCode:this.config_.incorrectVerificationCode})};var mJ=function(a){UI.call(this);this.config_=a};
l(mJ,UI);mJ.prototype.renderElement=function(){return cJ(ypa,{consentText:this.config_.consentText})};var Jpa={PostMessagePopup:MI},nJ=function(a,b,c,d,e,g){QI.call(this,c,d,e,g);this.showPopupInterstitial_=b;this.initialData_=a;this.popup_=new Jpa.PostMessagePopup(this.postMessageValidator_.bind(this));this.resolver_=this.dialogContent_=this.dialog_=null};
l(nJ,QI);nJ.prototype.postMessageValidator_=function(a,b){var c="https://oauth-redirect.googleusercontent.com"===b||"https://oauth-redirect-sandbox.googleusercontent.com"===b||"https://oauth-redirect-test.googleusercontent.com"===b;this.options.redirectServiceDomain&&(c=c||b===this.options.redirectServiceDomain);return c?!!a&&"gdi"===a.sentinel:!1};
nJ.prototype.fetchToken=function(){this.resolver_&&this.cancel();this.resolver_=fw();Kpa(this,this.initialData_);return this.resolver_.promise};
nJ.prototype.cancel=function(){this.closeDialog_();this.resolver_.reject(new LI("USER_CANCELLED"));this.resolver_=null};
var pJ=function(a,b,c){oJ(a,new iJ);a.sendRequest(b,c||{}).then(function(d){a.closeDialog_();return Kpa(a,d)},function(d){a.closeDialog_();
a.handleError_(d)})},Kpa=function(a,b){var c=b.gdiState;
if("COMPLETE"===c)a.resolver_.resolve(bw().then(function(){return jpa(a,b)}));else
if(a.options.appAuthOnly)Lpa(a,b);else switch(c){case"ACCOUNT_SELECTION":Mpa(a.service).then(function(d){Npa(a,b,d)});
break;case"ACCOUNT_CREATION":qJ(a,b,"");break;case"PROVIDER_CONSENT":Opa(a,b);break;case"APP_AUTH":Ppa(a,b);break;default:a.resolver_.reject(new LI("INTERNAL_ERROR"));}},Lpa=function(a,b){switch(b.gdiState){case"ACCOUNT_SELECTION":case"ACCOUNT_CREATION":case"PROVIDER_CONSENT":case"APP_AUTH":Ppa(a,b);
break;default:a.resolver_.reject(new LI("INTERNAL_ERROR"));}},Npa=function(a,b,c){b=new hJ({account:c,
serviceName:b.serviceInfo.name});b.listen("accountSelected",function(){a.closeDialog_();pJ(a,"ACCOUNT_SELECTION")});
b.listen("dialogCancel",function(){a.cancel()});
oJ(a,b)},Qpa=function(a){return u.getValueByKeys(a,"completionInfo","oauthAuthorizationUrl")||u.getValueByKeys(a,"completionInfo","appauthInfo","appauthRedirectUrl")||null},Rpa=function(a){return(a=u.getValueByKeys(a,"completionInfo","userInfo","phoneNumber"))&&0<Object.keys(a).length?u.getValues(a):[]},Spa=function(a){return(a=u.getValueByKeys(a,"completionInfo","selectionInfo","createAccountRequiredClaims"))&&0<Object.keys(a).length?u.containsValue(u.getValues(a),"PHONE_NUMBER_VERIFIED"):!1},qJ=
function(a,b,c){var d=u.getValueByKeys(b,"serviceInfo","name")||"",e=u.getValueByKeys(b,"completionInfo","consent","code")||"",g=rJ(b),h=Rpa(b);
d={serviceName:d,consentText:g};0!==h.length&&(d.phoneNumbers=h,c&&0!==c.length&&(d.selectedPhoneNumber=c));if(Spa(b)&&0===h.length)sJ(a,b,!1);else{var m=new gJ(d),n=Qpa(b);n?(m.listen("dialogPrimary",function(){var p=m.getPhoneNumber();a.closeDialog_();pJ(a,"ACCOUNT_CREATION",{credential:{accountCreationInfo:{phoneNumber:p,phoneNumberVerified:"true"},consentCode:e}})}),m.listen("useOtherEmail",function(){tJ(a,n)}),m.listen("addPhoneNumber",function(){a.closeDialog_();
sJ(a,b,!1)}),m.listen("changePhoneNumber",function(){var p=m.getPhoneNumber()||"";
a.closeDialog_();qJ(a,b,p)}),m.listen("dialogCancel",function(){a.cancel()}),oJ(a,m)):a.resolver_.reject(new LI("INTERNAL_ERROR","OAuth URL not provided."))}},Opa=function(a,b){var c=u.getValueByKeys(b,"completionInfo","consent","code")||"";
b=rJ(b);b=new mJ({consentText:b});b.listen("dialogPrimary",function(){a.closeDialog_();pJ(a,"PROVIDER_CONSENT",{credential:{consentCode:c}})});
b.listen("dialogCancel",function(){a.cancel()});
oJ(a,b)};
nJ.prototype.handleError_=function(a){var b=this;a=new dJ({errorType:a.code});a.listen("dialogCancel",function(){b.cancel()});
oJ(this,a)};
var Ppa=function(a,b){var c=u.getValueByKeys(b,"serviceInfo","name")||"",d=Qpa(b);d?"REDIRECT"!==a.request.appAuthMode&&a.showPopupInterstitial_?(b=new eJ({serviceName:c}),b.listen("dialogPrimary",function(){tJ(a,d)}),b.listen("dialogCancel",function(){a.cancel()}),oJ(a,b)):tJ(a,d):a.resolver_.reject(new LI("INTERNAL_ERROR","OAuth URL not provided."))},oJ=function(a,b){a.dialogContent_=b;
b.render();a.dialog_=new hpa};
nJ.prototype.closeDialog_=function(){this.dialog_&&(this.dialog_.close(),this.dialog_=null);this.dialogContent_&&(this.dialogContent_.dispose(),this.dialogContent_=null)};
var rJ=function(a){var b=a.serviceInfo||{};a=u.getValueByKeys(a,"completionInfo","consent")||{};b=b={tos_url:b.tosUrl,privacy_policy_url:b.privacyPolicyUrl,learn_more_url:a.learnMoreUrl};a=(a.text||"").split(cpa);for(var c=[],d=0;d<a.length;d++){var e=a[d].match(dpa);if(e){var g=e[1];e=e[2];(e=bpa.has(e)&&b[e])?(g=ad("A",{href:e,target:"_blank","class":"goi-link"},g),c.push(g)):c.push(Yc(g))}else c.push(Yc(a[d]))}return $c(c)},tJ=function(a,b){"REDIRECT"===a.request.appAuthMode?window.location.assign(b):
Tpa(a,b)},Tpa=function(a,b){a.popup_.open(b,"width=500,height=700,\n top="+Math.max((window.screen.availHeight-700)/2,0)+",left="+Math.max((window.screen.availWidth-500)/2,0)).then(function(c){a.closeDialog_();
"access_denied"===c.error?a.resolver_.reject(new LI("USER_CANCELLED")):c.error?a.resolver_.reject(new LI("INTERNAL_ERROR")):pJ(a,"APP_AUTH",{credential:{redirectState:c.redirect_state}})},function(c){a.closeDialog_();
c&&"POPUP_BLOCKED"===c.error.code?a.resolver_.reject(new LI("POPUP_BLOCKED")):a.resolver_.reject(new LI("USER_CANCELLED"))})},sJ=function(a,b,c){var d=new kJ({errorEnterPhoneNumber:c});
d.listen("dialogPrimary",function(){var e=d.getPhoneNumber()||"",g=b.gdiStateData;a.closeDialog_();oJ(a,new iJ);uJ(a.service,"/v1/verify/phone:start","POST",{gdiStateData:g,phoneNumber:e}).then(function(h){a.closeDialog_();Upa(a,b,{phoneNumber:e,gdiStateData:h.gdiStateData})},function(h){a.closeDialog_();
"INVALID_REQUEST"===h.code?sJ(a,b,!0):a.handleError_(h)})});
d.listen("dialogBack",function(){a.closeDialog_();qJ(a,b,"")});
oJ(a,d)},Upa=function(a,b,c){var d=new lJ({phoneNumber:c.phoneNumber,
incorrectVerificationCode:c.incorrectVerificationCode});d.listen("dialogPrimary",function(){var e=Ipa(d)||"";a.closeDialog_();var g=c.gdiStateData;oJ(a,new iJ);uJ(a.service,"/v1/verify/phone:finish","POST",{gdiStateData:g,code:e}).then(function(h){a.closeDialog_();h=h.gdiStateData;var m=Rpa(b),n=c.phoneNumber||"";0===m.length?m=[n]:Fb(m,0,0,n);c.phoneNumbers=m;c.gdiStateData=h;Vpa(a,b,c)},function(h){a.closeDialog_();
"INVALID_REQUEST"===h.code?(c.incorrectVerificationCode=!0,Upa(a,b,c)):(c.incorrectVerificationCode=!1,a.handleError_(h))})});
d.listen("dialogBack",function(){a.closeDialog_();sJ(a,b,!1)});
oJ(a,d)},Vpa=function(a,b,c){var d=u.getValueByKeys(b,"serviceInfo","name")||"",e=rJ(b),g=new fJ({serviceName:d,
consentText:e,phoneNumbers:c.phoneNumbers,selectedPhoneNumber:c.selectedPhoneNumber});g.listen("dialogPrimary",function(){var h=g.getPhoneNumber(),m=u.getValueByKeys(b,"completionInfo","consent","code")||"";a.closeDialog_();pJ(a,"ACCOUNT_CREATION",{credential:{accountCreationInfo:{phoneNumber:h,phoneNumberVerified:"true"},consentCode:m},gdiStateData:c.gdiStateData})});
g.listen("addPhoneNumber",function(){a.closeDialog_();sJ(a,b,!1)});
g.listen("changePhoneNumber",function(){var h=g.getPhoneNumber();a.closeDialog_();c.selectedPhoneNumber=h;Vpa(a,b,c)});
g.listen("dialogCancel",function(){a.cancel()});
oJ(a,g)};var vJ=function(a,b,c,d){QI.call(this,a,b,c,d)};
l(vJ,QI);
vJ.prototype.fetchToken=function(){var a=this,b="TOKEN_REQUESTED";if(!this.request.forceRefresh){var c=this.tokenCache.getToken(this.request.serviceId,this.request.scopes);if(c)return bw({status:"COMPLETE",token:c})}c={};this.request.extraRedirectState&&!gc(this.request.extraRedirectState)&&(c.extraRedirectState=this.request.extraRedirectState);this.request.completionUrl&&!gc(this.request.completionUrl)&&(c.completionUrl=this.request.completionUrl);var d=apa();d&&"REDIRECT"===this.request.appAuthMode?(b=
"APP_AUTH",c={credential:{redirectState:d}}):c.forceRefresh=!!this.request.forceRefresh;return this.sendRequest(b,c).then(function(e){var g=e.gdiState;if("COMPLETE"===g)return jpa(a,e);if(g)return Wpa(a,e);throw new LI("INTERNAL_ERROR")})};
var Wpa=function(a,b){return{status:"NEEDS_UI",getTokenWithUi:function(c){return new nJ(b,!!c,a.request,a.service,a.tokenCache,a.options).fetch()}}};var wJ=function(a,b,c,d,e,g,h,m,n){lk.call(this);this.gapi_=null;this.clientLoaded_=!1;this.clientLoadedResolver_=fw();this.requests_=[];this.apiKey_=a?md(a):null;this.gaiaSessionId_=null;!d&&b&&(this.gaiaSessionId_=b);this.apiRoot_=c||null;this.authenticated_=!d;this.enableCors_=null!=e?e:null;this.oauthAccessToken_=g||null;this.useV2Headers_=!!h;this.gapiConfig_=m||null;this.enableXd4_=null!=n?n:null};
l(wJ,lk);wJ.prototype.init=function(){var a=r(function(c){this.gapi_=c;var d=Sa("client.request",c),e=Sa("auth",c);d&&e?this.handleClientLoaded_():c.load("client",r(this.handleClientLoaded_,this))},this),b=Xpa("gapi");
b?a(b.gapi):Ypa(this,a);return this.clientLoadedResolver_.promise};
var Xpa=function(a){for(var b=window,c=Sa(a,b);!c&&b!=window.top&&Zpa(b.parent,a);)b=b.parent,c=Sa(a,b);return c?b:null},Zpa=function(a,b){try{return!!a&&null!=a.location.href&&Le(a,b)}catch(c){return!1}},Ypa=function(a,b){var c=Xpa("gapi_onload");
if(c){var d=c.gapi_onload;c.gapi_onload=function(){d();b(c.gapi)}}else{window.gapi_onload=function(){b(window.gapi)};
var e=vh("SCRIPT");jd(e,$pa);a.gapiConfig_&&Rh(e,Gk(a.gapiConfig_));document.getElementsByTagName("head")[0].appendChild(e)}};
wJ.prototype.getApiRoot=function(){return this.apiRoot_};
wJ.prototype.handleClientLoaded_=function(){for(var a=0;a<this.requests_.length;a++)this.requests_[a].resolver.resolve(aqa(this,this.requests_[a].requestData));this.clientLoaded_=!0;this.clientLoadedResolver_.resolve(this.gapi_)};
wJ.prototype.sendRequest=function(a){if(this.clientLoaded_)return aqa(this,a);var b=fw();this.requests_.push({requestData:a,resolver:b});return b.promise};
var aqa=function(a,b){var c=Sa("config.get",a.gapi_);if(!a.authenticated_){var d=c("googleapis.config/auth/useFirstPartyAuth");var e=c("googleapis.config/auth/useOriginToken")}var g;null!=a.enableCors_&&(g=c("client/cors"));var h;null!=a.enableXd4_&&(h=c("client/xd4"));try{var m=Sa("config.update",a.gapi_);a.authenticated_||(m("googleapis.config/auth/useFirstPartyAuth",!1),m("googleapis.config/auth/useOriginToken",!1));null!=a.enableCors_&&m("client/cors",a.enableCors_);null!=a.enableXd4_&&m("client/xd4",
a.enableXd4_);var n=bqa(a);b.headers&&u.extend(n,b.headers);var p={headers:n,root:a.apiRoot_,path:b.path,method:b.method,body:b.body},x=b.params||{};a.apiKey_&&!a.oauthAccessToken_?u.extend(x,{key:a.apiKey_}):a.oauthAccessToken_&&u.extend(x,{key:null});u.isEmpty(x)||(p.params=x);var y=Sa("client.request",a.gapi_),B=bw(y(p));b.callback&&B.then(function(G){b.callback.apply(null,[G.result,G])},function(G){b.callback.apply(null,[G.result,
G])});
return B}finally{c=Sa("config.update",a.gapi_),a.authenticated_||(c("googleapis.config/auth/useFirstPartyAuth",d),c("googleapis.config/auth/useOriginToken",e)),null!=a.enableCors_&&c("client/cors",g),null!=a.enableXd4_&&c("client/xd4",h)}},bqa=function(a){if(a.authenticated_){if(a.oauthAccessToken_)return{Authorization:"Bearer "+a.oauthAccessToken_};
var b=Sa("auth.getAuthHeaderValueForFirstParty",a.gapi_);return{Authorization:a.useV2Headers_?b([]):b(),"X-Goog-AuthUser":a.gaiaSessionId_}}return{}};
wJ.prototype.refreshToken=function(a){this.oauthAccessToken_=a};
var $pa=dc(Sb("https://apis.google.com/js/client.js"));var cqa={ApiaryClient:wJ},xJ=function(a,b){this.oisClient_=a;this.userinfoClient_=b},dqa=function(a){var b=function(e){return new cqa.ApiaryClient(a.apiKey,a.authUser,e&&(ec(e,"http://")||ec(e,"https://")?e:"https://"+e),!1,!0,a.googleAccessToken,!!a.apiKey)},c=b(a.oisDomain||"oauthintegrations.googleapis.com"),d=b(a.userinfoDomain);
return c.init().then(function(){return d.init()}).then(function(){return new xJ(c,d)})},uJ=function(a,b,c,d){var e={path:b,
method:c};d&&("POST"===c?e.body=JSON.stringify(d):e.params=d);return jw(bw().then(function(){return a.oisClient_.sendRequest(e)}).then(function(g){return g.result}),function(g){throw eqa(g.result);
})},eqa=function(a){if(!a||!a.error)return new LI("UNKNOWN");
a=a.error;return new LI(fqa[a.code]||"UNKNOWN","("+a.code+"): "+(a.message||""))};
xJ.prototype.getTokenForService=function(a){return uJ(this,"/v1/token:getForService","POST",a)};
xJ.prototype.listAssociatedAccounts=function(a,b){a={serviceId:a};b&&(a["header.bucket"]=b);return uJ(this,"/v1/associatedAccounts","GET",a)};
xJ.prototype.deleteAssociatedAccount=function(a,b){var c=null;b&&(c={"header.bucket":b});return uJ(this,"/v1/associatedAccounts/"+a,"DELETE",c)};
var Mpa=function(a){var b={path:"/oauth2/v3/userinfo",method:"GET"};return jw(bw().then(function(){return a.userinfoClient_.sendRequest(b)}).then(function(c){if(!c.result)throw new LI("NETWORK_ERROR");
return{accountId:c.result.sub,username:c.result.email,displayName:c.result.name,photoUrl:c.result.picture}}),function(c){throw eqa(c.result);
})},fqa={"-1":"NETWORK_ERROR",
409:"ABORTED",499:"CANCELLED",504:"DEADLINE_EXCEEDED",400:"INVALID_REQUEST",404:"NOT_FOUND",403:"PERMISSION_DENIED",429:"RESOURCE_EXHAUSTED",401:"UNAUTHENTICATED",503:"UNAVAILABLE",501:"UNIMPLEMENTED",500:"UNKNOWN"};var gqa={CachedTokenFetcher:vJ},yJ=function(a){this.options_=a||{};this.tokenCache_=this.options_.tokenCache||new PI;this.options_.appAuthOnly=!!this.options_.appAuthOnly||!this.options_.uiAdapter;this.options_.uiAdapter=this.options_.uiAdapter||new ipa;this.serviceInit_=dqa({apiKey:this.options_.apiKey,authUser:this.options_.authUser||(this.options_.apiKey?"0":void 0),googleAccessToken:this.options_.googleAccessToken,oisDomain:this.options_.oisDomain,userinfoDomain:this.options_.userinfoDomain});
this.flow_=null};
yJ.prototype.getTokenForService=function(a){var b=this;return this.serviceInit_.then(function(c){return new gqa.CachedTokenFetcher(a,c,b.tokenCache_,b.options_).fetch()})};
yJ.prototype.listAssociatedAccounts=function(a){var b=this;return this.serviceInit_.then(function(c){return c.listAssociatedAccounts(a.serviceId,b.options_.bucket)}).then(function(c){return pb(c.associatedAccounts||[],function(d){return{accountId:d.associatedAccountInfo.accountId}})})};
yJ.prototype.deleteAssociatedAccount=function(a){var b=this;return this.serviceInit_.then(function(c){return c.deleteAssociatedAccount(a.accountId,b.options_.bucket)}).then(function(){})};var zJ=GI(JI,"perf",HI());GI(zJ,"g",HI());var hqa=GI(zJ,"i",HI());GI(zJ,"r",[]);HI();HI();var AJ=function(a,b,c){b&&0<b.length&&(b=iqa(b),c&&0<c.length&&(b+="___"+iqa(c)),28<b.length&&(b=b.substr(0,28)+(b.length-28)),c=b,b=GI(hqa,"_p",HI()),GI(b,c,HI())[a]=new Date().getTime(),b=zJ.r,"function"===typeof b?b(a,"_p",c):b.push([a,"_p",c]))},iqa=function(a){return a.join("__").replace(/\./g,"_").replace(/\-/g,"_").replace(/,/g,"_")};var jqa=HI(),BJ=[],CJ=function(a){throw Error("Bad hint"+(a?": "+a:""))};
BJ.push(["jsl",function(a){for(var b in a)if(Object.prototype.hasOwnProperty.call(a,b)){var c=a[b];"object"==typeof c?JI[b]=GI(JI,b,[]).concat(c):GI(JI,b,c)}if(b=a.u)a=GI(JI,"us",[]),a.push(b),(b=/^https:(.*)$/.exec(b))&&a.push("http:"+b[1])}]);
var kqa=/^(\/[a-zA-Z0-9_\-]+)+$/,lqa=[/\/amp\//,/\/amp$/,/^\/amp$/],mqa=/^[a-zA-Z0-9\-_\.,!]+$/,nqa=/^gapi\.loaded_[0-9]+$/,oqa=/^[a-zA-Z0-9,._-]+$/,sqa=function(a,b,c,d){var e=a.split(";"),g=e.shift(),h=jqa[g],m=null;h?m=h(e,b,c,d):CJ("no hint processor for: "+g);m||CJ("failed to generate load url");b=m;c=b.match(pqa);(d=b.match(qqa))&&1===d.length&&rqa.test(b)&&c&&1===c.length||CJ("failed sanity: "+a);return m},vqa=function(a,b,c,d){a=tqa(a);
nqa.test(c)||CJ("invalid_callback");b=uqa(b);d=d&&d.length?uqa(d):null;var e=function(g){return encodeURIComponent(g).replace(/%2C/g,",")};
return[encodeURIComponent(a.pathPrefix).replace(/%2C/g,",").replace(/%2F/g,"/"),"/k=",e(a.version),"/m=",e(b),d?"/exm="+e(d):"","/rt=j/sv=1/d=1/ed=1",a.activeMods?"/am="+e(a.activeMods):"",a.resourceSig?"/rs="+e(a.resourceSig):"",a.zcms?"/t="+e(a.zcms):"","/cb=",e(c)].join("")},tqa=function(a){"/"!==a.charAt(0)&&CJ("relative path");
for(var b=a.substring(1).split("/"),c=[];b.length;){a=b.shift();if(!a.length||0==a.indexOf("."))CJ("empty/relative directory");else if(0<a.indexOf("=")){b.unshift(a);break}c.push(a)}a={};for(var d=0,e=b.length;d<e;++d){var g=b[d].split("="),h=decodeURIComponent(g[0]),m=decodeURIComponent(g[1]);2==g.length&&h&&m&&(a[h]=a[h]||m)}b="/"+c.join("/");kqa.test(b)||CJ("invalid_prefix");c=0;for(d=lqa.length;c<d;++c)lqa[c].test(b)&&CJ("invalid_prefix");c=DJ(a,"k",!0);d=DJ(a,"am");e=DJ(a,"rs");a=DJ(a,"t");return{pathPrefix:b,
version:c,activeMods:d,resourceSig:e,zcms:a}},uqa=function(a){for(var b=[],c=0,d=a.length;c<d;++c){var e=a[c].replace(/\./g,"_").replace(/-/g,"_");
oqa.test(e)&&b.push(e)}return b.join(",")},DJ=function(a,b,c){a=a[b];
!a&&c&&CJ("missing: "+b);if(a){if(mqa.test(a))return a;CJ("invalid: "+b)}return null},rqa=/^https?:\/\/[a-z0-9_.-]+\.google(rs)?\.com(:\d+)?\/[a-zA-Z0-9_.,!=\-\/]+$/,qqa=/\/cb=/g,pqa=/\/\//g,wqa=function(){var a=Woa();
if(!a)throw Error("Bad hint");return a};
jqa.m=function(a,b,c,d){(a=a[0])||CJ("missing_hint");return"https://apis.google.com"+vqa(a,b,c,d)};
var EJ=decodeURI("%73cript"),xqa=/^[-+_0-9\/A-Za-z]+={0,2}$/,yqa=function(a,b){for(var c=[],d=0;d<a.length;++d){var e=a[d],g;if(g=e){a:{for(g=0;g<b.length;g++)if(b[g]===e)break a;g=-1}g=0>g}g&&c.push(e)}return c},zqa=function(){var a=JI.nonce;
return void 0!==a?a&&a===String(a)&&a.match(xqa)?a:JI.nonce=null:FI.querySelector?(a=FI.querySelector("script[nonce]"))?(a=a.nonce||a.getAttribute("nonce")||"",a&&a===String(a)&&a.match(xqa)?JI.nonce=a:JI.nonce=null):null:null},Bqa=function(a){if("loading"!=FI.readyState)Aqa(a);else
{var b=zqa(),c="";null!==b&&(c=" nonce=\""+b+"\"");a="<"+EJ+" src=\""+encodeURI(a)+"\""+c+"></"+EJ+">";FI.write(a)}},Aqa=function(a){var b=FI.createElement(EJ);
b.setAttribute("src",a);a=zqa();null!==a&&b.setAttribute("nonce",a);b.async="true";(a=FI.getElementsByTagName(EJ)[0])?a.parentNode.insertBefore(b,a):(FI.head||FI.body||FI.documentElement).appendChild(b)},Cqa=function(a,b){var c=b&&b._c;
if(c)for(var d=0;d<BJ.length;d++){var e=BJ[d][0],g=BJ[d][1];g&&Object.prototype.hasOwnProperty.call(c,e)&&g(c[e],a,b)}},Eqa=function(a,b,c){Dqa(function(){var d=b===Woa()?GI(II,"_",HI()):HI();
d=GI(KI(b),"_",d);a(d)},c)},FJ=function(a,b){var c=b||{};
"function"==typeof b&&(c={},c.callback=b);Cqa(a,c);b=a?a.split(":"):[];var d=c.h||wqa(),e=GI(JI,"ah",HI());if(e["::"]&&b.length){a=[];for(var g=null;g=b.shift();){var h=g.split(".");h=e[g]||e[h[1]&&"ns:"+h[0]||""]||d;var m=a.length&&a[a.length-1]||null,n=m;m&&m.hint==h||(n={hint:h,features:[]},a.push(n));n.features.push(g)}var p=a.length;if(1<p){var x=c.callback;x&&(c.callback=function(){0==--p&&x()})}for(;b=a.shift();)Fqa(b.features,c,b.hint)}else Fqa(b||[],c,d)},Fqa=function(a,b,c){a=Voa(a)||[];
var d=b.callback,e=b.config,g=b.timeout,h=b.ontimeout,m=b.onerror,n=void 0;"function"==typeof m&&(n=m);var p=null,x=!1;if(g&&!h||!g&&h)throw"Timeout requires both the timeout parameter and ontimeout parameter to be set";m=GI(KI(c),"r",[]).sort();var y=GI(KI(c),"L",[]).sort(),B=[].concat(m),G=function(Ya,Mb){if(x)return 0;EI.clearTimeout(p);y.push.apply(y,P);var Vb=((II||{}).config||{}).update;Vb?Vb(e):e&&GI(JI,"cu",[]).push(e);if(Mb){AJ("me0",Ya,B);try{Eqa(Mb,c,n)}finally{AJ("me1",Ya,B)}}return 1};
0<g&&(p=EI.setTimeout(function(){x=!0;h()},g));
var P=yqa(a,y);if(P.length){P=yqa(a,m);var S=GI(JI,"CP",[]),ca=S.length;S[ca]=function(Ya){if(!Ya)return 0;AJ("ml1",P,B);var Mb=function(Y){S[ca]=null;G(P,Ya)&&Xoa(function(){d&&d();Y()})},Vb=function(){var Y=S[ca+1];
Y&&Y()};
0<ca&&S[ca-1]?S[ca]=function(){Mb(Vb)}:Mb(Vb)};
if(P.length){var Ja="loaded_"+JI.I++;II[Ja]=function(Ya){S[ca](Ya);II[Ja]=null};
a=sqa(c,P,"gapi."+Ja,m);m.push.apply(m,P);AJ("ml0",P,B);b.sync||EI.___gapisync?Bqa(a):Aqa(a)}else S[ca](ina)}else G(P)&&d&&d()},Dqa=function(a,b){if(JI.hee&&0<JI.hel)try{return a()}catch(c){b&&b(c),JI.hel--,FJ("debug_error",function(){try{window.___jsl.hefn(c)}catch(d){throw c;
}})}else try{return a()}catch(c){throw b&&b(c),c;
}};
II.load=function(a,b){return Dqa(function(){return FJ(a,b)})};var GJ=function(a){this.id_=a;this.opts={}};
f=GJ.prototype;f.setLabel=function(a){this.label_=a||void 0;return this};
f.setQuery=function(a){this.opts.query=a;return this};
f.setMimeTypes=function(a){this.opts.mimeTypes=a;return this};
f.setBreadcrumbsBarHidden=function(a){this.opts.hideBc=a?"true":null};
f.addUploadMetadata=function(a,b){var c=this.opts.data||{};c[a]=b;this.opts.data=c;return this};
f.setParent=function(a){this.opts.parent=a};
f.setContainerRenameableType=function(a){this.opts.cRename=a};
f.toArray=function(){var a=u.filter(this.opts,function(c){return null!==c});
a=u.isEmpty(a)?null:a;a=[this.id_,this.label_,a];var b=vb(a,Lb);return a=a.slice(0,b+1)};
f.toString=function(){var a=this.toArray();return"("+pb(a,function(b){return Gk(b)}).join(",")+")"};
f.getId=function(){return this.id_};
f.getOptions=function(){return u.clone(this.opts)};
f.getQuery=function(){return this.opts.query};var HJ=function(){GJ.call(this,"image-search")};
t(HJ,GJ);f=HJ.prototype;f.setSite=function(a){this.opts.site=a;return this};
f.setType=function(a){this.opts.type=a;return this};
f.setLicense=function(a){"*"==a?delete this.opts.license:this.opts.license=a;return this};
f.setSize=function(a){this.opts.imgsz=a;return this};
f.setColor=function(a){this.opts.imgcolor=a;return this};
f.setColorization=function(a){this.opts.imgc=a;return this};
f.setImageType=function(a){this.opts.imgtype=a;return this};
f.setLearnMoreUrl=function(a){this.opts.learnmoreurl=a;return this};
f.setSafeSearch=function(a){this.opts.safe=a;return this};
f.setComboTypes=function(a){this.opts.comboTypes=a.join(",");return this};
f.setContainingCosmoId=function(a){this.opts.containingCosmoId=a;return this};
f.setLabel=function(a){HJ.superClass_.setLabel.call(this,a);return this};
f.setQuery=function(a){HJ.superClass_.setQuery.call(this,a);return this};
f.setMimeTypes=function(a){HJ.superClass_.setMimeTypes.call(this,a);return this};
f.setBreadcrumbsBarHidden=function(a){HJ.superClass_.setBreadcrumbsBarHidden.call(this,a)};
f.addUploadMetadata=function(a,b){HJ.superClass_.addUploadMetadata.call(this,a,b);return this};
f.setParent=function(a){HJ.superClass_.setParent.call(this,a)};
f.setContainerRenameableType=function(a){HJ.superClass_.setContainerRenameableType.call(this,a)};var IJ=function(){GJ.call(this,"maps")};
t(IJ,GJ);f=IJ.prototype;f.setMode=function(a){this.opts.mode=a;return this};
f.setCenter=function(a,b){this.opts.center=[a,b];return this};
f.setZoom=function(a){this.opts.zoom=a;return this};
f.addPlacemark=function(a,b){this.opts.placemark=[a,b];return this};
f.setLabel=function(a){IJ.superClass_.setLabel.call(this,a);return this};
f.setQuery=function(a){IJ.superClass_.setQuery.call(this,a);return this};
f.setMimeTypes=function(a){IJ.superClass_.setMimeTypes.call(this,a);return this};
f.setBreadcrumbsBarHidden=function(a){IJ.superClass_.setBreadcrumbsBarHidden.call(this,a)};
f.addUploadMetadata=function(a,b){IJ.superClass_.addUploadMetadata.call(this,a,b);return this};
f.setParent=function(a){IJ.superClass_.setParent.call(this,a)};
f.setContainerRenameableType=function(a){IJ.superClass_.setContainerRenameableType.call(this,a)};var JJ=function(){GJ.call(this,"photos")};
t(JJ,GJ);f=JJ.prototype;f.setAllowedItemTypes=function(a){this.opts.allowedItemTypes=a.join(",");return this};
f.setShowDescription=function(a){this.opts.sdsc=a;return this};
f.setExcludeEventAlbums=function(a){this.opts.excludeEvAlbums=a;return this};
f.setExcludeLabels=function(a){this.opts.excludeLabels=a.join(",");return this};
f.setLegacyLocalPageAlbumId=function(a){this.opts.localalbum=a;return this};
f.setLegacyLocalPageUserEmail=function(a){this.opts.localuser=a;return this};
f.setMode=function(a){this.opts.mode=a;return this};
f.setSelectAlbumEnabled=function(a){this.opts.selectAlbum=a;return this};
f.setSelectAlbumLabel=function(a){this.opts.selectAlbumLabel=a;return this};
f.setShowVideoMetadata=function(a){this.opts.svm=a;return this};
f.setType=function(a){this.opts.type=a;return this};
f.setUploadEnabled=function(a){this.opts.upload=a?"true":null;return this};
f.setUploadPosition=function(a){this.opts.uploadpos=a;return this};
f.setUsername=function(a){this.opts.username=a;return this};
f.setIsParentLegacy=function(a){this.opts.ipl=a;return this};
f.setVisibilityFilter=function(a){this.opts.visibilityFilter=a;return this};
f.setLabel=function(a){JJ.superClass_.setLabel.call(this,a);return this};
f.setQuery=function(a){JJ.superClass_.setQuery.call(this,a);return this};
f.setMimeTypes=function(a){JJ.superClass_.setMimeTypes.call(this,a);return this};
f.setBreadcrumbsBarHidden=function(a){JJ.superClass_.setBreadcrumbsBarHidden.call(this,a)};
f.addUploadMetadata=function(a,b){JJ.superClass_.addUploadMetadata.call(this,a,b);return this};
f.setParent=function(a){JJ.superClass_.setParent.call(this,a)};
f.setContainerRenameableType=function(a){JJ.superClass_.setContainerRenameableType.call(this,a)};
f.removeDuplicates=function(){this.opts.rdv=!0;return this};var KJ=function(){GJ.call(this,"url")};
t(KJ,GJ);f=KJ.prototype;f.setSite=function(a){this.opts.site=a;return this};
f.setType=function(a){this.opts.type=a;return this};
f.disableDriveUrlPicking=function(a){this.opts.ddup=a;return this};
f.setLabel=function(a){KJ.superClass_.setLabel.call(this,a);return this};
f.setQuery=function(a){KJ.superClass_.setQuery.call(this,a);return this};
f.setMimeTypes=function(a){KJ.superClass_.setMimeTypes.call(this,a);return this};
f.setBreadcrumbsBarHidden=function(a){KJ.superClass_.setBreadcrumbsBarHidden.call(this,a)};
f.addUploadMetadata=function(a,b){KJ.superClass_.addUploadMetadata.call(this,a,b);return this};
f.setParent=function(a){KJ.superClass_.setParent.call(this,a)};
f.setContainerRenameableType=function(a){KJ.superClass_.setContainerRenameableType.call(this,a)};var LJ=function(){GJ.call(this,"video-search")};
t(LJ,GJ);f=LJ.prototype;f.setSite=function(a){this.opts.site=a;return this};
f.setSafeSearch=function(a){this.opts.safe=a;return this};
f.setLabel=function(a){LJ.superClass_.setLabel.call(this,a);return this};
f.setQuery=function(a){LJ.superClass_.setQuery.call(this,a);return this};
f.setMimeTypes=function(a){LJ.superClass_.setMimeTypes.call(this,a);return this};
f.setBreadcrumbsBarHidden=function(a){LJ.superClass_.setBreadcrumbsBarHidden.call(this,a)};
f.addUploadMetadata=function(a,b){LJ.superClass_.addUploadMetadata.call(this,a,b);return this};
f.setParent=function(a){LJ.superClass_.setParent.call(this,a)};
f.setContainerRenameableType=function(a){LJ.superClass_.setContainerRenameableType.call(this,a)};var MJ=function(){GJ.call(this,"web")};
t(MJ,GJ);f=MJ.prototype;f.setSite=function(a){this.opts.site=a;return this};
f.setCustomSearchEngine=function(a){this.opts.cse=a;return this};
f.setSearchLabel=function(a){this.opts.cseLabel=a;return this};
f.setInUrl=function(a){this.opts.inUrl=a;return this};
f.setSafeSearch=function(a){this.opts.safe=a;return this};
f.setLabel=function(a){MJ.superClass_.setLabel.call(this,a);return this};
f.setQuery=function(a){MJ.superClass_.setQuery.call(this,a);return this};
f.setMimeTypes=function(a){MJ.superClass_.setMimeTypes.call(this,a);return this};
f.setBreadcrumbsBarHidden=function(a){MJ.superClass_.setBreadcrumbsBarHidden.call(this,a)};
f.addUploadMetadata=function(a,b){MJ.superClass_.addUploadMetadata.call(this,a,b);return this};
f.setParent=function(a){MJ.superClass_.setParent.call(this,a)};
f.setContainerRenameableType=function(a){MJ.superClass_.setContainerRenameableType.call(this,a)};var NJ=function(){this.root_=void 0;this.items_=[];this.opts={}},Gqa=function(a){switch(a){case"image-search":return new HJ;
case"maps":return new IJ;case"photos":return new JJ;case"url":return new KJ;case"video-search":return new LJ;case"web":return new MJ;}return new GJ(a)};
f=NJ.prototype;f.addView=function(a){this.items_.push("string"===typeof a?Gqa(a):a);return this};
f.addViewAt=function(a,b){Fb(this.items_,b,0,"string"===typeof a?Gqa(a):a)};
f.addLabel=function(a){this.items_.push(new GJ(null).setLabel(a))};
f.addLabelAt=function(a,b){a=new GJ(null).setLabel(a);Fb(this.items_,b,0,a);return this};
f.addViewGroup=function(a){this.items_.push(a)};
f.addViewGroupAt=function(a,b){Fb(this.items_,b,0,a)};
var OJ=function(a){return"("+pb(a.items_,function(b){return b.toString()}).join(",")+")"},Hqa=function(a){a=u.filter(a.opts,function(b){return null!==b});
return(a=u.isEmpty(a)?null:a)?Gk(u.map(a,function(b){return b.toString()})):""};
NJ.prototype.toString=function(){if(this.root_){var a=["{root:",this.root_.toString(),",items:",OJ(this)],b=Hqa(this);b&&(a.push(",options:"),a.push(b));a.push("}");return a.join("")}return OJ(this)};
NJ.prototype.toObject=function(){var a=pb(this.items_,function(b){return b instanceof NJ?b.toObject():b.toArray()});
return this.root_?{root:this.root_.toArray(),items:a,options:this.getOptions()}:a};
NJ.prototype.hasView=function(a){for(var b=this.items_,c=0;c<b.length;c++){var d=b[c];if(d instanceof NJ&&d.hasView(a)||d instanceof GJ&&d.getId()==a)return!0}return!1};
NJ.prototype.getViews=function(a,b){b=void 0===b?[]:b;for(var c=this.items_,d=0;d<c.length;d++){var e=c[d];e instanceof NJ?e.getViews(a,b):e.getId()==a&&b.push(e)}return b};
var Iqa=function(a,b){b=void 0===b?[]:b;a.items_.forEach(function(c){c instanceof NJ?Iqa(c,b):b.push(c)});
return b};
NJ.prototype.getOptions=function(){return u.clone(this.opts)};
NJ.prototype.setCollapsible=function(a){this.opts.collapsible=a;return this};var PJ=function(a){this.basePickerUrl_=a||"https://docs.google.com/picker";this.nav_=new NJ};
f=PJ.prototype;f.nav_=null;f.domHelper_=null;f.addLabel=function(a){this.nav_.addLabel(a)};
f.addView=function(a){this.nav_.addView(a);return this};
f.addViewAt=function(a,b){this.nav_.addViewAt(a,b)};
f.addViewGroup=function(a){this.nav_.addViewGroup(a)};
f.addViewGroupAt=function(a,b){this.nav_.addViewGroupAt(a,b)};
f.getBaseUrl=function(){return this.basePickerUrl_};
f.getDomHelper=function(){return this.domHelper_};
f.getNavObject=function(){return this.nav_.toObject()};
f.getViews=function(a){return this.nav_.getViews(a)};
f.hasView=function(a){return this.nav_.hasView(a)};
f.hideTitleBar=function(){return this.setTitle("")};
f.setAppId=function(a){this.appId_=a};
f.setCallback=function(a){this.callback_=a;return this};
f.setDocument=function(a){this.domHelper_=new Zg(a)};
f.setDomHelper=function(a){this.domHelper_=a;return this};
f.addUploader=function(){return this};var QJ=function(a){this.action=a;this.wfv=!1};var Rqa=function(a,b){switch(a[0].getId().getSourceId()){case 13:return Jqa(a,b);case 3:return Kqa(a,b);case 10:return Lqa(a,b,"upload");case 12:return Mqa(a,b);case 2:return Nqa(a,b);case 5:return Oqa(a,b);case 9:return Pqa(a,b);case 1:return null!=E(a[0],Nr,26)?Qqa(a,b):Lqa(a,b,"webcam");default:return{};}},Nqa=function(a,b){a=a.map(function(c){return{id:c.getId().getId(),
serviceId:"docs",mimeType:D(c,7,""),name:c.getName(),type:c.getType(),lastEditedUtc:E(c,Yq,12),url:c.getUrl(),sizeBytes:D(c,23,0),description:c.getDescription(),iconUrl:D(c,11,""),thumbnails:RJ(Gs(c)),isShared:kg(E(c,ys,21),1),downloadUrl:D(E(c,ys,21),10,""),embedUrl:D(c,13,""),copyable:kg(E(c,ys,21),9)}});
return{action:b,docs:a,viewToken:SJ("all","",{}),view:"all"}},Oqa=function(a,b){a=a.map(function(c){return{id:c.getId().getId(),
serviceId:"web",mimeType:D(c,7,""),name:c.getName(),type:c.getType(),url:c.getUrl(),description:c.getDescription(),iconUrl:"https://ssl.gstatic.com/docs/doclist/images/icon_10_generic_list.png",thumbnails:RJ(Gs(c))}});
return{action:b,docs:a,viewToken:SJ("image-search","Search",{}),view:"image-search"}},Pqa=function(a,b){a=a.map(function(c){return{serviceId:"url",
name:Gs(c)[0].getUrl().split("/").pop(),type:c.getType(),mimeType:D(c,7,""),url:c.getUrl(),description:c.getDescription(),iconUrl:"https://ssl.gstatic.com/docs/doclist/images/icon_10_generic_list.png",thumbnails:RJ(Gs(c))}});
return{action:b,docs:a,viewToken:SJ("url","By URL",{}),view:"url"}},Qqa=function(a,b){a=a.map(function(c){return{id:c.getId().getId(),
serviceId:"picasa",name:c.getName(),type:c.getType(),description:c.getDescription(),iconUrl:"https://ssl.gstatic.com/docs/doclist/images/icon_10_generic_list.png",thumbnails:RJ(Gs(c))}});
return{action:b,docs:a,viewToken:SJ("webcam","",{}),view:"webcam"}},Lqa=function(a,b,c){var d=a.map(function(e){return{id:e.getId().getId(),
serviceId:"photo",mimeType:D(e,7,""),name:e.getName(),type:e.getType(),sizeBytes:D(e,23,0),description:e.getDescription(),iconUrl:"https://ssl.gstatic.com/docs/doclist/images/icon_10_generic_list.png",thumbnails:RJ(Gs(e))}});
a=new Set(a.map(function(e){return e.getType()}));
a={allowedItemTypes:Array.from(a)};return{action:b,docs:d,viewToken:SJ(c,"",a),view:c}},Kqa=function(a,b){var c=a.map(function(d){return{id:d.getId().getId(),
serviceId:"picasa",mimeType:D(d,7,""),name:Gs(d)[0].getUrl().split("/").pop(),type:d.getType(),lastEditedUtc:E(d,Yq,12),url:d.getUrl(),sizeBytes:D(d,23,0),description:d.getDescription(),iconUrl:"https://ssl.gstatic.com/docs/doclist/images/icon_10_generic_list.png",thumbnails:RJ(Gs(d))}});
a=new Set(a.map(function(d){return d.getType()}));
a={allowedItemTypes:Array.from(a)};return{action:b,docs:c,viewToken:SJ("photos","",a),view:"photos"}},Jqa=function(a,b){var c=a.map(function(e){return{id:e.getId().getId(),
serviceId:"et",name:Gs(e)[0].getUrl().split("/").pop(),description:e.getDescription(),type:"et",iconUrl:"https://ssl.gstatic.com/docs/doclist/images/icon_10_generic_list.png",thumbnails:RJ(Gs(e))}}),d={category:E(a[0],Tr,28).getCategory()};
a=SJ("et",D(E(a[0],Tr,28),2,""),d);return{action:b,docs:c,viewToken:a,view:"et"}},Mqa=function(a,b){a=a.map(function(c){var d=E(c,Qr,27);
d=C(d,1)[0];return{id:c.getId().getId(),serviceId:"contacts",mimeType:D(c,7,""),name:c.getName(),description:c.getDescription(),url:"mailto:"+d,thumbnail:[{url:D(c,11,"")}],email:d}});
return{action:b,docs:a,view:"contacts"}},SJ=function(a,b,c){return{0:a,
1:b,2:c}},RJ=function(a){return a.map(function(b){return{url:b.getUrl(),
height:b.getHeight(),width:b.getWidth()}})};var VJ=function(a,b){var c=b||{};b=c.document||document;var d=Zb(a),e=vh("SCRIPT"),g={script_:e,timeout_:void 0},h=new Fz(Sqa,g),m=null,n=null!=c.timeout?c.timeout:5E3;0<n&&(m=window.setTimeout(function(){TJ(e,!0);h.errback(new UJ(1,"Timeout reached for loading script "+d))},n),g.timeout_=m);
e.onload=e.onreadystatechange=function(){e.readyState&&"loaded"!=e.readyState&&"complete"!=e.readyState||(TJ(e,c.cleanupWhenDone||!1,m),h.callback(null))};
e.onerror=function(){TJ(e,!0,m);h.errback(new UJ(0,"Error while loading script "+d))};
g=c.attributes||{};u.extend(g,{type:"text/javascript",charset:"UTF-8"});ih(e,g);jd(e,a);Tqa(b).appendChild(e);return h},Tqa=function(a){var b=ch("HEAD",a);
return b&&0!=b.length?b[0]:a.documentElement},Sqa=function(){if(this&&this.script_){var a=this.script_;
a&&"SCRIPT"==a.tagName&&TJ(a,!0,this.timeout_)}},TJ=function(a,b,c){null!=c&&q.clearTimeout(c);
a.onload=Ta;a.onerror=Ta;a.onreadystatechange=Ta;b&&window.setTimeout(function(){Dh(a)},0)},UJ=function(a,b){var c="Jsloader error (code #"+a+")";
b&&(c+=": "+b);hb.call(this,c);this.code=a};
t(UJ,hb);var WJ=function(){lk.call(this);this.logger_=null};
l(WJ,lk);var Uqa=function(a,b){var c=window.gapi,d=fw(),e=ec(b,"gapi.")?b.slice(5):b;if(c[e])d.resolve(c[e]);else try{c.load(b,{callback:r(function(){d.resolve(c[e])},a)})}catch(g){d.reject()}return d.promise};
WJ.prototype.load=function(a){if(window.gapi&&window.gapi.load){var b=!1,c=fw();Uqa(this,a).then(function(d){b||(b=!0,c.resolve(d))},null,this);
zw(5E3).then(function(){b||Vqa(this,a).then(function(d){b||(b=!0,c.resolve(d))},null,this)},null,this);
return c.promise}return Vqa(this,a)};
var Vqa=function(a,b){return VJ(Wqa).then(function(){return Uqa(this,b)},function(){return cw()},a)},Wqa=dc(Sb("https://apis.google.com/js/api.js"));var XJ=function(){this.logger_=null;this.gapiLoader_=new WJ;this.gapiLibPromise_=null;Xqa(this);this.gapiIframePromiseResolver_=fw()};
t(XJ,lk);var Xqa=function(a){a.gapiLoadStartTimestamp_=fb();a.gapiLibPromise_=a.gapiLoader_.load("gapi.iframes").then(function(b){this.gapiLoadEndTimestamp_=fb();return b},function(){this.gapiLibPromise_=null},a)},Zqa=function(a,b,c,d,e){Yqa(a).then(r(a.createIframeFromUrlInternal_,a,b,c,d,void 0,e),function(){},a)},$qa=function(a,b){a.gapiIframePromiseResolver_.promise.then(r(a.sendToChildInternal_,a,b),function(){},a)};
XJ.prototype.sendToChildInternal_=function(a,b){b&&b.send("picker-message-handler",a,void 0,ara(this))};
var ara=function(a){return Sa("gapi.iframes.makeWhiteListIframesFilter")([a.origin_])};
XJ.prototype.createIframeFromUrlInternal_=function(a,b,c,d,e){var g={};g["host-message-handler"]=b;b=px(c);b=px(b);this.origin_=fx(ex(new cx().setScheme(b.getScheme()),b.domain_),b.port_).toString();c=new $oa().setUrl(c);c.obj_.where=a;c.obj_.allowPost=!1;c.obj_.messageHandlers=g;g=ara(this);c.obj_.messageHandlersFilter=g;null!==d&&(c.obj_.queryParams=d);null!==e&&c.setId(e);c.obj_.attributes=c.obj_.attributes||{};new Yoa(c.obj_.attributes).setStyle({display:"block","min-width":"100%",width:"1px"}).setHeight("100%");
a=(ph(a.ownerDocument).gapi||window.gapi).iframes.getContext().openChild(c.value());this.gapiIframePromiseResolver_.resolve(a)};
XJ.prototype.getGapiLoadStartTime=function(){return this.gapiLoadStartTimestamp_};
XJ.prototype.getGapiLoadEndTime=function(){return this.gapiLoadEndTimestamp_};
var Yqa=function(a){a.gapiLibPromise_||Xqa(a);return a.gapiLibPromise_};var bra=function(){};
bra.prototype.nextId_=0;var cra=function(){var a=new gu,b=new Jt;b.setParentId("root");var c=YJ();xg(b,3,c);sg(b,4,1);xg(a,3,b);a.setSourceId(2);a.setName("My Drive");return a},dra=function(){var a=new gu,b=new Jt;
qg(b,5,!0);var c=YJ();c.setType(7);xg(b,3,c);sg(b,4,1);xg(a,3,b);a.setSourceId(2);a.setName("Shared with me");return a},era=function(){var a=new gu,b=new Jt;
qg(b,14,!0);sg(b,4,1);xg(a,3,b);a.setSourceId(2);a.setName("Recent");return a},fra=function(){var a=new gu,b=new Jt,c=new Gt;
c.setType(10);c.setDirection(2);xg(b,3,c);sg(b,4,1);xg(a,3,b);a.setSourceId(2);a.setName("Recent");return a},gra=function(){var a=new gu,b=new Jt;
qg(b,7,!0);var c=YJ();xg(b,3,c);sg(b,4,1);xg(a,3,b);a.setSourceId(2);a.setName("Starred");return a},hra=function(){var a=new gu,b=new Jt;
qg(b,11,!0);xg(a,3,b);a.setSourceId(2);a.setName("Shared drives");return a},ira=function(){var a=new gu,b=new Jt;
qg(b,12,!0);xg(a,3,b);a.setSourceId(2);a.setName("Computers");return a},YJ=function(){var a=new Gt;
a.setType(4);a.setDirection(1);return a};var lra=function(){var a=new ju;a.addSource(jra());a.addSource(kra());return a},jra=function(){var a=new gu,b=new St;
b.setViewMode(1);sg(b,2,1);qg(b,5,!0);qg(b,6,!1);xg(a,6,b);a.setSourceId(3);a.setName("Photos");return a},kra=function(){var a=new gu,b=new St;
b.setViewMode(2);qg(b,5,!0);qg(b,6,!1);xg(a,6,b);a.setSourceId(3);a.setName("Albums");return a},mra=function(){var a=new gu,b=new St;
b.setViewMode(1);sg(b,2,1);qg(b,5,!1);qg(b,6,!0);xg(a,6,b);a.setSourceId(3);a.setName("Videos");return a};var nea=function(){var a=window.location.origin;a||(a=ex(new cx().setScheme(window.location.protocol),window.location.host).toString());return a};var nra=new Map([["birthday",14],["children",1],["dinner",2],["featured",3],["holiday",4],["nightlife",5],["other",6],["party",7],["school",8],["seasonal",9],["sport",10],["stationery",11],["travel",12],["wedding",13]]),pra=function(a,b,c,d){var e=jt(xea(wea(),a),oea());a=[];try{for(var g=0;g<d.length;g++){var h=d[g],m=h[0],n=h[1];switch(m){case"cropphoto":for(var p=new Xs().setId(2),x=new Ps,y=k(Object.entries(n||{})),B=y.next();!B.done;B=y.next()){var G=k(B.value),P=G.next().value;G.next();switch(P){case"ctta":break;
default:throw Error("PostProcessor Option '"+P+"' not supported in V2 for PostProcessor '"+m+"'");}}$s(p,x);e.addPostProcessor(p);break;default:throw Error("PostProcessor '"+m+"' not supported in V2");}}c.forEach(function(S,ca){switch(ca){case"hostId".toString():rg(e,24,S);break;case"origin".toString():rg(e,27,S);break;case"title".toString():e.setTitle(S);break;case"hl".toString():e.setLocale(S);break;case"multiselectEnabled".toString():"true"==S&&(S=new dt,sg(S,1,1),xg(e,3,S));break;case"st".toString():e.setSecretToken(S);
break;case"authuser".toString():S=parseInt(S,10);if(isNaN(S))throw Error("Invalid AuthUser");e.setAuthUser(new dr().setAuthUser(S));break;case"maxItems".toString():pg(e,5,parseInt(S,10));break;case"profilePhoto".toString():e.setTitle("Select Profile Photo");e.addPostProcessor($s(new Xs().setId(2),sea()));e.addPostProcessor(new Xs().setId(1));break;case"gmailDelegatorId".toString():S=new Vq().setGmailDelegatorId(S);xg(e,29,S);break;case"pp".toString():case"dff".toString():case"relayUrl".toString():case"navHidden".toString():case"nav".toString():case"protocol".toString():case"actions".toString():case"thumbs".toString():case"tt".toString():case"odv".toString():case"newDriveView".toString():case"cropMode".toString():case"minSize".toString():case"maxSize".toString():case"maxSizeBytes".toString():case"selectButtonLabel".toString():case"view".toString():break;
default:throw Error("Url Param '"+ca+"' not supported in V2");}});
a=ora(b,e)}catch(S){return null}return new mu().setConfig(e).setSourceList(a)},qra=function(a){var b=a.getConfig().getBaseUrl();
fc(b,"/")||(b+="/");b=px(b);gx(b,b.path_+"home");Xw(b,"req",a.serialize());return b.toString()},rra=function(a){var b="";
switch(a.getStatus()){case 2:b="cancel";break;case 1:b="picked";break;case 3:b="error";}a=a.getItemList();return 0===a.length?{action:b}:Rqa(a,b)},tra=function(a,b){switch(a.action){case"select-contacts":a=sra(a.contacts);
break;case"visibility":a=a.visible;a=new ku().setCommand(7).setVisible(a);var c={};c["iframe-command"]=a.serialize();a=c;break;default:a=null;}a&&$qa(b,a)},sra=function(a){if(!a||0==a.length)return null;
var b=new ku;b.setCommand(11);var c=new bra;a.forEach(function(d){if(d.email){var e=new zs().setName(d.name?d.name:d.email);var g=new Qr;d=tg(g,1,d.email,void 0);e=xg(e,27,d).setId(new vr().setId(":"+(c.nextId_++).toString(36)).setSourceId(12))}else e=null;e&&b.addItem(e)});
a={};a["iframe-command"]=b.serialize();return a},ora=function(a,b){var c=new Map,d=new Is;
Iqa(a).forEach(function(e){var g=new gu,h=e.getOptions();switch(e.getId()){case"docs-images":Ls(d,1);if(Object.keys(h).length)h.hasOwnProperty("sortKey")&&15!=h.sortKey||(g=fra(),c.set(g.serialize(),g)),h.starred&&(g=gra(),c.set(g.serialize(),g)),h.ownedByMe?(g=cra(),c.set(g.serialize(),g)):(g=dra(),c.set(g.serialize(),g)),h.td&&(g=hra(),c.set(g.serialize(),g));else{var m=void 0===m?!1:m;g=new ju;g.addSource(fra());m&&g.addSource(era());g.addSource(cra());g.addSource(hra());g.addSource(dra());g.addSource(gra());
g.addSource(ira());c.set(g.serialize(),g)}break;case"contacts":g.setSourceId(12);if(0!=Object.keys(h||{}).length)throw Error("View options not supported for CONTACTS");c.set(g.serialize(),g);break;case"photos":ura(h,c,d);break;case"upload":if("docs"==h.query){var n=void 0===n?[]:n;g=new gu;h=g.setSourceId(11).setName("Drive Upload");e=new Mt;n=mg(e,3,n||[]);xg(h,11,n)}else g.setSourceId(10),g.setUploadSourceOptions(vra(h,d));c.set(g.serialize(),g);break;case"url":g.setSourceId(9);e.label_&&g.setName(e.label_);
Ls(d,1);c.set(g.serialize(),g);break;case"webcam":g.setSourceId(1);switch(h.query){case"forms":case"spreadsheets":case"presentation":n=g,h=vra(h,d),e=new At,h=sg(e,1,1).setUploadSourceOptions(h),xg(n,16,h);}Ls(d,1);c.set(g.serialize(),g);break;case"image-search":g.setSourceId(5);Ls(d,1);c.set(g.serialize(),g);break;case"et":g.setSourceId(13);e.label_&&g.setName(e.label_);h=new Pt;n=k(Object.entries(e.getOptions()||{}));for(e=n.next();!e.done;e=n.next())switch(m=k(e.value),e=m.next().value,m=
m.next().value,e){case"category":if(nra.has(m))h.setCategory(nra.get(m));else throw Error("party category '"+m+"' not supported in V2");break;default:throw Error("view option '"+e+"' not supported in V2");}Ls(d,1);xg(g,13,h);c.set(g.serialize(),g);break;case null:break;default:throw Error("Source "+e.getId()+" not supported in V2");}});
xg(b,2,d);return Array.from(c.values())},vra=function(a,b){var c=new wt;
a=k(Object.entries(a||{}));for(var d=a.next();!d.done;d=a.next()){var e=k(d.value);d=e.next().value;e=e.next().value;switch(d){case"query":switch(e){case"profile":sg(c,4,2);Ls(b,1);break;case"photo":sg(c,4,1);Ls(b,1);break;case"forms":sg(c,4,6);Ls(b,1);break;case"spreadsheets":sg(c,4,7);Ls(b,1);break;case"presentation":sg(c,4,8);Ls(b,1);break;default:throw Error("query value '"+e+"' not supported in V2");}break;case"data":for(d=k(Object.entries(e||{})),e=d.next();!e.done;e=d.next()){var g=
k(e.value);e=g.next().value;g=g.next().value;ng(c,void 0).set(e,g)}}}return c},ura=function(a,b,c){var d=new ju;
if(Object.keys(a).length){if(a.allowedItemTypes.includes("photo")&&(d.addSource(jra()),Ls(c,1)),a.allowedItemTypes.includes("album")&&(d.addSource(kra()),Ls(c,14)),"videos-uploaded"==a.type||"videos-camerasync"==a.type)d.addSource(mra()),Ls(c,2)}else d=lra(),Ls(c,1),Ls(c,14);d.getSourceList().forEach(function(e){b.set(e.serialize(),e)})};var ZJ=function(a){return(a=a.exec(Kc))?a[1]:""},wra=function(){if(cf)return ZJ(/Firefox\/([0-9.]+)/);
if(Ne||Oe||Me)return Ze;if(df)return Je()?ZJ(/CriOS\/([0-9.]+)/):ZJ(/Chrome\/([0-9.]+)/);if(ef&&!Je())return ZJ(/Version\/([0-9.]+)/);if(Aba||Bba){var a=/Version\/(\S+).*Mobile\/(\S+)/.exec(Kc);if(a)return a[1]+"."+a[2]}else if(Cba)return(a=ZJ(/Android\s+([0-9.]+)/))?a:ZJ(/Version\/([0-9.]+)/);return""}();var $J=function(a){var b=uj(a);return b&&xra()?-a.scrollLeft:!b||Pe&&$e("8")||"visible"==cj(a,"overflowX")?a.scrollLeft:a.scrollWidth-a.clientWidth-a.scrollLeft},yra=function(a){var b=a.offsetLeft,c=a.offsetParent;
c||"fixed"!=dj(a)||(c=$g(a).documentElement);if(!c)return b;if(Qe&&!$e(58)){var d=Aj(c);b+=d.left}else af(8)&&!af(9)&&(d=Aj(c),b-=d.left);return uj(c)?c.clientWidth-(b+a.offsetWidth):b},aK=function(a,b){b=Math.max(b,0);
uj(a)?xra()?a.scrollLeft=-b:Pe&&$e("8")?a.scrollLeft=b:a.scrollLeft=a.scrollWidth-b-a.clientWidth:a.scrollLeft=b},xra=function(){var a;
if(a=ef)a=0<=sc(wra,10);var b;if(b=yba)b=0<=sc(uz,10);return Qe||a||b};var zra=function(a,b,c,d,e,g,h){a=a.clone();var m=bK(b,c);c=oj(b);h=h?h.clone():c.clone();a=a.clone();h=h.clone();var n=0;if(d||0!=m)m&4?a.x-=h.width+(d?d.right:0):m&2?a.x-=h.width/2:d&&(a.x+=d.left),m&1?a.y-=h.height+(d?d.bottom:0):d&&(a.y+=d.top);if(g){if(e){d=a;m=h;n=0;65==(g&65)&&(d.x<e.left||d.x>=e.right)&&(g&=-2);132==(g&132)&&(d.y<e.top||d.y>=e.bottom)&&(g&=-5);d.x<e.left&&g&1&&(d.x=e.left,n|=1);if(g&16){var p=d.x;d.x<e.left&&(d.x=e.left,n|=4);d.x+m.width>e.right&&(m.width=Math.min(e.right-
d.x,p+m.width-e.left),m.width=Math.max(m.width,0),n|=4)}d.x+m.width>e.right&&g&1&&(d.x=Math.max(e.right-m.width,e.left),n|=1);g&2&&(n|=(d.x<e.left?16:0)|(d.x+m.width>e.right?32:0));d.y<e.top&&g&4&&(d.y=e.top,n|=2);g&32&&(p=d.y,d.y<e.top&&(d.y=e.top,n|=8),d.y+m.height>e.bottom&&(m.height=Math.min(e.bottom-d.y,p+m.height-e.top),m.height=Math.max(m.height,0),n|=8));d.y+m.height>e.bottom&&g&4&&(d.y=Math.max(e.bottom-m.height,e.top),n|=2);g&8&&(n|=(d.y<e.top?64:0)|(d.y+m.height>e.bottom?128:0));e=n}else e=
256;n=e}e=new Wi(0,0,0,0);e.left=a.x;e.top=a.y;e.width=h.width;e.height=h.height;n&496||(fj(b,new Wg(e.left,e.top)),h=new Yg(e.width,e.height),c==h||c&&h&&c.width==h.width&&c.height==h.height||(c=h,h=lh(ah($g(b)).document_),!Ne||$e("10")||h&&$e("8")?(b=b.style,Qe?b.MozBoxSizing="border-box":Re?b.WebkitBoxSizing="border-box":b.boxSizing="border-box",b.width=Math.max(c.width,0)+"px",b.height=Math.max(c.height,0)+"px"):(e=b.style,h?(h=xj(b,"padding"),b=Aj(b),e.pixelWidth=c.width-b.left-h.left-h.right-
b.right,e.pixelHeight=c.height-b.top-h.top-h.bottom-b.bottom):(e.pixelWidth=c.width,e.pixelHeight=c.height))))},bK=function(a,b){return(b&8&&uj(a)?b^4:b)&-9};var cK=function(){};
Ua(cK);cK.prototype.nextId_=0;cK.prototype.idPrefix_="";cK.prototype.setIdPrefix=function(a){this.idPrefix_=a};var dK=function(a){Wv.call(this);this.dom_=a||ah();this.rightToLeft_=Ara;this.id_=null;this.inDocument_=!1;this.element_=null;this.googUiComponentHandler_=void 0;this.childIndex_=this.children_=this.parent_=this.model_=null;this.pointerEventsEnabled_=this.wasDecorated_=!1};
t(dK,Wv);dK.prototype.idGenerator_=cK.getInstance();var Ara=null;f=dK.prototype;f.getId=function(){var a;(a=this.id_)||(a=this.idGenerator_,a=this.id_=a.idPrefix_+":"+(a.nextId_++).toString(36));return a};
f.setId=function(a){this.parent_&&this.parent_.childIndex_&&(u.remove(this.parent_.childIndex_,this.id_),u.add(this.parent_.childIndex_,a,this));this.id_=a};
f.getElement=function(){return this.element_};
f.getElementsByClass=function(a){return this.element_?this.dom_.getElementsByClass(a,this.element_):[]};
f.getElementByClass=function(a){return this.element_?this.dom_.getElementByClass(a,this.element_):null};
f.getRequiredElementByClass=function(a){return this.getElementByClass(a)};
f.getHandler=function(){this.googUiComponentHandler_||(this.googUiComponentHandler_=new Sv(this));return this.googUiComponentHandler_};
f.setParent=function(a){if(this==a)throw Error("Unable to set parent component");var b;if(b=a&&this.parent_&&this.id_){b=this.parent_;var c=this.id_;b=b.childIndex_&&c?u.get(b.childIndex_,c)||null:null}if(b&&this.parent_!=a)throw Error("Unable to set parent component");this.parent_=a;dK.superClass_.setParentEventTarget.call(this,a)};
f.getParent=function(){return this.parent_};
f.setParentEventTarget=function(a){if(this.parent_&&this.parent_!=a)throw Error("Method not supported");dK.superClass_.setParentEventTarget.call(this,a)};
f.getDomHelper=function(){return this.dom_};
f.createDom=function(){this.element_=this.dom_.createElement("DIV")};
f.render=function(a){eK(this,a)};
f.renderBefore=function(a){eK(this,a.parentNode,a)};
var eK=function(a,b,c){if(a.inDocument_)throw Error("Component already rendered");a.element_||a.createDom();b?b.insertBefore(a.element_,c||null):a.dom_.getDocument().body.appendChild(a.element_);a.parent_&&!a.parent_.inDocument_||a.enterDocument()};
f=dK.prototype;f.decorate=function(a){if(this.inDocument_)throw Error("Component already rendered");if(a&&this.canDecorate(a)){this.wasDecorated_=!0;var b=$g(a);this.dom_&&this.dom_.getDocument()==b||(this.dom_=ah(a));this.decorateInternal(a);this.enterDocument()}else throw Error("Invalid element to decorate")};
f.canDecorate=function(){return!0};
f.wasDecorated=function(){return this.wasDecorated_};
f.decorateInternal=function(a){this.element_=a};
f.enterDocument=function(){this.inDocument_=!0;fK(this,function(a){!a.inDocument_&&a.getElement()&&a.enterDocument()})};
f.exitDocument=function(){fK(this,function(a){a.inDocument_&&a.exitDocument()});
this.googUiComponentHandler_&&this.googUiComponentHandler_.removeAll();this.inDocument_=!1};
f.disposeInternal=function(){this.inDocument_&&this.exitDocument();this.googUiComponentHandler_&&(this.googUiComponentHandler_.dispose(),delete this.googUiComponentHandler_);fK(this,function(a){a.dispose()});
!this.wasDecorated_&&this.element_&&Dh(this.element_);this.parent_=this.model_=this.element_=this.childIndex_=this.children_=null;dK.superClass_.disposeInternal.call(this)};
var Bra=function(a,b){return a.getId()+"."+b};
f=dK.prototype;f.makeIds=function(a){var b={},c;for(c in a)b[c]=Bra(this,a[c]);return b};
f.getModel=function(){return this.model_};
f.setModel=function(a){this.model_=a};
f.getFragmentFromId=function(a){return a.substring(this.getId().length+1)};
f.getElementByFragment=function(a){if(!this.inDocument_)throw Error("Operation not supported while component is not in document");return this.dom_.getElement(Bra(this,a))};
f.addChild=function(a,b){var c=this.children_?this.children_.length:0;if(a.inDocument_&&(b||!this.inDocument_))throw Error("Component already rendered");if(0>c||c>(this.children_?this.children_.length:0))throw Error("Child component index out of bounds");this.childIndex_&&this.children_||(this.childIndex_={},this.children_=[]);a.getParent()==this?(u.set(this.childIndex_,a.getId(),a),zb(this.children_,a)):u.add(this.childIndex_,a.getId(),a);a.setParent(this);Fb(this.children_,c,0,a);a.inDocument_&&
this.inDocument_&&a.getParent()==this?(b=this.getContentElement(),c=b.childNodes[c]||null,c!=a.getElement()&&b.insertBefore(a.getElement(),c)):b?(this.element_||this.createDom(),c=this.children_?this.children_[c+1]||null:null,eK(a,this.getContentElement(),c?c.element_:null)):this.inDocument_&&!a.inDocument_&&a.element_&&a.element_.parentNode&&1==a.element_.parentNode.nodeType&&a.enterDocument()};
f.getContentElement=function(){return this.element_};
f.isRightToLeft=function(){null==this.rightToLeft_&&(this.rightToLeft_=uj(this.inDocument_?this.element_:this.dom_.getDocument().body));return this.rightToLeft_};
f.setRightToLeft=function(a){if(this.inDocument_)throw Error("Component already rendered");this.rightToLeft_=a};
f.getChildIds=function(){var a=[];fK(this,function(b){a.push(b.getId())});
return a};
var fK=function(a,b){a.children_&&mb(a.children_,b,void 0)};
f=dK.prototype;f.indexOfChild=function(a){return this.children_&&a?lb(this.children_,a):-1};
f.removeChild=function(a,b){if(a){var c=Ka(a)?a:a.getId();a=this.childIndex_&&c?u.get(this.childIndex_,c)||null:null;c&&a&&(u.remove(this.childIndex_,c),zb(this.children_,a),b&&(a.exitDocument(),a.element_&&Dh(a.element_)),a.setParent(null))}if(!a)throw Error("Child is not in parent component");return a};
f.removeChildren=function(a){for(var b=[];this.children_&&0!=this.children_.length;)b.push(this.removeChild(this.children_?this.children_[0]||null:null,a));return b};
f.pointerEventsEnabled=function(){return this.pointerEventsEnabled_};
f.setPointerEventsEnabled=function(a){if(this.inDocument_)throw Error("Component already rendered");this.pointerEventsEnabled_=a};var gK=function(a){dK.call(this,a)};
t(gK,dK);gK.prototype.createDom=function(){var a=this.getDomHelper(),b=a.createDom("DIV");this.element_=b;var c=a.createDom("DIV","picker-min-arrow-inner"),d=a.createDom("DIV","picker-min-arrow-border");a.appendChild(b,c);a.appendChild(b,d)};
var Cra=function(a,b,c){a=a.getElement();$i(a,"left","");$i(a,"right","");tk(b,"picker-min-top");tk(b,"picker-min-bottom");c=bK(b,c);c&1?(a.className="picker-min-arrow-down",rk(b,"picker-min-bottom")):(a.className="picker-min-arrow-up",rk(b,"picker-min-top"))};
gK.prototype.update=function(a,b,c){this.inDocument_&&(c||(c=new Ui(0,0,0,0)),Cra(this,a,b),a=this.getElement(),b&4?$i(a,"right",-c.right+"px"):$i(a,"left",-c.left+"px"))};var hK=function(a,b){QJ.call(this,"set-drive-options");this.appId=a;this.appOrigin=b};
t(hK,QJ);var iK=function(a){QJ.call(this,"visibility");this.visible=a};
t(iK,QJ);var jK;u.createSet("A AREA BUTTON HEAD INPUT LINK MENU META OPTGROUP OPTION PROGRESS STYLE SELECT SOURCE TEXTAREA TITLE TRACK".split(" "));var kK=function(a,b){b?a.setAttribute("role",b):a.removeAttribute("role")},lK=function(a,b,c){Wa(c)&&(c=c.join(" "));
var d="aria-"+b;""===c||void 0==c?(jK||(jK=u.create("atomic",!1,"autocomplete","none","dropeffect","none","haspopup",!1,"live","off","multiline",!1,"multiselectable",!1,"orientation","vertical","readonly",!1,"relevant","additions text","required",!1,"sort","none","busy",!1,"disabled",!1,"hidden",!1,"invalid","false")),c=jK,b in c?a.setAttribute(d,c[b]):a.removeAttribute(d)):a.setAttribute(d,c)};var mK=function(a,b,c){Wv.call(this);this.target=a;this.handle=b||a;this.limits=c||new Wi(NaN,NaN,NaN,NaN);this.document_=$g(a);this.eventHandler_=new Sv(this);ok(this,this.eventHandler_);this.deltaY=this.deltaX=this.startY=this.startX=this.screenY=this.screenX=this.clientY=this.clientX=0;this.enabled_=!0;this.dragging_=!1;this.preventMouseDown_=!0;this.hysteresisDistanceSquared_=0;this.useRightPositioningForRtl_=this.ieDragStartCancellingOn_=!1;Hv(this.handle,["touchstart","mousedown"],this.startDrag,
!1,this);this.useSetCapture_=Dra};
t(mK,Wv);var Dra=q.document&&q.document.documentElement&&!!q.document.documentElement.setCapture&&!!q.document.releaseCapture;f=mK.prototype;f.setAllowSetCapture=function(a){this.useSetCapture_=a&&Dra};
f.enableRightPositioningForRtl=function(a){this.useRightPositioningForRtl_=a};
f.getHandler=function(){return this.eventHandler_};
f.setHysteresis=function(a){this.hysteresisDistanceSquared_=Math.pow(a,2)};
f.getHysteresis=function(){return Math.sqrt(this.hysteresisDistanceSquared_)};
f.setCancelIeDragStart=function(a){this.ieDragStartCancellingOn_=a};
f.getEnabled=function(){return this.enabled_};
f.setPreventMouseDown=function(a){this.preventMouseDown_=a};
f.disposeInternal=function(){mK.superClass_.disposeInternal.call(this);Mv(this.handle,["touchstart","mousedown"],this.startDrag,!1,this);this.eventHandler_.removeAll();this.useSetCapture_&&this.document_.releaseCapture();this.handle=this.target=null};
var Era=function(a){Ia(a.rightToLeft_)||(a.rightToLeft_=uj(a.target));return a.rightToLeft_};
mK.prototype.startDrag=function(a){var b="mousedown"==a.type;if(!this.enabled_||this.dragging_||b&&(!(Sea?0==a.event_.button:"click"==a.type||a.event_.button&Yea[0])||Re&&Se&&a.ctrlKey))this.dispatchEvent("earlycancel");else{if(0==this.hysteresisDistanceSquared_){if(this.dispatchEvent(new nK("start",this,a.clientX,a.clientY,a)))this.dragging_=!0,this.preventMouseDown_&&b&&a.preventDefault();else return;}else this.preventMouseDown_&&b&&a.preventDefault();b=this.document_;var c=b.documentElement,d=!this.useSetCapture_;
this.eventHandler_.listen(b,["touchmove","mousemove"],this.handleMove_,{capture:d,passive:!1});this.eventHandler_.listen(b,["touchend","mouseup"],this.endDrag,d);this.useSetCapture_?(c.setCapture(!1),this.eventHandler_.listen(c,"losecapture",this.endDrag)):this.eventHandler_.listen(ph(b),"blur",this.endDrag);Ne&&this.ieDragStartCancellingOn_&&this.eventHandler_.listen(b,"dragstart",Xea);this.scrollTarget_&&this.eventHandler_.listen(this.scrollTarget_,"scroll",this.onScroll_,d);this.clientX=this.startX=
a.clientX;this.clientY=this.startY=a.clientY;this.screenX=a.screenX;this.screenY=a.screenY;this.deltaX=this.useRightPositioningForRtl_?yra(this.target):this.target.offsetLeft;this.deltaY=this.target.offsetTop;this.pageScroll=oh(ah(this.document_).document_)}};
mK.prototype.endDrag=function(a,b){this.eventHandler_.removeAll();this.useSetCapture_&&this.document_.releaseCapture();this.dragging_?(this.dragging_=!1,this.dispatchEvent(new nK("end",this,a.clientX,a.clientY,a,Fra(this,this.deltaX),Gra(this,this.deltaY),b||"touchcancel"==a.type))):this.dispatchEvent("earlycancel")};
mK.prototype.endDragCancel=function(a){this.endDrag(a,!0)};
mK.prototype.handleMove_=function(a){if(this.enabled_){var b=(this.useRightPositioningForRtl_&&Era(this)?-1:1)*(a.clientX-this.clientX),c=a.clientY-this.clientY;this.clientX=a.clientX;this.clientY=a.clientY;this.screenX=a.screenX;this.screenY=a.screenY;if(!this.dragging_){var d=this.startX-this.clientX,e=this.startY-this.clientY;if(d*d+e*e>this.hysteresisDistanceSquared_)if(this.dispatchEvent(new nK("start",this,a.clientX,a.clientY,a)))this.dragging_=!0;else{this.isDisposed()||this.endDrag(a);return}}c=
Hra(this,b,c);b=c.x;c=c.y;this.dragging_&&this.dispatchEvent(new nK("beforedrag",this,a.clientX,a.clientY,a,b,c))&&(Ira(this,a,b,c),a.preventDefault())}};
var Hra=function(a,b,c){var d=oh(ah(a.document_).document_);b+=d.x-a.pageScroll.x;c+=d.y-a.pageScroll.y;a.pageScroll=d;a.deltaX+=b;a.deltaY+=c;return new Wg(Fra(a,a.deltaX),Gra(a,a.deltaY))};
mK.prototype.onScroll_=function(a){var b=Hra(this,0,0);a.clientX=this.clientX;a.clientY=this.clientY;Ira(this,a,b.x,b.y)};
var Ira=function(a,b,c,d){a.useRightPositioningForRtl_&&Era(a)?a.target.style.right=c+"px":a.target.style.left=c+"px";a.target.style.top=d+"px";a.dispatchEvent(new nK("drag",a,b.clientX,b.clientY,b,c,d))},Fra=function(a,b){var c=a.limits;
a=isNaN(c.left)?null:c.left;c=isNaN(c.width)?0:c.width;return Math.min(null!=a?a+c:Infinity,Math.max(null!=a?a:-Infinity,b))},Gra=function(a,b){var c=a.limits;
a=isNaN(c.top)?null:c.top;c=isNaN(c.height)?0:c.height;return Math.min(null!=a?a+c:Infinity,Math.max(null!=a?a:-Infinity,b))};
mK.prototype.isDragging=function(){return this.dragging_};
var nK=function(a,b,c,d,e,g,h,m){vv.call(this,a);this.clientX=c;this.clientY=d;this.browserEvent=e;this.left=Ia(g)?g:b.deltaX;this.top=Ia(h)?h:b.deltaY;this.dragger=b;this.dragCanceled=!!m};
t(nK,vv);(function(){for(var a=["ms","moz","webkit","o"],b,c=0;b=a[c]&&!q.requestAnimationFrame;++c)q.requestAnimationFrame=q[b+"RequestAnimationFrame"],q.cancelAnimationFrame=q[b+"CancelAnimationFrame"]||q[b+"CancelRequestAnimationFrame"];if(!q.requestAnimationFrame){var d=0;q.requestAnimationFrame=function(e){var g=new Date().getTime(),h=Math.max(0,16-(g-d));d=g+h;return q.setTimeout(function(){e(g+h)},h)};
q.cancelAnimationFrame||(q.cancelAnimationFrame=function(e){clearTimeout(e)})}})();
var Jra=[[],[]],oK=0,pK=!1,Kra=0,Mra=function(a,b){var c=Kra++,d={measureTask:{id:c,fn:a.measure,context:b},mutateTask:{id:c,fn:a.mutate,context:b},state:{},args:void 0,isScheduled:!1};return function(){0<arguments.length?(d.args||(d.args=[]),d.args.length=0,d.args.push.apply(d.args,arguments),d.args.push(d.state)):d.args&&0!=d.args.length?(d.args[0]=d.state,d.args.length=1):d.args=[d.state];d.isScheduled||(d.isScheduled=!0,Jra[oK].push(d));pK||(pK=!0,window.requestAnimationFrame(Lra))}},Lra=function(){pK=
!1;
var a=Jra[oK],b=a.length;oK=(oK+1)%2;for(var c,d=0;d<b;++d){c=a[d];var e=c.measureTask;c.isScheduled=!1;e.fn&&e.fn.apply(e.context,c.args)}for(d=0;d<b;++d)c=a[d],e=c.mutateTask,c.isScheduled=!1,e.fn&&e.fn.apply(e.context,c.args),c.state={};a.length=0};var Nra=Ne?dc(Sb("javascript:\"\"")):dc(Sb("about:blank"));Zb(Nra);var Ora=Ne?dc(Sb("javascript:\"\"")):dc(Sb("javascript:undefined"));Zb(Ora);var qK=function(a){Wv.call(this);this.element_=a;a=Ne?"focusout":"blur";this.listenKeyIn_=Hv(this.element_,Ne?"focusin":"focus",this,!Ne);this.listenKeyOut_=Hv(this.element_,a,this,!Ne)};
t(qK,Wv);qK.prototype.handleEvent=function(a){var b=new wv(a.event_);b.type="focusin"==a.type||"focus"==a.type?"focusin":"focusout";this.dispatchEvent(b)};
qK.prototype.disposeInternal=function(){qK.superClass_.disposeInternal.call(this);Nv(this.listenKeyIn_);Nv(this.listenKeyOut_);delete this.element_};var Pra=function(a,b){this.element_=a;this.dom_=b};var sK=function(a,b){Wv.call(this);this.handler_=new Sv(this);a=a||null;rK(this);this.element_=a;b&&this.setType(b)};
t(sK,Wv);f=sK.prototype;f.element_=null;f.autoHide_=!0;f.autoHidePartners_=null;f.autoHideRegion_=null;f.isVisible_=!1;f.shouldHideAsync_=!1;f.lastShowTime_=-1;f.lastHideTime_=-1;f.hideOnEscape_=!1;f.enableCrossIframeDismissal_=!0;f.type_="toggle_display";f.getType=function(){return this.type_};
f.setType=function(a){this.type_=a};
f.shouldHideAsync=function(){return this.shouldHideAsync_};
f.setShouldHideAsync=function(a){this.shouldHideAsync_=a};
f.getElement=function(){return this.element_};
f.getAutoHide=function(){return this.autoHide_};
f.addAutoHidePartner=function(a){this.autoHidePartners_||(this.autoHidePartners_=[]);xb(this.autoHidePartners_,a)};
f.removeAutoHidePartner=function(a){this.autoHidePartners_&&zb(this.autoHidePartners_,a)};
f.getHideOnEscape=function(){return this.hideOnEscape_};
f.getEnableCrossIframeDismissal=function(){return this.enableCrossIframeDismissal_};
f.setEnableCrossIframeDismissal=function(a){this.enableCrossIframeDismissal_=a};
f.getAutoHideRegion=function(){return this.autoHideRegion_};
f.setAutoHideRegion=function(a){this.autoHideRegion_=a};
f.setTransition=function(a,b){this.showTransition_=a;this.hideTransition_=b};
f.getLastShowTime=function(){return this.lastShowTime_};
f.getLastHideTime=function(){return this.lastHideTime_};
f.getHandler=function(){return this.handler_};
var rK=function(a){if(a.isVisible_)throw Error("Can not change this state of the popup while showing.")};
f=sK.prototype;f.isVisible=function(){return this.isVisible_};
f.isOrWasRecentlyVisible=function(){return this.isVisible_||150>fb()-this.lastHideTime_};
f.setVisible=function(a){this.showTransition_&&this.showTransition_.stop();this.hideTransition_&&this.hideTransition_.stop();a?this.show_():this.hide_()};
f.reposition=Ta;
f.show_=function(){if(!this.isVisible_&&this.dispatchEvent("beforeshow")){if(!this.element_)throw Error("Caller must call setElement before trying to show the popup");this.reposition();var a=$g(this.element_);this.hideOnEscape_&&this.handler_.listen(a,"keydown",this.onDocumentKeyDown_,!0);if(this.autoHide_)if(this.handler_.listen(a,"mousedown",this.onDocumentMouseDown_,!0),Ne){try{var b=a.activeElement}catch(d){}for(;b&&"IFRAME"==b.nodeName;){try{var c=Ph(b)}catch(d){break}a=c;b=a.activeElement}this.handler_.listen(a,"mousedown",
this.onDocumentMouseDown_,!0);this.handler_.listen(a,"deactivate",this.onDocumentBlur_)}else this.handler_.listen(a,"blur",this.onDocumentBlur_);"toggle_display"==this.type_?Qra(this):"move_offscreen"==this.type_&&this.reposition();this.isVisible_=!0;this.lastShowTime_=fb();this.lastHideTime_=-1;if(this.showTransition_)Gv(this.showTransition_,"end",this.onShow,!1,this),this.showTransition_.play();else this.onShow()}};
f.hide_=function(a){if(!this.isVisible_||!this.dispatchEvent({type:"beforehide",target:a}))return!1;this.handler_&&this.handler_.removeAll();this.isVisible_=!1;this.lastHideTime_=fb();this.hideTransition_?(Gv(this.hideTransition_,"end",db(this.continueHidingPopup_,a),!1,this),this.hideTransition_.play()):this.continueHidingPopup_(a);return!0};
f.continueHidingPopup_=function(a){"toggle_display"==this.type_?this.shouldHideAsync_?xw(this.hidePopupElement,0,this):this.hidePopupElement():"move_offscreen"==this.type_&&(this.element_.style.top="-10000px");this.onHide(a)};
var Qra=function(a){a.element_.style.visibility="visible";rj(a.element_,!0)};
f=sK.prototype;f.hidePopupElement=function(){this.element_.style.visibility="hidden";rj(this.element_,!1)};
f.onShow=function(){this.dispatchEvent("show")};
f.onHide=function(a){this.dispatchEvent({type:"hide",target:a})};
f.onDocumentMouseDown_=function(a){a=a.target;Kh(this.element_,a)||Rra(this,a)||this.autoHideRegion_&&!Kh(this.autoHideRegion_,a)||150>fb()-this.lastShowTime_||this.hide_(a)};
f.onDocumentKeyDown_=function(a){27==a.keyCode&&this.hide_(a.target)&&(a.preventDefault(),a.stopPropagation())};
f.onDocumentBlur_=function(a){if(this.enableCrossIframeDismissal_){var b=$g(this.element_);if("undefined"!=typeof document.activeElement){if(a=b.activeElement,!a||Kh(this.element_,a)||"BODY"==a.tagName)return}else if(a.target!=b)return;150>fb()-this.lastShowTime_||this.hide_()}};
var Rra=function(a,b){return rb(a.autoHidePartners_||[],function(c){return b===c||Kh(c,b)})};
sK.prototype.disposeInternal=function(){sK.superClass_.disposeInternal.call(this);this.handler_.dispose();nk(this.showTransition_);nk(this.hideTransition_);delete this.element_;delete this.handler_;delete this.autoHidePartners_};var tK=function(a,b){dK.call(this,b);this.useIframeMask_=!!a;this.lastFocus_=null;this.resizeBackgroundTask_=Mra({mutate:this.resizeBackground_},this)};
t(tK,dK);f=tK.prototype;f.focusHandler_=null;f.visible_=!1;f.bgEl_=null;f.bgIframeEl_=null;f.tabCatcherElement_=null;f.backwardTabWrapInProgress_=!1;f.getCssClass=function(){return"goog-modalpopup"};
f.getBackgroundElement=function(){return this.bgEl_};
f.createDom=function(){tK.superClass_.createDom.call(this);var a=this.getElement(),b=hc(this.getCssClass()).split(" ");sk(a,b);$h(a,!0);rj(a,!1);Sra(this);Tra(this)};
var Sra=function(a){if(a.useIframeMask_&&!a.bgIframeEl_){var b=a.getDomHelper().createDom("IFRAME",{frameborder:0,style:"border:0;vertical-align:bottom;"});hd(b,Nra);a.bgIframeEl_=b;a.bgIframeEl_.className=a.getCssClass()+"-bg";rj(a.bgIframeEl_,!1);qj(a.bgIframeEl_,0)}a.bgEl_||(a.bgEl_=a.getDomHelper().createDom("DIV",a.getCssClass()+"-bg"),rj(a.bgEl_,!1))},Tra=function(a){a.tabCatcherElement_||(a.tabCatcherElement_=a.getDomHelper().createElement("SPAN"),rj(a.tabCatcherElement_,!1),$h(a.tabCatcherElement_,
!0),a.tabCatcherElement_.style.position="absolute")};
f=tK.prototype;f.resetBackwardTabWrap_=function(){this.backwardTabWrapInProgress_=!1};
f.canDecorate=function(a){return!!a&&"DIV"==a.tagName};
f.decorateInternal=function(a){tK.superClass_.decorateInternal.call(this,a);a=hc(this.getCssClass()).split(" ");sk(this.getElement(),a);Sra(this);Tra(this);$h(this.getElement(),!0);rj(this.getElement(),!1)};
f.enterDocument=function(){this.bgIframeEl_&&Ah(this.bgIframeEl_,this.getElement());Ah(this.bgEl_,this.getElement());tK.superClass_.enterDocument.call(this);Bh(this.tabCatcherElement_,this.getElement());this.focusHandler_=new qK(this.getDomHelper().getDocument());this.getHandler().listen(this.focusHandler_,"focusin",this.onFocus);uK(this,!1)};
f.exitDocument=function(){this.isVisible()&&this.setVisible(!1);nk(this.focusHandler_);tK.superClass_.exitDocument.call(this);Dh(this.bgIframeEl_);Dh(this.bgEl_);Dh(this.tabCatcherElement_)};
f.setVisible=function(a){a!=this.visible_&&(this.popupShowTransition_&&this.popupShowTransition_.stop(),this.bgShowTransition_&&this.bgShowTransition_.stop(),this.popupHideTransition_&&this.popupHideTransition_.stop(),this.bgHideTransition_&&this.bgHideTransition_.stop(),this.inDocument_&&uK(this,a),a?this.show_():this.hide_())};
var uK=function(a,b){a.modalAriaVisibilityHelper_||(a.modalAriaVisibilityHelper_=new Pra(a.element_,a.dom_));a=a.modalAriaVisibilityHelper_;if(b){a.hiddenElements_||(a.hiddenElements_=[]);b=a.dom_.getChildren(a.dom_.getDocument().body);for(var c=0;c<b.length;c++){var d=b[c],e;if(e=d!=a.element_)e=d.getAttribute("aria-hidden"),e=!(null==e||void 0==e?0:String(e));e&&(lK(d,"hidden",!0),a.hiddenElements_.push(d))}}else if(a.hiddenElements_){for(c=0;c<a.hiddenElements_.length;c++)a.hiddenElements_[c].removeAttribute("aria-hidden");
a.hiddenElements_=null}};
tK.prototype.setTransition=function(a,b,c,d){this.popupShowTransition_=a;this.popupHideTransition_=b;this.bgShowTransition_=c;this.bgHideTransition_=d};
tK.prototype.show_=function(){if(this.dispatchEvent("beforeshow")){try{this.lastFocus_=this.getDomHelper().getDocument().activeElement}catch(a){}this.resizeBackground_();this.reposition();this.getHandler().listen(this.getDomHelper().getWindow(),"resize",this.resizeBackground_).listen(this.getDomHelper().getWindow(),"orientationchange",this.resizeBackgroundTask_);Ura(this,!0);this.focus();this.visible_=!0;if(this.popupShowTransition_&&this.bgShowTransition_)Gv(this.popupShowTransition_,"end",this.onShow,
!1,this),this.bgShowTransition_.play(),this.popupShowTransition_.play();else this.onShow()}};
tK.prototype.hide_=function(){if(this.dispatchEvent("beforehide")){this.getHandler().unlisten(this.getDomHelper().getWindow(),"resize",this.resizeBackground_).unlisten(this.getDomHelper().getWindow(),"orientationchange",this.resizeBackgroundTask_);this.visible_=!1;if(this.popupHideTransition_&&this.bgHideTransition_)Gv(this.popupHideTransition_,"end",this.onHide,!1,this),this.bgHideTransition_.play(),this.popupHideTransition_.play();else this.onHide();a:{try{var a=this.getDomHelper(),b=a.getDocument().body,
c=a.getDocument().activeElement||b;if(!this.lastFocus_||this.lastFocus_==b){this.lastFocus_=null;break a}(c==b||a.contains(this.getElement(),c))&&this.lastFocus_.focus()}catch(d){}this.lastFocus_=null}}};
var Ura=function(a,b){a.bgIframeEl_&&rj(a.bgIframeEl_,b);a.bgEl_&&rj(a.bgEl_,b);rj(a.getElement(),b);rj(a.tabCatcherElement_,b)};
f=tK.prototype;f.onShow=function(){this.dispatchEvent("show")};
f.onHide=function(){Ura(this,!1);this.dispatchEvent("hide")};
f.isVisible=function(){return this.visible_};
f.focus=function(){this.focusElement_()};
f.resizeBackground_=function(){this.bgIframeEl_&&rj(this.bgIframeEl_,!1);this.bgEl_&&rj(this.bgEl_,!1);var a=this.getDomHelper().getDocument(),b=kh(ph(a)||window),c=Math.max(b.width,Math.max(a.body.scrollWidth,a.documentElement.scrollWidth));a=Math.max(b.height,Math.max(a.body.scrollHeight,a.documentElement.scrollHeight));this.bgIframeEl_&&(rj(this.bgIframeEl_,!0),mj(this.bgIframeEl_,c,a));this.bgEl_&&(rj(this.bgEl_,!0),mj(this.bgEl_,c,a))};
f.reposition=function(){var a=this.getDomHelper().getDocument(),b=ph(a)||window;if("fixed"==dj(this.getElement()))var c=a=0;else c=oh(this.getDomHelper().document_),a=c.x,c=c.y;var d=oj(this.getElement());b=kh(b);a=Math.max(a+b.width/2-d.width/2,0);c=Math.max(c+b.height/2-d.height/2,0);fj(this.getElement(),a,c);fj(this.tabCatcherElement_,a,c)};
f.onFocus=function(a){this.backwardTabWrapInProgress_?this.resetBackwardTabWrap_():a.target==this.tabCatcherElement_&&xw(this.focusElement_,0,this)};
f.getTabCatcherElement=function(){return this.tabCatcherElement_};
f.focusElement_=function(){try{Ne&&this.getDomHelper().getDocument().body.focus(),this.getElement().focus()}catch(a){}};
f.disposeInternal=function(){nk(this.popupShowTransition_);this.popupShowTransition_=null;nk(this.popupHideTransition_);this.popupHideTransition_=null;nk(this.bgShowTransition_);this.bgShowTransition_=null;nk(this.bgHideTransition_);this.bgHideTransition_=null;tK.superClass_.disposeInternal.call(this)};var yK=function(a,b,c){tK.call(this,b,c);this.class_=a||"modal-dialog";this.buttons_=new vK().addButton(wK,!0).addButton(xK,!1,!0)};
t(yK,tK);f=yK.prototype;f.escapeToCancel_=!0;f.hasTitleCloseButton_=!0;f.modal_=!0;f.draggable_=!0;f.backgroundElementOpacity_=.5;f.title_="";f.content_=null;f.dragger_=null;f.disposeOnHide_=!1;f.titleEl_=null;f.titleTextEl_=null;f.titleTextId_=null;f.titleCloseEl_=null;f.contentEl_=null;f.buttonEl_=null;f.preferredAriaRole_="dialog";f.getCssClass=function(){return this.class_};
f.setTitle=function(a){this.title_=a;this.titleTextEl_&&Rh(this.titleTextEl_,a)};
f.getTitle=function(){return this.title_};
f.setTextContent=function(a){a instanceof Uc||(a=Yc(a),a=Xc(Wc(a).replace(/(\r\n|\r|\n)/g,"<br>"),a.getDirection()));this.content_=a;this.contentEl_&&dd(this.contentEl_,a)};
f.getContent=function(){return null!=this.content_?Wc(this.content_):""};
f.getSafeHtmlContent=function(){return this.content_};
f.setPreferredAriaRole=function(a){this.preferredAriaRole_=a};
var zK=function(a){a.getElement()||a.render()};
f=yK.prototype;f.getContentElement=function(){zK(this);return this.contentEl_};
f.getTitleElement=function(){zK(this);return this.titleEl_};
f.getTitleTextElement=function(){zK(this);return this.titleTextEl_};
f.getTitleCloseElement=function(){zK(this);return this.titleCloseEl_};
f.getDialogCloseMessage=function(){return"Close"};
f.getButtonElement=function(){zK(this);return this.buttonEl_};
var Vra=function(a){zK(a);return a.getElement()};
yK.prototype.getBackgroundElement=function(){zK(this);return yK.superClass_.getBackgroundElement.call(this)};
yK.prototype.getBackgroundElementOpacity=function(){return this.backgroundElementOpacity_};
var Wra=function(a,b){a.backgroundElementOpacity_=b;a.getElement()&&(b=a.getBackgroundElement())&&qj(b,a.backgroundElementOpacity_)};
yK.prototype.setModal=function(a){a!=this.modal_&&Xra(this,a)};
var Xra=function(a,b){a.modal_=b;if(a.inDocument_){var c=a.getDomHelper(),d=a.getBackgroundElement(),e=a.bgIframeEl_;b?(e&&c.insertSiblingBefore(e,a.getElement()),c.insertSiblingBefore(d,a.getElement())):(c.removeNode(e),c.removeNode(d))}a.isVisible()&&uK(a,b)};
yK.prototype.getModal=function(){return this.modal_};
yK.prototype.getClass=function(){return this.getCssClass()};
yK.prototype.setDraggable=function(a){this.draggable_=a;AK(this,a&&this.inDocument_)};
yK.prototype.getDraggable=function(){return this.draggable_};
var AK=function(a,b){var c=hc(a.class_+"-title-draggable").split(" ");a.getElement()&&(b?sk(a.titleEl_,c):uk(a.titleEl_,c));b&&!a.dragger_?(b=new mK(a.getElement(),a.titleEl_),a.dragger_=b,sk(a.titleEl_,c),Hv(a.dragger_,"start",a.setDraggerLimits_,!1,a)):!b&&a.dragger_&&(a.dragger_.dispose(),a.dragger_=null)};
f=yK.prototype;
f.createDom=function(){yK.superClass_.createDom.call(this);var a=this.getElement(),b=this.getDomHelper();this.titleEl_=b.createDom("DIV",this.class_+"-title",this.titleTextEl_=b.createDom("SPAN",{className:this.class_+"-title-text",id:this.getId()},this.title_),this.titleCloseEl_=b.createDom("SPAN",this.class_+"-title-close"));yh(a,this.titleEl_,this.contentEl_=b.createDom("DIV",this.class_+"-content"),this.buttonEl_=b.createDom("DIV",this.class_+"-buttons"));kK(this.titleTextEl_,"heading");kK(this.titleCloseEl_,
"button");$h(this.titleCloseEl_,!0);lK(this.titleCloseEl_,"label","Close");this.titleTextId_=this.titleTextEl_.id;kK(a,this.preferredAriaRole_);lK(a,"labelledby",this.titleTextId_||"");this.content_&&dd(this.contentEl_,this.content_);rj(this.titleCloseEl_,this.hasTitleCloseButton_);this.buttons_&&(a=this.buttons_,a.element_=this.buttonEl_,a.render());rj(this.buttonEl_,!!this.buttons_);Wra(this,this.backgroundElementOpacity_)};
f.decorateInternal=function(a){yK.superClass_.decorateInternal.call(this,a);a=this.getElement();var b=this.class_+"-content";this.contentEl_=dh(document,null,b,a)[0];this.contentEl_||(this.contentEl_=this.getDomHelper().createDom("DIV",b),this.content_&&dd(this.contentEl_,this.content_),a.appendChild(this.contentEl_));b=this.class_+"-title";var c=this.class_+"-title-text",d=this.class_+"-title-close";(this.titleEl_=dh(document,null,b,a)[0])?(this.titleTextEl_=dh(document,null,c,this.titleEl_)[0],
this.titleCloseEl_=dh(document,null,d,this.titleEl_)[0]):(this.titleEl_=this.getDomHelper().createDom("DIV",b),a.insertBefore(this.titleEl_,this.contentEl_));this.titleTextEl_?(this.title_=ci(this.titleTextEl_),this.titleTextEl_.id||(this.titleTextEl_.id=this.getId())):(this.titleTextEl_=rh("SPAN",{className:c,id:this.getId()}),this.titleEl_.appendChild(this.titleTextEl_));this.titleTextId_=this.titleTextEl_.id;lK(a,"labelledby",this.titleTextId_||"");this.titleCloseEl_||(this.titleCloseEl_=this.getDomHelper().createDom("SPAN",
d),this.titleEl_.appendChild(this.titleCloseEl_));rj(this.titleCloseEl_,this.hasTitleCloseButton_);b=this.class_+"-buttons";(this.buttonEl_=dh(document,null,b,a)[0])?(this.buttons_=new vK(this.getDomHelper()),this.buttons_.decorate(this.buttonEl_)):(this.buttonEl_=this.getDomHelper().createDom("DIV",b),a.appendChild(this.buttonEl_),this.buttons_&&(a=this.buttons_,a.element_=this.buttonEl_,a.render()),rj(this.buttonEl_,!!this.buttons_));Wra(this,this.backgroundElementOpacity_)};
f.enterDocument=function(){yK.superClass_.enterDocument.call(this);this.getHandler().listen(this.getElement(),"keydown",this.onKey_).listen(this.getElement(),"keypress",this.onKey_);this.getHandler().listen(this.buttonEl_,"click",this.onButtonClick_);AK(this,this.draggable_);this.getHandler().listen(this.titleCloseEl_,"click",this.onTitleCloseClick_);var a=this.getElement();kK(a,this.preferredAriaRole_);""!==this.titleTextEl_.id&&lK(a,"labelledby",this.titleTextEl_.id);this.modal_||Xra(this,!1)};
f.exitDocument=function(){this.isVisible()&&this.setVisible(!1);AK(this,!1);yK.superClass_.exitDocument.call(this)};
f.setVisible=function(a){a!=this.isVisible()&&(this.inDocument_||this.render(),yK.superClass_.setVisible.call(this,a))};
f.onShow=function(){yK.superClass_.onShow.call(this);this.dispatchEvent("aftershow")};
f.onHide=function(){yK.superClass_.onHide.call(this);this.dispatchEvent("afterhide");this.disposeOnHide_&&this.dispose()};
f.setDraggerLimits_=function(){var a=this.getDomHelper().getDocument(),b=kh(ph(a)||window),c=Math.max(a.body.scrollWidth,b.width);a=Math.max(a.body.scrollHeight,b.height);var d=oj(this.getElement());"fixed"==dj(this.getElement())?this.dragger_.limits=new Wi(0,0,Math.max(0,b.width-d.width),Math.max(0,b.height-d.height)):this.dragger_.limits=new Wi(0,0,c-d.width,a-d.height)};
f.onTitleCloseClick_=function(){BK(this)};
var BK=function(a){if(a.hasTitleCloseButton_){var b=a.buttons_,c=b&&b.cancelButton_;c?(b=b.get(c),a.dispatchEvent(new CK(c,b))&&a.setVisible(!1)):a.setVisible(!1)}};
yK.prototype.getHasTitleCloseButton=function(){return this.hasTitleCloseButton_};
var Yra=function(a){a.hasTitleCloseButton_=!1;a.titleCloseEl_&&rj(a.titleCloseEl_,a.hasTitleCloseButton_)};
f=yK.prototype;f.isEscapeToCancel=function(){return this.escapeToCancel_};
f.setDisposeOnHide=function(a){this.disposeOnHide_=a};
f.getDisposeOnHide=function(){return this.disposeOnHide_};
f.disposeInternal=function(){this.buttonEl_=this.titleCloseEl_=null;yK.superClass_.disposeInternal.call(this)};
f.onButtonClick_=function(a){a:{for(a=a.target;null!=a&&a!=this.buttonEl_;){if("BUTTON"==a.tagName)break a;a=a.parentNode}a=null}if(a&&!a.disabled){a=a.name;var b=this.buttons_.get(a);this.dispatchEvent(new CK(a,b))&&this.setVisible(!1)}};
f.onKey_=function(a){var b=!1,c=!1,d=this.buttons_,e=a.target;if("keydown"==a.type){if(this.escapeToCancel_&&27==a.keyCode){var g=d&&d.cancelButton_;e="SELECT"==e.tagName&&!e.disabled;g&&!e?(c=!0,b=d.get(g),b=this.dispatchEvent(new CK(g,b))):e||(b=!0)}else{if(9==a.keyCode&&a.shiftKey&&e==this.getElement()){this.backwardTabWrapInProgress_=!0;try{this.tabCatcherElement_.focus()}catch(n){}xw(this.resetBackwardTabWrap_,0,this)}}}else if(13==a.keyCode){if("BUTTON"==e.tagName&&!e.disabled)g=e.name;else if(e==
this.titleCloseEl_)BK(this);else if(d){var h=d.defaultButton_,m=h&&Zra(d,h);e=("TEXTAREA"==e.tagName||"SELECT"==e.tagName||"A"==e.tagName)&&!e.disabled;!m||m.disabled||e||(g=h)}g&&d&&(c=!0,b=this.dispatchEvent(new CK(g,String(d.get(g)))))}else e!=this.titleCloseEl_||32!=a.keyCode&&" "!=a.key||BK(this);if(b||c)a.stopPropagation(),a.preventDefault();b&&this.setVisible(!1)};
var CK=function(a,b){this.type="dialogselect";this.key=a;this.caption=b};
t(CK,vv);var vK=function(a){this.dom_=a||ah();Ak.call(this)};
t(vK,Ak);f=vK.prototype;f.class_="goog-buttonset";f.defaultButton_=null;f.element_=null;f.cancelButton_=null;f.clear=function(){Ak.prototype.clear.call(this);this.defaultButton_=this.cancelButton_=null};
f.set=function(a,b,c,d){Ak.prototype.set.call(this,a,b);c&&(this.defaultButton_=a);d&&(this.cancelButton_=a);return this};
f.addButton=function(a,b,c){return this.set(a.key,a.caption,b,c)};
f.render=function(){if(this.element_){dd(this.element_,bd);var a=ah(this.element_);this.forEach(function(b,c){b=a.createDom("BUTTON",{name:c},b);c==this.defaultButton_&&(b.className=this.class_+"-default");this.element_.appendChild(b)},this)}};
f.decorate=function(a){if(a&&1==a.nodeType){this.element_=a;a=ch("BUTTON",this.element_);for(var b=0,c,d,e;c=a[b];b++)if(d=c.name||c.id,e=ci(c)||c.value,d){var g=0==b;this.set(d,e,g,"cancel"==c.name);g&&rk(c,this.class_+"-default")}}};
f.getElement=function(){return this.element_};
f.getDomHelper=function(){return this.dom_};
f.setDefault=function(a){this.defaultButton_=a};
f.setCancel=function(a){this.cancelButton_=a};
var Zra=function(a,b){a=ch("BUTTON",a.element_);for(var c=0,d;d=a[c];c++)if(d.name==b||d.id==b)return d;return null};
vK.prototype.setButtonEnabled=function(a,b){if(a=Zra(this,a))a.disabled=!b};
vK.prototype.setAllButtonsEnabled=function(a){for(var b=ch("BUTTON",this.element_),c=0,d;d=b[c];c++)d.disabled=!a};
var wK={key:"ok",caption:"OK"},xK={key:"cancel",caption:"Cancel"},$ra={key:"yes",caption:"Yes"},asa={key:"no",caption:"No"},bsa={key:"save",caption:"Save"},csa={key:"continue",caption:"Continue"};"undefined"!=typeof document&&(new vK().addButton(wK,!0,!0),new vK().addButton(wK,!0).addButton(xK,!1,!0),new vK().addButton($ra,!0).addButton(asa,!1,!0),new vK().addButton($ra).addButton(asa,!0).addButton(xK,!1,!0),new vK().addButton(csa).addButton(bsa).addButton(xK,!0,!0));var dsa=function(a,b,c){yK.call(this,a,b,c)};
t(dsa,yK);var esa=function(a){PJ.call(this,a)};
t(esa,PJ);var fsa=dc(Sb("//www-onepick-opensocial.googleusercontent.com/gadgets/js/rpc.js?c=1&container=onepick")),gsa=dc(Sb("//apis.google.com/js/rpc.js")),hsa=function(a,b){if(!DK(b)){b=b||ah(document);var c=b.createElement("SCRIPT");jd(c,a);c.type="text/javascript";b.getDocument().body.appendChild(c)}},DK=function(a){a=a&&a.getWindow()||window;
return a.gadgets&&a.gadgets.rpc},EK=null,isa=function(a,b){var c=b&&b.getWindow()||window;
if(DK(b))a();else if(EK)EK.push(a);else var d=EK=[a],e=c.setInterval(function(){if(DK(b)){c.clearInterval(e);for(var g=0;g<d.length;g++)d[g]();EK=null}},100)};var jsa=function(){};
jsa.prototype.reposition=function(){};var FK=function(a,b,c){this.element=a;this.corner=b;this.overflow_=c};
t(FK,jsa);
FK.prototype.reposition=function(a,b,c){var d=this.element,e=this.corner,g=this.overflow_,h=a.offsetParent;if(h){var m="HTML"==h.tagName||"BODY"==h.tagName;if(!m||"static"!=dj(h)){var n=hj(h);m||(n=Xg(n,new Wg($J(h),h.scrollTop)))}}n=n||new Wg;h=pj(d);(m=ij(d))&&h.intersection(new Wi(m.left,m.top,m.right-m.left,m.bottom-m.top));m=ah(d);var p=ah(a);if(m.getDocument()!=p.getDocument()){var x=m.getDocument().body;p=kj(x,p.getWindow());p=Xg(p,hj(x));!Ne||af(9)||lh(m.document_)||(p=Xg(p,oh(m.document_)));h.left+=
p.x;h.top+=p.y}d=bK(d,e);e=h.left;d&4?e+=h.width:d&2&&(e+=h.width/2);d=new Wg(e,h.top+(d&1?h.height:0));d=Xg(d,n);var y;g&&(y=ij(a))&&(y.top-=n.y,y.right-=n.x,y.bottom-=n.y,y.left-=n.x);zra(d,a,b,c,y,g,void 0)};var GK=function(a,b){this.popupCorner_=8;this.position_=b||void 0;sK.call(this,a)};
t(GK,sK);GK.prototype.getPosition=function(){return this.position_||null};
GK.prototype.setPosition=function(a){this.position_=a||void 0;this.isVisible()&&this.reposition()};
GK.prototype.setMargin=function(a,b,c,d){this.margin_=null==a||a instanceof Ui?a:new Ui(a,b,c,d);this.isVisible()&&this.reposition()};
GK.prototype.reposition=function(){if(this.position_){var a=!this.isVisible()&&"move_offscreen"!=this.getType(),b=this.getElement();a&&(b.style.visibility="hidden",rj(b,!0));this.position_.reposition(b,this.popupCorner_,this.margin_);a&&rj(b,!1)}};var HK=function(a,b){GK.call(this,a);$h(a,!0);kK(a,"dialog");this.domHelper_=b||ah();this.isNew=!1;this.tabCatcherElement_=this.domHelper_.createElement("span");$h(this.tabCatcherElement_,!0);this.tabCatcherElement_.style.position="absolute";lK(this.tabCatcherElement_,"hidden",!0);this.backwardTabWrapInProgress_=!1};
t(HK,GK);f=HK.prototype;f.focusHandler_=null;f.getDomHelper=function(){return this.domHelper_};
f.resetBackwardTabWrap_=function(){this.backwardTabWrapInProgress_=!1};
f.setViewportElement=function(a){this.viewportElement_=a};
f.onKeyDown_=function(a){9==a.keyCode&&a.shiftKey&&a.target==this.getElement()&&(this.backwardTabWrapInProgress_=!0,this.focus(this.tabCatcherElement_),xw(this.resetBackwardTabWrap_,0,this))};
f.onFocus_=function(a){this.backwardTabWrapInProgress_?this.resetBackwardTabWrap_():a.target==this.tabCatcherElement_&&xw(r(this.focus,this,this.getElement()),0)};
f.focus=function(a){try{a&&a.focus()}catch(b){}};
f.reposition=function(){HK.superClass_.reposition.call(this);var a=this.getPosition();a&&a.reposition(this.tabCatcherElement_,this.popupCorner_,this.margin_||null)};var IK=function(a,b,c,d,e,g){var h=c||ah(),m=h.createDom("DIV","picker-iframe picker-min goog-menu"),n="true"==ox(new cx(a),"minew");n&&rk(m,"picker-minew");rk(m,"picker-white-callout");h.appendChild(h.getDocument().body,m);HK.call(this,m,h);this.isNew=n;this.isVisible()?Qra(this):this.hidePopupElement();this.dom_=h;this.targetId_=zd();this.rpcToken_=zd();this.setUrl(a);this.preferredPopupWidth_=d||300;this.preferredPopupHeight_=e||n?311:300;this.disableAutoHide_=!!g;b&&(ox(px(a),"hostId"),b=this.getDomHelper(),
hsa(fsa,b));this.setDefaultRelayUrl_(a);rK(this);this.hideOnEscape_=!1;rK(this);this.autoHide_=!1;this.calloutArrow_=new gK(c);ok(this,this.calloutArrow_);this.calloutArrow_.render(m)};
t(IK,HK);f=IK.prototype;f.url_="";f.iframe_=null;f.canDispose_=!1;f.iframeLoaded_=!1;f.loadedFired_=!1;f.callback_=Ta;
f.create_=function(){if(!this.iframe_){this.getHandler().listen(this.getDomHelper().getWindow(),"keydown",this.handleKeydown_);this.iframe_=this.dom_.createDom("IFRAME",{id:this.targetId_,name:this.targetId_,"class":"picker-frame",onload:r(this.handleIFrameLoad_,this),frameBorder:"0"});hd(this.iframe_,JK(this));this.getElement().appendChild(this.iframe_);kK(this.iframe_,"dialog");var a=ox(px(this.url_),"title");a&&lK(this.iframe_,"label",a);rk(this.getElement(),"picker-min-popup");mj(this.iframe_,
this.preferredPopupWidth_,this.preferredPopupHeight_);hd(this.iframe_,hi(this.url_));this.execOnGadgetsLoad_(r(function(b){b.setAuthToken(this.targetId_,this.rpcToken_)},this))}};
f.reposition=function(){if(this.iframe_){IK.superClass_.reposition.call(this);var a=this.getPosition(),b=this.popupCorner_;if(a instanceof FK){var c=this.calloutArrow_;a=a.element;var d=this.getElement();if(c.inDocument_){Cra(c,d,b);c=c.getElement();var e=lj(a),g=lj(d),h=new Yg(c.offsetWidth,c.offsetHeight).width;e=new Wg(e.x-g.x,e.y-g.y).x+new Yg(a.offsetWidth,a.offsetHeight).width/2-h/2;e=Math.max(0,e);g=new Yg(d.offsetWidth,d.offsetHeight).width;g-h&&(h=g-h,e>h&&(e=h,d.getBoundingClientRect().left+
h/2>a.getBoundingClientRect().left&&(e=Math.min(e,h/2))));$i(c,"left",e+"px")}}else this.calloutArrow_.update(this.getElement(),b,this.margin_||null);bK(this.getElement(),b)&1?this.iframe_.className="picker-min-frame-down":this.iframe_.className="picker-min-frame-up"}};
var JK=function(a){return Ne&&$e("7")&&ec(a.url_,"https")?dc(Sb("https://about:blank")):Ne?dc(Sb("javascript:\"\"")):dc(Sb("about:blank"))};
f=IK.prototype;f.handleIFrameLoad_=function(){this.iframe_.src!=Zb(JK(this))&&(this.iframeLoaded_=!0,this.getHandler().unlisten(this.getDomHelper().getWindow(),"keydown",this.handleKeydown_),$h(this.iframe_,!0),this.isVisible()&&xw(r(this.focus,this,this.iframe_),0))};
f.handleKeydown_=function(a){27==a.keyCode&&(ksa(this),a.stopPropagation(),a.preventDefault())};
f.execOnGadgetsLoad_=function(a){var b=this.getDomHelper();isa(function(){a(b.getWindow().gadgets.rpc)},b)};
f.setUrl=function(a){a=Xw(Xw(new cx(a),"rpctoken",this.rpcToken_),"rpcService",this.targetId_);a.setScheme("https");this.url_=a.toString();this.iframe_&&hd(this.iframe_,hi(this.url_))};
f.setAppId=function(a){this.appId_=a;this.loadedFired_&&KK(this)};
f.setCallback=function(a){this.callback_=a;this.execOnGadgetsLoad_(r(function(b){b.register(this.targetId_,r(this.handlePickerAction_,this))},this))};
f.handlePickerAction_=function(a){switch(a.action){case"viewUpdated":case"viewChanged":this.reposition();return;case"enableWhiteCallout":a=a.extraUserInputs;var b=this.getElement();a&&a.ewc?rk(b,"picker-white-callout"):tk(b,"picker-white-callout");return;case"loaded":this.loadedFired_=!0;this.sendCommand(new iK(this.isVisible()));KK(this);break;case"blurred":this.getElement()!=this.getDomHelper().getDocument().activeElement&&this.isVisible()&&(this.setVisible(!1),this.callback_({action:"cancel"}));
return;case"picked":case"cancel":this.setVisible(!1);}this.callback_(a)};
var KK=function(a){a.appId_&&a.sendCommand(new hK(a.appId_,window.location.protocol+"//"+window.location.host))};
f=IK.prototype;f.setRelayUrl=function(a){this.execOnGadgetsLoad_(r(function(b){b.setRelayUrl(this.targetId_,a)},this))};
f.setDefaultRelayUrl_=function(a){var b=null,c=a.indexOf("/picker?");-1<c?b=a.substring(0,c+8-1):fc(a,"/picker")&&(b=a);b&&this.setRelayUrl(b+"/resources/rpc_relay.html")};
f.sendCommand=function(a){"refresh"==a.action?(this.iframe_&&!this.isVisible()&&(this.getElement().removeChild(this.iframe_),this.iframe_=null),this.create_()):this.execOnGadgetsLoad_(r(function(b){b.call(this.targetId_,"picker",null,a)},this))};
f.onShow=function(){IK.superClass_.onShow.call(this);Bh(this.tabCatcherElement_,this.getElement());this.focusHandler_=new qK(this.getDomHelper().getDocument());this.getHandler().listen(this.focusHandler_,"focusin",this.onFocus_).listen(this.getElement(),"keydown",this.onKeyDown_);this.create_();if(!this.disableAutoHide_){var a=this.getDomHelper().getDocument();this.getHandler().listen(a,"mousedown",this.handleDocumentMouseDown_,!0);if(Ne){try{var b=a.activeElement}catch(x){}for(;b&&"IFRAME"==b.nodeName;){try{var c=
Ph(b)}catch(x){break}a=c;b=a.activeElement}this.getHandler().listen(a,"mousedown",this.handleDocumentMouseDown_,!0)}}this.sendCommand(new iK(!0));zra(new Wg(0,0),this.getElement(),0,this.margin_||null);this.reposition();if(this.isNew&&(a=this.getPosition(),a instanceof FK&&Za(this.getElement().getBoundingClientRect))){b=this.popupCorner_;var d=kh(this.getDomHelper().getWindow()).height,e=kh(this.getDomHelper().getWindow()).width;c=null;var g=a.corner,h=this.viewportElement_?this.viewportElement_.getBoundingClientRect():
void 0,m=h?h.top:0;d=h?Math.min(h.bottom,d):d;e=h?Math.min(h.right,e):e;h=h?h.left:0;var n=a.element.getBoundingClientRect(),p=this.getElement().getBoundingClientRect();if(!(g&1)&&p.top<m||g&1&&p.bottom>d&&n.top>m+(p.bottom-p.top))g^=1,c=new FK(a.element,g),b^=1;if(g&4&&p.left<h||!(g&4)&&p.right>e&&n.right>h+(p.right-p.left))c=new FK(a.element,g^4),b^=4;c&&(this.setPosition(c),this.popupCorner_=b,this.isVisible()&&this.reposition(),this.reposition())}this.iframeLoaded_?this.focus(this.iframe_):this.focus(this.getElement())};
f.onHide=function(a){IK.superClass_.onHide.call(this,a);nk(this.focusHandler_);Dh(this.tabCatcherElement_);this.sendCommand(new iK(!1))};
f.handleDocumentMouseDown_=function(a){a=a.target;Kh(this.getElement(),a)||Rra(this,a)||this.autoHideRegion_&&!Kh(this.autoHideRegion_,a)||150>fb()-this.lastShowTime_||ksa(this)};
var ksa=function(a){a.isVisible()&&(a.setVisible(!1),a.callback_({action:"cancel"}))};
IK.prototype.disposeInternal=function(){this.canDispose_?(Dh(this.getElement()),IK.superClass_.disposeInternal.call(this)):xw(function(){this.canDispose_=!0;this.disposeInternal()},0,this)};var LK=function(a,b){Wv.call(this);this.element_=a;a=Ih(this.element_)?this.element_:this.element_?this.element_.body:null;this.isRtl_=!!a&&uj(a);this.listenKey_=Hv(this.element_,Qe?"DOMMouseScroll":"mousewheel",this,b)};
t(LK,Wv);LK.prototype.setMaxDeltaX=function(a){this.maxDeltaX_=a};
LK.prototype.setMaxDeltaY=function(a){this.maxDeltaY_=a};
LK.prototype.handleEvent=function(a){var b=0,c=0,d=a.event_;"mousewheel"==d.type?(a=MK(-d.wheelDelta),Ia(d.wheelDeltaX)?(b=MK(-d.wheelDeltaX),c=MK(-d.wheelDeltaY)):c=a):(a=d.detail,100<a?a=3:-100>a&&(a=-3),Ia(d.axis)&&d.axis===d.HORIZONTAL_AXIS?b=a:c=a);Ma(this.maxDeltaX_)&&(b=Ug(b,-this.maxDeltaX_,this.maxDeltaX_));Ma(this.maxDeltaY_)&&(c=Ug(c,-this.maxDeltaY_,this.maxDeltaY_));this.isRtl_&&(b=-b);b=new lsa(a,d,b,c);this.dispatchEvent(b)};
var MK=function(a){return Re&&(Se||tba)&&0!=a%40?a:a/40};
LK.prototype.disposeInternal=function(){LK.superClass_.disposeInternal.call(this);Nv(this.listenKey_);this.listenKey_=null};
var lsa=function(a,b,c,d){wv.call(this,b);this.type="mousewheel";this.detail=a;this.deltaX=c;this.deltaY=d};
t(lsa,wv);var msa=function(a,b){var c;a:{for(c=b.target;c;){if(1==c.nodeType){var d=cj(c,"overflowY");if("auto"==d||"scroll"==d)break a}c=c.parentNode}c=null}(!c||!Kh(a,c)||c.scrollHeight==c.clientHeight||0<b.deltaY&&1>=Math.abs(c.scrollTop-(c.scrollHeight-c.clientHeight))||0>b.deltaY&&0==c.scrollTop)&&b.stopPropagation()};var NK;var OK=function(a,b,c,d,e,g,h){yK.call(this,g?g+" "+this.className_:this.className_,!0,c);this.useGapiIframesProtocol_="gapi_iframes"==Ei(a,"protocol");this.iframeManager_=new XJ;this.targetId_=zd();this.rpcToken_=zd();this.setUrl(a);this.useGapi_=void 0!==ox(px(this.url_),"v2");this.preferredDialogWidth_=d;this.preferredDialogHeight_=e;void 0!==d||void 0!==e?c=!0:(c=ox(px(a),"hostId"),NK||(NK=new Set("DocVerse fusiontables geo geowiki gm gmail-gadget gws hotpot jointly presentations pwa sites templates trix trix-copy-sheet webstore".split(" "))),
c=!NK.has(c));this.autoSizeDialog_=c;this.gadgetsDomHelper_=h||this.getDomHelper();b&&(ox(px(a),"hostId"),b="true"==ox(px(this.url_),"grugl"),hsa(b?gsa:fsa,this.gadgetsDomHelper_));this.setDefaultRelayUrl_(a);this.escapeToCancel_=!1;this.buttons_=null;this.buttonEl_&&(this.buttons_?(a=this.buttons_,a.element_=this.buttonEl_,a.render()):dd(this.buttonEl_,bd),rj(this.buttonEl_,!!this.buttons_));this.logger_=null};
t(OK,dsa);f=OK.prototype;f.className_="picker modal-dialog";f.url_="";f.iframe_=null;f.iframeLoaded_=!1;f.loadedFired_=!1;f.callback_=Ta;f.enterDocument=function(){OK.superClass_.enterDocument.call(this);var a=this.getBackgroundElement(),b=this.getHandler(),c=new LK(a);ok(b,c);b.listen(c,"mousewheel",r(msa,void 0,a)).listen(a,"scroll",r(msa,void 0,a))};
f.handlePickerCommands_=function(a){a=Dg(lu,a["iframe-command"]);switch(D(a,1,0)){case 1:this.callback_(rra(E(a,qt,2)));this.setVisible(!1);break;case 4:Yra(this),this.callback_({action:"loaded"});}};
f.render=function(a){OK.superClass_.render.call(this,a);this.useGapi_?Yqa(this.iframeManager_).then(r(this.createGapiIframeElement_,this),function(){},this):(this.iframe_=this.dom_.createDom("IFRAME",{id:this.targetId_,
name:this.targetId_,"class":"picker-frame",onload:r(this.handleIFrameLoad_,this),frameBorder:"0",allow:"camera"}),hd(this.iframe_,JK(this)),this.getContentElement().appendChild(this.iframe_),rk(this.getElement(),"picker-dialog"),this.iframe_.src=this.url_,nsa(this),osa(this))};
f.createGapiIframeElement_=function(){var a=this.getDomHelper().createDom("div","picker-dialog-content");Zqa(this.iframeManager_,a,r(this.handlePickerCommands_,this),this.url_,this.targetId_);this.iframeManager_.gapiIframePromiseResolver_.promise.then(r(this.handleGapiIframeLoad_,this))};
f.handleGapiIframeLoad_=function(a){this.iframe_=a.getIframeEl();this.handleIFrameLoad_();rk(this.iframe_,"picker-frame");this.getContentElement().appendChild(this.iframe_);rk(this.getElement(),"picker-dialog");nsa(this);osa(this)};
var nsa=function(a){a.execOnGadgetsLoad_(r(function(b){b.setAuthToken(this.targetId_,this.rpcToken_)},a))},osa=function(a){var b=ox(px(a.url_),"title");
b&&a.setTitle(b)};
f=OK.prototype;f.getSafeBlankUrl_=function(){return Ne&&$e("7")&&ec(this.url_,"https")?dc(Sb("https://about:blank")):Ne?dc(Sb("javascript:\"\"")):dc(Sb("about:blank"))};
f.handleIFrameLoad_=function(){this.iframe_.src!=Zb(JK(this))&&(this.iframeLoaded_=!0,$h(this.iframe_,!0),this.isVisible()&&this.focus())};
f.handleKeydown_=function(a){27==a.keyCode&&(this.setVisible(!1),this.callback_({action:"cancel"}),a.stopPropagation(),a.preventDefault())};
f.execOnGadgetsLoad_=function(a){var b=this.gadgetsDomHelper_;isa(function(){a(b.getWindow().gadgets.rpc)},b)};
f.setUrl=function(a){a=Xw(Xw(new cx(a),"rpctoken",this.rpcToken_),"rpcService",this.targetId_);a.setScheme("https");this.url_=a.toString();this.iframe_&&(this.iframe_.src=this.url_)};
f.setAppId=function(a){this.appId_=a;this.loadedFired_&&KK(this)};
f.setCallback=function(a){this.callback_=a;this.execOnGadgetsLoad_(r(function(b){b.register(this.targetId_,r(this.handlePickerAction_,this))},this))};
f.handlePickerAction_=function(a){var b=a.action;"loaded"==b&&(this.loadedFired_=!0,this.sendCommand(new iK(this.isVisible())),KK(this),Yra(this),this.getHandler().unlisten(this.getDomHelper().getWindow(),"keydown",this.handleKeydown_),$h(this.iframe_,!0));"picked"!=b&&"cancel"!=b||this.setVisible(!1);this.callback_(a)};
f.setDriveOptions_=function(){this.appId_&&this.sendCommand(new hK(this.appId_,window.location.protocol+"//"+window.location.host))};
f.setRelayUrl=function(a){this.execOnGadgetsLoad_(r(function(b){b.setRelayUrl(this.targetId_,a)},this))};
f.setDefaultRelayUrl_=function(a){var b=null,c=a.indexOf("/picker?");-1<c?b=a.substring(0,c+8-1):fc(a,"/picker")&&(b=a);b&&this.setRelayUrl(b+"/resources/rpc_relay.html")};
f.sendCommand=function(a){this.useGapi_&&tra(a,this.iframeManager_);this.execOnGadgetsLoad_(r(function(b){b.call(this.targetId_,"picker",null,a)},this))};
f.resizePicker_=function(){var a=this.getDomHelper().getDocument();a=ph(a)||window;if("true"==ox(px(this.url_),"ignoreLimits"))a=new Yg(this.preferredDialogWidth_,this.preferredDialogHeight_);else if("true"==ox(px(this.url_),"shadeDialog")){var b=xj(Vra(this),"margin"),c=kh(a);a=c.width-80;c=c.height-40;b&&(a-=b.left?b.left:0,a-=b.right?b.right:0,c-=b.top?b.top:0,c-=b.bottom?b.bottom:0);a=new Yg(0<a?a:0,0<c?c:0)}else{b=this.preferredDialogWidth_;if(b){b=Math.max(320,Math.min(1051,b));c=this.preferredDialogHeight_;
c||(c=kh(a),c=.85*c.height);var d=Math.max(320,Math.min(650,c))}else c=kh(a),b=.618*c.width,d=b<c.height?Math.round(Math.max(320,Math.min(650,.85*b))):Math.round(Math.max(320,Math.min(650,.85*c.height))),b=Math.round(d/.618);c=kh(a);b=Math.min(b,Math.max(c.width,320));d=Math.min(d,Math.max(c.height,320));a=new Yg(b,d)}mj(this.getContentElement(),a);this.reposition()};
f.reposition=function(){if("true"==ox(px(this.url_),"shadeDialog")){var a=oj(this.getElement()),b=kh(this.getDomHelper().getWindow());a=Math.floor(b.width/2-a.width/2);if(b=xj(Vra(this),"margin")){var c=0+(b.left?b.left:0);c+=b.right?b.right:0;a=Math.floor(a-c/2)}a=0<a?a:0;b=oh(this.getDomHelper().document_).y;fj(this.getElement(),a,b)}else OK.superClass_.reposition.call(this)};
f.setVisible=function(a){if(a!=this.isVisible()&&this.autoSizeDialog_){var b=this.getDomHelper().getWindow();a?(this.resizePicker_(),this.getHandler().listen(b,"resize",this.resizePicker_),this.iframeLoaded_||this.getHandler().listen(b,"keydown",this.handleKeydown_)):(this.getHandler().unlisten(b,"resize",this.resizePicker_),this.iframeLoaded_||this.getHandler().unlisten(b,"keydown",this.handleKeydown_))}OK.superClass_.setVisible.call(this,a);this.sendCommand(new iK(a))};
f.focus=function(){OK.superClass_.focus.call(this);if(this.iframe_&&this.iframeLoaded_&&this.loadedFired_)try{this.iframe_.focus()}catch(a){}};var PK=function(a){PJ.call(this,a);this.urlParamMap_=new Map;this.useV2_=!0;this.urlParamMap_.set("protocol","gadgets");(a=window.location.origin)||(a=window.location.protocol+"//"+window.location.host);this.setOrigin(a);this.postProcessors_=[];this.additionalClasses_="";this.gadgetsDomHelper_=void 0};
t(PK,esa);PK.prototype.loadGadgets_=!0;PK.prototype.disposeOnHide_=!1;PK.prototype.addPostProcessor=function(a,b){this.postProcessors_.push([a,b||{}]);return this};
var psa=function(a){a.getRelayUrl()||a.setRelayUrl(gx(ix(hx(px(window.location.href),void 0),""),"//s.ytimg.com/yts/favicon-vfl8qSV2F.ico").toString())};
f=PK.prototype;f.build=function(){psa(this);if(this.urlParamMap_.get("minimal"))throw Error("use buildMinimal to build minimal picker");var a=new OK(qsa(this).toString(),this.loadGadgets_,this.getDomHelper(),this.dialogWidth_,this.dialogHeight_,this.additionalClasses_,this.gadgetsDomHelper_);a.setDisposeOnHide(this.disposeOnHide_);a.setAppId(this.appId_);a.setCallback(this.callback_);return a};
f.buildDialogPicker=function(){return this.build()};
f.buildMinimal=function(){this.urlParamMap_.set("minimal","true");psa(this);var a=new IK(qsa(this).toString(),this.loadGadgets_,this.getDomHelper(),this.dialogWidth_,this.dialogHeight_,this.disableAutoHide_);a.setAppId(this.appId_);a.setCallback(this.callback_);return a};
f.disableAutoHide=function(a){this.disableAutoHide_=a;return this};
f.disableFeature=function(a){this.urlParamMap_.delete(a);return this};
f.getDisposeOnHide=function(){return this.disposeOnHide_};
f.getHeight=function(){return this.dialogHeight_};
f.getProtocol=function(){return this.urlParamMap_.get("protocol")};
f.getRelayUrl=function(){return this.urlParamMap_.get("relayUrl")};
f.getSelectButtonLabel=function(){return this.urlParamMap_.get("selectButtonLabel")};
f.getTitle=function(){return this.urlParamMap_.get("title")};
f.getWidth=function(){return this.dialogWidth_};
f.getUiVersion=Ta;f.isFeatureEnabled=function(a){return"true"==this.urlParamMap_.get(a)};
f.setDeveloperKey=function(a){this.urlParamMap_.set("developerKey",a);return this};
f.setActionPaneType=function(a){this.urlParamMap_.set("apt",a);return this};
f.setActions=function(a){this.urlParamMap_.set("actions",a.join(","));return this};
f.setAdditionalClasses=function(a){this.additionalClasses_=a;return this};
f.setAuthUser=function(a){this.urlParamMap_.set("authuser",a);return this};
f.setChromeMode=function(a){this.urlParamMap_.set("chromeMode",a);return this};
f.setStartInAddMode=function(){this.urlParamMap_.set("addMode",!0);return this};
f.setDisposeOnHide=function(a){this.disposeOnHide_=a};
f.setEventId=function(a){this.urlParamMap_.set("eventId",a);return this};
f.setMaxSizeBytes=function(a){this.urlParamMap_.set("maxSizeBytes",a);return this};
f.setMaxSizeBytesPerItem=function(a){this.urlParamMap_.set("maxSizeBytesPerItem",a);return this};
f.setMaxItems=function(a){this.urlParamMap_.set("maxItems",a);return this};
f.setMaxVideoDurationSec=function(a){this.urlParamMap_.set("maxVD",a);return this};
f.setMinItems=function(a){this.urlParamMap_.set("minItems",a);return this};
f.setExcludeIds=function(a){this.urlParamMap_.set("excludeIds",a.join(","));return this};
f.setExperiments=function(a){this.urlParamMap_.set("e",a.join(","))};
f.setFaceDetectionTimeout=function(a){this.urlParamMap_.set("fdtm",a);return this};
f.setGadgetsRpcUrl=function(a){this.urlParamMap_.set("rpcUrl",a);return this};
f.setUseGadgetsRpcUsingGapi=function(a){this.urlParamMap_.set("grugl",a);return this};
f.setGmailDelegatorId=function(a){this.urlParamMap_.set("gmailDelegatorId",a);return this};
f.setOrigin=function(a){a&&this.urlParamMap_.set("origin",a);return this};
f.setInitialView=function(a){a instanceof GJ?this.urlParamMap_.set("view",a.toString()):this.urlParamMap_.set("view",a);return this};
f.setLearnMore=function(a){this.urlParamMap_.set("learnMore",a);return this};
f.setLoadGadgetsLibrary=function(a){this.loadGadgets_=a;return this};
f.setLocale=function(a){this.urlParamMap_.set("hl",a)};
f.setMaxSize=function(a){if(isNaN(a)||isNaN(void 0))throw Error("MaxSize - Not a number. ("+a+", undefined)");this.urlParamMap_.set("maxSize",a+"xundefined");return this};
f.setNoItemsView=function(a){this.urlParamMap_.set("noItemsView",a);return this};
f.setOAuthToken=function(a){this.urlParamMap_.set("oauth_token",a)};
f.setSecretToken=function(a){this.urlParamMap_.set("st",a)};
f.setPostProcessor=function(a,b){return this.addPostProcessor(a,b)};
f.setRelayUrl=function(a){this.urlParamMap_.set("relayUrl",a);return this};
f.setSelectButtonLabel=function(a){this.urlParamMap_.set("selectButtonLabel",a);return this};
f.setSelectableMimeTypes=function(a){this.urlParamMap_.set("selectableMimeTypes",a);return this};
f.setSize=function(a,b){this.dialogWidth_=a;this.dialogHeight_=b;return this};
f.setTitleBarIconId=function(a){this.urlParamMap_.set("titleBarIconId",a);return this};
f.setThumbnailTypes=function(a){this.urlParamMap_.set("tt",a.join(","));return this};
f.setUploadButton=function(a){this.urlParamMap_.set("uploadButton",a.toString());return this};
f.setUploadToAlbumId=function(a){this.urlParamMap_.set("uploadToAlbumId",a);return this};
f.setTitle=function(a){this.urlParamMap_.set("title",a);return this};
f.setDogfoodConfidential=function(a){this.urlParamMap_.set("dfc",a);return this};
f.setActionPaneText=function(a){this.urlParamMap_.set("actionPaneText",a);return this};
f.setUser=function(a){this.urlParamMap_.set("user",a);return this};
f.setViewerGender=function(a){this.urlParamMap_.set("vg",a?a.charAt(0):void 0);return this};
f.shouldReturnUploadMetadata=function(a){this.urlParamMap_.set("srum",a);return this};
var qsa=function(a){a.postProcessors_.length&&a.urlParamMap_.set("pp",Gk(a.postProcessors_));a.urlParamMap_.set("nav",OJ(a.nav_));var b=new cx(a.getBaseUrl());a.urlParamMap_.forEach(function(e,g){Xw(b,g,e)});
if(a.useV2_){var c=pra(a.getBaseUrl(),a.nav_,a.urlParamMap_,a.postProcessors_);if(null!==c){Xw(b,"amc","true");var d=!1;switch(a.urlParamMap_.get("hostId")){case"gmail-to":case"og":case"hangouts-profile-picture":case"testing":case"youtube-video-importer":d=!0;break;case"ritz":case"punch":case"freebird-themes":case"freebird":case"atariImage":Ne||Oe||(d=!0);}d&&Xw(b,"v2",qra(c))}}return b};
PK.prototype.setDefaultFontFamily=function(a){this.urlParamMap_.set("dff",a);return this};
PK.prototype.setUseV2=function(a){this.useV2_=a;return this};
PK.prototype.setGadgetsDomHelper=function(a){this.gadgetsDomHelper_=a;return this};
PK.prototype.setRpcTargetId=function(a){this.urlParamMap_.set("rpcTargetId",a);return this};var QK=function(a){GJ.call(this,"upload");this.opts.query=a};
t(QK,GJ);f=QK.prototype;f.setQuery=function(){throw Error("Query cannot be set for upload views.")};
f.setUploadNotificationsEnabled=function(a){this.opts.notifications=a?"true":null;return this};
f.setSendDataUrlEnabled=function(a){this.opts.sdurl=a?"true":null;return this};
f.setHidePhotoTransformationOption=function(){this.opts.hito=!0;return this};
f.setLabel=function(a){QK.superClass_.setLabel.call(this,a);return this};
f.setMimeTypes=function(a){QK.superClass_.setMimeTypes.call(this,a);return this};
f.setBreadcrumbsBarHidden=function(a){QK.superClass_.setBreadcrumbsBarHidden.call(this,a)};
f.addUploadMetadata=function(a,b){QK.superClass_.addUploadMetadata.call(this,a,b);return this};
f.setParent=function(a){QK.superClass_.setParent.call(this,a)};
f.setContainerRenameableType=function(a){QK.superClass_.setContainerRenameableType.call(this,a)};
f.setFileExtensions=function(a){this.opts.fileExts=a;return this};var RK=function(a){if("youtubebanner"!==a&&"youtube-channel-banner"!==a)throw Error("configurationId must be YOUTUBE_BANNER or YOUTUBE_CHANNEL_BANNER");QK.call(this,a)};
t(RK,QK);var rsa=function(a,b,c){a.opts.ytRecWidth=b;a.opts.ytRecHeight=c;return a},ssa=function(a,b){a.opts.ytMaxFileSize=b;
return a};
f=RK.prototype;f.setLabel=function(a){RK.superClass_.setLabel.call(this,a);return this};
f.setQuery=function(a){RK.superClass_.setQuery.call(this,a);return this};
f.setMimeTypes=function(a){RK.superClass_.setMimeTypes.call(this,a);return this};
f.setBreadcrumbsBarHidden=function(a){RK.superClass_.setBreadcrumbsBarHidden.call(this,a)};
f.addUploadMetadata=function(a,b){RK.superClass_.addUploadMetadata.call(this,a,b);return this};
f.setParent=function(a){RK.superClass_.setParent.call(this,a)};
f.setContainerRenameableType=function(a){RK.superClass_.setContainerRenameableType.call(this,a)};var SK=function(a,b){Ia(a.name)?(this.name=a.name,this.code=tsa[a.name]):(this.code=a=a.code,this.name=usa(a));hb.call(this,ld("%s %s",this.name,b))};
t(SK,hb);var usa=function(a){var b=u.findKey(tsa,function(c){return a==c});
if(!Ia(b))throw Error("Invalid code: "+a);return b},tsa=u.create("AbortError",3,"EncodingError",5,"InvalidModificationError",9,"InvalidStateError",7,"NotFoundError",1,"NotReadableError",4,"NoModificationAllowedError",6,"PathExistsError",12,"QuotaExceededError",10,"SecurityError",2,"SyntaxError",8,"TypeMismatchError",11);var TK=function(a,b){vv.call(this,a.type,b);this.event_=a};
t(TK,vv);TK.prototype.isLengthComputable=function(){return this.event_.lengthComputable};
TK.prototype.getLoaded=function(){return this.event_.loaded};
TK.prototype.getTotal=function(){return this.event_.total};var UK=function(){Wv.call(this);this.reader_=new FileReader;this.reader_.onloadstart=r(this.dispatchProgressEvent_,this);this.reader_.onprogress=r(this.dispatchProgressEvent_,this);this.reader_.onload=r(this.dispatchProgressEvent_,this);this.reader_.onabort=r(this.dispatchProgressEvent_,this);this.reader_.onerror=r(this.dispatchProgressEvent_,this);this.reader_.onloadend=r(this.dispatchProgressEvent_,this)};
t(UK,Wv);f=UK.prototype;f.abort=function(){try{this.reader_.abort()}catch(a){throw new SK(a,"aborting read")}};
f.getReadyState=function(){return this.reader_.readyState};
f.getError=function(){return this.reader_.error&&new SK(this.reader_.error,"reading file")};
f.dispatchProgressEvent_=function(a){this.dispatchEvent(new TK(a,this))};
f.disposeInternal=function(){UK.superClass_.disposeInternal.call(this);delete this.reader_};
f.readAsBinaryString=function(a){this.reader_.readAsBinaryString(a)};
f.readAsArrayBuffer=function(a){this.reader_.readAsArrayBuffer(a)};
var vsa=function(a){var b=new UK,c=VK(b);b.readAsArrayBuffer(a);return c};
UK.prototype.readAsText=function(a,b){this.reader_.readAsText(a,b)};
var wsa=function(a){var b=new UK,c=VK(b);b.reader_.readAsDataURL(a);return c},VK=function(a){var b=new Fz;
a.listen("loadend",db(function(c,d){var e=d.reader_.result,g=d.getError();null==e||g?c.errback(g):c.callback(e);d.dispose()},b,a));
return b};var WK=function(a,b,c){Ia(c)||(c=a.size);return a.webkitSlice?a.webkitSlice(b,c):a.mozSlice?a.mozSlice(b,c):a.slice?Qe&&!$e("13.0")||Re&&!$e("537.1")?(0>b&&(b+=a.size),0>b&&(b=0),0>c&&(c+=a.size),c<b&&(c=b),a.slice(b,c-b)):a.slice(b,c):null};var ysa=function(a){var b=xsa;return function(){var c=this||q;c=c.closure_memoize_cache_||(c.closure_memoize_cache_={});var d=b(bb(a),arguments);return c.hasOwnProperty(d)?c[d]:c[d]=a.apply(this,arguments)}},xsa=function(a,b){a=[a];
for(var c=b.length-1;0<=c;--c)a.push(typeof b[c],b[c]);return a.join("\x0B")};var XK=function(a){var b={};a=a.replace(/\r/g,"").split("\n");for(var c=0;c<a.length;c++){var d=a[c],e=d.indexOf(":");0>e||(b[d.substring(0,e)]=d.substring(e+2,d.length))}return b},zsa=ysa(function(){if(!q.Blob)return!1;
var a=new Uint8Array(100);try{var b=new Blob([a])}catch(c){return!1}return null===WK(b,0,1)?!1:!0});var YK=function(a,b,c){lk.call(this);this.id_=null;this.usingListeners_=!1;this.listener_=a;this.handler_=c;this.win_=b||window;this.callback_=r(this.doAction_,this)};
t(YK,lk);f=YK.prototype;f.start=function(){this.stop();this.usingListeners_=!1;var a=Asa(this),b=Bsa(this);a&&!b&&this.win_.mozRequestAnimationFrame?(this.id_=Hv(this.win_,"MozBeforePaint",this.callback_),this.win_.mozRequestAnimationFrame(null),this.usingListeners_=!0):this.id_=a&&b?a.call(this.win_,this.callback_):this.win_.setTimeout(saa(this.callback_),20)};
f.startIfNotActive=function(){this.isActive()||this.start()};
f.stop=function(){if(this.isActive()){var a=Asa(this),b=Bsa(this);a&&!b&&this.win_.mozRequestAnimationFrame?Nv(this.id_):a&&b?b.call(this.win_,this.id_):this.win_.clearTimeout(this.id_)}this.id_=null};
f.fire=function(){this.stop();this.doAction_()};
f.fireIfActive=function(){this.isActive()&&this.fire()};
f.isActive=function(){return null!=this.id_};
f.doAction_=function(){this.usingListeners_&&this.id_&&Nv(this.id_);this.id_=null;this.listener_.call(this.handler_,fb())};
f.disposeInternal=function(){this.stop();YK.superClass_.disposeInternal.call(this)};
var Asa=function(a){a=a.win_;return a.requestAnimationFrame||a.webkitRequestAnimationFrame||a.mozRequestAnimationFrame||a.oRequestAnimationFrame||a.msRequestAnimationFrame||null},Bsa=function(a){a=a.win_;
return a.cancelAnimationFrame||a.cancelRequestAnimationFrame||a.webkitCancelRequestAnimationFrame||a.mozCancelRequestAnimationFrame||a.oCancelRequestAnimationFrame||a.msCancelRequestAnimationFrame||null};var Csa=/#(.)(.)(.)/,ZK=function(a){var b=a[0],c=a[1];a=a[2];b=Number(b);c=Number(c);a=Number(a);if(b!=(b&255)||c!=(c&255)||a!=(a&255))throw Error("\"("+b+","+c+","+a+"\") is not a valid RGB color");c=b<<16|c<<8|a;return 16>b?"#"+(16777216|c).toString(16).substr(1):"#"+c.toString(16)},Dsa=/^#(?:[0-9a-f]{3}){1,2}$/i;var $K=function(a,b,c){if(isNaN(a)||0>a||255<a||isNaN(b)||0>b||255<b||isNaN(c)||0>c||255<c||isNaN(1))throw Error("\"("+a+","+b+","+c+",1)\" is not a valid RGBA color");a=[a,b,c,1];b=a.slice(0);b[3]=Math.round(1E3*a[3])/1E3;return"rgba("+b.join(",")+")"};var aL=function(){lk.call(this)};
t(aL,lk);aL.prototype.restore=function(a){var b=this.restoreInternal();a||this.dispose();return b};var bL=function(a){lk.call(this);this.startCaretId_="goog_"+Bd++;this.endCaretId_="goog_"+Bd++;this.reversed_=a.isReversed();this.dom_=ah(a.getDocument());a.surroundWithNodes(this.dom_.createDom("SPAN",{id:this.startCaretId_}),this.dom_.createDom("SPAN",{id:this.endCaretId_}))};
t(bL,aL);bL.prototype.toAbstractRange=function(){var a=null,b=cL(this,!0),c=cL(this,!1);b&&c&&(a=dL(b,0,c,0));return a};
var cL=function(a,b){return a.dom_.getElement(b?a.startCaretId_:a.endCaretId_)},eL=function(a,b){Dh(cL(a,!0));
Dh(cL(a,!1));return b};
bL.prototype.setRestorationDocument=function(a){this.dom_.setDocument(a)};
bL.prototype.restoreInternal=function(){var a=null,b=cL(this,!this.reversed_),c=cL(this,this.reversed_);if(b&&c){a=b.parentNode;b=lb(a.childNodes,b);var d=c.parentNode;c=lb(d.childNodes,c);d==a&&(this.reversed_?b--:c--);a=dL(a,b,d,c);a=eL(this,a);a.select()}else eL(this);return a};
bL.prototype.disposeInternal=function(){eL(this);this.dom_=null};var fL=function(a,b,c,d,e){this.reversed=!!b;this.node=null;this.tagType=0;this.started_=!1;this.constrained=!c;a&&this.setPosition(a,d);this.depth=void 0!=e?e:this.tagType||0;this.reversed&&(this.depth*=-1)};
t(fL,wk);f=fL.prototype;f.setPosition=function(a,b,c){if(this.node=a)this.tagType=Ma(b)?b:1!=this.node.nodeType?0:this.reversed?-1:1;Ma(c)&&(this.depth=c)};
f.copyFrom=function(a){this.node=a.node;this.tagType=a.tagType;this.depth=a.depth;this.reversed=a.reversed;this.constrained=a.constrained};
f.clone=function(){return new fL(this.node,this.reversed,!this.constrained,this.tagType,this.depth)};
f.skipTag=function(){var a=this.reversed?-1:1;this.tagType==a&&(this.tagType=-1*a,this.depth+=this.tagType*(this.reversed?-1:1))};
f.next=function(){if(this.started_){if(!this.node||this.constrained&&0==this.depth)throw vk;var a=this.node;var b=this.reversed?-1:1;if(this.tagType==b){var c=this.reversed?a.lastChild:a.firstChild;c?this.setPosition(c):this.setPosition(a,-1*b)}else(c=this.reversed?a.previousSibling:a.nextSibling)?this.setPosition(c):this.setPosition(a.parentNode,-1*b);this.depth+=this.tagType*(this.reversed?-1:1)}else this.started_=!0;a=this.node;if(!this.node)throw vk;return a};
f.isStarted=function(){return this.started_};
f.isNonElement=function(){return 0==this.tagType};
f.equals=function(a){return a.node==this.node&&(!this.node||a.tagType==this.tagType)};
f.splice=function(a){var b=this.node,c=this.reversed?1:-1;this.tagType==c&&(this.tagType=-1*c,this.depth+=this.tagType*(this.reversed?-1:1));this.reversed=!this.reversed;fL.prototype.next.call(this);this.reversed=!this.reversed;c=Xa(arguments[0])?arguments[0]:arguments;for(var d=c.length-1;0<=d;d--)Bh(c[d],b);Dh(b)};var gL=function(){},Esa=function(a){if(a.getSelection)return a.getSelection();
a=a.document;var b=a.selection;if(b){try{var c=b.createRange();if(c.parentElement){if(c.parentElement().document!=a)return null}else if(!c.length||c.item(0).document!=a)return null}catch(d){return null}return b}return null};
gL.prototype.setBrowserRangeObject=function(){return!1};
var hL=function(a){for(var b=[],c=0,d=a.getTextRangeCount();c<d;c++)b.push(a.getTextRange(c));return b};
f=gL.prototype;f.getContainerElement=function(){var a=this.getContainer();return 1==a.nodeType?a:a.parentNode};
f.isReversed=function(){return!1};
f.getDocument=function(){return $g(Ne?this.getContainer():this.getStartNode())};
f.getWindow=function(){return ph(this.getDocument())};
f.replaceContentsWithNode=function(a){this.isCollapsed()||this.removeContents();this.insertNode(a,!0)};
f.saveUsingCarets=function(){return this.getStartNode()&&this.getEndNode()?new bL(this):null};
var iL=function(a,b){fL.call(this,a,b,!0)};
t(iL,fL);var jL=function(a,b,c,d,e){this.endNode_=this.startNode_=null;this.endOffset_=this.startOffset_=0;this.isReversed_=!!e;if(a){this.startNode_=a;this.startOffset_=b;this.endNode_=c;this.endOffset_=d;if(1==a.nodeType&&"BR"!=a.tagName)if(a=a.childNodes,b=a[b])this.startNode_=b,this.startOffset_=0;else{a.length&&(this.startNode_=kb(a));var g=!0}1==c.nodeType&&((this.endNode_=c.childNodes[d])?this.endOffset_=0:this.endNode_=c)}fL.call(this,this.isReversed_?this.endNode_:this.startNode_,this.isReversed_,
!0);if(g)try{this.next()}catch(h){if(h!=vk)throw h}};
t(jL,iL);f=jL.prototype;f.getStartTextOffset=function(){return 3!=this.node.nodeType?-1:this.node==this.startNode_?this.startOffset_:0};
f.getEndTextOffset=function(){return 3!=this.node.nodeType?-1:this.node==this.endNode_?this.endOffset_:this.node.nodeValue.length};
f.getStartNode=function(){return this.startNode_};
f.setStartNode=function(a){this.isStarted()||this.setPosition(a);this.startNode_=a;this.startOffset_=0};
f.getEndNode=function(){return this.endNode_};
f.setEndNode=function(a){this.endNode_=a;this.endOffset_=0};
f.isLast=function(){return this.isStarted()&&(this.node!=(this.isReversed_?this.startNode_:this.endNode_)?!1:this.isReversed_?this.startOffset_?-1!=this.tagType:1==this.tagType:!this.endOffset_||1!=this.tagType)};
f.next=function(){if(this.isLast())throw vk;return jL.superClass_.next.call(this)};
f.skipTag=function(){jL.superClass_.skipTag.apply(this);if(Kh(this.node,this.isReversed_?this.startNode_:this.endNode_))throw vk};
f.copyFrom=function(a){this.startNode_=a.startNode_;this.endNode_=a.endNode_;this.startOffset_=a.startOffset_;this.endOffset_=a.endOffset_;this.isReversed_=a.isReversed_;jL.superClass_.copyFrom.call(this,a)};
f.clone=function(){var a=new jL(this.startNode_,this.startOffset_,this.endNode_,this.endOffset_,this.isReversed_);a.copyFrom(this);return a};var kL=function(){};
kL.prototype.getStartPosition=function(){return Fsa(this,!0)};
kL.prototype.getEndPosition=function(){return Fsa(this,!1)};
var Fsa=function(a,b){a=a.range_.getClientRects();return a.length?(a=b?a[0]:kb(a),new Wg(b?a.left:a.right,b?a.top:a.bottom)):null};
kL.prototype.containsRange=function(a,b){b=b&&!a.isCollapsed();a=a.range_;try{return b?0<=this.compareBrowserRangeEndpoints(a,0,1)&&0>=this.compareBrowserRangeEndpoints(a,1,0):0<=this.compareBrowserRangeEndpoints(a,0,0)&&0>=this.compareBrowserRangeEndpoints(a,1,1)}catch(c){if(!Ne)throw c;return!1}};
kL.prototype.containsNode=function(a,b){return this.containsRange(lL(a),b)};
kL.prototype.getHtmlFragment=function(){var a=new qG;yk(this,function(b,c,d){3==b.nodeType?a.append(od(b.nodeValue.substring(d.getStartTextOffset(),d.getEndTextOffset()))):1==b.nodeType&&(-1==d.tagType?xh(b)&&a.append("</"+b.tagName+">"):(c=b.cloneNode(!1),c=Sh(c),Ne&&"LI"==b.tagName?a.append(c):(b=c.lastIndexOf("<"),a.append(b?c.substr(0,b):c))))},this);
return a.toString()};
kL.prototype.__iterator__=function(){return new jL(this.getStartNode(),this.getStartOffset(),this.getEndNode(),this.getEndOffset())};var mL=function(a){this.range_=a};
t(mL,kL);var oL=function(a){var b=$g(a).createRange();if(3==a.nodeType)b.setStart(a,0),b.setEnd(a,a.length);else if(nL(a)){for(var c,d=a;(c=d.firstChild)&&nL(c);)d=c;b.setStart(d,0);for(d=a;(c=d.lastChild)&&nL(c);)d=c;b.setEnd(d,1==d.nodeType?d.childNodes.length:d.length)}else c=a.parentNode,a=lb(c.childNodes,a),b.setStart(c,a),b.setEnd(c,a+1);return b},pL=function(a,b,c,d){var e=$g(a).createRange();
e.setStart(a,b);e.setEnd(c,d);return e};
f=mL.prototype;f.clone=function(){return new this.constructor(this.range_.cloneRange())};
f.getContainer=function(){return this.range_.commonAncestorContainer};
f.getStartNode=function(){return this.range_.startContainer};
f.getStartOffset=function(){return this.range_.startOffset};
f.getEndNode=function(){return this.range_.endContainer};
f.getEndOffset=function(){return this.range_.endOffset};
f.compareBrowserRangeEndpoints=function(a,b,c){return this.range_.compareBoundaryPoints(1==c?1==b?q.Range.START_TO_START:q.Range.START_TO_END:1==b?q.Range.END_TO_START:q.Range.END_TO_END,a)};
f.isCollapsed=function(){return this.range_.collapsed};
f.getText=function(){return this.range_.toString()};
f.getValidHtml=function(){var a=ah(this.range_.startContainer).createDom("DIV");a.appendChild(this.range_.cloneContents());a=a.innerHTML;if(ec(a,"<")||!this.isCollapsed()&&!pc(a,"<"))return a;var b=this.getContainer();b=1==b.nodeType?b:b.parentNode;return Sh(b.cloneNode(!1)).replace(">",">"+a)};
f.select=function(a){var b=ph($g(this.getStartNode()));this.selectInternal(b.getSelection(),a)};
f.selectInternal=function(a){a.removeAllRanges();a.addRange(this.range_)};
f.removeContents=function(){var a=this.range_;a.extractContents();if(a.startContainer.hasChildNodes()){var b=a.startContainer.childNodes[a.startOffset];if(b){var c=b.previousSibling;""==di(b)&&Dh(b);c&&""==di(c)&&Dh(c)}}if(Pe){b=this.getStartNode();c=this.getStartOffset();var d=this.getEndNode(),e=this.getEndOffset(),g=b.nextSibling;b==d&&b.parentNode&&3==b.nodeType&&g&&3==g.nodeType&&(b.nodeValue+=g.nodeValue,Dh(g),a.setStart(b,c),a.setEnd(d,e))}};
f.surroundContents=function(a){this.range_.surroundContents(a);return a};
f.insertNode=function(a,b){var c=this.range_.cloneRange();c.collapse(b);c.insertNode(a);c.detach();return a};
f.surroundWithNodes=function(a,b){var c=ph($g(this.getStartNode()));if(c=OL(c))var d=c.getStartNode(),e=c.getEndNode(),g=c.getStartOffset(),h=c.getEndOffset();var m=this.range_.cloneRange(),n=this.range_.cloneRange();m.collapse(!1);n.collapse(!0);m.insertNode(b);n.insertNode(a);m.detach();n.detach();if(c){if(3==d.nodeType)for(;g>d.length;){g-=d.length;do d=d.nextSibling;while(d==a||d==b)}if(3==e.nodeType)for(;h>e.length;){h-=e.length;do e=e.nextSibling;while(e==a||e==b)}dL(d,g,e,h).select()}};
f.collapse=function(a){this.range_.collapse(a)};var PL=function(a){this.range_=a};
t(PL,mL);PL.prototype.selectInternal=function(a,b){!b||this.isCollapsed()?PL.superClass_.selectInternal.call(this,a,b):(a.collapse(this.getEndNode(),this.getEndOffset()),a.extend(this.getStartNode(),this.getStartOffset()))};var QL=function(a,b){this.endNode_=this.startNode_=this.parentNode_=null;this.endOffset_=this.startOffset_=-1;this.range_=a;this.doc_=b};
t(QL,kL);var RL=function(a){var b=$g(a).body.createTextRange();if(1==a.nodeType)b.moveToElementText(a),nL(a)&&!a.childNodes.length&&b.collapse(!1);else{for(var c=0,d=a;d=d.previousSibling;){var e=d.nodeType;if(3==e)c+=d.length;else if(1==e){b.moveToElementText(d);break}}d||b.moveToElementText(a.parentNode);b.collapse(!d);c&&b.move("character",c);b.moveEnd("character",a.length)}return b};
QL.prototype.clone=function(){var a=new QL(this.range_.duplicate(),this.doc_);a.parentNode_=this.parentNode_;a.startNode_=this.startNode_;a.endNode_=this.endNode_;return a};
QL.prototype.getBrowserRange=function(){return this.range_};
QL.prototype.clearCachedValues_=function(){this.parentNode_=this.startNode_=this.endNode_=null;this.startOffset_=this.endOffset_=-1};
QL.prototype.getContainer=function(){if(!this.parentNode_){var a=this.range_.text,b=this.range_.duplicate(),c=a.replace(/ +$/,"");(c=a.length-c.length)&&b.moveEnd("character",-c);c=b.parentElement();b=b.htmlText.replace(/(\r\n|\r|\n)+/g," ").length;if(this.isCollapsed()&&0<b)return this.parentNode_=c;for(;b>c.outerHTML.replace(/(\r\n|\r|\n)+/g," ").length;)c=c.parentNode;for(;1==c.childNodes.length&&c.innerText==Gsa(c.firstChild)&&nL(c.firstChild);)c=c.firstChild;0==a.length&&(c=Hsa(this,c));this.parentNode_=
c}return this.parentNode_};
var Hsa=function(a,b){for(var c=b.childNodes,d=0,e=c.length;d<e;d++){var g=c[d];if(nL(g)){var h=RL(g),m=h.htmlText!=g.outerHTML;if(a.isCollapsed()&&m?0<=a.compareBrowserRangeEndpoints(h,1,1)&&0>=a.compareBrowserRangeEndpoints(h,1,0):a.range_.inRange(h))return Hsa(a,g)}}return b};
f=QL.prototype;f.getStartNode=function(){this.startNode_||(this.startNode_=SL(this,1),this.isCollapsed()&&(this.endNode_=this.startNode_));return this.startNode_};
f.getStartOffset=function(){0>this.startOffset_&&(this.startOffset_=Isa(this,1),this.isCollapsed()&&(this.endOffset_=this.startOffset_));return this.startOffset_};
f.getEndNode=function(){if(this.isCollapsed())return this.getStartNode();this.endNode_||(this.endNode_=SL(this,0));return this.endNode_};
f.getEndOffset=function(){if(this.isCollapsed())return this.getStartOffset();0>this.endOffset_&&(this.endOffset_=Isa(this,0),this.isCollapsed()&&(this.startOffset_=this.endOffset_));return this.endOffset_};
f.compareBrowserRangeEndpoints=function(a,b,c){return this.range_.compareEndPoints((1==b?"Start":"End")+"To"+(1==c?"Start":"End"),a)};
var SL=function(a,b,c){c=c||a.getContainer();if(!c||!c.firstChild)return c;for(var d=1==b,e=0,g=c.childNodes.length;e<g;e++){var h=d?e:g-e-1,m=c.childNodes[h];try{var n=lL(m)}catch(x){continue}var p=n.range_;if(a.isCollapsed()){if(!nL(m)){if(0==a.compareBrowserRangeEndpoints(p,1,1)){a.startOffset_=a.endOffset_=h;break}}else{if(n.containsRange(a))return SL(a,b,m)}}else{if(a.containsRange(n)){if(!nL(m)){d?a.startOffset_=h:a.endOffset_=h+1;break}return SL(a,b,m)}if(0>a.compareBrowserRangeEndpoints(p,1,
0)&&0<a.compareBrowserRangeEndpoints(p,0,1))return SL(a,b,m)}}return c},Isa=function(a,b){var c=1==b,d=c?a.getStartNode():a.getEndNode();
if(1==d.nodeType){d=d.childNodes;for(var e=d.length,g=c?1:-1,h=c?0:e-1;0<=h&&h<e;h+=g){var m=d[h];if(!nL(m)&&0==a.range_.compareEndPoints((1==b?"Start":"End")+"To"+(1==b?"Start":"End"),lL(m).range_))return c?h:h+1}return-1==h?0:h}a=a.range_.duplicate();b=RL(d);a.setEndPoint(c?"EndToEnd":"StartToStart",b);a=a.text.length;return c?d.length-a:a},Gsa=function(a){return 3==a.nodeType?a.nodeValue:a.innerText};
f=QL.prototype;f.isRangeInDocument=function(){var a=this.doc_.body.createTextRange();a.moveToElementText(this.doc_.body);return this.containsRange(new QL(a,this.doc_),!0)};
f.isCollapsed=function(){return 0==this.range_.compareEndPoints("StartToEnd",this.range_)};
f.getText=function(){return this.range_.text};
f.getValidHtml=function(){return this.range_.htmlText};
f.select=function(){this.range_.select()};
f.removeContents=function(){if(!this.isCollapsed()&&this.range_.htmlText){var a=this.getStartNode(),b=this.getEndNode(),c=this.range_.text,d=this.range_.duplicate();d.moveStart("character",1);d.moveStart("character",-1);d.text==c&&(this.range_=d);this.range_.text="";this.clearCachedValues_();c=this.getStartNode();d=this.getStartOffset();try{var e=a.nextSibling;a==b&&a.parentNode&&3==a.nodeType&&e&&3==e.nodeType&&(a.nodeValue+=e.nodeValue,Dh(e),this.range_=RL(c),this.range_.move("character",d),this.clearCachedValues_())}catch(g){}}};
var Jsa=function(a,b,c){c=c||ah(a.parentElement());var d,e=d=b.id;d||(d=b.id="goog_"+Bd++);a.pasteHTML(b.outerHTML);(b=c.getElement(d))&&(e||b.removeAttribute("id"));return b};
QL.prototype.surroundContents=function(a){Dh(a);var b=cd(this.range_.htmlText);dd(a,b);(a=Jsa(this.range_,a))&&this.range_.moveToElementText(a);this.clearCachedValues_();return a};
var TL=function(a,b,c){var d=d||ah(a.parentElement());if(1!=b.nodeType){var e=!0;b=d.createDom("DIV",null,b)}a.collapse(c);b=Jsa(a,b,d);if(e){a=b.firstChild;if((d=b.parentNode)&&11!=d.nodeType)if(b.removeNode)b.removeNode(!1);else{for(;c=b.firstChild;)d.insertBefore(c,b);Dh(b)}b=a}return b};
QL.prototype.insertNode=function(a,b){a=TL(this.range_.duplicate(),a,b);this.clearCachedValues_();return a};
QL.prototype.surroundWithNodes=function(a,b){var c=this.range_.duplicate(),d=this.range_.duplicate();TL(c,a,!0);TL(d,b,!1);this.clearCachedValues_()};
QL.prototype.collapse=function(a){this.range_.collapse(a);a?(this.endNode_=this.startNode_,this.endOffset_=this.startOffset_):(this.startNode_=this.endNode_,this.startOffset_=this.endOffset_)};var UL=function(a){this.range_=a};
t(UL,mL);UL.prototype.selectInternal=function(a){a.collapse(this.getStartNode(),this.getStartOffset());this.getEndNode()==this.getStartNode()&&this.getEndOffset()==this.getStartOffset()||a.extend(this.getEndNode(),this.getEndOffset());0==a.rangeCount&&a.addRange(this.range_)};var VL=function(a){this.range_=a};
t(VL,mL);VL.prototype.compareBrowserRangeEndpoints=function(a,b,c){return $e("528")?VL.superClass_.compareBrowserRangeEndpoints.call(this,a,b,c):this.range_.compareBoundaryPoints(1==c?1==b?q.Range.START_TO_START:q.Range.END_TO_START:1==b?q.Range.START_TO_END:q.Range.END_TO_END,a)};
VL.prototype.selectInternal=function(a,b){b?a.setBaseAndExtent(this.getEndNode(),this.getEndOffset(),this.getStartNode(),this.getStartOffset()):a.setBaseAndExtent(this.getStartNode(),this.getStartOffset(),this.getEndNode(),this.getEndOffset())};var WL=function(a){return Nba?new QL(a,$g(a.parentElement())):Re?new VL(a):Qe?new PL(a):Me?new UL(a):new mL(a)},lL=function(a){if(Ne&&!af(9)){var b=new QL(RL(a),$g(a));
if(nL(a)){for(var c,d=a;(c=d.firstChild)&&nL(c);)d=c;b.startNode_=d;b.startOffset_=0;for(d=a;(c=d.lastChild)&&nL(c);)d=c;b.endNode_=d;b.endOffset_=1==d.nodeType?d.childNodes.length:d.length;b.parentNode_=a}else b.startNode_=b.endNode_=b.parentNode_=a.parentNode,b.startOffset_=lb(b.parentNode_.childNodes,a),b.endOffset_=b.startOffset_+1;a=b}else a=Re?new VL(oL(a)):Qe?new PL(oL(a)):Me?new UL(oL(a)):new mL(oL(a));return a},nL=function(a){return xh(a)||3==a.nodeType};var XL=function(){this.endOffset_=this.endNode_=this.startOffset_=this.startNode_=this.browserRangeWrapper_=null;this.isReversed_=!1};
t(XL,gL);var YL=function(a,b){var c=new XL;c.browserRangeWrapper_=a;c.isReversed_=!!b;return c},ZL=function(a){return YL(lL(a),void 0)},dL=function(a,b,c,d){var e=new XL;
e.isReversed_=$L(a,b,c,d);if(Ih(a)&&!xh(a)){var g=a.parentNode;b=lb(g.childNodes,a);a=g}Ih(c)&&!xh(c)&&(g=c.parentNode,d=lb(g.childNodes,c),c=g);e.isReversed_?(e.startNode_=c,e.startOffset_=d,e.endNode_=a,e.endOffset_=b):(e.startNode_=a,e.startOffset_=b,e.endNode_=c,e.endOffset_=d);return e};
f=XL.prototype;f.clone=function(){var a=new XL;a.browserRangeWrapper_=this.browserRangeWrapper_&&this.browserRangeWrapper_.clone();a.startNode_=this.startNode_;a.startOffset_=this.startOffset_;a.endNode_=this.endNode_;a.endOffset_=this.endOffset_;a.isReversed_=this.isReversed_;return a};
f.getType=function(){return"text"};
f.getBrowserRangeObject=function(){return aM(this).range_};
f.setBrowserRangeObject=function(a){if(a&&a.addElement)return!1;this.browserRangeWrapper_=WL(a);this.clearCachedValues_();return!0};
f.clearCachedValues_=function(){this.startNode_=this.startOffset_=this.endNode_=this.endOffset_=null};
f.getTextRangeCount=function(){return 1};
f.getTextRange=function(){return this};
var aM=function(a){var b;if(!(b=a.browserRangeWrapper_)){b=a.getStartNode();var c=a.getStartOffset(),d=a.getEndNode(),e=a.getEndOffset();if(Ne&&!af(9)){var g=b,h=c,m=d,n=e,p=!1;1==g.nodeType&&(h=g.childNodes[h],p=!h,g=h||g.lastChild||g,h=0);var x=RL(g);h&&x.move("character",h);g==m&&h==n?x.collapse(!0):(p&&x.collapse(!1),p=!1,1==m.nodeType&&(m=(h=m.childNodes[n])||m.lastChild||m,n=0,p=!h),g=RL(m),g.collapse(!p),n&&g.moveEnd("character",n),x.setEndPoint("EndToEnd",g));n=new QL(x,$g(b));n.startNode_=
b;n.startOffset_=c;n.endNode_=d;n.endOffset_=e;b=n}else b=Re?new VL(pL(b,c,d,e)):Qe?new PL(pL(b,c,d,e)):Me?new UL(pL(b,c,d,e)):new mL(pL(b,c,d,e));b=a.browserRangeWrapper_=b}return b};
f=XL.prototype;f.getContainer=function(){return aM(this).getContainer()};
f.getStartNode=function(){return this.startNode_||(this.startNode_=aM(this).getStartNode())};
f.getStartOffset=function(){return null!=this.startOffset_?this.startOffset_:this.startOffset_=aM(this).getStartOffset()};
f.getStartPosition=function(){return aM(this).getStartPosition()};
f.getEndNode=function(){return this.endNode_||(this.endNode_=aM(this).getEndNode())};
f.getEndOffset=function(){return null!=this.endOffset_?this.endOffset_:this.endOffset_=aM(this).getEndOffset()};
f.getEndPosition=function(){return aM(this).getEndPosition()};
f.moveToNodes=function(a,b,c,d,e){this.startNode_=a;this.startOffset_=b;this.endNode_=c;this.endOffset_=d;this.isReversed_=e;this.browserRangeWrapper_=null};
f.isReversed=function(){return this.isReversed_};
f.containsRange=function(a,b){var c=a.getType();return"text"==c?aM(this).containsRange(aM(a),b):"control"==c?(a=a.getElements(),(b?rb:sb)(a,function(d){return this.containsNode(d,b)},this)):!1};
f.containsNode=function(a,b){return this.containsRange(ZL(a),b)};
var Ksa=function(a){if(Ne&&!af(9)){var b=!1;try{b=a.parentNode}catch(c){}return!!b}return Kh(a.ownerDocument.body,a)};
f=XL.prototype;f.isRangeInDocument=function(){return(!this.startNode_||Ksa(this.startNode_))&&(!this.endNode_||Ksa(this.endNode_))&&(!(Ne&&!af(9))||aM(this).isRangeInDocument())};
f.isCollapsed=function(){return aM(this).isCollapsed()};
f.getText=function(){return aM(this).getText()};
f.getHtmlFragment=function(){return aM(this).getHtmlFragment()};
f.getValidHtml=function(){return aM(this).getValidHtml()};
f.getPastableHtml=function(){var a=this.getValidHtml();if(a.match(/^\s*<td\b/i))a="<table><tbody><tr>"+a+"</tr></tbody></table>";else if(a.match(/^\s*<tr\b/i))a="<table><tbody>"+a+"</tbody></table>";else if(a.match(/^\s*<tbody\b/i))a="<table>"+a+"</table>";else if(a.match(/^\s*<li\b/i)){for(var b=this.getContainer(),c="UL";b;){if("OL"==b.tagName){c="OL";break}else if("UL"==b.tagName)break;b=b.parentNode}a=yd("<",c,">",a,"</",c,">")}return a};
f.__iterator__=function(){return new jL(this.getStartNode(),this.getStartOffset(),this.getEndNode(),this.getEndOffset())};
f.select=function(){aM(this).select(this.isReversed_)};
f.removeContents=function(){aM(this).removeContents();this.clearCachedValues_()};
f.surroundContents=function(a){a=aM(this).surroundContents(a);this.clearCachedValues_();return a};
f.insertNode=function(a,b){a=aM(this).insertNode(a,b);this.clearCachedValues_();return a};
f.surroundWithNodes=function(a,b){aM(this).surroundWithNodes(a,b);this.clearCachedValues_()};
f.saveUsingDom=function(){return new bM(this)};
f.collapse=function(a){a=this.isReversed()?!a:a;this.browserRangeWrapper_&&this.browserRangeWrapper_.collapse(a);a?(this.endNode_=this.startNode_,this.endOffset_=this.startOffset_):(this.startNode_=this.endNode_,this.startOffset_=this.endOffset_);this.isReversed_=!1};
var bM=function(a){lk.call(this);this.anchorNode_=a.isReversed()?a.getEndNode():a.getStartNode();this.anchorOffset_=a.isReversed()?a.getEndOffset():a.getStartOffset();this.focusNode_=a.isReversed()?a.getStartNode():a.getEndNode();this.focusOffset_=a.isReversed()?a.getStartOffset():a.getEndOffset()};
t(bM,aL);bM.prototype.restoreInternal=function(){return dL(this.anchorNode_,this.anchorOffset_,this.focusNode_,this.focusOffset_)};
bM.prototype.disposeInternal=function(){bM.superClass_.disposeInternal.call(this);this.focusNode_=this.anchorNode_=null};var cM=function(){};
t(cM,gL);cM.prototype.containsRange=function(a,b){var c=hL(this);a=hL(a);return(b?rb:sb)(a,function(d){return rb(c,function(e){return e.containsRange(d,b)})})};
cM.prototype.containsNode=function(a,b){return this.containsRange(ZL(a),b)};
cM.prototype.insertNode=function(a,b){b?Ah(a,this.getStartNode()):Bh(a,this.getEndNode());return a};
cM.prototype.surroundWithNodes=function(a,b){this.insertNode(a,!0);this.insertNode(b,!1)};var dM=function(){this.sortedElements_=this.elements_=this.range_=null};
t(dM,cM);var eM=function(a){var b=new dM;b.range_=a;return b},Lsa=function(a){for(var b=$g(arguments[0]).body.createControlRange(),c=0,d=arguments.length;c<d;c++)b.addElement(arguments[c]);
return eM(b)};
f=dM.prototype;f.clearCachedValues_=function(){this.sortedElements_=this.elements_=null};
f.clone=function(){return Lsa.apply(this,this.getElements())};
f.getType=function(){return"control"};
f.getBrowserRangeObject=function(){return this.range_||document.body.createControlRange()};
f.setBrowserRangeObject=function(a){if(!a||!a.addElement)return!1;this.range_=a;return!0};
f.getTextRangeCount=function(){return this.range_?this.range_.length:0};
f.getTextRange=function(a){return ZL(this.range_.item(a))};
f.getContainer=function(){return Oh.apply(null,this.getElements())};
f.getStartNode=function(){return fM(this)[0]};
f.getStartOffset=function(){return 0};
f.getEndNode=function(){var a=fM(this),b=kb(a);return ub(a,function(c){return Kh(c,b)})};
f.getEndOffset=function(){return this.getEndNode().childNodes.length};
f.getElements=function(){if(!this.elements_&&(this.elements_=[],this.range_))for(var a=0;a<this.range_.length;a++)this.elements_.push(this.range_.item(a));return this.elements_};
var fM=function(a){a.sortedElements_||(a.sortedElements_=a.getElements().concat(),a.sortedElements_.sort(function(b,c){return b.sourceIndex-c.sourceIndex}));
return a.sortedElements_};
f=dM.prototype;f.isRangeInDocument=function(){var a=!1;try{a=sb(this.getElements(),function(b){return Ne?!!b.parentNode:Kh(b.ownerDocument.body,b)})}catch(b){}return a};
f.isCollapsed=function(){return!this.range_||!this.range_.length};
f.getText=function(){return""};
f.getHtmlFragment=function(){return pb(fM(this),Sh).join("")};
f.getValidHtml=function(){return this.getHtmlFragment()};
f.getPastableHtml=dM.prototype.getValidHtml;f.__iterator__=function(){return new gM(this)};
f.select=function(){this.range_&&this.range_.select()};
f.removeContents=function(){if(this.range_){for(var a=[],b=0,c=this.range_.length;b<c;b++)a.push(this.range_.item(b));mb(a,Dh);this.collapse(!1)}};
f.replaceContentsWithNode=function(a){this.insertNode(a,!0);this.isCollapsed()||this.removeContents()};
f.saveUsingDom=function(){return new hM(this)};
f.collapse=function(){this.range_=null;this.clearCachedValues_()};
var hM=function(a){this.elements_=a.getElements()};
t(hM,aL);hM.prototype.restoreInternal=function(){for(var a=(this.elements_.length?$g(this.elements_[0]):document).body.createControlRange(),b=0,c=this.elements_.length;b<c;b++)a.addElement(this.elements_[b]);return eM(a)};
hM.prototype.disposeInternal=function(){hM.superClass_.disposeInternal.call(this);delete this.elements_};
var gM=function(a){this.elements_=this.endNode_=this.startNode_=null;a&&(this.elements_=fM(a),this.startNode_=this.elements_.shift(),this.endNode_=kb(this.elements_)||this.startNode_);fL.call(this,this.startNode_,!1,!0)};
t(gM,iL);f=gM.prototype;f.getStartTextOffset=function(){return 0};
f.getEndTextOffset=function(){return 0};
f.getStartNode=function(){return this.startNode_};
f.getEndNode=function(){return this.endNode_};
f.isLast=function(){return!this.depth&&!this.elements_.length};
f.next=function(){if(this.isLast())throw vk;if(!this.depth){var a=this.elements_.shift();this.setPosition(a,1,1);return a}return gM.superClass_.next.call(this)};
f.copyFrom=function(a){this.elements_=a.elements_;this.startNode_=a.startNode_;this.endNode_=a.endNode_;gM.superClass_.copyFrom.call(this,a)};
f.clone=function(){var a=new gM(null);a.copyFrom(this);return a};var iM=function(){this.logger_=null;this.browserRanges_=[];this.ranges_=[];this.container_=this.sortedRanges_=null};
t(iM,cM);var Msa=function(a){var b=new iM;b.ranges_=a;b.browserRanges_=pb(a,function(c){return c.getBrowserRangeObject()});
return b};
f=iM.prototype;f.clearCachedValues_=function(){this.ranges_=[];this.container_=this.sortedRanges_=null};
f.clone=function(){var a=new iM;a.browserRanges_=Cb(this.browserRanges_);return a};
f.getType=function(){return"mutli"};
f.getBrowserRangeObject=function(){return this.browserRanges_[0]};
f.setBrowserRangeObject=function(){return!1};
f.getTextRangeCount=function(){return this.browserRanges_.length};
f.getTextRange=function(a){this.ranges_[a]||(this.ranges_[a]=YL(WL(this.browserRanges_[a]),void 0));return this.ranges_[a]};
f.getContainer=function(){if(!this.container_){for(var a=[],b=0,c=this.getTextRangeCount();b<c;b++)a.push(this.getTextRange(b).getContainer());this.container_=Oh.apply(null,a)}return this.container_};
var jM=function(a){a.sortedRanges_||(a.sortedRanges_=hL(a),a.sortedRanges_.sort(function(b,c){var d=b.getStartNode();b=b.getStartOffset();var e=c.getStartNode();c=c.getStartOffset();return d==e&&b==c?0:$L(d,b,e,c)?1:-1}));
return a.sortedRanges_};
f=iM.prototype;f.getStartNode=function(){return jM(this)[0].getStartNode()};
f.getStartOffset=function(){return jM(this)[0].getStartOffset()};
f.getEndNode=function(){return kb(jM(this)).getEndNode()};
f.getEndOffset=function(){return kb(jM(this)).getEndOffset()};
f.isRangeInDocument=function(){return sb(hL(this),function(a){return a.isRangeInDocument()})};
f.isCollapsed=function(){return 0==this.browserRanges_.length||1==this.browserRanges_.length&&this.getTextRange(0).isCollapsed()};
f.getText=function(){return pb(hL(this),function(a){return a.getText()}).join("")};
f.getHtmlFragment=function(){return this.getValidHtml()};
f.getValidHtml=function(){return pb(hL(this),function(a){return a.getValidHtml()}).join("")};
f.getPastableHtml=function(){return this.getValidHtml()};
f.__iterator__=function(){return new kM(this)};
f.select=function(){var a=Esa(this.getWindow());a.removeAllRanges();for(var b=0,c=this.getTextRangeCount();b<c;b++)a.addRange(this.getTextRange(b).getBrowserRangeObject())};
f.removeContents=function(){mb(hL(this),function(a){a.removeContents()})};
f.saveUsingDom=function(){return new lM(this)};
f.collapse=function(a){if(!this.isCollapsed()){var b=a?this.getTextRange(0):this.getTextRange(this.getTextRangeCount()-1);this.clearCachedValues_();b.collapse(a);this.ranges_=[b];this.sortedRanges_=[b];this.browserRanges_=[b.getBrowserRangeObject()]}};
var lM=function(a){this.savedRanges_=pb(hL(a),function(b){return b.saveUsingDom()})};
t(lM,aL);lM.prototype.restoreInternal=function(){var a=pb(this.savedRanges_,function(b){return b.restore()});
return Msa(a)};
lM.prototype.disposeInternal=function(){lM.superClass_.disposeInternal.call(this);mb(this.savedRanges_,function(a){a.dispose()});
delete this.savedRanges_};
var kM=function(a){this.iterators_=null;this.currentIdx_=0;a&&(this.iterators_=pb(jM(a),function(b){return xk(b)}));
iL.call(this,a?this.getStartNode():null,!1)};
t(kM,iL);f=kM.prototype;f.getStartTextOffset=function(){return this.iterators_[this.currentIdx_].getStartTextOffset()};
f.getEndTextOffset=function(){return this.iterators_[this.currentIdx_].getEndTextOffset()};
f.getStartNode=function(){return this.iterators_[0].getStartNode()};
f.getEndNode=function(){return kb(this.iterators_).getEndNode()};
f.isLast=function(){return this.iterators_[this.currentIdx_].isLast()};
f.next=function(){try{var a=this.iterators_[this.currentIdx_],b=a.next();this.setPosition(a.node,a.tagType,a.depth);return b}catch(c){if(c!==vk||this.iterators_.length-1==this.currentIdx_)throw c;this.currentIdx_++;return this.next()}};
f.copyFrom=function(a){this.iterators_=Cb(a.iterators_);kM.superClass_.copyFrom.call(this,a)};
f.clone=function(){var a=new kM(null);a.copyFrom(this);return a};var OL=function(a){return(a=Esa(a||window))&&Nsa(a)},Nsa=function(a){var b=!1;
if(a.createRange)try{var c=a.createRange()}catch(e){return null}else if(a.rangeCount){if(1<a.rangeCount){b=new iM;c=0;for(var d=a.rangeCount;c<d;c++)b.browserRanges_.push(a.getRangeAt(c));return b}c=a.getRangeAt(0);b=$L(a.anchorNode,a.anchorOffset,a.focusNode,a.focusOffset)}else return null;return(a=c)&&a.addElement?eM(a):YL(WL(a),b)},mM=function(a,b){return dL(a,b,a,b)},nM=function(a,b,c,d){return dL(a,b,c,d)},$L=function(a,b,c,d){if(a==c)return d<b;
var e;if(1==a.nodeType&&b)if(e=a.childNodes[b])a=e,b=0;else if(Kh(a,c))return!0;if(1==c.nodeType&&d)if(e=c.childNodes[d])c=e,d=0;else if(Kh(c,a))return!1;return 0<(Nh(a,c)||b-d)};var oM=function(){Wv.call(this);this.hysteresisDistance_=0;this.dragLists_=[];this.dragItems_=[];this.dragItemForHandle_={};this.eventHandler_=new Sv(this);this.isCurrDragItemAlwaysDisplayed_=this.isInitialized_=!1;this.updateWhileDragging_=!0};
t(oM,Wv);var Osa=new uv("a"),Psa=new uv("beforedragstart"),pM=new uv("dragstart"),Qsa=new uv("beforedragmove"),Rsa=new uv("dragmove"),Ssa=new uv("beforedragend"),qM=new uv("dragend"),Tsa=new uv("b");f=oM.prototype;f.setIsCurrDragItemAlwaysDisplayed=function(){this.isCurrDragItemAlwaysDisplayed_=!0};
f.setNoUpdateWhileDragging=function(){this.updateWhileDragging_=!1};
f.setHysteresis=function(a){this.hysteresisDistance_=a};
f.getHysteresis=function(){return this.hysteresisDistance_};
f.isDragging=function(){return!!this.dragger_};
f.setFunctionToGetHandleForDragItem=function(a){this.getHandleForDragItem_=a};
f.setDragItemHoverClass=function(a){this.dragItemHoverClasses_=Eb(arguments,0)};
f.setDragItemHandleHoverClass=function(a){this.dragItemHandleHoverClasses_=Eb(arguments,0)};
f.setCurrDragItemClass=function(a){this.currDragItemClasses_=Eb(arguments,0)};
f.init=function(){if(!this.isInitialized_){for(var a=0,b=this.dragLists_.length;a<b;a++)for(var c=Eh(this.dragLists_[a]),d=0,e=c.length;d<e;++d)Usa(this,c[d]);this.isInitialized_=!0}};
f.addItemToDragList=function(a,b,c){Ia(c)?Ch(a,b,c):a.appendChild(b);Usa(this,b)};
f.disposeInternal=function(){this.eventHandler_.dispose();for(var a=0,b=this.dragLists_.length;a<b;a++){var c=this.dragLists_[a];c.dlgGrowthDirection_=void 0;c.dlgDragHoverClass_=void 0}this.dragLists_.length=0;this.dragItems_.length=0;this.dragItemForHandle_=null;rM(this);oM.superClass_.disposeInternal.call(this)};
var sM=function(a,b){for(var c=0,d=a.dragLists_.length;c<d;c++){var e=a.dragLists_[c];e.dlgBounds_=pj(e)}c=0;for(d=a.dragItems_.length;c<d;c++)e=a.dragItems_[c],e!=b&&(e.dlgBounds_=pj(e))},Usa=function(a,b){var c=a.getHandleForDragItem_(b),d=bb(c);
a.dragItemForHandle_[d]=b;a.dragItemHoverClasses_&&(a.eventHandler_.listen(b,"mouseover",a.handleDragItemMouseover_),a.eventHandler_.listen(b,"mouseout",a.handleDragItemMouseout_));a.dragItemHandleHoverClasses_&&(a.eventHandler_.listen(c,"mouseover",a.handleDragItemHandleMouseover_),a.eventHandler_.listen(c,"mouseout",a.handleDragItemHandleMouseout_));a.dragItems_.push(b);a.eventHandler_.listen(c,["mousedown","touchstart"],a.handlePotentialDragStart_)};
f=oM.prototype;
f.handlePotentialDragStart_=function(a){var b=bb(a.currentTarget);b=this.dragItemForHandle_[b];if(2!=b.parentElement.dlgDragPermission){this.currDragItem_=b;a:{b=this.currDragItem_;for(var c=b.cloneNode(!0),d=ch("TEXTAREA",b),e=ch("TEXTAREA",c),g=0;g<d.length;g++)e[g].value=d[g].value;switch(b.tagName){case"TR":b=rh("TABLE",null,rh("TBODY",null,c));break a;case"TD":case"TH":b=rh("TABLE",null,rh("TBODY",null,rh("TR",null,c)));break a;case"TEXTAREA":c.value=b.value;default:b=c;}}this.draggerEl_=b;
this.draggerElClasses_&&sk(this.draggerEl_,this.draggerElClasses_||[]);this.draggerEl_.style.margin="0";this.draggerEl_.style.position="absolute";this.draggerEl_.style.visibility="hidden";$g(this.currDragItem_).body.appendChild(this.draggerEl_);c=hj(this.currDragItem_);b=this.draggerEl_;d=hj(b);if(c instanceof Wg){var h=c.y;c=c.x}fj(b,b.offsetLeft+(c-d.x),b.offsetTop+(Number(h)-d.y));this.dragger_=new mK(this.draggerEl_);this.dragger_.setHysteresis(this.hysteresisDistance_);Hv(this.dragger_,"start",
this.handleDragStart_,!1,this);Hv(this.dragger_,"end",this.handleDragEnd_,!1,this);Hv(this.dragger_,"earlycancel",this.cleanup_,!1,this);this.dispatchEvent(new tM(Osa,this,a,this.currDragItem_,this.draggerEl_,this.dragger_));this.dragger_.startDrag(a)}};
f.handleDragStart_=function(a){if(this.dispatchEvent(new tM(Psa,this,a.browserEvent,this.currDragItem_,null,null))){this.origList_=this.currDragItem_.parentNode;this.currHoverItem_=this.origNextItem_=Hh(this.currDragItem_);this.currHoverList_=this.origList_;this.currDragItemClasses_?sk(this.currDragItem_,this.currDragItemClasses_||[]):this.currDragItem_.style.visibility="hidden";var b=oj(this.draggerEl_);this.draggerEl_.halfWidth=b.width/2;this.draggerEl_.halfHeight=b.height/2;this.draggerEl_.style.visibility=
"";this.updateWhileDragging_&&(this.currDragItem_.style.display="none");sM(this,this.currDragItem_);this.currDragItem_.style.display="";Hv(this.dragger_,"drag",this.handleDragMove_,!1,this);this.dispatchEvent(new tM(pM,this,a.browserEvent,this.currDragItem_,this.draggerEl_,this.dragger_))}else a.preventDefault(),this.cleanup_()};
f.handleDragMove_=function(a){var b=hj(this.draggerEl_);b=new Wg(b.x+this.draggerEl_.halfWidth,b.y+this.draggerEl_.halfHeight);a:{var c=null;if("none"!=this.currDragItem_.style.display){c=this.currDragItem_.parentNode;var d=pj(c);if(Vsa(b,d))break a}d=0;for(var e=this.dragLists_.length;d<e;d++){var g=this.dragLists_[d];if(g!=c&&Vsa(b,g.dlgBounds_)){c=g;break a}}c=null}if(c){if(null==c)throw Error("getHoverNextItem_ called with null hoverList.");d=0;e=!1;g=void 0;switch(c.dlgGrowthDirection_){case 0:d=
b.y;var h=Wsa;var m=Xsa;break;case 4:e=!0;case 2:d=b.x;h=Ysa;m=Xsa;break;case 5:e=!0;case 3:d=b.x,h=Zsa,m=$sa;}for(var n=null,p,x=Eh(c),y=0,B=x.length;y<B;y++){var G=x[y];if(G!=this.currDragItem_){var P=h(G.dlgBounds_);if(e){var S=ata(G,b);Ia(g)||(g=S);m(d,P)&&(void 0==p||S<g||S==g&&(m(P,p)||P==p))&&(n=G,p=P);S<g&&(g=S)}else m(d,P)&&(void 0==p||m(P,p))&&(n=G,p=P)}}h=null!==n&&ata(n,b)>g?null:n}else h=null;if(!this.dispatchEvent(new tM(Qsa,this,a,this.currDragItem_,this.draggerEl_,this.dragger_,b,c,
h)))return!1;if(c&&1!=c.dlgDragPermission)this.updateWhileDragging_?this.currDragItem_.parentNode==c&&Hh(this.currDragItem_)==h||c.insertBefore(this.currDragItem_,h):h&&(this.currHoverItem_=h),this.currDragItem_.style.display="",c.dlgDragHoverClass_&&rk(c,c.dlgDragHoverClass_);else for(this.isCurrDragItemAlwaysDisplayed_||(this.currDragItem_.style.display="none"),m=0,p=this.dragLists_.length;m<p;m++)d=this.dragLists_[m],d.dlgDragHoverClass_&&tk(d,d.dlgDragHoverClass_);c!=this.currHoverList_&&(this.currHoverList_=
c,sM(this,this.currDragItem_));this.dispatchEvent(new tM(Rsa,this,a,this.currDragItem_,this.draggerEl_,this.dragger_,b,c,h));return!1};
f.cleanup_=function(){rM(this);this.dragger_=this.draggerEl_=this.origNextItem_=this.origList_=this.currHoverList_=this.currDragItem_=null;for(var a=0,b=this.dragLists_.length;a<b;a++)this.dragLists_[a].dlgBounds_=null;a=0;for(b=this.dragItems_.length;a<b;a++)this.dragItems_[a].dlgBounds_=null};
f.handleDragEnd_=function(a){if(!this.dispatchEvent(new tM(Ssa,this,a,this.currDragItem_,this.draggerEl_,this.dragger_)))return!1;this.updateWhileDragging_||this.origList_.insertBefore(this.currDragItem_,this.currHoverItem_);rM(this);this.dispatchEvent(new tM(qM,this,a,this.currDragItem_,this.draggerEl_,this.dragger_));this.cleanup_();return!0};
var rM=function(a){nk(a.dragger_);var b=a.draggerEl_&&a.draggerEl_.parentElement;a.draggerEl_&&Dh(a.draggerEl_);a.currDragItem_&&"none"==a.currDragItem_.style.display&&(a.origList_.insertBefore(a.currDragItem_,a.origNextItem_),a.currDragItem_.style.display="");a.currDragItemClasses_&&a.currDragItem_?uk(a.currDragItem_,a.currDragItemClasses_||[]):a.currDragItem_&&(a.currDragItem_.style.visibility="");for(var c=0,d=a.dragLists_.length;c<d;c++){var e=a.dragLists_[c];e.dlgDragHoverClass_&&tk(e,e.dlgDragHoverClass_)}b&&
a.dispatchEvent(new tM(Tsa,a,null,a.currDragItem_,a.draggerEl_,a.dragger_))};
f=oM.prototype;f.getHandleForDragItem_=function(a){return a};
f.handleDragItemMouseover_=function(a){sk(a.currentTarget,this.dragItemHoverClasses_||[])};
f.handleDragItemMouseout_=function(a){uk(a.currentTarget,this.dragItemHoverClasses_||[])};
f.handleDragItemHandleMouseover_=function(a){sk(a.currentTarget,this.dragItemHandleHoverClasses_||[])};
f.handleDragItemHandleMouseout_=function(a){uk(a.currentTarget,this.dragItemHandleHoverClasses_||[])};
var Vsa=function(a,b){return a.x>b.left&&a.x<b.left+b.width&&a.y>b.top&&a.y<b.top+b.height},ata=function(a,b){a=a.dlgBounds_;
return Math.abs(b.y-(a.top+(a.height-1)/2))},Wsa=function(a){return a.top+a.height-1},Ysa=function(a){return a.left+a.width-1},Zsa=function(a){return a.left||0},Xsa=function(a,b){return a<b},$sa=function(a,b){return a>b},tM=function(a,b,c,d,e,g,h,m,n){vv.call(this,a);
this.dragListGroup=b;this.event=c;this.currDragItem=d;this.draggerEl=e;this.dragger=g;this.draggerElCenter=h;this.hoverList=m;this.hoverNextItem=n};
t(tM,vv);var uM=function(a,b,c){lk.call(this);this.constrainScroll_=!1;this.horizontalScrolling_=!0;this.containerNode_=a;this.scrollTimer_=new rw(50);this.eventHandler_=new Sv(this);this.scrollDelta_=new Wg;this.containerBounds_=pj(a);if("BODY"===a.tagName||"HTML"===a.tagName)a=kh(),this.containerBounds_.height=a.height,this.containerBounds_.width=a.width;this.margin_=b||0;if(b){if(b=this.containerBounds_.clone(),a=this.margin_){var d=Math.min(a,.25*b.height);b.top+=d;b.height-=2*d;a=Math.min(a,.25*b.width);
b.left+=a;b.width-=2*a}}else b=this.containerBounds_;this.scrollBounds_=b;c||this.eventHandler_.listen($g(this.containerNode_),"mousemove",this.onMouseMove);this.eventHandler_.listen(this.scrollTimer_,"tick",this.onTick_)};
t(uM,lk);uM.prototype.onTick_=function(){this.containerNode_.scrollTop+=this.scrollDelta_.y;this.containerNode_.scrollLeft+=this.scrollDelta_.x};
uM.prototype.onMouseMove=function(a){var b=this.horizontalScrolling_?bta(a.clientX,this.scrollBounds_.left,this.scrollBounds_.width):0,c=bta(a.clientY,this.scrollBounds_.top,this.scrollBounds_.height);this.scrollDelta_.x=b;this.scrollDelta_.y=c;!(b=!b&&!c)&&(b=this.constrainScroll_)&&(b=a.clientX,a=a.clientY,c=this.containerBounds_,b=!(c.left<=b&&c.left+c.width>=b&&c.top<=a&&c.top+c.height>=a));b?this.scrollTimer_.stop():this.scrollTimer_.enabled||this.scrollTimer_.start()};
var bta=function(a,b,c){var d=0;a<b?d=-8:a>b+c&&(d=8);return d};
uM.prototype.disposeInternal=function(){uM.superClass_.disposeInternal.call(this);this.eventHandler_.dispose();this.scrollTimer_.dispose()};var cta={COMPACT_DECIMAL_SHORT_PATTERN:{1E3:{other:"0K"},1E4:{other:"00K"},1E5:{other:"000K"},1E6:{other:"0M"},1E7:{other:"00M"},1E8:{other:"000M"},1E9:{other:"0B"},1E10:{other:"00B"},1E11:{other:"000B"},1E12:{other:"0T"},1E13:{other:"00T"},1E14:{other:"000T"}},COMPACT_DECIMAL_LONG_PATTERN:{1E3:{other:"0 thousand"},1E4:{other:"00 thousand"},1E5:{other:"000 thousand"},1E6:{other:"0 million"},1E7:{other:"00 million"},1E8:{other:"000 million"},1E9:{other:"0 billion"},1E10:{other:"00 billion"},1E11:{other:"000 billion"},
1E12:{other:"0 trillion"},1E13:{other:"00 trillion"},1E14:{other:"000 trillion"}}},vM=cta;vM=cta;var wM={AED:[2,"dh","\u062F.\u0625."],ALL:[0,"Lek","Lek"],AUD:[2,"$","AU$"],BDT:[2,"\u09F3","Tk"],BGN:[2,"lev","lev"],BRL:[2,"R$","R$"],CAD:[2,"$","C$"],CDF:[2,"FrCD","CDF"],CHF:[2,"CHF","CHF"],CLP:[0,"$","CL$"],CNY:[2,"\xA5","RMB\xA5"],COP:[32,"$","COL$"],CRC:[0,"\u20A1","CR\u20A1"],CZK:[50,"K\u010D","K\u010D"],DKK:[50,"kr.","kr."],DOP:[2,"RD$","RD$"],EGP:[2,"\xA3","LE"],ETB:[2,"Birr","Birr"],EUR:[2,"\u20AC","\u20AC"],GBP:[2,"\xA3","GB\xA3"],HKD:[2,"$","HK$"],HRK:[2,"kn","kn"],HUF:[34,
"Ft","Ft"],IDR:[0,"Rp","Rp"],ILS:[34,"\u20AA","IL\u20AA"],INR:[2,"\u20B9","Rs"],IRR:[0,"Rial","IRR"],ISK:[0,"kr","kr"],JMD:[2,"$","JA$"],JPY:[0,"\xA5","JP\xA5"],KRW:[0,"\u20A9","KR\u20A9"],LKR:[2,"Rs","SLRs"],LTL:[2,"Lt","Lt"],MNT:[0,"\u20AE","MN\u20AE"],MVR:[2,"Rf","MVR"],MXN:[2,"$","Mex$"],MYR:[2,"RM","RM"],NOK:[50,"kr","NOkr"],PAB:[2,"B/.","B/."],PEN:[2,"S/.","S/."],PHP:[2,"\u20B1","PHP"],PKR:[0,"Rs","PKRs."],PLN:[50,"z\u0142","z\u0142"],RON:[2,"RON","RON"],RSD:[0,"din","RSD"],RUB:[50,"\u20BD",
"RUB"],SAR:[2,"Rial","Rial"],SEK:[50,"kr","kr"],SGD:[2,"$","S$"],THB:[2,"\u0E3F","THB"],TRY:[2,"\u20BA","TRY"],TWD:[2,"NT$","NT$"],TZS:[0,"TSh","TSh"],UAH:[2,"\u0433\u0440\u043D.","UAH"],USD:[2,"$","US$"],UYU:[2,"$","$U"],VND:[48,"\u20AB","VN\u20AB"],YER:[0,"Rial","Rial"],ZAR:[2,"R","ZAR"]};var dta={DECIMAL_SEP:".",GROUP_SEP:",",PERCENT:"%",ZERO_DIGIT:"0",PLUS_SIGN:"+",MINUS_SIGN:"-",EXP_SYMBOL:"E",PERMILL:"\u2030",INFINITY:"\u221E",NAN:"NaN",DECIMAL_PATTERN:"#,##0.###",SCIENTIFIC_PATTERN:"#E0",PERCENT_PATTERN:"#,##0%",CURRENCY_PATTERN:"\xA4#,##0.00",DEF_CURRENCY_CODE:"USD"},eta=dta;eta=dta;var zM=function(){this.intlCurrencyCode_=null;this.currencyStyle_=0;this.overrideNumberFormatSymbols_=null;this.maximumIntegerDigits_=40;this.minimumIntegerDigits_=1;this.significantDigits_=0;this.maximumFractionDigits_=3;this.minExponentDigits_=this.minimumFractionDigits_=0;this.showTrailingZeros_=this.useSignForPositiveExponent_=!1;this.positiveSuffix_=this.positivePrefix_="";this.negativePrefix_=xM(this).MINUS_SIGN;this.negativeSuffix_="";this.multiplier_=1;this.negativePercentSignExpected_=!1;
this.groupingArray_=[];this.useExponentialNotation_=this.decimalSeparatorAlwaysShown_=!1;this.compactStyle_=0;this.baseFormattingNumber_=null;this.compactStyle_=1;var a=xM(this).DECIMAL_PATTERN;this.pattern_=a.replace(/ /g,"\xA0");var b=[0];this.positivePrefix_=yM(this,a,b);for(var c=b[0],d=-1,e=0,g=0,h=0,m=-1,n=a.length,p=!0;b[0]<n&&p;b[0]++)switch(a.charAt(b[0])){case"#":0<g?h++:e++;0<=m&&0>d&&m++;break;case"0":if(0<h)throw Error("Unexpected \"0\" in pattern \""+a+"\"");g++;0<=m&&0>d&&m++;break;
case",":0<m&&this.groupingArray_.push(m);m=0;break;case".":if(0<=d)throw Error("Multiple decimal separators in pattern \""+a+"\"");d=e+g+h;break;case"E":if(this.useExponentialNotation_)throw Error("Multiple exponential symbols in pattern \""+a+"\"");this.useExponentialNotation_=!0;this.minExponentDigits_=0;b[0]+1<n&&"+"==a.charAt(b[0]+1)&&(b[0]++,this.useSignForPositiveExponent_=!0);for(;b[0]+1<n&&"0"==a.charAt(b[0]+1);)b[0]++,this.minExponentDigits_++;if(1>e+g||1>this.minExponentDigits_)throw Error("Malformed exponential pattern \""+
a+"\"");p=!1;break;default:b[0]--,p=!1;}0==g&&0<e&&0<=d&&(g=d,0==g&&g++,h=e-g,e=g-1,g=1);if(0>d&&0<h||0<=d&&(d<e||d>e+g)||0==m)throw Error("Malformed pattern \""+a+"\"");h=e+g+h;this.maximumFractionDigits_=0<=d?h-d:0;0<=d&&(this.minimumFractionDigits_=e+g-d,0>this.minimumFractionDigits_&&(this.minimumFractionDigits_=0));this.minimumIntegerDigits_=(0<=d?d:h)-e;this.useExponentialNotation_&&(this.maximumIntegerDigits_=e+this.minimumIntegerDigits_,0==this.maximumFractionDigits_&&0==this.minimumIntegerDigits_&&(
this.minimumIntegerDigits_=1));this.groupingArray_.push(Math.max(0,m));this.decimalSeparatorAlwaysShown_=0==d||d==h;c=b[0]-c;this.positiveSuffix_=yM(this,a,b);b[0]<a.length&&";"==a.charAt(b[0])?(b[0]++,1!=this.multiplier_&&(this.negativePercentSignExpected_=!0),this.negativePrefix_=yM(this,a,b),b[0]+=c,this.negativeSuffix_=yM(this,a,b)):(this.negativePrefix_+=this.positivePrefix_,this.negativeSuffix_+=this.positiveSuffix_);this.minimumFractionDigits_=0;this.maximumFractionDigits_=2;if(0<this.minimumFractionDigits_)throw Error("Can't combine significant digits and minimum fraction digits");
this.significantDigits_=2},xM=function(a){return a.overrideNumberFormatSymbols_||eta};
f=zM.prototype;f.getMinimumFractionDigits=function(){return this.minimumFractionDigits_};
f.getMaximumFractionDigits=function(){return this.maximumFractionDigits_};
f.getSignificantDigits=function(){return this.significantDigits_};
f.setShowTrailingZeros=function(a){this.showTrailingZeros_=a;return this};
f.setBaseFormatting=function(a){this.baseFormattingNumber_=a;return this};
f.getBaseFormatting=function(){return this.baseFormattingNumber_};
f.parse=function(a,b){b=b||[0];if(0!=this.compactStyle_)throw Error("Parsing of compact numbers is unimplemented");a=a.replace(/ |\u202f/g,"\xA0");var c=a.indexOf(this.positivePrefix_,b[0])==b[0],d=a.indexOf(this.negativePrefix_,b[0])==b[0];c&&d&&(this.positivePrefix_.length>this.negativePrefix_.length?d=!1:this.positivePrefix_.length<this.negativePrefix_.length&&(c=!1));c?b[0]+=this.positivePrefix_.length:d&&(b[0]+=this.negativePrefix_.length);if(a.indexOf(xM(this).INFINITY,b[0])==b[0]){b[0]+=
xM(this).INFINITY.length;var e=Infinity}else{e=a;var g=!1,h=!1,m=!1,n=-1,p=1,x=xM(this).DECIMAL_SEP,y=xM(this).GROUP_SEP,B=xM(this).EXP_SYMBOL;if(0!=this.compactStyle_)throw Error("Parsing of compact style numbers is not implemented");y=y.replace(/\u202f/g,"\xA0");for(var G="";b[0]<e.length;b[0]++){var P=e.charAt(b[0]),S=fta(this,P);if(0<=S&&9>=S)G+=S,m=!0;else if(P==x.charAt(0)){if(g||h)break;G+=".";g=!0}else if(P==y.charAt(0)&&("\xA0"!=y.charAt(0)||b[0]+1<e.length&&0<=fta(this,e.charAt(b[0]+
1)))){if(g||h)break}else if(P==B.charAt(0)){if(h)break;G+="E";h=!0;n=b[0]}else if("+"==P||"-"==P){if(m&&n!=b[0]-1)break;G+=P}else if(1==this.multiplier_&&P==xM(this).PERCENT.charAt(0)){if(1!=p)break;p=100;if(m){b[0]++;break}}else if(1==this.multiplier_&&P==xM(this).PERMILL.charAt(0)){if(1!=p)break;p=1E3;if(m){b[0]++;break}}else break}1!=this.multiplier_&&(p=this.multiplier_);e=parseFloat(G)/p}if(c){if(a.indexOf(this.positiveSuffix_,b[0])!=b[0])return NaN;b[0]+=this.positiveSuffix_.length}else if(d){if(a.indexOf(this.negativeSuffix_,
b[0])!=b[0])return NaN;b[0]+=this.negativeSuffix_.length}return d?-e:e};
f.format=function(a){if(isNaN(a))return xM(this).NAN;var b=[];var c=null===this.baseFormattingNumber_?a:this.baseFormattingNumber_,d=a;if(0==this.compactStyle_)var e=AM;else c=Math.abs(c),d=Math.abs(d),e=gta(this,1>=c?0:BM(c)).divisorBase,d=CM(d,-e),DM(this,d),c=CM(c,-e),c=DM(this,c),e=gta(this,e+BM(c.intValue));a=CM(a,-e.divisorBase);b.push(e.prefix);c=0>a||0==a&&0>1/a;b.push(c?this.negativePrefix_:this.positivePrefix_);if(isFinite(a)){if(a=a*(c?-1:1)*this.multiplier_,this.useExponentialNotation_){if(0==
a)EM(this,a,this.minimumIntegerDigits_,b),hta(this,0,b);else{d=Math.floor(Math.log(a)/Math.log(10)+2e-15);a=CM(a,-d);var g=this.minimumIntegerDigits_;1<this.maximumIntegerDigits_&&this.maximumIntegerDigits_>this.minimumIntegerDigits_?(g=d%this.maximumIntegerDigits_,0>g&&(g=this.maximumIntegerDigits_+g),a=CM(a,g),d-=g,g=1):1>this.minimumIntegerDigits_?(d++,a=CM(a,-1)):(d-=this.minimumIntegerDigits_-1,a=CM(a,this.minimumIntegerDigits_-1));EM(this,a,g,b);hta(this,d,b)}}else EM(this,a,this.minimumIntegerDigits_,
b);}else b.push(xM(this).INFINITY);b.push(c?this.negativeSuffix_:this.positiveSuffix_);b.push(e.suffix);return b.join("")};
var DM=function(a,b){var c=CM(b,a.maximumFractionDigits_);0<a.significantDigits_&&(c=ita(c,a.significantDigits_,a.maximumFractionDigits_));c=Math.round(c);isFinite(c)?(b=Math.floor(CM(c,-a.maximumFractionDigits_)),a=Math.floor(c-CM(b,a.maximumFractionDigits_))):a=0;return{intValue:b,fracValue:a}},EM=function(a,b,c,d){if(a.minimumFractionDigits_>a.maximumFractionDigits_)throw Error("Min value must be less than max value");
d||(d=[]);b=DM(a,b);var e=b.intValue,g=b.fracValue,h=0==e?0:BM(e)+1,m=0<a.minimumFractionDigits_||0<g||a.showTrailingZeros_&&h<a.significantDigits_;b=a.minimumFractionDigits_;m&&(b=a.showTrailingZeros_&&0<a.significantDigits_?a.significantDigits_-h:a.minimumFractionDigits_);var n="";for(h=e;1E20<h;)n="0"+n,h=Math.round(CM(h,-1));n=h+n;var p=xM(a).DECIMAL_SEP;h=xM(a).ZERO_DIGIT.charCodeAt(0);var x=n.length,y=0;if(0<e||0<c){for(e=x;e<c;e++)d.push(String.fromCharCode(h));if(2<=a.groupingArray_.length)for(c=
1;c<a.groupingArray_.length;c++)y+=a.groupingArray_[c];c=x-y;if(0<c){e=a.groupingArray_;y=x=0;for(var B,G=xM(a).GROUP_SEP,P=n.length,S=0;S<P;S++)if(d.push(String.fromCharCode(h+1*Number(n.charAt(S)))),1<P-S)if(B=e[y],S<c){var ca=c-S;(1===B||0<B&&1===ca%B)&&d.push(G)}else y<e.length&&(S===c?y+=1:B===S-c-x+1&&(d.push(G),x+=B,y+=1))}else{c=n;n=a.groupingArray_;e=xM(a).GROUP_SEP;B=c.length;G=[];for(x=n.length-1;0<=x&&0<B;x--){y=n[x];for(P=0;P<y&&0<=B-P-1;P++)G.push(String.fromCharCode(h+1*Number(c.charAt(B-
P-1))));B-=y;0<B&&G.push(e)}d.push.apply(d,G.reverse())}}else m||d.push(String.fromCharCode(h));(a.decimalSeparatorAlwaysShown_||m)&&d.push(p);g=String(g);m=g.split("e+");2==m.length&&(g=String(ita(parseFloat(m[0]),a.significantDigits_,1)),g=g.replace(".",""),g+=vd("0",parseInt(m[1],10)-g.length+1));a.maximumFractionDigits_+1>g.length&&(g="1"+vd("0",a.maximumFractionDigits_-g.length)+g);for(a=g.length;"0"==g.charAt(a-1)&&a>b+1;)a--;for(e=1;e<a;e++)d.push(String.fromCharCode(h+1*Number(g.charAt(e))))},
hta=function(a,b,c){c.push(xM(a).EXP_SYMBOL);
0>b?(b=-b,c.push(xM(a).MINUS_SIGN)):a.useSignForPositiveExponent_&&c.push(xM(a).PLUS_SIGN);b=""+b;for(var d=xM(a).ZERO_DIGIT,e=b.length;e<a.minExponentDigits_;e++)c.push(d);c.push(b)},fta=function(a,b){b=b.charCodeAt(0);
if(48<=b&&58>b)return b-48;a=xM(a).ZERO_DIGIT.charCodeAt(0);return a<=b&&b<a+10?b-a:-1},yM=function(a,b,c){for(var d="",e=!1,g=b.length;c[0]<g;c[0]++){var h=b.charAt(c[0]);
if("'"==h)c[0]+1<g&&"'"==b.charAt(c[0]+1)?(c[0]++,d+="'"):e=!e;else if(e)d+=h;else switch(h){case"#":case"0":case",":case".":case";":return d;case"\xA4":if(c[0]+1<g&&"\xA4"==b.charAt(c[0]+1))c[0]++,d+=a.intlCurrencyCode_||xM(a).DEF_CURRENCY_CODE;else switch(a.currencyStyle_){case 0:h=a.intlCurrencyCode_||xM(a).DEF_CURRENCY_CODE;d+=h in wM?wM[h][1]:h;break;case 2:h=a.intlCurrencyCode_||xM(a).DEF_CURRENCY_CODE;var m=wM[h];d+=m?h==m[1]?h:h+" "+m[1]:h;break;case 1:h=a.intlCurrencyCode_||xM(a).DEF_CURRENCY_CODE,
d+=h in wM?wM[h][2]:h;}break;case"%":if(!a.negativePercentSignExpected_&&1!=a.multiplier_)throw Error("Too many percent/permill");if(a.negativePercentSignExpected_&&100!=a.multiplier_)throw Error("Inconsistent use of percent/permill characters");a.multiplier_=100;a.negativePercentSignExpected_=!1;d+=xM(a).PERCENT;break;case"\u2030":if(!a.negativePercentSignExpected_&&1!=a.multiplier_)throw Error("Too many percent/permill");if(a.negativePercentSignExpected_&&1E3!=a.multiplier_)throw Error("Inconsistent use of percent/permill characters");
a.multiplier_=1E3;a.negativePercentSignExpected_=!1;d+=xM(a).PERMILL;break;default:d+=h;}}return d},AM={prefix:"",
suffix:"",divisorBase:0},gta=function(a,b){a=1==a.compactStyle_?vM.COMPACT_DECIMAL_SHORT_PATTERN:vM.COMPACT_DECIMAL_LONG_PATTERN;null==a&&(a=vM.COMPACT_DECIMAL_SHORT_PATTERN);if(3>b)return AM;b=Math.min(14,b);var c=a[CM(1,b)];for(--b;!c&&3<=b;)c=a[CM(1,b)],b--;if(!c)return AM;a=c.other;return a&&"0"!=a?(a=/([^0]*)(0+)(.*)/.exec(a))?{prefix:a[1],suffix:a[3],divisorBase:b+1-(a[2].length-1)}:AM:AM},BM=function(a){if(!isFinite(a))return 0<a?a:0;
for(var b=0;1<=(a/=10);)b++;return b},CM=function(a,b){if(!a||!isFinite(a)||0==b)return a;
a=String(a).split("e");return parseFloat(a[0]+"e"+(parseInt(a[1]||0,10)+b))},jta=function(a,b){return a&&isFinite(a)?CM(Math.round(CM(a,b)),-b):a},ita=function(a,b,c){if(!a)return a;
b=b-BM(a)-1;return b<-c?jta(a,-c):jta(a,b)};
zM.prototype.isCurrencyCodeBeforeValue=function(){var a=this.pattern_.indexOf("\xA4"),b=this.pattern_.indexOf("#"),c=this.pattern_.indexOf("0"),d=Number.MAX_VALUE;0<=b&&b<d&&(d=b);0<=c&&c<d&&(d=c);return a<d};var FM=function(a,b,c,d,e,g,h,m){this.x0=a;this.y0=b;this.x1=c;this.y1=d;this.x2=e;this.y2=g;this.x3=h;this.y3=m};
FM.prototype.clone=function(){return new FM(this.x0,this.y0,this.x1,this.y1,this.x2,this.y2,this.x3,this.y3)};
FM.prototype.equals=function(a){return this.x0==a.x0&&this.y0==a.y0&&this.x1==a.x1&&this.y1==a.y1&&this.x2==a.x2&&this.y2==a.y2&&this.x3==a.x3&&this.y3==a.y3};
var kta=function(a){var b=a.x0;a.x0=a.x3;a.x3=b;b=a.y0;a.y0=a.y3;a.y3=b;b=a.x1;a.x1=a.x2;a.x2=b;b=a.y1;a.y1=a.y2;a.y2=b},GM=function(a,b){if(0==b)return a.x0;
if(1==b)return a.x3;var c=Vg(a.x0,a.x1,b),d=Vg(a.x1,a.x2,b);a=Vg(a.x2,a.x3,b);c=Vg(c,d,b);d=Vg(d,a,b);return Vg(c,d,b)},lta=function(a,b){if(0==b)return a.y0;
if(1==b)return a.y3;var c=Vg(a.y0,a.y1,b),d=Vg(a.y1,a.y2,b);a=Vg(a.y2,a.y3,b);c=Vg(c,d,b);d=Vg(d,a,b);return Vg(c,d,b)};
FM.prototype.getPoint=function(a){return new Wg(GM(this,a),lta(this,a))};
var mta=function(a,b){if(1!=b){var c=Vg(a.x0,a.x1,b),d=Vg(a.y0,a.y1,b),e=Vg(a.x1,a.x2,b),g=Vg(a.y1,a.y2,b),h=Vg(a.x2,a.x3,b),m=Vg(a.y2,a.y3,b);a.x1=c;a.y1=d;c=Vg(c,e,b);d=Vg(d,g,b);e=Vg(e,h,b);g=Vg(g,m,b);a.x2=c;a.y2=d;a.x3=Vg(c,e,b);a.y3=Vg(d,g,b)}};
FM.prototype.subdivide=function(a,b){kta(this);mta(this,1-a);kta(this);mta(this,(b-a)/(1-a))};
var nta=function(a,b){var c=(b-a.x0)/(a.x3-a.x0);if(0>=c)return 0;if(1<=c)return 1;for(var d=0,e=1,g=0,h=0;8>h;h++){g=GM(a,c);var m=(GM(a,c+1E-6)-g)/1E-6;if(1E-6>Math.abs(g-b))return c;if(1E-6>Math.abs(m))break;else g<b?d=c:e=c,c-=(g-b)/m}for(h=0;1E-6<Math.abs(g-b)&&8>h;h++)g<b?(d=c,c=(c+e)/2):(e=c,c=(c+d)/2),g=GM(a,c);return c};var HM=function(){Wv.call(this);this.name_="closure_frame"+ota++;this.iframesForDisposal_=[];pta[this.name_]=this},IM;
t(HM,Wv);var pta={},ota=0,qta=function(a,b){var c=ah(a);Gu(b,function(d,e){Wa(d)||(d=[d]);mb(d,function(g){g=c.createDom("INPUT",{type:"hidden",name:e,value:g});a.appendChild(g)})})};
f=HM.prototype;f.logger_=null;f.form_=null;f.iframe_=null;f.iframeName_=null;f.nextIframeId_=0;f.active_=!1;f.complete_=!1;f.success_=!1;f.lastUri_=null;f.lastContent_=null;f.lastErrorCode_=0;f.firefoxSilentErrorTimeout_=null;f.iframeDisposalTimer_=null;f.ignoreResponse_=!1;
f.send=function(a,b,c,d){if(this.active_)throw Error("[goog.net.IframeIo] Unable to send, already active.");this.lastUri_=a=new cx(a);b=b?b.toUpperCase():"GET";c&&Kw(a);IM||(IM=rh("FORM"),IM.acceptCharset="utf-8",c=IM.style,c.position="absolute",c.visibility="hidden",c.top=c.left="-10px",c.width=c.height="10px",c.overflow="hidden",document.body.appendChild(IM));this.form_=IM;"GET"==b&&qta(this.form_,a.queryData_);d&&qta(this.form_,d);d=this.form_;a=a.toString();gi();a=xc(a);ed(d,a);this.form_.method=
b;rta(this);JM(this)};
f.abort=function(a){if(this.active_){var b=KM(this);if(b)if(yv(b))b.removeAllListeners(void 0);else if(b=Kv(b)){var c=0,d;for(d in b.listeners)for(var e=b.listeners[d].concat(),g=0;g<e.length;++g)Nv(e[g])&&++c}this.success_=this.active_=this.complete_=!1;this.lastErrorCode_=a||7;this.dispatchEvent("abort");LM(this)}};
f.disposeInternal=function(){this.active_&&this.abort();HM.superClass_.disposeInternal.call(this);this.iframe_&&sta(this);JM(this);this.form_=null;delete this.errorChecker_;this.lastUri_=this.lastCustomError_=this.lastContent_=this.lastContentHtml_=this.form_=null;this.lastErrorCode_=0;delete pta[this.name_]};
f.isComplete=function(){return this.complete_};
f.isSuccess=function(){return this.success_};
f.isActive=function(){return this.active_};
f.getResponseText=function(){return this.lastContent_};
f.getResponseHtml=function(){return this.lastContentHtml_};
f.getResponseJson=function(){return Ek(this.lastContent_)};
f.getResponseXml=function(){return this.iframe_?MM(this):null};
f.getLastUri=function(){return this.lastUri_};
f.getLastErrorCode=function(){return this.lastErrorCode_};
f.getLastError=function(){return hfa(this.lastErrorCode_)};
f.getLastCustomError=function(){return this.lastCustomError_};
f.setErrorChecker=function(a){this.errorChecker_=a};
f.getErrorChecker=function(){return this.errorChecker_};
f.isIgnoringResponse=function(){return this.ignoreResponse_};
f.setIgnoreResponse=function(a){this.ignoreResponse_=a};
var rta=function(a){a.active_=!0;a.complete_=!1;a.lastErrorCode_=0;a.createIframe_();if(Ne&&!$e("11")){a.form_.target=a.iframeName_||"";ah(a.form_).getDocument().body.appendChild(a.iframe_);a.ignoreResponse_||Hv(a.iframe_,"readystatechange",a.onIeReadyStateChange_,!1,a);try{a.errorHandled_=!1,a.form_.submit()}catch(B){a.ignoreResponse_||Mv(a.iframe_,"readystatechange",a.onIeReadyStateChange_,!1,a),a.handleError_(1)}}else{ah(a.form_).getDocument().body.appendChild(a.iframe_);var b=a.iframeName_+"_inner",
c=Ph(a.iframe_);if(document.baseURI){var d=od(b);d=cd("<head><base href=\""+od(document.baseURI)+"\"></head><body><iframe id=\""+d+"\" name=\""+d+"\"></iframe>")}else d=od(b),d=cd("<body><iframe id=\""+d+"\" name=\""+d+"\"></iframe>");Me&&!Re?dd(c.documentElement,d):c.write(Vc(d));a.ignoreResponse_||Hv(c.getElementById(b),"load",a.onIframeLoaded_,!1,a);var e=ch("TEXTAREA",a.form_);d=0;for(var g=e.length;d<g;d++){var h=e[d].value;di(e[d])!=h&&(Rh(e[d],h),e[d].value=h)}e=c.importNode(a.form_,!0);e.target=b;e.action=
a.form_.action;c.body.appendChild(e);h=ch("SELECT",a.form_);var m=ch("SELECT",e);d=0;for(g=h.length;d<g;d++)for(var n=ch("OPTION",h[d]),p=ch("OPTION",m[d]),x=0,y=n.length;x<y;x++)p[x].selected=n[x].selected;h=ch("INPUT",a.form_);m=ch("INPUT",e);d=0;for(g=h.length;d<g;d++)if("file"==h[d].type&&h[d].value!=m[d].value){a.form_.target=b;e=a.form_;break}try{a.errorHandled_=!1,e.submit(),c.close(),Qe&&(a.firefoxSilentErrorTimeout_=xw(a.testForFirefoxSilentError_,250,a))}catch(B){a.ignoreResponse_||Mv(c.getElementById(b),
"load",a.onIframeLoaded_,!1,a),c.close(),a.handleError_(2)}}};
HM.prototype.onIeReadyStateChange_=function(){if("complete"==this.iframe_.readyState){Mv(this.iframe_,"readystatechange",this.onIeReadyStateChange_,!1,this);try{var a=Ph(this.iframe_);if(Ne&&"about:blank"==a.location&&!navigator.onLine){this.handleError_(9);return}}catch(b){this.handleError_(1);return}tta(this,a)}};
HM.prototype.onIframeLoaded_=function(){if(!Me||Re||"about:blank"!=MM(this).location){Mv(KM(this),"load",this.onIframeLoaded_,!1,this);try{tta(this,MM(this))}catch(a){this.handleError_(1)}}};
var tta=function(a,b){a.complete_=!0;a.active_=!1;try{var c=b.body;a.lastContent_=c.textContent||c.innerText;a.lastContentHtml_=c.innerHTML}catch(g){var d=1}var e;d||"function"!=typeof a.errorChecker_||(e=a.errorChecker_(b))&&(d=4);d?a.handleError_(d,e):(a.success_=!0,a.lastErrorCode_=0,a.dispatchEvent("complete"),a.dispatchEvent("success"),LM(a))};
HM.prototype.handleError_=function(a,b){this.errorHandled_||(this.active_=this.success_=!1,this.complete_=!0,this.lastErrorCode_=a,4==a&&(this.lastCustomError_=b),this.dispatchEvent("complete"),this.dispatchEvent("error"),LM(this),this.errorHandled_=!0)};
HM.prototype.handleIncrementalData_=function(a){this.dispatchEvent(new uta(a))};
var LM=function(a){sta(a);JM(a);a.form_=null;a.dispatchEvent("ready")};
HM.prototype.createIframe_=function(){this.iframeName_=this.name_+"_"+(this.nextIframeId_++).toString(36);this.iframe_=ah(this.form_).createDom("IFRAME",{name:this.iframeName_,id:this.iframeName_});if(Ne&&7>Number(Ze)){var a=this.iframe_;var b=xc(Rb(Sb("javascript:\"\"")));ed(a,b)}a=this.iframe_.style;a.visibility="hidden";a.width=a.height="10px";a.display="none";Re?a.marginTop=a.marginLeft="-10px":(a.position="absolute",a.top=a.left="-10px")};
var sta=function(a){var b=a.iframe_;b&&(b.onreadystatechange=null,b.onload=null,b.onerror=null,a.iframesForDisposal_.push(b));a.iframeDisposalTimer_&&(yw(a.iframeDisposalTimer_),a.iframeDisposalTimer_=null);Qe||Me&&!Re?a.iframeDisposalTimer_=xw(a.disposeIframes_,2E3,a):a.disposeIframes_();a.iframe_=null;a.iframeName_=null};
HM.prototype.disposeIframes_=function(){this.iframeDisposalTimer_&&(yw(this.iframeDisposalTimer_),this.iframeDisposalTimer_=null);for(;0!=this.iframesForDisposal_.length;){var a=this.iframesForDisposal_.pop();Dh(a)}};
var JM=function(a){a.form_&&a.form_==IM&&zh(a.form_)},MM=function(a){return a.iframe_?Ph(KM(a)):null},KM=function(a){return a.iframe_?Ne&&!$e("11")?a.iframe_:Ph(a.iframe_).getElementById(a.iframeName_+"_inner"):null};
HM.prototype.testForFirefoxSilentError_=function(){if(this.active_){var a=MM(this);a&&!Le(a,"documentUri")?(this.ignoreResponse_||Mv(KM(this),"load",this.onIframeLoaded_,!1,this),navigator.onLine?this.handleError_(3):this.handleError_(9)):this.firefoxSilentErrorTimeout_=xw(this.testForFirefoxSilentError_,250,this)}};
var uta=function(a){vv.call(this,"incrementaldata");this.data=a};
t(uta,vv);var NM=function(a){this.mechanism=a};
t(NM,Rk);var vta=function(a,b){var c=[];yk(b,function(d){try{var e=NM.prototype.getWrapper.call(this,d,!0)}catch(g){if("Storage: Invalid value was encountered"==g)return;throw g}Ia(e)?Sk(e)&&c.push(d):c.push(d)},a);
return c},wta=function(a,b){b=vta(a,b);
mb(b,function(c){NM.prototype.remove.call(this,c)},a)};var xta=function(){this.front_=[];this.back_=[]},yta=function(a){0==a.front_.length&&(a.front_=a.back_,a.front_.reverse(),a.back_=[])};
f=xta.prototype;f.enqueue=function(a){this.back_.push(a)};
f.dequeue=function(){yta(this);return this.front_.pop()};
f.peek=function(){yta(this);return kb(this.front_)};
f.getCount=function(){return this.front_.length+this.back_.length};
f.isEmpty=function(){return 0==this.front_.length&&0==this.back_.length};
f.clear=function(){this.front_=[];this.back_=[]};
f.contains=function(a){return wb(this.front_,a)||wb(this.back_,a)};
f.remove=function(a){var b=this.front_;var c=Array.prototype.lastIndexOf.call(b,a,b.length-1);0<=c?(yb(b,c),b=!0):b=!1;return b||zb(this.back_,a)};
f.getValues=function(){for(var a=[],b=this.front_.length-1;0<=b;--b)a.push(this.front_[b]);var c=this.back_.length;for(b=0;b<c;++b)a.push(this.back_[b]);return a};var OM=function(a){this.cellValue_=a};
OM.prototype.setCellValue=function(a){this.cellValue_=a};var PM=function(a,b,c){this.metricName_=a;this.cellType_=b;this.fields_=c||[];this.cellMap_=new Map};
f=PM.prototype;f.getFields=function(){return this.fields_};
f.addCell=function(a,b){for(var c=[],d=1;d<arguments.length;++d)c[d-1]=arguments[d];(d=this.getCells(c))?d.push(new OM(a)):this.setCell(a,c)};
f.setCell=function(a,b){for(var c=[],d=1;d<arguments.length;++d)c[d-1]=arguments[d];c=this.getKey_(c);this.cellMap_.set(c,[new OM(a)])};
f.getCells=function(a){for(var b=[],c=0;c<arguments.length;++c)b[c-0]=arguments[c];b=this.getKey_(b);return this.cellMap_.has(b)?this.cellMap_.get(b):void 0};
f.getCell=function(a){for(var b=[],c=0;c<arguments.length;++c)b[c-0]=arguments[c];return(b=this.getCells(b))&&b.length?b[0]:void 0};
f.hasCell=function(a){for(var b=[],c=0;c<arguments.length;++c)b[c-0]=arguments[c];b=this.getKey_(b);return this.cellMap_.has(b)};
f.clear=function(){this.cellMap_.clear()};
f.getKey_=function(a){for(var b=[],c=0;c<arguments.length;++c)b[c-0]=arguments[c];return b?b.join(","):"key"};var QM=function(a){eg(this,a,0,zta,null)};
t(QM,$f);var RM=function(a){eg(this,a,0,null,null)};
t(RM,$f);var zta=[1];QM.prototype.toObject=function(a){return Ata(a,this)};
var Ata=function(a,b){var c={entryList:fg(b.getEntryList(),Bta,a)};a&&(c.$jspbMessageInstance=b);return c};
QM.prototype.serializeBinary=function(){var a=new Hf;Cta(this,a);return Nf(a)};
var Cta=function(a,b){a=a.getEntryList();0<a.length&&Tf(b,1,a,Dta)};
RM.prototype.toObject=function(a){return Bta(a,this)};
var Bta=function(a,b){var c,d={valueOrBucket:null==(c=gg(b,1))?void 0:c,count:null==(c=C(b,2))?void 0:c};a&&(d.$jspbMessageInstance=b);return d};
RM.prototype.serializeBinary=function(){var a=new Hf;Dta(this,a);return Nf(a)};
var Dta=function(a,b){var c=C(a,1);null!=c&&b.writeDouble(1,c);c=C(a,2);null!=c&&b.writeInt64(2,c)};
f=RM.prototype;f.getValueOrBucket=function(){return gg(this,1)};
f.setValueOrBucket=function(a){return mg(this,1,a)};
f.clearValueOrBucket=function(){return mg(this,1,void 0)};
f.hasValueOrBucket=function(){return null!=C(this,1)};
f.getCount=function(){return C(this,2)};
f.setCount=function(a){mg(this,2,a)};
f.clearCount=function(){return mg(this,2,void 0)};
f.hasCount=function(){return null!=C(this,2)};
QM.prototype.getEntryList=function(){return wg(this,RM,1)};
QM.prototype.addEntry=function(a,b){return Ag(this,1,a,RM,b)};
QM.prototype.clearEntryList=function(){return zg(this,1,[])};var SM=function(a){eg(this,a,0,Eta,null)};
t(SM,$f);var UM=function(a){eg(this,a,0,null,TM)};
t(UM,$f);var VM=function(a){eg(this,a,0,null,null)};
t(VM,$f);var WM=function(a){eg(this,a,0,null,null)};
t(WM,$f);var XM=function(a){eg(this,a,0,Fta,null)};
t(XM,$f);var ZM=function(a){eg(this,a,0,null,YM)};
t(ZM,$f);var aN=function(a){eg(this,a,0,null,$M)};
t(aN,$f);var Eta=[3,6,4];SM.prototype.toObject=function(a){var b,c={streamzName:null==(b=C(this,1))?void 0:b,hashedStreamzName:null==(b=C(this,5))?void 0:b,rootSpec:(b=E(this,UM,2))&&Gta(a,b),fieldNameList:null==(b=C(this,3))?void 0:b,hashedFieldNameList:null==(b=C(this,6))?void 0:b,incList:fg(wg(this,XM,4),Hta,a)};a&&(c.$jspbMessageInstance=this);return c};
SM.prototype.serializeBinary=function(){var a=new Hf;var b=C(this,1);null!=b&&a.writeString(1,b);b=C(this,5);null!=b&&Of(a,5,b);b=E(this,UM,2);null!=b&&Rf(a,2,b,Ita);b=C(this,3);0<b.length&&Sf(a,3,b);b=C(this,6);if(0<b.length&&null!=b)for(var c=0;c<b.length;c++)Of(a,6,b[c]);b=wg(this,XM,4);0<b.length&&Tf(a,4,b,Jta);return Nf(a)};
var TM=[[1,2]];UM.prototype.getSpecCase=function(){return dg(this,TM[0])};
UM.prototype.toObject=function(a){return Gta(a,this)};
var Gta=function(a,b){var c,d={mobile:(c=E(b,VM,1))&&Kta(a,c),mobileExp:(c=E(b,WM,2))&&Lta(a,c)};a&&(d.$jspbMessageInstance=b);return d};
UM.prototype.serializeBinary=function(){var a=new Hf;Ita(this,a);return Nf(a)};
var Ita=function(a,b){var c=E(a,VM,1);null!=c&&Rf(b,1,c,Mta);c=E(a,WM,2);null!=c&&Rf(b,2,c,Nta)};
VM.prototype.toObject=function(a){return Kta(a,this)};
var Kta=function(a,b){var c,d={appName:null==(c=C(b,1))?void 0:c,appVersion:null==(c=C(b,2))?void 0:c,useMobilespec:null==(c=hg(b,3))?void 0:c};a&&(d.$jspbMessageInstance=b);return d};
VM.prototype.serializeBinary=function(){var a=new Hf;Mta(this,a);return Nf(a)};
var Mta=function(a,b){var c=C(a,1);null!=c&&b.writeString(1,c);c=C(a,2);null!=c&&b.writeString(2,c);c=C(a,3);null!=c&&b.writeBool(3,c)};
f=VM.prototype;f.getAppName=function(){return C(this,1)};
f.setAppName=function(a){return mg(this,1,a)};
f.clearAppName=function(){return mg(this,1,void 0)};
f.hasAppName=function(){return null!=C(this,1)};
f.getAppVersion=function(){return C(this,2)};
f.setAppVersion=function(a){return mg(this,2,a)};
f.clearAppVersion=function(){return mg(this,2,void 0)};
f.hasAppVersion=function(){return null!=C(this,2)};
f.getUseMobilespec=function(){return hg(this,3)};
f.setUseMobilespec=function(a){return mg(this,3,a)};
f.clearUseMobilespec=function(){return mg(this,3,void 0)};
f.hasUseMobilespec=function(){return null!=C(this,3)};
WM.prototype.toObject=function(a){return Lta(a,this)};
var Lta=function(a,b){var c,d={appName:null==(c=C(b,1))?void 0:c,appVersion:null==(c=C(b,2))?void 0:c,experimentId:null==(c=C(b,3))?void 0:c,useMobilespec:null==(c=hg(b,4))?void 0:c};a&&(d.$jspbMessageInstance=b);return d};
WM.prototype.serializeBinary=function(){var a=new Hf;Nta(this,a);return Nf(a)};
var Nta=function(a,b){var c=C(a,1);null!=c&&b.writeString(1,c);c=C(a,2);null!=c&&b.writeString(2,c);c=C(a,3);null!=c&&b.writeInt32(3,c);c=C(a,4);null!=c&&b.writeBool(4,c)};
f=WM.prototype;f.getAppName=function(){return C(this,1)};
f.setAppName=function(a){return mg(this,1,a)};
f.clearAppName=function(){return mg(this,1,void 0)};
f.hasAppName=function(){return null!=C(this,1)};
f.getAppVersion=function(){return C(this,2)};
f.setAppVersion=function(a){return mg(this,2,a)};
f.clearAppVersion=function(){return mg(this,2,void 0)};
f.hasAppVersion=function(){return null!=C(this,2)};
f.getExperimentId=function(){return C(this,3)};
f.setExperimentId=function(a){return mg(this,3,a)};
f.clearExperimentId=function(){return mg(this,3,void 0)};
f.hasExperimentId=function(){return null!=C(this,3)};
f.getUseMobilespec=function(){return hg(this,4)};
f.setUseMobilespec=function(a){return mg(this,4,a)};
f.clearUseMobilespec=function(){return mg(this,4,void 0)};
f.hasUseMobilespec=function(){return null!=C(this,4)};
UM.prototype.clearMobile=function(){return yg(this,1,TM[0],void 0)};
UM.prototype.hasMobile=function(){return null!=C(this,1)};
UM.prototype.clearMobileExp=function(){return yg(this,2,TM[0],void 0)};
UM.prototype.hasMobileExp=function(){return null!=C(this,2)};
var Fta=[1];XM.prototype.toObject=function(a){return Hta(a,this)};
var Hta=function(a,b){var c,d={fieldList:fg(wg(b,ZM,1),Ota,a),incBy:(c=E(b,aN,2))&&Pta(a,c)};a&&(d.$jspbMessageInstance=b);return d};
XM.prototype.serializeBinary=function(){var a=new Hf;Jta(this,a);return Nf(a)};
var Jta=function(a,b){var c=wg(a,ZM,1);0<c.length&&Tf(b,1,c,Qta);c=E(a,aN,2);null!=c&&Rf(b,2,c,Rta)},YM=[[1,
2,3]];ZM.prototype.getValueCase=function(){return dg(this,YM[0])};
ZM.prototype.toObject=function(a){return Ota(a,this)};
var Ota=function(a,b){var c,d={strVal:null==(c=C(b,1))?void 0:c,intVal:null==(c=C(b,2))?void 0:c,boolVal:null==(c=hg(b,3))?void 0:c};a&&(d.$jspbMessageInstance=b);return d};
ZM.prototype.serializeBinary=function(){var a=new Hf;Qta(this,a);return Nf(a)};
var Qta=function(a,b){var c=C(a,1);null!=c&&b.writeString(1,c);c=C(a,2);null!=c&&b.writeInt32(2,c);c=C(a,3);null!=c&&b.writeBool(3,c)};
f=ZM.prototype;f.getStrVal=function(){return C(this,1)};
f.clearStrVal=function(){return ug(this,1,YM[0],void 0)};
f.hasStrVal=function(){return null!=C(this,1)};
f.getIntVal=function(){return C(this,2)};
f.clearIntVal=function(){return ug(this,2,YM[0],void 0)};
f.hasIntVal=function(){return null!=C(this,2)};
f.getBoolVal=function(){return hg(this,3)};
f.clearBoolVal=function(){return ug(this,3,YM[0],void 0)};
f.hasBoolVal=function(){return null!=C(this,3)};
var $M=[[1,2,3]];aN.prototype.getValueCase=function(){return dg(this,$M[0])};
aN.prototype.toObject=function(a){return Pta(a,this)};
var Pta=function(a,b){var c,d={int64Val:null==(c=C(b,1))?void 0:c,doubleVal:null==(c=gg(b,2))?void 0:c,histogramVal:(c=E(b,QM,3))&&Ata(a,c)};a&&(d.$jspbMessageInstance=b);return d};
aN.prototype.serializeBinary=function(){var a=new Hf;Rta(this,a);return Nf(a)};
var Rta=function(a,b){var c=C(a,1);null!=c&&b.writeInt64(1,c);c=C(a,2);null!=c&&b.writeDouble(2,c);c=E(a,QM,3);null!=c&&Rf(b,3,c,Cta)};
f=aN.prototype;f.getInt64Val=function(){return C(this,1)};
f.clearInt64Val=function(){return ug(this,1,$M[0],void 0)};
f.hasInt64Val=function(){return null!=C(this,1)};
f.getDoubleVal=function(){return gg(this,2)};
f.clearDoubleVal=function(){return ug(this,2,$M[0],void 0)};
f.hasDoubleVal=function(){return null!=C(this,2)};
f.clearHistogramVal=function(){return yg(this,3,$M[0],void 0)};
f.hasHistogramVal=function(){return null!=C(this,3)};
XM.prototype.addField=function(a,b){return Ag(this,1,a,ZM,b)};
XM.prototype.clearFieldList=function(){return zg(this,1,[])};
XM.prototype.clearIncBy=function(){return xg(this,2,void 0)};
XM.prototype.hasIncBy=function(){return null!=C(this,2)};
f=SM.prototype;f.getStreamzName=function(){return C(this,1)};
f.clearStreamzName=function(){return mg(this,1,void 0)};
f.hasStreamzName=function(){return null!=C(this,1)};
f.getHashedStreamzName=function(){return C(this,5)};
f.setHashedStreamzName=function(a){return mg(this,5,a)};
f.clearHashedStreamzName=function(){return mg(this,5,void 0)};
f.hasHashedStreamzName=function(){return null!=C(this,5)};
f.clearRootSpec=function(){return xg(this,2,void 0)};
f.hasRootSpec=function(){return null!=C(this,2)};
f.addFieldName=function(a,b){return tg(this,3,a,b)};
f.clearFieldNameList=function(){return mg(this,3,[])};
f.addHashedFieldName=function(a,b){return tg(this,6,a,b)};
f.clearHashedFieldNameList=function(){return mg(this,6,[])};
f.addInc=function(a,b){return Ag(this,4,a,XM,b)};
f.clearIncList=function(){return zg(this,4,[])};var bN=function(a,b){PM.call(this,a,3,b)};
l(bN,PM);bN.prototype.incrementCounter=function(a){for(var b=[],c=0;c<arguments.length;++c)b[c-0]=arguments[c];this.incrementCounterBy(1,b)};
bN.prototype.incrementCounterBy=function(a,b){for(var c=[],d=1;d<arguments.length;++d)c[d-1]=arguments[d];d=0;var e=this.getCell(c);e&&(d=e.cellValue_);this.setCell(d+a,c)};var cN=function(a,b){PM.call(this,a,2,b)};
l(cN,PM);cN.prototype.record=function(a,b){for(var c=[],d=1;d<arguments.length;++d)c[d-1]=arguments[d];this.addCell(a,c)};var dN=function(){this.streamzLogger_=new Sta;this.metricMap=new Map;this.disabledMetrics_=new Set;this.invocationCount=0;this.invocationLimit=100;this.flushInterval=3E4;this.flushTimer=new rw(this.flushInterval);this.flushTimer.listen("tick",this.snapshotAndFlush,!1,this)},Tta=function(a){a.flushTimer.enabled||a.flushTimer.start();
a.invocationCount++;a.invocationCount>=a.invocationLimit&&a.snapshotAndFlush()};
dN.prototype.snapshotAndFlush=function(){var a=this.metricMap.values();a=[].concat(ka(a)).filter(function(b){return b.cellMap_.size});
a.length&&this.streamzLogger_.flush(a);Uta(a);this.invocationCount=0;this.flushTimer.enabled&&this.flushTimer.stop()};
dN.prototype.setDisabledMetrics=function(a){this.disabledMetrics_=new Set(a)};
dN.prototype.addNewCounter=function(a,b){for(var c=[],d=1;d<arguments.length;++d)c[d-1]=arguments[d];this.metricMap.has(a)||this.metricMap.set(a,new bN(a,c))};
dN.prototype.addNewEventMetric=function(a,b){for(var c=[],d=1;d<arguments.length;++d)c[d-1]=arguments[d];this.metricMap.has(a)||this.metricMap.set(a,new cN(a,c))};
var Vta=function(a,b){return a.disabledMetrics_.has(b)?void 0:a.metricMap.get(b)};
dN.prototype.incrementCounter=function(a,b){for(var c=[],d=1;d<arguments.length;++d)c[d-1]=arguments[d];this.incrementCounterBy.apply(this,[a,1].concat(ka(c)))};
dN.prototype.incrementCounterBy=function(a,b,c){for(var d=[],e=2;e<arguments.length;++e)d[e-2]=arguments[e];(e=Vta(this,a))&&e instanceof bN&&(e.incrementCounterBy(b,d),Tta(this))};
dN.prototype.record=function(a,b,c){for(var d=[],e=2;e<arguments.length;++e)d[e-2]=arguments[e];(e=Vta(this,a))&&e instanceof cN&&(e.record(b,d),Tta(this))};
var Uta=function(a){for(var b=0;b<a.length;b++)a[b].clear()};var eN=function(a){this.value=a.toString()};
eN.prototype.toString=function(){return this.value};
function Wta(a){if(a instanceof eN)return a.value;throw Error("non-literal value passed to Polymer's htmlLiteral function: "+a)}
var fN=function(a,b){for(var c=[],d=1;d<arguments.length;++d)c[d-1]=arguments[d];d=document.createElement("template");d.innerHTML=c.reduce(function(e,g,h){if(g instanceof HTMLTemplateElement)g=g.innerHTML;else if(g instanceof eN)g=Wta(g);else throw Error("non-template value passed to Polymer's html function: "+g);return e+g+a[h+1]},a[0]);
return d};var gN={},hN={},iN=function(){return HTMLElement.apply(this,arguments)||this};
l(iN,HTMLElement);iN.import=function(a,b){return a?(a=gN[a]||hN[a.toLowerCase()])&&b?a.querySelector(b):a:null};
iN.prototype.attributeChangedCallback=function(a,b,c){b!==c&&this.register()};
iN.prototype.register=function(a){if(a=a||this.id){if(Qd&&void 0!==(gN[a]||hN[a.toLowerCase()]))throw gN[a]=hN[a.toLowerCase()]=null,Error("strictTemplatePolicy: dom-module "+a+" re-registered");this.id=a;gN[a]=hN[a.toLowerCase()]=this;this.querySelector("style")&&console.warn("dom-module %s has style outside template",this.id)}};
ea.Object.defineProperties(iN.prototype,{assetpath:{configurable:!0,enumerable:!0,get:function(){if(!this.__assetpath){var a=window.HTMLImports&&HTMLImports.importForElement?HTMLImports.importForElement(this)||document:this.ownerDocument;a=Id(this.getAttribute("assetpath")||"",a.baseURI);this.__assetpath=Kd(a)}return this.__assetpath}}});
ea.Object.defineProperties(iN,{observedAttributes:{configurable:!0,enumerable:!0,get:function(){return["id"]}}});
iN["import"]=iN.import;iN.prototype.modules=gN;customElements.define("dom-module",iN);var Xta=0,Yta=0,jN=[],Zta=0,$ta=document.createTextNode("");new window.MutationObserver(aua).observe($ta,{characterData:!0});function aua(){for(var a=jN.length,b=0;b<a;b++){var c=jN[b];if(c)try{c()}catch(d){setTimeout(function(){throw d})}}jN.splice(0,a);
Yta+=a}
var kN={after:function(a){return{run:function(b){return window.setTimeout(b,a)},
cancel:function(b){window.clearTimeout(b)}}},
run:function(a,b){return window.setTimeout(a,b)},
cancel:function(a){window.clearTimeout(a)}},bua={run:function(a){return window.requestAnimationFrame(a)},
cancel:function(a){window.cancelAnimationFrame(a)}},lN={run:function(a){$ta.textContent=Zta++;
jN.push(a);return Xta++},
cancel:function(a){var b=a-Yta;if(0<=b){if(!jN[b])throw Error("invalid async handle: "+a);jN[b]=null}}};var cua=0,mN=function(a){var b=a.__mixinApplications;b||(b=new WeakMap,a.__mixinApplications=b);var c=cua++;return function(d){var e=d.__mixinSet;if(e&&e[c])return d;var g=b,h=g.get(d);h||(h=a(d),g.set(d,h));d=Object.create(h.__mixinSet||e||null);d[c]=!0;h.__mixinSet=d;return h}};var nN=window.ShadyDOM&&window.ShadyDOM.noPatch&&window.ShadyDOM.wrap?window.ShadyDOM.wrap:window.ShadyDOM?function(a){return ShadyDOM.patch(a)}:function(a){return a};var oN=mN(function(a){var b=function(){var c=a.call(this)||this;c.__dataEnabled=!1;c.__dataReady=!1;c.__dataInvalid=!1;c.__data={};c.__dataPending=null;c.__dataOld=null;c.__dataInstanceProps=null;c.__serializing=!1;c._initializeProperties();return c};
l(b,a);b.createProperties=function(c){var d=this.prototype,e;for(e in c)e in d||d._createPropertyAccessor(e)};
b.attributeNameForProperty=function(c){return c.toLowerCase()};
b.typeForProperty=function(){};
b.prototype._createPropertyAccessor=function(c,d){this._addPropertyToAttributeMap(c);this.hasOwnProperty("__dataHasAccessor")||(this.__dataHasAccessor=Object.assign({},this.__dataHasAccessor));this.__dataHasAccessor[c]||(this.__dataHasAccessor[c]=!0,this._definePropertyAccessor(c,d))};
b.prototype._addPropertyToAttributeMap=function(c){this.hasOwnProperty("__dataAttributes")||(this.__dataAttributes=Object.assign({},this.__dataAttributes));var d=this.__dataAttributes[c];d||(d=this.constructor.attributeNameForProperty(c),this.__dataAttributes[d]=c);return d};
b.prototype._definePropertyAccessor=function(c,d){Object.defineProperty(this,c,{get:function(){return this._getProperty(c)},
set:d?function(){}:function(e){this._setProperty(c,e)}})};
b.prototype.ready=function(){this.__dataReady=!0;this._flushProperties()};
b.prototype._initializeProperties=function(){for(var c in this.__dataHasAccessor)this.hasOwnProperty(c)&&(this.__dataInstanceProps=this.__dataInstanceProps||{},this.__dataInstanceProps[c]=this[c],delete this[c])};
b.prototype._initializeInstanceProperties=function(c){Object.assign(this,c)};
b.prototype._setProperty=function(c,d){this._setPendingProperty(c,d)&&this._invalidateProperties()};
b.prototype._getProperty=function(c){return this.__data[c]};
b.prototype._setPendingProperty=function(c,d){var e=this.__data[c],g=this._shouldPropertyChange(c,d,e);g&&(this.__dataPending||(this.__dataPending={},this.__dataOld={}),!this.__dataOld||c in this.__dataOld||(this.__dataOld[c]=e),this.__data[c]=d,this.__dataPending[c]=d);return g};
b.prototype._isPropertyPending=function(c){return!(!this.__dataPending||!this.__dataPending.hasOwnProperty(c))};
b.prototype._invalidateProperties=function(){var c=this;!this.__dataInvalid&&this.__dataReady&&(this.__dataInvalid=!0,lN.run(function(){c.__dataInvalid&&(c.__dataInvalid=!1,c._flushProperties())}))};
b.prototype._enableProperties=function(){this.__dataEnabled||(this.__dataEnabled=!0,this.__dataInstanceProps&&(this._initializeInstanceProperties(this.__dataInstanceProps),this.__dataInstanceProps=null),this.ready())};
b.prototype._flushProperties=function(){var c=this.__data,d=this.__dataPending,e=this.__dataOld;this._shouldPropertiesChange(c,d,e)&&(this.__dataOld=this.__dataPending=null,this._propertiesChanged(c,d,e))};
b.prototype._shouldPropertiesChange=function(c,d){return!!d};
b.prototype._propertiesChanged=function(){};
b.prototype._shouldPropertyChange=function(c,d,e){return e!==d&&(e===e||d===d)};
b.prototype.attributeChangedCallback=function(c,d,e,g){d!==e&&this._attributeToProperty(c,e);a.prototype.attributeChangedCallback&&a.prototype.attributeChangedCallback.call(this,c,d,e,g)};
b.prototype._attributeToProperty=function(c,d,e){if(!this.__serializing){var g=this.__dataAttributes;c=g&&g[c]||c;this[c]=this._deserializeValue(d,e||this.constructor.typeForProperty(c))}};
b.prototype._propertyToAttribute=function(c,d,e){this.__serializing=!0;e=3>arguments.length?this[c]:e;this._valueToNodeAttribute(this,e,d||this.constructor.attributeNameForProperty(c));this.__serializing=!1};
b.prototype._valueToNodeAttribute=function(c,d,e){d=this._serializeValue(d);if("class"===e||"name"===e||"slot"===e)c=nN(c);void 0===d?c.removeAttribute(e):c.setAttribute(e,d)};
b.prototype._serializeValue=function(c){switch(typeof c){case"boolean":return c?"":void 0;default:return null!=c?c.toString():void 0;}};
b.prototype._deserializeValue=function(c,d){switch(d){case Boolean:return null!==c;case Number:return Number(c);default:return c;}};
return b});var pN=0,qN=[];function _regLog$$module$third_party$javascript$polymer$v2$polymer$lib$utils$telemetry(a){console.log("["+a.is+"]: registered")}
function dua(a){qN.push(a)}
;var eua=mN(function(a){function b(g){g=Object.getPrototypeOf(g);return g.prototype instanceof e?g:null}
function c(g){if(!g.hasOwnProperty("__ownProperties")){var h=null;if(g.hasOwnProperty("properties")){var m=g.properties;if(m){h={};for(var n in m){var p=m[n];h[n]="function"===typeof p?{type:p}:p}}}g.__ownProperties=h}return g.__ownProperties}
var d=oN(a),e=function(){return d.apply(this,arguments)||this};
l(e,d);e.finalize=function(){if(!this.hasOwnProperty("__finalized")){var g=b(this);g&&g.finalize();this.__finalized=!0;this._finalizeClass()}};
e._finalizeClass=function(){var g=c(this);g&&this.createProperties(g)};
e.typeForProperty=function(g){return(g=this._properties[g])&&g.type};
e.prototype._initializeProperties=function(){pN++;this.constructor.finalize();d.prototype._initializeProperties.call(this)};
e.prototype.connectedCallback=function(){d.prototype.connectedCallback&&d.prototype.connectedCallback.call(this);this._enableProperties()};
e.prototype.disconnectedCallback=function(){d.prototype.disconnectedCallback&&d.prototype.disconnectedCallback.call(this)};
ea.Object.defineProperties(e,{observedAttributes:{configurable:!0,enumerable:!0,get:function(){var g=this;if(!this.hasOwnProperty("__observedAttributes")){dua(this.prototype);var h=this._properties;this.__observedAttributes=h?Object.keys(h).map(function(m){return g.prototype._addPropertyToAttributeMap(m)}):[]}return this.__observedAttributes}},
_properties:{configurable:!0,enumerable:!0,get:function(){if(!this.hasOwnProperty("__properties")){var g=b(this);this.__properties=Object.assign({},g&&g._properties,c(this))}return this.__properties}}});
return e});var rN={},fua=/-[a-z]/g,gua=/([A-Z])/g;function sN(a){return rN[a]||(rN[a]=0>a.indexOf("-")?a:a.replace(fua,function(b){return b[1].toUpperCase()}))}
function tN(a){return rN[a]||(rN[a]=a.replace(gua,"-$1").toLowerCase())}
;for(var hua={},uN=HTMLElement.prototype;uN;){for(var iua=Object.getOwnPropertyNames(uN),vN=0;vN<iua.length;vN++)hua[iua[vN]]=!0;uN=Object.getPrototypeOf(uN)}function jua(a,b){if(!hua[b]){var c=a[b];void 0!==c&&(a.__data?a._setPendingProperty(b,c):(a.__dataProto?a.hasOwnProperty("__dataProto")||(a.__dataProto=Object.create(a.__dataProto)):a.__dataProto={},a.__dataProto[b]=c))}}
var wN=mN(function(a){var b=oN(a);a=function(){return b.apply(this,arguments)||this};
l(a,b);a.createPropertiesForAttributes=function(){for(var c=this.observedAttributes,d=0;d<c.length;d++)this.prototype._createPropertyAccessor(sN(c[d]))};
a.attributeNameForProperty=function(c){return tN(c)};
a.prototype._initializeProperties=function(){this.__dataProto&&(this._initializeProtoProperties(this.__dataProto),this.__dataProto=null);b.prototype._initializeProperties.call(this)};
a.prototype._initializeProtoProperties=function(c){for(var d in c)this._setProperty(d,c[d])};
a.prototype._ensureAttribute=function(c,d){this.hasAttribute(c)||this._valueToNodeAttribute(this,d,c)};
a.prototype._serializeValue=function(c){switch(typeof c){case"object":if(c instanceof Date)return c.toString();if(c)try{return JSON.stringify(c)}catch(d){return""}default:return b.prototype._serializeValue.call(this,c);}};
a.prototype._deserializeValue=function(c,d){switch(d){case Object:try{var e=JSON.parse(c)}catch(g){e=c}break;case Array:try{e=JSON.parse(c)}catch(g){e=null,console.warn("Polymer::Attributes: couldn't decode Array as JSON: "+c)}break;case Date:e=isNaN(c)?String(c):Number(c);e=new Date(e);break;default:e=b.prototype._deserializeValue.call(this,c,d);}return e};
a.prototype._definePropertyAccessor=function(c,d){if(Wd){var e=this.__dataReady;this.__dataReady=!1;jua(this,c);this.__dataReady=e}else jua(this,c);b.prototype._definePropertyAccessor.call(this,c,d)};
a.prototype._hasAccessor=function(c){return this.__dataHasAccessor&&this.__dataHasAccessor[c]};
a.prototype._isPropertyPending=function(c){return!!(this.__dataPending&&c in this.__dataPending)};
return a});var kua={"dom-if":!0,"dom-repeat":!0},lua=!1,mua=!1;function nua(a,b){var c=b.parentInfo&&nua(a,b.parentInfo);if(c)for(a=c.firstChild,c=0;a;a=a.nextSibling){if(b.parentIndex===c++)return a}else return a}
function oua(a,b){a=a._methodHost||a;return function(c){if(a[b])a[b](c,c.detail);else console.warn("listener method `"+b+"` not defined")}}
var pua=mN(function(a){var b=function(){return a.apply(this,arguments)||this};
l(b,a);b._parseTemplate=function(c,d){if(!c._templateInfo){var e=c._templateInfo={};e.nodeInfoList=[];e.nestedTemplate=!!d;e.stripWhiteSpace=d&&d.stripWhiteSpace||c.hasAttribute("strip-whitespace");this._parseTemplateContent(c,e,{parent:null})}return c._templateInfo};
b._parseTemplateContent=function(c,d,e){return this._parseTemplateNode(c.content,d,e)};
b._parseTemplateNode=function(c,d,e){var g=!1;"template"!=c.localName||c.hasAttribute("preserve-content")?"slot"===c.localName&&(d.hasInsertionPoint=!0):g=this._parseTemplateNestedTemplate(c,d,e)||g;if(!lua){lua=!0;var h=document.createElement("textarea");h.placeholder="a";mua=h.placeholder===h.textContent}mua&&"textarea"===c.localName&&c.placeholder&&c.placeholder===c.textContent&&(c.textContent=null);c.firstChild&&this._parseTemplateChildNodes(c,d,e);c.hasAttributes&&c.hasAttributes()&&(g=this._parseTemplateNodeAttributes(c,
d,e)||g);return g||e.noted};
b._parseTemplateChildNodes=function(c,d,e){if("script"!==c.localName&&"style"!==c.localName)for(var g=c.firstChild,h=0,m;g;g=m){if("template"==g.localName&&(m=g.getAttribute("is"))&&kua[m]){var n=g;n.removeAttribute("is");g=n.ownerDocument.createElement(m);n.parentNode.replaceChild(g,n);for(g.appendChild(n);n.attributes.length;)g.setAttribute(n.attributes[0].name,n.attributes[0].value),n.removeAttribute(n.attributes[0].name)}m=g.nextSibling;if(g.nodeType===Node.TEXT_NODE){for(n=m;n&&n.nodeType===
Node.TEXT_NODE;)g.textContent+=n.textContent,m=n.nextSibling,c.removeChild(n),n=m;if(d.stripWhiteSpace&&!g.textContent.trim()){c.removeChild(g);continue}}n={parentIndex:h,parentInfo:e};this._parseTemplateNode(g,d,n)&&(n.infoIndex=d.nodeInfoList.push(n)-1);g.parentNode&&h++}};
b._parseTemplateNestedTemplate=function(c,d,e){d=this._parseTemplate(c,d);(d.content=c.content.ownerDocument.createDocumentFragment()).appendChild(c.content);e.templateInfo=d;return!0};
b._parseTemplateNodeAttributes=function(c,d,e){for(var g=!1,h=Array.from(c.attributes),m=h.length-1,n;n=h[m];m--)g=this._parseTemplateNodeAttribute(c,d,e,n.name,n.value)||g;return g};
b._parseTemplateNodeAttribute=function(c,d,e,g,h){return"on-"===g.slice(0,3)?(c.removeAttribute(g),e.events=e.events||[],e.events.push({name:g.slice(3),value:h}),!0):"id"===g?(e.id=h,!0):!1};
b._contentForTemplate=function(c){var d=c._templateInfo;return d&&d.content||c.content};
b.prototype._stampTemplate=function(c,d){c&&!c.content&&window.HTMLTemplateElement&&HTMLTemplateElement.decorate&&HTMLTemplateElement.decorate(c);d=d||this.constructor._parseTemplate(c);var e=d.nodeInfoList;c=document.importNode(d.content||c.content,!0);c.__noInsertionPoint=!d.hasInsertionPoint;var g=c.nodeList=Array(e.length);c.$={};for(var h=0,m=e.length,n=void 0;h<m&&(n=e[h]);h++){var p=g[h]=nua(c,n);n.id&&(c.$[n.id]=p);var x=p,y=d;n.templateInfo&&(x._templateInfo=n.templateInfo,x._parentTemplateInfo=
y);if(n.events&&n.events.length){x=0;y=n.events;for(var B=void 0;x<y.length&&(B=y[x]);x++)this._addMethodEventListenerToNode(p,B.name,B.value,this)}}return c};
b.prototype._addMethodEventListenerToNode=function(c,d,e,g){e=oua(g||c,e);this._addEventListenerToNode(c,d,e);return e};
b.prototype._addEventListenerToNode=function(c,d,e){c.addEventListener(d,e)};
b.prototype._removeEventListenerFromNode=function(c,d,e){c.removeEventListener(d,e)};
return b});function xN(a){return 0<=a.indexOf(".")}
function yN(a){var b=a.indexOf(".");return-1===b?a:a.slice(0,b)}
function zN(a,b){return 0===a.indexOf(b+".")}
function AN(a,b){return 0===b.indexOf(a+".")}
function BN(a,b,c){return b+c.slice(a.length)}
function qua(a,b){return a===b||zN(a,b)||AN(a,b)}
function CN(a){if(Array.isArray(a)){for(var b=[],c=0;c<a.length;c++)for(var d=a[c].toString().split("."),e=0;e<d.length;e++)b.push(d[e]);return b.join(".")}return a}
function DN(a){return Array.isArray(a)?CN(a).split("."):a.toString().split(".")}
function EN(a,b,c){b=DN(b);for(var d=0;d<b.length;d++){if(!a)return;a=a[b[d]]}c&&(c.path=b.join("."));return a}
function FN(a,b,c){var d=DN(b),e=d[d.length-1];if(1<d.length){for(b=0;b<d.length-1;b++)if(a=a[d[b]],!a)return;a[e]=c}else a[b]=c;return d.join(".")}
;/*
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at
http://polymer.github.io/LICENSE.txt The complete set of authors may be found
at http://polymer.github.io/AUTHORS.txt The complete set of contributors may
be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by
Google as part of the polymer project is also subject to an additional IP
rights grant found at http://polymer.github.io/PATENTS.txt
*/
var GN=0,HN=[],rua={COMPUTE:"__computeEffects",REFLECT:"__reflectEffects",NOTIFY:"__notifyEffects",PROPAGATE:"__propagateEffects",OBSERVE:"__observeEffects",READ_ONLY:"__readOnly"},sua=/[A-Z]/;function IN(a,b,c){var d=a[b];if(!d)d=a[b]={};else if(!a.hasOwnProperty(b)&&(d=a[b]=Object.create(a[b]),c))for(var e in d)for(a=d[e],b=d[e]=Array(a.length),c=0;c<a.length;c++)b[c]=a[c];return d}
function JN(a,b,c,d,e,g){if(b){var h=!1,m=GN++,n;for(n in c)tua(a,b,m,n,c,d,e,g)&&(h=!0);return h}return!1}
function tua(a,b,c,d,e,g,h,m){var n=!1,p=h?yN(d):d;if(b=b[p]){p=0;for(var x=b.length,y=void 0;p<x&&(y=b[p]);p++)y.info&&y.info.lastRun===c||h&&!uua(d,y.trigger)||(y.info&&(y.info.lastRun=c),y.fn(a,d,e,g,y.info,h,m),n=!0)}return n}
function uua(a,b){if(b){var c=b.name;return c==a||!(!b.structured||!zN(c,a))||!(!b.wildcard||!AN(c,a))}return!0}
function vua(a,b,c,d,e){b="string"===typeof e.method?a[e.method]:e.method;c=e.property;b?b.call(a,a.__data[c],d[c]):e.dynamicFn||console.warn("observer method `"+e.method+"` not defined")}
function wua(a,b,c,d,e){var g=a.__notifyEffects,h=GN++,m;for(m in b)if(b[m])if(g&&tua(a,g,h,m,c,d,e))var n=!0;else{var p;if(p=e){p=a;var x=m,y=c,B=yN(x);B!==x?(B=tN(B)+"-changed",xua(p,B,y[x],x),p=!0):p=!1}p&&(n=!0)}var G;n&&(G=a.__dataHost)&&G._invalidateProperties&&G._invalidateProperties()}
function xua(a,b,c,d){c={value:c,queueProperty:!0};d&&(c.path=d);nN(a).dispatchEvent(new CustomEvent(b,{detail:c}))}
function yua(a,b,c,d,e,g){g=(d=(g?yN(b):b)!=b?b:null)?EN(a,d):a.__data[b];d&&void 0===g&&(g=c[b]);xua(a,e.eventName,g,d)}
function zua(a,b,c,d,e){c=a.__data[b];Od&&(c=Od(c,e.attrName,"attribute",a));a._propertyToAttribute(b,e.attrName,c)}
var Aua=function(a,b,c,d,e){var g=e?yN(a):a;if(b=b[g])for(g=0;g<b.length;g++){var h=b[g];if(h.info.lastRun!==GN&&(!e||uua(a,h.trigger))){h.info.lastRun=GN;h=h.info;for(var m=c,n=d,p=0,x=m.length-1,y=-1;p<=x;){var B=p+x>>1,G=n.get(m[B].methodInfo)-n.get(h.methodInfo);if(0>G)p=B+1;else if(0<G)x=B-1;else{y=B;break}}0>y&&(y=x+1);m.splice(y,0,h)}}};
function Bua(a){var b=a.constructor.__orderedComputedDeps;if(!b){b=new Map;for(var c=a.__computeEffects,d=Cua(a),e=d.counts,g=d.ready,h=d.total;d=g.shift();)b.set(d,b.size),(d=c[d])&&d.forEach(function(m){m=m.info.methodInfo;--h;0===--e[m]&&g.push(m)});
0!==h&&console.warn("Computed graph for "+a.localName+" incomplete; circular?");a.constructor.__orderedComputedDeps=b}return b}
function Cua(a){var b=a.__computeInfo,c={};a=a.__computeEffects;var d=[],e=0,g;for(g in b){var h=b[g];e+=c[g]=h.args.filter(function(n){return!n.literal}).length+(h.dynamicFn?1:0)}for(var m in a)b[m]||d.push(m);
return{counts:c,ready:d,total:e}}
function Dua(a,b,c,d,e){b=KN(a,b,c,d,e);if(b===HN)return!1;e=e.methodInfo;if(a.__dataHasAccessor&&a.__dataHasAccessor[e])return a._setPendingProperty(e,b,!0);a[e]=b;return!1}
function LN(a,b,c,d,e,g,h){c.bindings=c.bindings||[];d={kind:d,target:e,parts:g,literal:h,isCompound:1!==g.length};c.bindings.push(d);d.target&&"attribute"!=d.kind&&"text"!=d.kind&&!d.isCompound&&"{"===d.parts[0].mode&&(c=d.parts[0],g=c.negate,d.listenerEvent=c.event||tN(e)+"-changed",d.listenerNegate=g);e=b.nodeInfoList.length;for(c=0;c<d.parts.length;c++){var m=d.parts[c];m.compoundIndex=c;g=a;h=b;var n=d,p=m,x=e;if(!p.literal)if("attribute"===n.kind&&"-"===n.target[0])console.warn("Cannot set attribute "+
n.target+" because \"-\" is not a valid attribute starting character");else for(m=p.dependencies,n={index:x,binding:n,part:p,evaluator:g},p=0;p<m.length;p++)x=m[p],"string"==typeof x&&(x=Eua(x),x.wildcard=!0),g._addTemplatePropertyEffect(h,x.rootProperty,{fn:Fua,info:n,trigger:x})}}
function Fua(a,b,c,d,e,g,h){h=h[e.index];var m=e.binding,n=e.part;g&&n.source&&b.length>n.source.length&&"property"==m.kind&&!m.isCompound&&h.__isPropertyEffectsClient&&h.__dataHasAccessor&&h.__dataHasAccessor[m.target]?(c=c[b],b=BN(n.source,m.target,b),h._setPendingPropertyOrPath(b,c,!1,!0)&&a._enqueueClient(h)):(b=e.evaluator._evaluateBinding(a,n,b,c,d,g),b!==HN&&(m.isCompound&&(c=h.__dataCompoundStorage[m.target],c[n.compoundIndex]=b,b=c.join("")),"attribute"===m.kind||"textContent"!==m.target&&(
"value"!==m.target||"input"!==h.localName&&"textarea"!==h.localName)||(b=void 0==b?"":b),n=b,Od&&(n=Od(n,m.target,m.kind,h)),"attribute"==m.kind?a._valueToNodeAttribute(h,n,m.target):(m=m.target,h.__isPropertyEffectsClient&&h.__dataHasAccessor&&h.__dataHasAccessor[m]?h.__readOnly&&h.__readOnly[m]||h._setPendingProperty(m,n)&&a._enqueueClient(h):(!Wd||a.__dataReady)&&a._setUnmanagedPropertyToNode(h,m,n))))}
function Gua(a,b,c){if(c.listenerEvent){var d=c.parts[0];a.addEventListener(c.listenerEvent,function(e){var g=c.target,h=d.source,m=e.detail,n=m&&m.path;n?(h=BN(g,h,n),e=m&&m.value):e=e.currentTarget[g];b.__readOnly&&b.__readOnly[h]||!b._setPendingPropertyOrPath(h,d.negate?!e:e,!0,!!n)||m&&m.queueProperty||b._invalidateProperties()})}}
function Hua(a,b,c,d,e,g){g=b.static||g&&("object"!==typeof g||g[b.methodName]);e={methodName:b.methodName,args:b.args,methodInfo:e,dynamicFn:g};for(var h=0,m=void 0;h<b.args.length&&(m=b.args[h]);h++)m.literal||a._addPropertyEffect(m.rootProperty,c,{fn:d,info:e,trigger:m});g&&a._addPropertyEffect(b.methodName,c,{fn:d,info:e});return e}
function KN(a,b,c,d,e){d=a._methodHost||a;var g=d[e.methodName];if(g)return a=a._marshalArgs(e.args,b,c),a===HN?HN:g.apply(d,a);e.dynamicFn||console.warn("method `"+e.methodName+"` not defined")}
var Iua=[],Jua=/(\[\[|{{)\s*(?:(!)\s*)?((?:[a-zA-Z_$][\w.:$\-*]*)\s*(?:\(\s*(?:(?:(?:((?:[a-zA-Z_$][\w.:$\-*]*)|(?:[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)|(?:(?:'(?:[^'\\]|\\.)*')|(?:"(?:[^"\\]|\\.)*")))\s*)(?:,\s*(?:((?:[a-zA-Z_$][\w.:$\-*]*)|(?:[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)|(?:(?:'(?:[^'\\]|\\.)*')|(?:"(?:[^"\\]|\\.)*")))\s*))*)?)\)\s*)?)(?:]]|}})/g;function Kua(a){for(var b="",c=0;c<a.length;c++)b+=a[c].literal||"";return b}
function MN(a){var b=a.match(/([^\s]+?)\(([\s\S]*)\)/);return b?(a={methodName:b[1],static:!0,args:Iua},b[2].trim()?(b=b[2].replace(/\\,/g,",").split(","),Lua(b,a)):a):null}
function Lua(a,b){b.args=a.map(function(c){c=Eua(c);c.literal||(b.static=!1);return c},this);
return b}
function Eua(a){a=a.trim().replace(/,/g,",").replace(/\\(.)/g,"$1");var b={name:a,value:"",literal:!1},c=a[0];"-"===c&&(c=a[1]);"0"<=c&&"9">=c&&(c="#");switch(c){case"'":case"\"":b.value=a.slice(1,-1);b.literal=!0;break;case"#":b.value=Number(a),b.literal=!0;}b.literal||(b.rootProperty=yN(a),b.structured=xN(a),b.structured&&(b.wildcard=".*"==a.slice(-2),b.wildcard&&(b.name=a.slice(0,-2))));return b}
function Mua(a,b,c){a=EN(a,c);void 0===a&&(a=b[c]);return a}
function Nua(a,b,c,d){d={indexSplices:d};Vd&&(b.splices=d);a.notifyPath(c+".splices",d);a.notifyPath(c+".length",b.length);Vd&&(d.indexSplices=[])}
function NN(a,b,c,d,e,g){Nua(a,b,c,[{index:d,addedCount:e,removed:g,object:b,type:"splice"}])}
var PN=mN(function(a){var b=pua(wN(a));a=function(){var c=b.call(this)||this;c.__isPropertyEffectsClient=!0;c.__dataCounter=0;return c};
l(a,b);a.prototype._initializeProperties=function(){b.prototype._initializeProperties.call(this);var c=ON;c.stack.length&&c.stack[c.stack.length-1]._enqueueClient(this);this.__dataClientsReady=!1;this.__dataLinkedPaths=this.__dataToNotify=this.__dataPendingClients=null;this.__dataHasPaths=!1;this.__dataCompoundStorage=this.__dataCompoundStorage||null;this.__dataHost=this.__dataHost||null;this.__dataTemp={};this.__dataClientsInitialized=!1};
a.prototype._initializeProtoProperties=function(c){this.__data=Object.create(c);this.__dataPending=Object.create(c);this.__dataOld={}};
a.prototype._initializeInstanceProperties=function(c){var d=this.__readOnly,e;for(e in c)d&&d[e]||(this.__dataPending=this.__dataPending||{},this.__dataOld=this.__dataOld||{},this.__data[e]=this.__dataPending[e]=c[e])};
a.prototype._addPropertyEffect=function(c,d,e){this._createPropertyAccessor(c,"__readOnly"==d);var g=IN(this,d,!0)[c];g||(g=this[d][c]=[]);g.push(e)};
a.prototype._removePropertyEffect=function(c,d,e){c=IN(this,d,!0)[c];e=c.indexOf(e);0<=e&&c.splice(e,1)};
a.prototype._hasPropertyEffect=function(c,d){d=this[d];return!(!d||!d[c])};
a.prototype._hasReadOnlyEffect=function(c){return this._hasPropertyEffect(c,"__readOnly")};
a.prototype._hasNotifyEffect=function(c){return this._hasPropertyEffect(c,"__notifyEffects")};
a.prototype._hasReflectEffect=function(c){return this._hasPropertyEffect(c,"__reflectEffects")};
a.prototype._hasComputedEffect=function(c){return this._hasPropertyEffect(c,"__computeEffects")};
a.prototype._setPendingPropertyOrPath=function(c,d,e,g){if(g||yN(Array.isArray(c)?c[0]:c)!==c){if(!g&&(g=EN(this,c),c=FN(this,c,d),!c||!b.prototype._shouldPropertyChange.call(this,c,d,g)))return!1;this.__dataHasPaths=!0;if(this._setPendingProperty(c,d,e)){if(e=this.__dataLinkedPaths)for(var h in e)g=e[h],AN(h,c)?(g=BN(h,g,c),this._setPendingPropertyOrPath(g,d,!0,!0)):AN(g,c)&&(g=BN(g,h,c),this._setPendingPropertyOrPath(g,d,!0,!0));return!0}}else{if(this.__dataHasAccessor&&this.__dataHasAccessor[c])return this._setPendingProperty(c,
d,e);this[c]=d}return!1};
a.prototype._setUnmanagedPropertyToNode=function(c,d,e){if(e!==c[d]||"object"==typeof e)"className"===d&&(c=nN(c)),c[d]=e};
a.prototype._setPendingProperty=function(c,d,e){var g=this.__dataHasPaths&&xN(c);if(this._shouldPropertyChange(c,d,(g?this.__dataTemp:this.__data)[c])){this.__dataPending||(this.__dataPending={},this.__dataOld={});c in this.__dataOld||(this.__dataOld[c]=this.__data[c]);g?this.__dataTemp[c]=d:this.__data[c]=d;this.__dataPending[c]=d;if(g||this.__notifyEffects&&this.__notifyEffects[c])this.__dataToNotify=this.__dataToNotify||{},this.__dataToNotify[c]=e;return Wd?(this._invalidateProperties(),!1):!0}return!1};
a.prototype._setProperty=function(c,d){this._setPendingProperty(c,d,!0)&&this._invalidateProperties()};
a.prototype._invalidateProperties=function(){this.__dataReady&&this._flushProperties()};
a.prototype._enqueueClient=function(c){this.__dataPendingClients=this.__dataPendingClients||[];c!==this&&this.__dataPendingClients.push(c)};
a.prototype._flushProperties=function(){this.__dataCounter++;if(Wd&&!this.__dataReady){this._propagatePropertyChanges(this.__dataPending,{},!1);this._flushClients();var c=this.__data,d=this.__dataToNotify;this.__data={};this.__dataPending=this.__dataToNotify=null;for(var e in c){var g=c[e];this.__data[e]=g;var h={};this.__dataPending=(h[e]=g,h);this.__dataOld={};g={};this.__dataToNotify=(g[e]=d&&d[e],g);b.prototype._flushProperties.call(this)}}else b.prototype._flushProperties.call(this);this.__dataCounter--};
a.prototype._flushClients=function(){this.__dataClientsReady?this.__enableOrFlushClients():(this.__dataClientsReady=!0,this._readyClients(),this.__dataReady=!0)};
a.prototype.__enableOrFlushClients=function(){var c=this.__dataPendingClients;if(c){this.__dataPendingClients=null;for(var d=0;d<c.length;d++){var e=c[d];e.__dataEnabled?e.__dataPending&&e._flushProperties():e._enableProperties()}}};
a.prototype._readyClients=function(){this.__enableOrFlushClients()};
a.prototype.setProperties=function(c,d){for(var e in c)!d&&this.__readOnly&&this.__readOnly[e]||this._setPendingPropertyOrPath(e,c[e],!0);this._invalidateProperties()};
a.prototype.ready=function(){this._flushProperties();this.__dataClientsReady||this._flushClients();this.__dataPending&&this._flushProperties()};
a.prototype._propertiesChanged=function(c,d,e){c=this.__dataHasPaths;this.__dataHasPaths=!1;if(Wd){var g=this.__dataToNotify;this.__dataToNotify=null;JN(this,this.__computeEffects,d,e,c)}else{if(g=this.__computeEffects)if(Yd){GN++;var h=Bua(this),m=[],n;for(n in d)Aua(n,g,m,h,c);for(;n=m.shift();)Dua(this,"",d,e,n)&&Aua(n.methodInfo,g,m,h,c);Object.assign(e,this.__dataOld);Object.assign(d,this.__dataPending);this.__dataPending=null}else for(h=d;JN(this,g,h,e,c);)Object.assign(e,this.__dataOld),Object.assign(d,
this.__dataPending),h=this.__dataPending,this.__dataPending=null;g=this.__dataToNotify;this.__dataToNotify=null}this._propagatePropertyChanges(d,e,c);this._flushClients();JN(this,this.__reflectEffects,d,e,c);g&&Xd&&wua(this,g,d,e,c);JN(this,this.__observeEffects,d,e,c);g&&!Xd&&wua(this,g,d,e,c);1==this.__dataCounter&&(this.__dataTemp={})};
a.prototype._propagatePropertyChanges=function(c,d,e){this.__propagateEffects&&JN(this,this.__propagateEffects,c,d,e);this.__templateInfo&&this._runEffectsForTemplate(this.__templateInfo,c,d,e)};
a.prototype._runEffectsForTemplate=function(c,d,e,g){var h=this,m=function(n,p){JN(h,c.propertyEffects,n,e,p,c.nodeList);for(var x=c.firstChild;x;x=x.nextSibling)h._runEffectsForTemplate(x,n,e,p)};
c.runEffects?c.runEffects(m,d,g):m(d,g)};
a.prototype.linkPaths=function(c,d){c=CN(c);d=CN(d);this.__dataLinkedPaths=this.__dataLinkedPaths||{};this.__dataLinkedPaths[c]=d};
a.prototype.unlinkPaths=function(c){c=CN(c);this.__dataLinkedPaths&&delete this.__dataLinkedPaths[c]};
a.prototype.notifySplices=function(c,d){var e={path:""};c=EN(this,c,e);Nua(this,c,e.path,d)};
a.prototype.get=function(c,d){return EN(d||this,c)};
a.prototype.set=function(c,d,e){e?FN(e,c,d):this.__readOnly&&this.__readOnly[c]||this._setPendingPropertyOrPath(c,d,!0)&&this._invalidateProperties()};
a.prototype.push=function(c,d){for(var e=[],g=1;g<arguments.length;++g)e[g-1]=arguments[g];g={path:""};var h=EN(this,c,g),m=h.length,n=h.push.apply(h,ka(e));e.length&&NN(this,h,g.path,m,e.length,[]);return n};
a.prototype.pop=function(c){var d={path:""};c=EN(this,c,d);var e=!!c.length,g=c.pop();e&&NN(this,c,d.path,c.length,0,[g]);return g};
a.prototype.splice=function(c,d,e,g){for(var h=[],m=3;m<arguments.length;++m)h[m-3]=arguments[m];m={path:""};var n=EN(this,c,m);0>d?d=n.length-Math.floor(-d):d&&(d=Math.floor(d));var p=2===arguments.length?n.splice(d):n.splice.apply(n,[d,e].concat(ka(h)));(h.length||p.length)&&NN(this,n,m.path,d,h.length,p);return p};
a.prototype.shift=function(c){var d={path:""};c=EN(this,c,d);var e=!!c.length,g=c.shift();e&&NN(this,c,d.path,0,0,[g]);return g};
a.prototype.unshift=function(c,d){for(var e=[],g=1;g<arguments.length;++g)e[g-1]=arguments[g];g={path:""};var h=EN(this,c,g),m=h.unshift.apply(h,ka(e));e.length&&NN(this,h,g.path,0,e.length,[]);return m};
a.prototype.notifyPath=function(c,d){if(1==arguments.length){var e={path:""};d=EN(this,c,e);e=e.path}else e=Array.isArray(c)?CN(c):c;this._setPendingPropertyOrPath(e,d,!0,!0)&&this._invalidateProperties()};
a.prototype._createReadOnlyProperty=function(c,d){this._addPropertyEffect(c,"__readOnly");d&&(this["_set"+(c[0].toUpperCase()+c.substring(1))]=function(e){this._setProperty(c,e)})};
a.prototype._createPropertyObserver=function(c,d,e){var g={property:c,method:d,dynamicFn:!!e};this._addPropertyEffect(c,"__observeEffects",{fn:vua,info:g,trigger:{name:c}});e&&this._addPropertyEffect(d,"__observeEffects",{fn:vua,info:g,trigger:{name:d}})};
a.prototype._createMethodObserver=function(c,d){var e=MN(c);if(!e)throw Error("Malformed observer expression '"+c+"'");Hua(this,e,"__observeEffects",KN,null,d)};
a.prototype._createNotifyingProperty=function(c){this._addPropertyEffect(c,"__notifyEffects",{fn:yua,info:{eventName:tN(c)+"-changed",property:c}})};
a.prototype._createReflectedProperty=function(c){var d=this.constructor.attributeNameForProperty(c);"-"===d[0]?console.warn("Property "+c+" cannot be reflected to attribute "+d+" because \"-\" is not a valid starting attribute name. Use a lowercase first letter for the property instead."):this._addPropertyEffect(c,"__reflectEffects",{fn:zua,info:{attrName:d}})};
a.prototype._createComputedProperty=function(c,d,e){var g=MN(d);if(!g)throw Error("Malformed computed expression '"+d+"'");d=Hua(this,g,"__computeEffects",Dua,c,e);IN(this,"__computeInfo")[c]=d};
a.prototype._marshalArgs=function(c,d,e){for(var g=this.__data,h=[],m=0,n=c.length;m<n;m++){var p=c[m],x=p.name,y=p.structured,B=p.wildcard,G=p.value;p.literal||(B?(p=AN(x,d),y=Mua(g,e,p?d:x),G={path:p?d:x,value:y,base:p?EN(g,x):y}):G=y?Mua(g,e,x):g[x]);if(Vd&&void 0===G&&1<c.length)return HN;h[m]=G}return h};
a.addPropertyEffect=function(c,d,e){this.prototype._addPropertyEffect(c,d,e)};
a.createPropertyObserver=function(c,d,e){this.prototype._createPropertyObserver(c,d,e)};
a.createMethodObserver=function(c,d){this.prototype._createMethodObserver(c,d)};
a.createNotifyingProperty=function(c){this.prototype._createNotifyingProperty(c)};
a.createReadOnlyProperty=function(c,d){this.prototype._createReadOnlyProperty(c,d)};
a.createReflectedProperty=function(c){this.prototype._createReflectedProperty(c)};
a.createComputedProperty=function(c,d,e){this.prototype._createComputedProperty(c,d,e)};
a.bindTemplate=function(c){return this.prototype._bindTemplate(c)};
a.prototype._bindTemplate=function(c,d){var e=this.constructor._parseTemplate(c),g=this.__preBoundTemplateInfo==e;if(!g)for(var h in e.propertyEffects)this._createPropertyAccessor(h);d?(e=Object.create(e),e.wasPreBound=g,this.__templateInfo?(c=c._parentTemplateInfo||this.__templateInfo,d=c.lastChild,c.lastChild=e,(e.previousSibling=d)?d.nextSibling=e:c.firstChild=e):this.__templateInfo=e):this.__preBoundTemplateInfo=e;return e};
a._addTemplatePropertyEffect=function(c,d,e){(c.hostProps=c.hostProps||{})[d]=!0;c=c.propertyEffects=c.propertyEffects||{};(c[d]=c[d]||[]).push(e)};
a.prototype._stampTemplate=function(c,d){d=d||this._bindTemplate(c,!0);ON.stack.push(this);c=b.prototype._stampTemplate.call(this,c,d);var e=ON,g=e.stack.length;g&&e.stack[g-1]==this&&e.stack.pop();d.nodeList=c.nodeList;if(!d.wasPreBound)for(e=d.childNodes=[],g=c.firstChild;g;g=g.nextSibling)e.push(g);c.templateInfo=d;e=d.nodeList;g=d.nodeInfoList;if(g.length)for(var h=0;h<g.length;h++){var m=e[h],n=g[h].bindings;if(n)for(var p=0;p<n.length;p++){var x=n[p],y=m,B=x;if(B.isCompound){for(var G=y.__dataCompoundStorage||(
y.__dataCompoundStorage={}),P=B.parts,S=Array(P.length),ca=0;ca<P.length;ca++)S[ca]=P[ca].literal;P=B.target;G[P]=S;B.literal&&"property"==B.kind&&("className"===P&&(y=nN(y)),y[P]=B.literal)}Gua(m,this,x)}m.__dataHost=this}this.__dataClientsReady&&this._runEffectsForTemplate(d,this.__data,null,!1);return c};
a.prototype._removeBoundDom=function(c){c=c.templateInfo;var d=c.previousSibling,e=c.nextSibling,g=c.parent;d?d.nextSibling=e:g&&(g.firstChild=e);e?e.previousSibling=d:g&&(g.lastChild=d);c=c.childNodes;for(d=0;d<c.length;d++)e=c[d],nN(nN(e).parentNode).removeChild(e)};
a._parseTemplateNode=function(c,d,e){var g=b._parseTemplateNode.call(this,c,d,e);if(c.nodeType===Node.TEXT_NODE){var h=this._parseBindings(c.textContent,d);h&&(c.textContent=Kua(h)||" ",LN(this,d,e,"text","textContent",h),g=!0)}return g};
a._parseTemplateNodeAttribute=function(c,d,e,g,h){var m=this._parseBindings(h,d);if(m){h=g;var n="property";sua.test(g)?n="attribute":"$"==g[g.length-1]&&(g=g.slice(0,-1),n="attribute");var p=Kua(m);p&&"attribute"==n&&("class"==g&&c.hasAttribute("class")&&(p+=" "+c.getAttribute(g)),c.setAttribute(g,p));"attribute"==n&&"disable-upgrade$"==h&&c.setAttribute(g,"");"input"===c.localName&&"value"===h&&c.setAttribute(h,"");c.removeAttribute(h);"property"===n&&(g=sN(g));LN(this,d,e,n,g,m,p);return!0}return b._parseTemplateNodeAttribute.call(this,
c,d,e,g,h)};
a._parseTemplateNestedTemplate=function(c,d,e){var g=b._parseTemplateNestedTemplate.call(this,c,d,e),h=c.parentNode,m=e.templateInfo,n="dom-if"===h.localName,p="dom-repeat"===h.localName;Zd&&(n||p)&&(h.removeChild(c),e=e.parentInfo,e.templateInfo=m,e.noted=!0,g=!1);c=m.hostProps;if($d&&n)c&&(d.hostProps=Object.assign(d.hostProps||{},c),Zd||(e.parentInfo.noted=!0));else for(var x in c)LN(this,d,e,"property","_host_"+x,[{mode:"{",source:x,dependencies:[x],hostProp:!0}]);return g};
a._parseBindings=function(c,d){for(var e=[],g=0,h;null!==(h=Jua.exec(c));){h.index>g&&e.push({literal:c.slice(g,h.index)});g=h[1][0];var m=!!h[2];h=h[3].trim();var n=!1,p="",x=-1;"{"==g&&0<(x=h.indexOf("::"))&&(p=h.substring(x+2),h=h.substring(0,x),n=!0);x=MN(h);var y=[];if(x){var B=x,G=B.args;B=B.methodName;for(var P=0;P<G.length;P++){var S=G[P];S.literal||y.push(S)}if((G=d.dynamicFns)&&G[B]||x.static)y.push(B),x.dynamicFn=!0}else y.push(h);e.push({source:h,mode:g,negate:m,customEvent:n,signature:x,
dependencies:y,event:p});g=Jua.lastIndex}g&&g<c.length&&(c=c.substring(g))&&e.push({literal:c});return e.length?e:null};
a._evaluateBinding=function(c,d,e,g,h,m){c=d.signature?KN(c,e,g,h,d.signature):e!=d.source?EN(c,d.source):m&&xN(e)?EN(c,e):c.__data[e];d.negate&&(c=!c);return c};
ea.Object.defineProperties(a.prototype,{PROPERTY_EFFECT_TYPES:{configurable:!0,enumerable:!0,get:function(){return rua}}});
return a}),ON=new function(){this.stack=[]};function Oua(a){a=Jd((a.body?a.body:a).textContent,a.baseURI);var b=document.createElement("style");b.textContent=a;return b}
function Pua(a){a=a.trim().split(/\s+/);for(var b=[],c=0;c<a.length;c++)b.push.apply(b,ka(Qua(a[c])));return b}
function Qua(a){var b=iN.import(a);if(!b)return console.warn("Could not find style data in module named",a),[];if(void 0===b._styles){a=[];a.push.apply(a,ka(_stylesFromModuleImports$$module$third_party$javascript$polymer$v2$polymer$lib$utils$style_gather(b)));var c=b.querySelector("template");c&&a.push.apply(a,ka(QN(c,b.assetpath)));b._styles=a}return b._styles}
function QN(a,b){if(!a._styles){for(var c=[],d=a.content.querySelectorAll("style"),e=0;e<d.length;e++){var g=d[e],h=g.getAttribute("include");h&&c.push.apply(c,ka(Pua(h).filter(function(m,n,p){return p.indexOf(m)===n})));
b&&(g.textContent=Jd(g.textContent,b));c.push(g)}a._styles=c}return a._styles}
function Rua(a){return(a=iN.import(a))?_stylesFromModuleImports$$module$third_party$javascript$polymer$v2$polymer$lib$utils$style_gather(a):[]}
function _stylesFromModuleImports$$module$third_party$javascript$polymer$v2$polymer$lib$utils$style_gather(a){var b=[];a=a.querySelectorAll("link[rel=import][type~=css]");for(var c=0;c<a.length;c++){var d=a[c];if(d.import){var e=d.import;if((d=d.hasAttribute("shady-unscoped"))&&!e._unscopedStyle){var g=Oua(e);g.setAttribute("shady-unscoped","");e._unscopedStyle=g}else e._style||(e._style=Oua(e));b.push(d?e._unscopedStyle:e._style)}}return b}
function Sua(a){a=a.trim().split(/\s+/);for(var b="",c=0;c<a.length;c++)b+=Tua(a[c]);return b}
function Tua(a){var b=iN.import(a);if(b&&void 0===b._cssText){var c=_cssFromModuleImports$$module$third_party$javascript$polymer$v2$polymer$lib$utils$style_gather(b),d=b.querySelector("template");d&&(c+=Uua(d,b.assetpath));b._cssText=c||null}b||console.warn("Could not find style data in module named",a);return b&&b._cssText||""}
function Uua(a,b){var c="";a=QN(a,b);for(b=0;b<a.length;b++){var d=a[b];d.parentNode&&d.parentNode.removeChild(d);c+=d.textContent}return c}
function _cssFromModuleImports$$module$third_party$javascript$polymer$v2$polymer$lib$utils$style_gather(a){var b="";a=_stylesFromModuleImports$$module$third_party$javascript$polymer$v2$polymer$lib$utils$style_gather(a);for(var c=0;c<a.length;c++)b+=a[c].textContent;return b}
;var Vua=window.ShadyCSS&&window.ShadyCSS.cssBuild,RN=mN(function(a){var b=eua(PN(a));a=function(){return b.call(this)||this};
l(a,b);a._finalizeClass=function(){b._finalizeClass.call(this);var c;this.hasOwnProperty("__ownObservers")||(this.__ownObservers=this.hasOwnProperty("observers")?this.observers:null);(c=this.__ownObservers)&&this.createObservers(c,this._properties);this._prepareTemplate()};
a._prepareTemplate=function(){var c=this.template;c&&("string"===typeof c?(console.error("template getter must return HTMLTemplateElement"),c=null):Sd||(c=c.cloneNode(!0)));this.prototype._template=c};
a.createProperties=function(c){for(var d in c){var e=this.prototype,g=d,h=c[d],m=c;h.computed&&(h.readOnly=!0);h.computed&&(e._hasReadOnlyEffect(g)?console.warn("Cannot redefine computed property '"+g+"'."):e._createComputedProperty(g,h.computed,m));h.readOnly&&!e._hasReadOnlyEffect(g)?e._createReadOnlyProperty(g,!h.computed):!1===h.readOnly&&e._hasReadOnlyEffect(g)&&console.warn("Cannot make readOnly property '"+g+"' non-readOnly.");h.reflectToAttribute&&!e._hasReflectEffect(g)?e._createReflectedProperty(g):
!1===h.reflectToAttribute&&e._hasReflectEffect(g)&&console.warn("Cannot make reflected property '"+g+"' non-reflected.");h.notify&&!e._hasNotifyEffect(g)?e._createNotifyingProperty(g):!1===h.notify&&e._hasNotifyEffect(g)&&console.warn("Cannot make notify property '"+g+"' non-notify.");h.observer&&e._createPropertyObserver(g,h.observer,m[h.observer]);e._addPropertyToAttributeMap(g)}};
a.createObservers=function(c,d){for(var e=this.prototype,g=0;g<c.length;g++)e._createMethodObserver(c[g],d)};
a.prototype._initializeProperties=function(){this.constructor.finalize();this.constructor._finalizeTemplate(this.localName);b.prototype._initializeProperties.call(this);this.rootPath=Nd;this.importPath=this.constructor.importPath;var c=this.constructor;if(!c.hasOwnProperty("__propertyDefaults")){c.__propertyDefaults=null;var d=c._properties,e;for(e in d){var g=d[e];"value"in g&&(c.__propertyDefaults=c.__propertyDefaults||{},c.__propertyDefaults[e]=g)}}if(c=c.__propertyDefaults)for(var h in c)d=c[h],
this._canApplyPropertyDefault(h)&&(d="function"==typeof d.value?d.value.call(this):d.value,this._hasAccessor(h)?this._setPendingProperty(h,d,!0):this[h]=d)};
a.prototype._canApplyPropertyDefault=function(c){return!this.hasOwnProperty(c)};
a._processStyleText=function(c,d){return Jd(c,d)};
a._finalizeTemplate=function(c){var d=this.prototype._template;if(d&&!d.__polymerFinalized){d.__polymerFinalized=!0;var e=this.importPath;e=e?Id(e):"";if(!Vua){for(var g=d.content.querySelectorAll("style"),h=QN(d),m=Rua(c),n=d.content.firstElementChild,p=0;p<m.length;p++){var x=m[p];x.textContent=this._processStyleText(x.textContent,e);d.content.insertBefore(x,n)}for(n=m=0;n<h.length;n++)p=h[n],x=g[m],x!==p?(p=p.cloneNode(!0),x.parentNode.insertBefore(p,x)):m++,p.textContent=this._processStyleText(p.textContent,
e)}window.ShadyCSS&&window.ShadyCSS.prepareTemplate(d,c);this.prototype._bindTemplate(d)}};
a.prototype.connectedCallback=function(){window.ShadyCSS&&this._template&&window.ShadyCSS.styleElement(this);b.prototype.connectedCallback.call(this)};
a.prototype.ready=function(){this._template&&(this.root=this._stampTemplate(this._template),this.$=this.root.$);b.prototype.ready.call(this)};
a.prototype._readyClients=function(){this._template&&(this.root=this._attachDom(this.root));b.prototype._readyClients.call(this)};
a.prototype._attachDom=function(c){var d=nN(this);if(d.attachShadow)return c?(d.shadowRoot||(d.attachShadow({mode:"open",shadyUpgradeFragment:c}),d.shadowRoot.appendChild(c)),Ud&&window.ShadyDOM&&window.ShadyDOM.flushInitial(d.shadowRoot),d.shadowRoot):null;throw Error("ShadowDOM not available. PolymerElement can create dom as children instead of in ShadowDOM by setting `this.root = this;` before `ready`.")};
a.prototype.updateStyles=function(c){window.ShadyCSS&&window.ShadyCSS.styleSubtree(this,c)};
a.prototype.resolveUrl=function(c,d){!d&&this.importPath&&(d=Id(this.importPath));return Id(c,d)};
a._parseTemplateContent=function(c,d,e){d.dynamicFns=d.dynamicFns||this._properties;return b._parseTemplateContent.call(this,c,d,e)};
a._addTemplatePropertyEffect=function(c,d,e){!Td||d in this._properties||e.info.part.signature&&e.info.part.signature.static||e.info.part.hostProp||c.nestedTemplate||console.warn("Property '"+d+"' used in template but not declared in 'properties'; attribute will not be observed.");return b._addTemplatePropertyEffect.call(this,c,d,e)};
ea.Object.defineProperties(a,{polymerElementVersion:{configurable:!0,enumerable:!0,get:function(){return"3.3.0"}},
template:{configurable:!0,enumerable:!0,get:function(){if(!this.hasOwnProperty("_template")){if(this.prototype.hasOwnProperty("_template"))var c=this.prototype._template;else{c=this.is;var d=null;if(c&&(!Qd||Rd)&&(d=iN.import(c,"template"),Qd&&!d))throw Error("strictTemplatePolicy: expecting dom-module or null template for "+c);c=d||Object.getPrototypeOf(this.prototype).constructor.template}this._template=c}return this._template},
set:function(c){this._template=c}},
importPath:{configurable:!0,enumerable:!0,get:function(){if(!this.hasOwnProperty("_importPath")){var c=this.importMeta;this._importPath=c?Kd(c.url):(c=iN.import(this.is))&&c.assetpath||Object.getPrototypeOf(this.prototype).constructor.importPath}return this._importPath}}});
return a});function SN(a,b){return{index:a,removed:[],addedCount:b}}
function Wua(a,b,c,d){var e=0,g=0,h=0,m=0,n=Math.min(b-e,d-g);if(0==e&&0==g)a:{for(h=0;h<n;h++)if(a[h]!==c[h])break a;h=n}if(b==a.length&&d==c.length){m=a.length;for(var p=c.length,x=0;x<n-h&&Xua(a[--m],c[--p]);)x++;m=x}e+=h;g+=h;b-=m;d-=m;if(0==b-e&&0==d-g)return[];if(e==b){for(b=SN(e,0);g<d;)b.removed.push(c[g++]);return[b]}if(g==d)return[SN(e,b-e)];n=e;h=g;d=d-h+1;m=b-n+1;b=Array(d);for(p=0;p<d;p++)b[p]=Array(m),b[p][0]=p;for(p=0;p<m;p++)b[0][p]=p;for(p=1;p<d;p++)for(x=1;x<m;x++)if(a[n+x-1]===
c[h+p-1])b[p][x]=b[p-1][x-1];else{var y=b[p-1][x]+1,B=b[p][x-1]+1;b[p][x]=y<B?y:B}n=b.length-1;h=b[0].length-1;d=b[n][h];for(a=[];0<n||0<h;)0==n?(a.push(2),h--):0==h?(a.push(3),n--):(m=b[n-1][h-1],p=b[n-1][h],x=b[n][h-1],y=p<x?p<m?p:m:x<m?x:m,y==m?(m==d?a.push(0):(a.push(1),d=m),n--,h--):y==p?(a.push(3),n--,d=p):(a.push(2),h--,d=x));a.reverse();b=void 0;n=[];for(h=0;h<a.length;h++)switch(a[h]){case 0:b&&(n.push(b),b=void 0);e++;g++;break;case 1:b||(b=SN(e,0));b.addedCount++;e++;b.removed.push(c[g]);
g++;break;case 2:b||(b=SN(e,0));b.addedCount++;e++;break;case 3:b||(b=SN(e,0)),b.removed.push(c[g]),g++;}b&&n.push(b);return n}
function TN(a,b){return Wua(a,a.length,b,b.length)}
function Xua(a,b){return a===b}
;var UN=RN(HTMLElement);var Yua=mN(function(a){var b=RN(a);a=function(){var c=b.call(this)||this;c.__lastItems=null;c.__lastMulti=null;c.__selectedMap=null;return c};
l(a,b);a.prototype.__updateSelection=function(c,d){var e=d.path;"items"==e?(d=d.base||[],e=this.__lastItems,c!==this.__lastMulti&&this.clearSelection(),e&&(e=TN(d,e),this.__applySplices(e)),this.__lastItems=d,this.__lastMulti=c):"items.splices"==d.path?this.__applySplices(d.value.indexSplices):(c=e.slice(6),d=parseInt(c,10),0>c.indexOf(".")&&c==d&&this.__deselectChangedIdx(d))};
a.prototype.__applySplices=function(c){for(var d=this,e=this.__selectedMap,g={},h=0;h<c.length;g={$jscomp$loop$prop$s$1981:g.$jscomp$loop$prop$s$1981},h++){g.$jscomp$loop$prop$s$1981=c[h];e.forEach(function(x){return function(y,B){y<x.$jscomp$loop$prop$s$1981.index||(y>=x.$jscomp$loop$prop$s$1981.index+x.$jscomp$loop$prop$s$1981.removed.length?e.set(B,y+x.$jscomp$loop$prop$s$1981.addedCount-x.$jscomp$loop$prop$s$1981.removed.length):e.set(B,-1))}}(g));
for(var m=0;m<g.$jscomp$loop$prop$s$1981.addedCount;m++){var n=g.$jscomp$loop$prop$s$1981.index+m;e.has(this.items[n])&&e.set(this.items[n],n)}}this.__updateLinks();var p=0;e.forEach(function(x,y){0>x?(d.multi?d.splice("selected",p,1):d.selected=d.selectedItem=null,e.delete(y)):p++})};
a.prototype.__updateLinks=function(){var c=this;this.__dataLinkedPaths={};if(this.multi){var d=0;this.__selectedMap.forEach(function(e){0<=e&&c.linkPaths("items."+e,"selected."+d++)})}else this.__selectedMap.forEach(function(e){c.linkPaths("selected","items."+e);
c.linkPaths("selectedItem","items."+e)})};
a.prototype.clearSelection=function(){this.__dataLinkedPaths={};this.__selectedMap=new Map;this.selected=this.multi?[]:null;this.selectedItem=null};
a.prototype.isSelected=function(c){return this.__selectedMap.has(c)};
a.prototype.isIndexSelected=function(c){return this.isSelected(this.items[c])};
a.prototype.__deselectChangedIdx=function(c){var d=this,e=this.__selectedIndexForItemIndex(c);if(0<=e){var g=0;this.__selectedMap.forEach(function(h,m){e==g++&&d.deselect(m)})}};
a.prototype.__selectedIndexForItemIndex=function(c){if(c=this.__dataLinkedPaths["items."+c])return parseInt(c.slice(9),10)};
a.prototype.deselect=function(c){var d=this.__selectedMap.get(c);if(0<=d){this.__selectedMap.delete(c);var e;this.multi&&(e=this.__selectedIndexForItemIndex(d));this.__updateLinks();this.multi?this.splice("selected",e,1):this.selected=this.selectedItem=null}};
a.prototype.deselectIndex=function(c){this.deselect(this.items[c])};
a.prototype.select=function(c){this.selectIndex(this.items.indexOf(c))};
a.prototype.selectIndex=function(c){var d=this.items[c];this.isSelected(d)?this.toggle&&this.deselectIndex(c):(this.multi||this.__selectedMap.clear(),this.__selectedMap.set(d,c),this.__updateLinks(),this.multi?this.push("selected",d):this.selected=this.selectedItem=d)};
ea.Object.defineProperties(a,{properties:{configurable:!0,enumerable:!0,get:function(){return{items:{type:Array},multi:{type:Boolean,value:!1},selected:{type:Object,notify:!0},selectedItem:{type:Object,notify:!0},toggle:{type:Boolean,value:!1}}}},
observers:{configurable:!0,enumerable:!0,get:function(){return["__updateSelection(multi, items.*)"]}}});
return a}),Zua=Yua(UN),VN=function(){return Zua.apply(this,arguments)||this};
l(VN,Zua);ea.Object.defineProperties(VN,{is:{configurable:!0,enumerable:!0,get:function(){return"array-selector"}},
template:{configurable:!0,enumerable:!0,get:function(){return null}}});
customElements.define(VN.is,VN);var WN=/(?:^|[;\s{]\s*)(--[\w-]*?)\s*:\s*(?:((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};{])+)|\{([^}]*)\}(?:(?=[;\s}])|$))/gi,XN=/(?:^|\W+)@apply\s*\(?([^);\n]*)\)?/gi,$ua=/@media\s(.*)/;function YN(a,b){for(var c in b)null===c?a.style.removeProperty(c):a.style.setProperty(c,b[c])}
function ava(a,b){return(a=window.getComputedStyle(a).getPropertyValue(b))?a.trim():""}
;var ZN=null,bva=window.HTMLImports&&window.HTMLImports.whenReady||null,$N;function cva(a){requestAnimationFrame(function(){bva?bva(a):(ZN||(ZN=new Promise(function(b){$N=b}),"complete"===document.readyState?$N():document.addEventListener("readystatechange",function(){"complete"===document.readyState&&$N()})),ZN.then(function(){a&&a()}))})}
;var aO=null,bO=null,cO=function(){this.customStyles=[];this.enqueued=!1;cva(function(){window.ShadyCSS.flushCustomStyles&&window.ShadyCSS.flushCustomStyles()})},dva=function(a){!a.enqueued&&bO&&(a.enqueued=!0,cva(bO))};
cO.prototype.addCustomStyle=function(a){a.__seenByShadyCSS||(a.__seenByShadyCSS=!0,this.customStyles.push(a),dva(this))};
cO.prototype.getStyleForCustomStyle=function(a){return a.__shadyCSSCachedStyle?a.__shadyCSSCachedStyle:a.getStyle?a.getStyle():a};
cO.prototype.processStyles=function(){for(var a=this.customStyles,b=0;b<a.length;b++){var c=a[b];if(!c.__shadyCSSCachedStyle){var d=this.getStyleForCustomStyle(c);d&&(d=d.__appliedElement||d,aO&&aO(d),c.__shadyCSSCachedStyle=d)}}return a};
cO.prototype.addCustomStyle=cO.prototype.addCustomStyle;cO.prototype.getStyleForCustomStyle=cO.prototype.getStyleForCustomStyle;cO.prototype.processStyles=cO.prototype.processStyles;Object.defineProperties(cO.prototype,{transformCallback:{get:function(){return aO},
set:function(a){aO=a}},
validateCallback:{get:function(){return bO},
set:function(a){var b=!1;bO||(b=!0);bO=a;b&&dva(this)}}});var dO=!(window.ShadyDOM&&window.ShadyDOM.inUse),eO;function eva(a){eO=a&&a.shimcssproperties?!1:dO||!(navigator.userAgent.match(/AppleWebKit\/601|Edge\/15/)||!window.CSS||!CSS.supports||!CSS.supports("box-shadow","0 0 0 var(--foo)"))}
var fO;window.ShadyCSS&&void 0!==window.ShadyCSS.cssBuild&&(fO=window.ShadyCSS.cssBuild);var fva=!(!window.ShadyCSS||!window.ShadyCSS.disableRuntime);window.ShadyCSS&&void 0!==window.ShadyCSS.nativeCss?eO=window.ShadyCSS.nativeCss:window.ShadyCSS?(eva(window.ShadyCSS),window.ShadyCSS=void 0):eva(window.WebComponents&&window.WebComponents.flags);var gO=eO;var hO=new cO;window.ShadyCSS||(window.ShadyCSS={prepareTemplate:function(){},
prepareTemplateDom:function(){},
prepareTemplateStyles:function(){},
styleSubtree:function(a,b){hO.processStyles();YN(a,b)},
styleElement:function(){hO.processStyles()},
styleDocument:function(a){hO.processStyles();YN(document.body,a)},
getComputedStyleValue:function(a,b){return ava(a,b)},
flushCustomStyles:function(){},
nativeCss:gO,nativeShadow:dO,cssBuild:fO,disableRuntime:fva});window.ShadyCSS.CustomStyleInterface=hO;var gva=window.ShadyCSS.CustomStyleInterface,iO=function(){var a=HTMLElement.call(this)||this;a._style=null;gva.addCustomStyle(a);return a};
l(iO,HTMLElement);iO.prototype.getStyle=function(){if(this._style)return this._style;var a=this.querySelector("style");if(!a)return null;this._style=a;var b=a.getAttribute("include");b&&(a.removeAttribute("include"),a.textContent=Sua(b)+a.textContent);this.ownerDocument!==window.document&&window.document.head.appendChild(this);return this._style};
iO.prototype.getStyle=iO.prototype.getStyle;window.customElements.define("custom-style",iO);var jO=function(){this._timer=this._callback=this._asyncModule=null};
f=jO.prototype;f.setConfig=function(a,b){var c=this;this._asyncModule=a;this._callback=b;this._timer=this._asyncModule.run(function(){c._timer=null;kO.delete(c);c._callback()})};
f.cancel=function(){this.isActive()&&(this._cancelAsync(),kO.delete(this))};
f._cancelAsync=function(){this.isActive()&&(this._asyncModule.cancel(this._timer),this._timer=null)};
f.flush=function(){this.isActive()&&(this.cancel(),this._callback())};
f.isActive=function(){return null!=this._timer};
var lO=function(a,b,c){a instanceof jO?a._cancelAsync():a=new jO;a.setConfig(b,c);return a},kO=new Set,mO=function(a){kO.add(a)},hva=function(){var a=!!kO.size;
kO.forEach(function(b){try{b.flush()}catch(c){setTimeout(function(){throw c})}});
return a};var nO="string"===typeof document.head.style.touchAction,oO=["mousedown","mousemove","mouseup","click"],iva=[0,1,4,2],pO;try{pO=1===new MouseEvent("test",{buttons:1}).buttons}catch(a){pO=!1}var qO=!1;(function(){try{var a=Object.defineProperty({},"passive",{get:function(){qO=!0}});
window.addEventListener("test",null,a);window.removeEventListener("test",null,a)}catch(b){}})();
function jva(a){if(!(-1<oO.indexOf(a))&&"touchend"!==a&&nO&&qO&&Pd)return{passive:!0}}
var kva=navigator.userAgent.match(/iP(?:[oa]d|hone)|Android/),rO=[],lva={button:!0,input:!0,keygen:!0,meter:!0,output:!0,textarea:!0,progress:!0,select:!0},mva={button:!0,command:!0,fieldset:!0,input:!0,keygen:!0,optgroup:!0,option:!0,select:!0,textarea:!0},nva=function(a){var b=a.sourceCapabilities;if(!b||b.firesTouchEvents)if(a.__polymerGesturesHandled={skip:!0},"click"===a.type){b=!1;for(var c=sO(a),d=0;d<c.length;d++){if(c[d].nodeType===Node.ELEMENT_NODE)if("label"===c[d].localName)rO.push(c[d]);else
if(lva[c[d].localName]){var e=c[d];var g=Array.prototype.slice.call(e.labels||[]);if(!g.length){g=[];var h=e.getRootNode();if(e.id)for(e=h.querySelectorAll("label[for = "+e.id+"]"),h=0;h<e.length;h++)g.push(e[h])}for(e=0;e<g.length;e++)b=b||-1<rO.indexOf(g[e])}if(c[d]===tO)return}b||(a.preventDefault(),a.stopPropagation())}};
function ova(a){for(var b=kva?["click"]:oO,c=0,d;c<b.length;c++)d=b[c],a?(rO.length=0,document.addEventListener(d,nva,!0)):document.removeEventListener(d,nva,!0)}
function uO(a){var b=a.type;return-1<oO.indexOf(b)?"mousemove"===b?(b=void 0===a.buttons?1:a.buttons,a instanceof window.MouseEvent&&!pO&&(b=iva[a.which]||0),!!(b&1)):0===(void 0===a.button?0:a.button):!1}
function pva(a){if("click"===a.type){if(0===a.detail)return!0;var b=_findOriginalTarget$$module$third_party$javascript$polymer$v2$polymer$lib$utils$gestures(a);if(!b.nodeType||b.nodeType!==Node.ELEMENT_NODE)return!0;b=b.getBoundingClientRect();var c=a.pageX;a=a.pageY;return!(c>=b.left&&c<=b.right&&a>=b.top&&a<=b.bottom)}return!1}
var tO=null,vO=null,qva=0,rva=0,sva=-1,wO=!1;function tva(a,b,c){a.movefn=b;a.upfn=c;document.addEventListener("mousemove",b);document.addEventListener("mouseup",c)}
function xO(a){document.removeEventListener("mousemove",a.movefn);document.removeEventListener("mouseup",a.upfn);a.movefn=null;a.upfn=null}
document.addEventListener("touchend",function(a){vO||ova(!0);tO=sO(a)[0];vO=lO(vO,kN.after(2500),function(){ova();vO=tO=null})},qO?{passive:!0}:!1);
var sO=window.ShadyDOM&&window.ShadyDOM.noPatch?window.ShadyDOM.composedPath:function(a){return a.composedPath&&a.composedPath()||[]},yO={},zO=[];
function uva(a,b){for(var c=document.elementFromPoint(a,b),d=c;d&&d.shadowRoot&&!window.ShadyDOM;){var e=d;d=d.shadowRoot.elementFromPoint(a,b);if(e===d)break;d&&(c=d)}return c}
function _findOriginalTarget$$module$third_party$javascript$polymer$v2$polymer$lib$utils$gestures(a){var b=sO(a);return 0<b.length?b[0]:a.target}
function _handleNative$$module$third_party$javascript$polymer$v2$polymer$lib$utils$gestures(a){var b=a.type,c=a.currentTarget.__polymerGestures;if(c&&(c=c[b])){if(!a.__polymerGesturesHandled&&(a.__polymerGesturesHandled={},"touch"===b.slice(0,5))){var d=a.changedTouches[0];"touchstart"===b&&1===a.touches.length&&(sva=d.identifier);if(sva!==d.identifier)return;nO||("touchstart"===b||"touchmove"===b)&&_handleTouchAction$$module$third_party$javascript$polymer$v2$polymer$lib$utils$gestures(a)}d=a.__polymerGesturesHandled;
if(!d.skip){for(var e=0,g;e<zO.length;e++)g=zO[e],c[g.name]&&!d[g.name]&&g.flow&&-1<g.flow.start.indexOf(a.type)&&g.reset&&g.reset();for(e=0;e<zO.length;e++)g=zO[e],c[g.name]&&!d[g.name]&&(d[g.name]=!0,g[b](a))}}}
function _handleTouchAction$$module$third_party$javascript$polymer$v2$polymer$lib$utils$gestures(a){var b=a.changedTouches[0],c=a.type;if("touchstart"===c)qva=b.clientX,rva=b.clientY,wO=!1;else if("touchmove"===c&&!wO){wO=!0;c="auto";for(var d=sO(a),e=0,g;e<d.length;e++)if(g=d[e],g.__polymerGesturesTouchAction){c=g.__polymerGesturesTouchAction;break}d=!1;e=Math.abs(qva-b.clientX);b=Math.abs(rva-b.clientY);a.cancelable&&("none"===c?d=!0:"pan-x"===c?d=b>e:"pan-y"===c&&(d=e>b));d?a.preventDefault():
AO("track")}}
function BO(a,b,c){return yO[b]?(_add$$module$third_party$javascript$polymer$v2$polymer$lib$utils$gestures(a,b,c),!0):!1}
function CO(a,b,c){return yO[b]?(_remove$$module$third_party$javascript$polymer$v2$polymer$lib$utils$gestures(a,b,c),!0):!1}
function _add$$module$third_party$javascript$polymer$v2$polymer$lib$utils$gestures(a,b,c){var d=yO[b],e=d.deps,g=d.name,h=a.__polymerGestures;h||(a.__polymerGestures=h={});for(var m=0,n,p;m<e.length;m++)n=e[m],kva&&-1<oO.indexOf(n)&&"click"!==n||((p=h[n])||(h[n]=p={_count:0}),0===p._count&&a.addEventListener(n,_handleNative$$module$third_party$javascript$polymer$v2$polymer$lib$utils$gestures,jva(n)),p[g]=(p[g]||0)+1,p._count=(p._count||0)+1);a.addEventListener(b,c);d.touchAction&&DO(a,d.touchAction)}
function _remove$$module$third_party$javascript$polymer$v2$polymer$lib$utils$gestures(a,b,c){var d=yO[b],e=d.deps;d=d.name;var g=a.__polymerGestures;if(g)for(var h=0,m,n;h<e.length;h++)m=e[h],(n=g[m])&&n[d]&&(n[d]=(n[d]||1)-1,n._count=(n._count||1)-1,0===n._count&&a.removeEventListener(m,_handleNative$$module$third_party$javascript$polymer$v2$polymer$lib$utils$gestures,jva(m)));a.removeEventListener(b,c)}
function EO(a){zO.push(a);for(var b=0;b<a.emits.length;b++)yO[a.emits[b]]=a}
function _findRecognizerByEvent$$module$third_party$javascript$polymer$v2$polymer$lib$utils$gestures(a){for(var b=0,c;b<zO.length;b++){c=zO[b];for(var d=0,e;d<c.emits.length;d++)if(e=c.emits[d],e===a)return c}return null}
function DO(a,b){nO&&a instanceof HTMLElement&&lN.run(function(){a.style.touchAction=b});
a.__polymerGesturesTouchAction=b}
function _fire$$module$third_party$javascript$polymer$v2$polymer$lib$utils$gestures(a,b,c){b=new Event(b,{bubbles:!0,cancelable:!0,composed:!0});b.detail=c;nN(a).dispatchEvent(b);b.defaultPrevented&&(a=c.preventer||c.sourceEvent)&&a.preventDefault&&a.preventDefault()}
function AO(a){a=_findRecognizerByEvent$$module$third_party$javascript$polymer$v2$polymer$lib$utils$gestures(a);a.info&&(a.info.prevent=!0)}
EO({name:"downup",deps:["mousedown","touchstart","touchend"],flow:{start:["mousedown","touchstart"],end:["mouseup","touchend"]},emits:["down","up"],info:{movefn:null,upfn:null},reset:function(){xO(this.info)},
mousedown:function(a){if(uO(a)){var b=_findOriginalTarget$$module$third_party$javascript$polymer$v2$polymer$lib$utils$gestures(a),c=this;tva(this.info,function(d){uO(d)||(FO("up",b,d),xO(c.info))},function(d){uO(d)&&FO("up",b,d);
xO(c.info)});
FO("down",b,a)}},
touchstart:function(a){FO("down",_findOriginalTarget$$module$third_party$javascript$polymer$v2$polymer$lib$utils$gestures(a),a.changedTouches[0],a)},
touchend:function(a){FO("up",_findOriginalTarget$$module$third_party$javascript$polymer$v2$polymer$lib$utils$gestures(a),a.changedTouches[0],a)}});
function FO(a,b,c,d){b&&_fire$$module$third_party$javascript$polymer$v2$polymer$lib$utils$gestures(b,a,{x:c.clientX,y:c.clientY,sourceEvent:c,preventer:d,prevent:function(e){return AO(e)}})}
EO({name:"track",touchAction:"none",deps:["mousedown","touchstart","touchmove","touchend"],flow:{start:["mousedown","touchstart"],end:["mouseup","touchend"]},emits:["track"],info:{x:0,y:0,state:"start",started:!1,moves:[],addMove:function(a){2<this.moves.length&&this.moves.shift();this.moves.push(a)},
movefn:null,upfn:null,prevent:!1},reset:function(){this.info.state="start";this.info.started=!1;this.info.moves=[];this.info.x=0;this.info.y=0;this.info.prevent=!1;xO(this.info)},
mousedown:function(a){if(uO(a)){var b=_findOriginalTarget$$module$third_party$javascript$polymer$v2$polymer$lib$utils$gestures(a),c=this,d=function(e){var g=e.clientX,h=e.clientY;vva(c.info,g,h)&&(c.info.state=c.info.started?"mouseup"===e.type?"end":"track":"start","start"===c.info.state&&AO("tap"),c.info.addMove({x:g,y:h}),uO(e)||(c.info.state="end",xO(c.info)),b&&GO(c.info,b,e),c.info.started=!0)};
tva(this.info,d,function(e){c.info.started&&d(e);xO(c.info)});
this.info.x=a.clientX;this.info.y=a.clientY}},
touchstart:function(a){a=a.changedTouches[0];this.info.x=a.clientX;this.info.y=a.clientY},
touchmove:function(a){var b=_findOriginalTarget$$module$third_party$javascript$polymer$v2$polymer$lib$utils$gestures(a);a=a.changedTouches[0];var c=a.clientX,d=a.clientY;vva(this.info,c,d)&&("start"===this.info.state&&AO("tap"),this.info.addMove({x:c,y:d}),GO(this.info,b,a),this.info.state="track",this.info.started=!0)},
touchend:function(a){var b=_findOriginalTarget$$module$third_party$javascript$polymer$v2$polymer$lib$utils$gestures(a);a=a.changedTouches[0];this.info.started&&(this.info.state="end",this.info.addMove({x:a.clientX,y:a.clientY}),GO(this.info,b,a))}});
function vva(a,b,c){if(a.prevent)return!1;if(a.started)return!0;c=Math.abs(a.y-c);return 5<=Math.abs(a.x-b)||5<=c}
function GO(a,b,c){if(b){var d=a.moves[a.moves.length-2],e=a.moves[a.moves.length-1],g=e.x-a.x,h=e.y-a.y,m=0;if(d){var n=e.x-d.x;m=e.y-d.y}_fire$$module$third_party$javascript$polymer$v2$polymer$lib$utils$gestures(b,"track",{state:a.state,x:c.clientX,y:c.clientY,dx:g,dy:h,ddx:n,ddy:m,sourceEvent:c,hover:function(){return uva(c.clientX,c.clientY)}})}}
EO({name:"tap",deps:["mousedown","click","touchstart","touchend"],flow:{start:["mousedown","touchstart"],end:["click","touchend"]},emits:["tap"],info:{x:NaN,y:NaN,prevent:!1},reset:function(){this.info.x=NaN;this.info.y=NaN;this.info.prevent=!1},
mousedown:function(a){uO(a)&&(this.info.x=a.clientX,this.info.y=a.clientY)},
click:function(a){uO(a)&&wva(this.info,a)},
touchstart:function(a){a=a.changedTouches[0];this.info.x=a.clientX;this.info.y=a.clientY},
touchend:function(a){wva(this.info,a.changedTouches[0],a)}});
function wva(a,b,c){var d=Math.abs(b.clientX-a.x),e=Math.abs(b.clientY-a.y),g=_findOriginalTarget$$module$third_party$javascript$polymer$v2$polymer$lib$utils$gestures(c||b);!g||mva[g.localName]&&g.hasAttribute("disabled")||!(isNaN(d)||isNaN(e)||25>=d&&25>=e||pva(b))||a.prevent||_fire$$module$third_party$javascript$polymer$v2$polymer$lib$utils$gestures(g,"tap",{x:b.clientX,y:b.clientY,sourceEvent:b,preventer:c})}
;var HO=mN(function(a){var b=function(){return a.apply(this,arguments)||this};
l(b,a);b.prototype._addEventListenerToNode=function(c,d,e){BO(c,d,e)||a.prototype._addEventListenerToNode.call(this,c,d,e)};
b.prototype._removeEventListenerFromNode=function(c,d,e){CO(c,d,e)||a.prototype._removeEventListenerFromNode.call(this,c,d,e)};
return b});function IO(a,b,c,d,e){var g;e&&(g="object"===typeof c&&null!==c)&&(d=a.__dataTemp[b]);d=d!==c&&(d===d||c===c);g&&d&&(a.__dataTemp[b]=c);return d}
var JO=mN(function(a){var b=function(){return a.apply(this,arguments)||this};
l(b,a);b.prototype._shouldPropertyChange=function(c,d,e){return IO(this,c,d,e,!0)};
return b}),KO=mN(function(a){var b=function(){return a.apply(this,arguments)||this};
l(b,a);b.prototype._shouldPropertyChange=function(c,d,e){return IO(this,c,d,e,this.mutableData)};
ea.Object.defineProperties(b,{properties:{configurable:!0,enumerable:!0,get:function(){return{mutableData:Boolean}}}});
return b});
JO._mutablePropertyChange=IO;var xva=!1;function LO(){if(Sd&&!Md){if(!xva){xva=!0;var a=document.createElement("style");a.textContent="dom-bind,dom-if,dom-repeat{display:none;}";document.head.appendChild(a)}return!0}return!1}
;var yva=HO(KO(PN(HTMLElement))),MO=function(){var a=yva.call(this)||this;if(Qd)throw Error("strictTemplatePolicy: dom-bind not allowed");a.root=null;a.$=null;a.__children=null;return a};
l(MO,yva);f=MO.prototype;f.attributeChangedCallback=function(){this.mutableData=!0};
f.connectedCallback=function(){LO()||(this.style.display="none");this.render()};
f.disconnectedCallback=function(){this.__removeChildren()};
f.__insertChildren=function(){nN(nN(this).parentNode).insertBefore(this.root,this)};
f.__removeChildren=function(){if(this.__children)for(var a=0;a<this.__children.length;a++)this.root.appendChild(this.__children[a])};
f.render=function(){var a=this;if(!this.__children){var b=b||this.querySelector("template");if(!b){var c=new MutationObserver(function(){if(b=a.querySelector("template"))c.disconnect(),a.render();else throw Error("dom-bind requires a <template> child")});
c.observe(this,{childList:!0});return}this.root=this._stampTemplate(b);this.$=this.root.$;this.__children=[];for(var d=this.root.firstChild;d;d=d.nextSibling)this.__children[this.__children.length]=d;this._enableProperties()}this.__insertChildren();this.dispatchEvent(new CustomEvent("dom-change",{bubbles:!0,composed:!0}))};
ea.Object.defineProperties(MO,{observedAttributes:{configurable:!0,enumerable:!0,get:function(){return["mutable-data"]}}});
customElements.define("dom-bind",MO);var NO=function(){do{var a=window.ShadyDOM&&ShadyDOM.flush();window.ShadyCSS&&window.ShadyCSS.ScopingShim&&window.ShadyCSS.ScopingShim.flush();var b=hva()}while(a||b)};var OO=null;function PO(){return OO}
PO.prototype=Object.create(HTMLTemplateElement.prototype,{constructor:{value:PO,writable:!0}});var zva=PN(PO),Ava=JO(zva);function Bva(a,b){OO=a;Object.setPrototypeOf(a,b.prototype);new b;OO=null}
var QO=PN(function(){});
function Cva(a,b){for(var c=0;c<b.length;c++){var d=b[c];if(!!a!=!!d.__hideTemplateChildren__)if(d.nodeType===Node.TEXT_NODE)a?(d.__polymerTextContent__=d.textContent,d.textContent=""):d.textContent=d.__polymerTextContent__;else if("slot"===d.localName){if(a)d.__polymerReplaced__=document.createComment("hidden-slot"),nN(nN(d).parentNode).replaceChild(d.__polymerReplaced__,d);else{var e=d.__polymerReplaced__;e&&nN(nN(e).parentNode).replaceChild(d,e)}}else d.style&&(a?(d.__polymerDisplay__=d.style.display,
d.style.display="none"):d.style.display=d.__polymerDisplay__);d.__hideTemplateChildren__=a;d._showHideChildren&&d._showHideChildren(a)}}
var RO=function(a){var b=QO.call(this)||this;b._configureProperties(a);b.root=b._stampTemplate(b.__dataHost);var c=[];b.children=c;for(var d=b.root.firstChild;d;d=d.nextSibling)c.push(d),d.__templatizeInstance=b;b.__templatizeOwner&&b.__templatizeOwner.__hideTemplateChildren__&&b._showHideChildren(!0);c=b.__templatizeOptions;(a&&c.instanceProps||!c.instanceProps)&&b._enableProperties();return b};
l(RO,QO);f=RO.prototype;f._configureProperties=function(a){if(this.__templatizeOptions.forwardHostProp)for(var b in this.__hostProps)this._setPendingProperty(b,this.__dataHost["_host_"+b]);for(var c in a)this._setPendingProperty(c,a[c])};
f.forwardHostProp=function(a,b){this._setPendingPropertyOrPath(a,b,!1,!0)&&this.__dataHost._enqueueClient(this)};
f._addEventListenerToNode=function(a,b,c){var d=this;if(this._methodHost&&this.__templatizeOptions.parentModel)this._methodHost._addEventListenerToNode(a,b,function(g){g.model=d;c(g)});else
{var e=this.__dataHost.__dataHost;e&&e._addEventListenerToNode(a,b,c)}};
f._showHideChildren=function(a){Cva(a,this.children)};
f._setUnmanagedPropertyToNode=function(a,b,c){a.__hideTemplateChildren__&&a.nodeType==Node.TEXT_NODE&&"textContent"==b?a.__polymerTextContent__=c:QO.prototype._setUnmanagedPropertyToNode.call(this,a,b,c)};
f.dispatchEvent=function(){return!0};
ea.Object.defineProperties(RO.prototype,{parentModel:{configurable:!0,enumerable:!0,get:function(){var a=this.__parentModel;if(!a){var b;a=this;do a=a.__dataHost.__dataHost;while((b=a.__templatizeOptions)&&!b.parentModel);this.__parentModel=a}return a}}});
var Dva=JO(RO);function Eva(a){return(a=a.__dataHost)&&a._methodHost||a}
function Fva(a,b,c){var d=c.mutableData?Dva:RO;SO.mixin&&(d=SO.mixin(d));var e=function(){return d.apply(this,arguments)||this};
l(e,d);e.prototype.__templatizeOptions=c;e.prototype._bindTemplate(a);Gva(e,a,b,c);return e}
function Hva(a,b,c,d){var e=c.forwardHostProp;if(e&&b.hasHostProps){var g="template"==a.localName,h=b.templatizeTemplateClass;if(!h){if(g){var m=c.mutableData?Ava:zva;h=function(){return m.apply(this,arguments)||this};
l(h,m);h=b.templatizeTemplateClass=h}else{var n=a.constructor;h=function(){return n.apply(this,arguments)||this};
l(h,n);h=b.templatizeTemplateClass=h}var p=b.hostProps,x;for(x in p)h.prototype._addPropertyEffect("_host_"+x,h.prototype.PROPERTY_EFFECT_TYPES.PROPAGATE,{fn:Iva(e)}),h.prototype._createNotifyingProperty("_host_"+x);Td&&d&&Jva(b,c,d)}a.__dataProto&&Object.assign(a.__data,a.__dataProto);if(g)Bva(a,h),a.__dataTemp={},a.__dataPending=null,a.__dataOld=null,a._enableProperties();else{Object.setPrototypeOf(a,h.prototype);b=b.hostProps;for(var y in b)y="_host_"+y,y in a&&(b=a[y],delete a[y],a.__data[y]=
b)}}}
function Iva(a){return function(b,c,d){a.call(b.__templatizeOwner,c.substring(6),d[c])}}
function Gva(a,b,c,d){var e=c.hostProps||{},g;for(g in d.instanceProps){delete e[g];var h=d.notifyInstanceProp;h&&a.prototype._addPropertyEffect(g,a.prototype.PROPERTY_EFFECT_TYPES.NOTIFY,{fn:Kva(h)})}if(d.forwardHostProp&&b.__dataHost)for(var m in e)c.hasHostProps||(c.hasHostProps=!0),a.prototype._addPropertyEffect(m,a.prototype.PROPERTY_EFFECT_TYPES.NOTIFY,{fn:Lva()})}
function Kva(a){return function(b,c,d){a.call(b.__templatizeOwner,b,c,d[c])}}
function Lva(){return function(a,b,c){a.__dataHost._setPendingPropertyOrPath("_host_"+b,c[b],!0,!0)}}
function SO(a,b,c){if(Qd&&!Eva(a))throw Error("strictTemplatePolicy: template owner not trusted");c=c||{};if(a.__templatizeOwner)throw Error("A <template> can only be templatized once");a.__templatizeOwner=b;var d=(b?b.constructor:RO)._parseTemplate(a),e=d.templatizeInstanceClass;e||(e=Fva(a,d,c),d.templatizeInstanceClass=e);var g=Eva(a);Hva(a,d,c,g);c=function(){return e.apply(this,arguments)||this};
l(c,e);c.prototype._methodHost=g;c.prototype.__dataHost=a;c.prototype.__templatizeOwner=b;c.prototype.__hostProps=d.hostProps;return c}
function Jva(a,b,c){c=c.constructor._properties;a=a.propertyEffects;b=b.instanceProps;for(var d in a)if(!(c[d]||b&&b[d]))for(var e=a[d],g=0;g<e.length;g++){var h=e[g].info.part;if(!h.signature||!h.signature.static){console.warn("Property '"+d+"' used in template but not declared in 'properties'; attribute will not be observed.");break}}}
function TO(a,b){for(var c;b;)if(c=b.__dataHost?b:b.__templatizeInstance){if(c.__dataHost!=a)b=c.__dataHost;else return c;}else b=nN(b).parentNode;return null}
;var UO=function(){var a=UN.call(this)||this;a.__renderDebouncer=null;a._lastIf=!1;a.__hideTemplateChildren__=!1;return a};
l(UO,UN);f=UO.prototype;f.__debounceRender=function(){var a=this;this.__renderDebouncer=lO(this.__renderDebouncer,lN,function(){return a.__render()});
mO(this.__renderDebouncer)};
f.disconnectedCallback=function(){UN.prototype.disconnectedCallback.call(this);var a=nN(this).parentNode;a&&(a.nodeType!=Node.DOCUMENT_FRAGMENT_NODE||nN(a).host)||this.__teardownInstance()};
f.connectedCallback=function(){UN.prototype.connectedCallback.call(this);LO()||(this.style.display="none");this.if&&this.__debounceRender()};
f.__ensureTemplate=function(){var a=this;if(!this.__template){var b=this._templateInfo?this:nN(this).querySelector("template");if(!b){var c=new MutationObserver(function(){if(nN(a).querySelector("template"))c.disconnect(),a.__render();else throw Error("dom-if requires a <template> child")});
c.observe(this,{childList:!0});return!1}this.__template=b}return!0};
f.__ensureInstance=function(){var a=nN(this).parentNode;if(this.__hasInstance()){var b=this.__getInstanceNodes();if(b&&b.length&&nN(this).previousSibling!==b[b.length-1])for(var c=0,d=void 0;c<b.length&&(d=b[c]);c++)nN(a).insertBefore(d,this)}else{if(!a||!this.__ensureTemplate())return!1;this.__createAndInsertInstance(a)}return!0};
f.render=function(){NO()};
f.__render=function(){if(this.if){if(!this.__ensureInstance())return}else this.restamp&&this.__teardownInstance();this._showHideChildren();this.if!=this._lastIf&&(this.dispatchEvent(new CustomEvent("dom-change",{bubbles:!0,composed:!0})),this._lastIf=this.if)};
f.__hasInstance=function(){};
f.__getInstanceNodes=function(){};
f.__createAndInsertInstance=function(){};
f.__teardownInstance=function(){};
f._showHideChildren=function(){};
ea.Object.defineProperties(UO,{is:{configurable:!0,enumerable:!0,get:function(){return"dom-if"}},
template:{configurable:!0,enumerable:!0,get:function(){return null}},
properties:{configurable:!0,enumerable:!0,get:function(){return{if:{type:Boolean,observer:"__debounceRender"},restamp:{type:Boolean,observer:"__debounceRender"}}}}});
var VO=function(){var a=UO.call(this)||this;a.__instance=null;a.__syncInfo=null;return a};
l(VO,UO);f=VO.prototype;f.__hasInstance=function(){return!!this.__instance};
f.__getInstanceNodes=function(){return this.__instance.templateInfo.childNodes};
f.__createAndInsertInstance=function(a){var b=this,c=this.__dataHost||this;if(Qd&&!this.__dataHost)throw Error("strictTemplatePolicy: template owner not trusted");var d=c._bindTemplate(this.__template,!0);d.runEffects=function(e,g,h){var m=b.__syncInfo;b.if?(m&&(b.__syncInfo=null,b._showHideChildren(),g=Object.assign(m.changedProps,g),h=h||m.hasPaths),e(g,h)):m?(m.hasPaths=m.hasPaths||h,Object.assign(m.changedProps,g)):b.__syncInfo={runEffects:e,changedProps:Object.assign({},g),hasPaths:h}};
this.__instance=c._stampTemplate(this.__template,d);nN(a).insertBefore(this.__instance,this)};
f.__syncHostProperties=function(){var a=this.__syncInfo;a&&(this.__syncInfo=null,a.runEffects(a.changedProps,a.hasPaths))};
f.__teardownInstance=function(){var a=this.__dataHost||this;this.__instance&&(a._removeBoundDom(this.__instance),this.__instance=null)};
f._showHideChildren=function(){var a=this.__hideTemplateChildren__||!this.if;this.__instance&&!!this.__instance.__hidden!==a&&(this.__instance.__hidden=a,Cva(a,this.__instance.templateInfo.childNodes));a||this.__syncHostProperties()};
var WO=function(){var a=UO.call(this)||this;a.__ctor=null;a.__instance=null;a.__invalidProps=null;return a};
l(WO,UO);f=WO.prototype;f.__hasInstance=function(){return!!this.__instance};
f.__getInstanceNodes=function(){return this.__instance.children};
f.__createAndInsertInstance=function(a){this.__ctor||(this.__ctor=SO(this.__template,this,{mutableData:!0,forwardHostProp:function(b,c){this.__instance&&(this.if?this.__instance.forwardHostProp(b,c):(this.__invalidProps=this.__invalidProps||Object.create(null),this.__invalidProps[yN(b)]=!0))}}));
this.__instance=new this.__ctor;nN(a).insertBefore(this.__instance.root,this)};
f.__teardownInstance=function(){if(this.__instance){var a=this.__instance.children;if(a&&a.length){var b=nN(a[0]).parentNode;if(b){b=nN(b);for(var c=0,d=void 0;c<a.length&&(d=a[c]);c++)b.removeChild(d)}}this.__instance=this.__invalidProps=null}};
f.__syncHostProperties=function(){var a=this.__invalidProps;if(a){for(var b in a)this.__instance._setPendingProperty(b,this.__dataHost[b]);this.__instance._flushProperties();this.__invalidProps=null}};
f._showHideChildren=function(){var a=this.__hideTemplateChildren__||!this.if;this.__instance&&!!this.__instance.__hidden!==a&&(this.__instance.__hidden=a,this.__instance._showHideChildren(a));a||this.__syncHostProperties()};
var XO=$d?VO:WO;customElements.define(XO.is,XO);var YO=KO(UN),ZO=function(){var a=YO.call(this)||this;a.__instances=[];a.__limit=Infinity;a.__pool=[];a.__renderDebouncer=null;a.__itemsIdxToInstIdx={};a.__chunkCount=null;a.__lastChunkTime=null;a.__sortFn=null;a.__filterFn=null;a.__observePaths=null;a.__ctor=null;a.__isDetached=!0;a.template=null;return a};
l(ZO,YO);f=ZO.prototype;f.disconnectedCallback=function(){YO.prototype.disconnectedCallback.call(this);this.__isDetached=!0;for(var a=0;a<this.__instances.length;a++)this.__detachInstance(a)};
f.connectedCallback=function(){YO.prototype.connectedCallback.call(this);LO()||(this.style.display="none");if(this.__isDetached){this.__isDetached=!1;for(var a=nN(nN(this).parentNode),b=0;b<this.__instances.length;b++)this.__attachInstance(b,a)}};
f.__ensureTemplatized=function(){var a=this;if(!this.__ctor){var b=this.template=this._templateInfo?this:this.querySelector("template");if(!b){var c=new MutationObserver(function(){if(a.querySelector("template"))c.disconnect(),a.__render();else throw Error("dom-repeat requires a <template> child")});
c.observe(this,{childList:!0});return!1}var d={};d[this.as]=!0;d[this.indexAs]=!0;d[this.itemsIndexAs]=!0;this.__ctor=SO(b,this,{mutableData:this.mutableData,parentModel:!0,instanceProps:d,forwardHostProp:function(e,g){for(var h=this.__instances,m=0,n=void 0;m<h.length&&(n=h[m]);m++)n.forwardHostProp(e,g)},
notifyInstanceProp:function(e,g,h){qua(this.as,g)&&(e=e[this.itemsIndexAs],g==this.as&&(this.items[e]=h),this.notifyPath(BN(this.as,"items."+e,g),h))}})}return!0};
f.__getMethodHost=function(){return this.__dataHost._methodHost||this.__dataHost};
f.__functionFromPropertyValue=function(a){if("string"===typeof a){var b=this.__getMethodHost();return function(){return b[a].apply(b,arguments)}}return a};
f.__sortChanged=function(a){this.__sortFn=this.__functionFromPropertyValue(a);this.items&&this.__debounceRender(this.__render)};
f.__filterChanged=function(a){this.__filterFn=this.__functionFromPropertyValue(a);this.items&&this.__debounceRender(this.__render)};
f.__computeFrameTime=function(a){return Math.ceil(1E3/a)};
f.__initializeChunking=function(){this.initialCount&&(this.__chunkCount=this.__limit=this.initialCount,this.__lastChunkTime=performance.now())};
f.__tryRenderChunk=function(){this.items&&this.__limit<this.items.length&&this.__debounceRender(this.__requestRenderChunk)};
f.__requestRenderChunk=function(){var a=this;requestAnimationFrame(function(){return a.__renderChunk()})};
f.__renderChunk=function(){var a=performance.now();this.__chunkCount=Math.round(this._targetFrameTime/(a-this.__lastChunkTime)*this.__chunkCount)||1;this.__limit+=this.__chunkCount;this.__lastChunkTime=a;this.__debounceRender(this.__render)};
f.__observeChanged=function(){this.__observePaths=this.observe&&this.observe.replace(".*",".").split(" ")};
f.__itemsChanged=function(a){this.items&&!Array.isArray(this.items)&&console.warn("dom-repeat expected array for `items`, found",this.items);this.__handleItemPath(a.path,a.value)||(this.__initializeChunking(),this.__debounceRender(this.__render))};
f.__handleObservedPaths=function(a){if(this.__sortFn||this.__filterFn)if(!a)this.__debounceRender(this.__render,this.delay);else if(this.__observePaths)for(var b=this.__observePaths,c=0;c<b.length;c++)0===a.indexOf(b[c])&&this.__debounceRender(this.__render,this.delay)};
f.__debounceRender=function(a,b){b=void 0===b?0:b;this.__renderDebouncer=lO(this.__renderDebouncer,0<b?kN.after(b):lN,a.bind(this));mO(this.__renderDebouncer)};
f.render=function(){this.__debounceRender(this.__render);NO()};
f.__render=function(){this.__ensureTemplatized()&&(this.__applyFullRefresh(),this.__pool.length=0,this._setRenderedItemCount(this.__instances.length),this.dispatchEvent(new CustomEvent("dom-change",{bubbles:!0,composed:!0})),this.__tryRenderChunk())};
f.__applyFullRefresh=function(){for(var a=this,b=this.items||[],c=Array(b.length),d=0;d<b.length;d++)c[d]=d;this.__filterFn&&(c=c.filter(function(p,x,y){return a.__filterFn(b[p],x,y)}));
this.__sortFn&&c.sort(function(p,x){return a.__sortFn(b[p],b[x])});
var e=this.__itemsIdxToInstIdx={};d=0;for(var g=Math.min(c.length,this.__limit);d<g;d++){var h=this.__instances[d],m=c[d],n=b[m];e[m]=d;h?(h._setPendingProperty(this.as,n),h._setPendingProperty(this.indexAs,d),h._setPendingProperty(this.itemsIndexAs,m),h._flushProperties()):this.__insertInstance(n,d,m)}for(c=this.__instances.length-1;c>=d;c--)this.__detachAndRemoveInstance(c)};
f.__detachInstance=function(a){a=this.__instances[a];for(var b=nN(a.root),c=0;c<a.children.length;c++)b.appendChild(a.children[c]);return a};
f.__attachInstance=function(a,b){b.insertBefore(this.__instances[a].root,this)};
f.__detachAndRemoveInstance=function(a){var b=this.__detachInstance(a);b&&this.__pool.push(b);this.__instances.splice(a,1)};
f.__stampInstance=function(a,b,c){var d={};d[this.as]=a;d[this.indexAs]=b;d[this.itemsIndexAs]=c;return new this.__ctor(d)};
f.__insertInstance=function(a,b,c){var d=this.__pool.pop();d?(d._setPendingProperty(this.as,a),d._setPendingProperty(this.indexAs,b),d._setPendingProperty(this.itemsIndexAs,c),d._flushProperties()):d=this.__stampInstance(a,b,c);a=(a=this.__instances[b+1])?a.children[0]:this;nN(nN(this).parentNode).insertBefore(d.root,a);return this.__instances[b]=d};
f._showHideChildren=function(a){for(var b=0;b<this.__instances.length;b++)this.__instances[b]._showHideChildren(a)};
f.__handleItemPath=function(a,b){var c=a.slice(6),d=c.indexOf(".");a=0>d?c:c.substring(0,d);if(a==parseInt(a,10)){c=0>d?"":c.substring(d+1);this.__handleObservedPaths(c);if(a=this.__instances[this.__itemsIdxToInstIdx[a]])a._setPendingPropertyOrPath(this.as+(c?"."+c:""),b,!1,!0),a._flushProperties();return!0}};
f.itemForElement=function(a){return(a=this.modelForElement(a))&&a[this.as]};
f.indexForElement=function(a){return(a=this.modelForElement(a))&&a[this.indexAs]};
f.modelForElement=function(a){return TO(this.template,a)};
ea.Object.defineProperties(ZO,{is:{configurable:!0,enumerable:!0,get:function(){return"dom-repeat"}},
template:{configurable:!0,enumerable:!0,get:function(){return null}},
properties:{configurable:!0,enumerable:!0,get:function(){return{items:{type:Array},as:{type:String,value:"item"},indexAs:{type:String,value:"index"},itemsIndexAs:{type:String,value:"itemsIndex"},sort:{type:Function,observer:"__sortChanged"},filter:{type:Function,observer:"__filterChanged"},observe:{type:String,observer:"__observeChanged"},delay:Number,renderedItemCount:{type:Number,notify:!0,readOnly:!0},initialCount:{type:Number,observer:"__initializeChunking"},targetFramerate:{type:Number,value:20},
_targetFrameTime:{type:Number,computed:"__computeFrameTime(targetFramerate)"}}}},
observers:{configurable:!0,enumerable:!0,get:function(){return["__itemsChanged(items.*)"]}}});
ZO.prototype._setRenderedItemCount=function(){};
customElements.define(ZO.is,ZO);function $O(a){return"slot"===a.localName}
var aP=function(a,b){var c=this;this._nativeChildrenObserver=this._shadyChildrenObserver=null;this._connected=!1;this._target=a;this.callback=b;this._effectiveNodes=[];this._observer=null;this._scheduled=!1;this._boundSchedule=function(){c._schedule()};
this.connect();this._schedule()},Mva=function(a){var b=nN(a);
return $O(a)?b.assignedNodes({flatten:!0}):Array.from(b.childNodes).map(function(c){return $O(c)?nN(c).assignedNodes({flatten:!0}):[c]}).reduce(function(c,d){return c.concat(d)},[])};
f=aP.prototype;f.connect=function(){var a=this;$O(this._target)?this._listenSlots([this._target]):nN(this._target).children&&(this._listenSlots(nN(this._target).children),window.ShadyDOM?this._shadyChildrenObserver=window.ShadyDOM.observeChildren(this._target,function(b){a._processMutations(b)}):(this._nativeChildrenObserver=new MutationObserver(function(b){a._processMutations(b)}),this._nativeChildrenObserver.observe(this._target,{childList:!0})));
this._connected=!0};
f.disconnect=function(){$O(this._target)?this._unlistenSlots([this._target]):nN(this._target).children&&(this._unlistenSlots(nN(this._target).children),window.ShadyDOM&&this._shadyChildrenObserver?(window.ShadyDOM.unobserveChildren(this._shadyChildrenObserver),this._shadyChildrenObserver=null):this._nativeChildrenObserver&&(this._nativeChildrenObserver.disconnect(),this._nativeChildrenObserver=null));this._connected=!1};
f._schedule=function(){var a=this;this._scheduled||(this._scheduled=!0,lN.run(function(){return a.flush()}))};
f._processMutations=function(a){this._processSlotMutations(a);this.flush()};
f._processSlotMutations=function(a){if(a)for(var b=0;b<a.length;b++){var c=a[b];c.addedNodes&&this._listenSlots(c.addedNodes);c.removedNodes&&this._unlistenSlots(c.removedNodes)}};
f.flush=function(){if(!this._connected)return!1;window.ShadyDOM&&ShadyDOM.flush();this._nativeChildrenObserver?this._processSlotMutations(this._nativeChildrenObserver.takeRecords()):this._shadyChildrenObserver&&this._processSlotMutations(this._shadyChildrenObserver.takeRecords());this._scheduled=!1;for(var a={target:this._target,addedNodes:[],removedNodes:[]},b=Mva(this._target),c=TN(b,this._effectiveNodes),d=0,e=void 0;d<c.length&&(e=c[d]);d++)for(var g=0,h=void 0;g<e.removed.length&&(h=e.removed[g]);g++)a.removedNodes.push(h);
d=0;for(e=void 0;d<c.length&&(e=c[d]);d++)for(g=e.index;g<e.index+e.addedCount;g++)a.addedNodes.push(b[g]);this._effectiveNodes=b;b=!1;if(a.addedNodes.length||a.removedNodes.length)b=!0,this.callback.call(this._target,a);return b};
f._listenSlots=function(a){for(var b=0;b<a.length;b++){var c=a[b];$O(c)&&c.addEventListener("slotchange",this._boundSchedule)}};
f._unlistenSlots=function(a){for(var b=0;b<a.length;b++){var c=a[b];$O(c)&&c.removeEventListener("slotchange",this._boundSchedule)}};var bP=Element.prototype,Nva=bP.matches||bP.matchesSelector||bP.mozMatchesSelector||bP.msMatchesSelector||bP.oMatchesSelector||bP.webkitMatchesSelector,cP=function(a,b){return Nva.call(a,b)},dP=function(a){window.ShadyDOM&&window.ShadyDOM.inUse&&window.ShadyDOM.patch(a);
this.node=a};
f=dP.prototype;f.observeNodes=function(a){return new aP(this.node,a)};
f.unobserveNodes=function(a){a.disconnect()};
f.notifyObserver=function(){};
f.deepContains=function(a){if(nN(this.node).contains(a))return!0;var b=a;for(a=a.ownerDocument;b&&b!==a&&b!==this.node;)b=nN(b).parentNode||nN(b).host;return b===this.node};
f.getOwnerRoot=function(){return nN(this.node).getRootNode()};
f.getDistributedNodes=function(){return"slot"===this.node.localName?nN(this.node).assignedNodes({flatten:!0}):[]};
f.getDestinationInsertionPoints=function(){for(var a=[],b=nN(this.node).assignedSlot;b;)a.push(b),b=nN(b).assignedSlot;return a};
f.importNode=function(a,b){return nN(this.node instanceof Document?this.node:this.node.ownerDocument).importNode(a,b)};
f.getEffectiveChildNodes=function(){return Mva(this.node)};
f.queryDistributedElements=function(a){for(var b=this.getEffectiveChildNodes(),c=[],d=0,e=b.length,g=void 0;d<e&&(g=b[d]);d++)g.nodeType===Node.ELEMENT_NODE&&cP(g,a)&&c.push(g);return c};
ea.Object.defineProperties(dP.prototype,{activeElement:{configurable:!0,enumerable:!0,get:function(){var a=this.node;return void 0!==a._activeElement?a._activeElement:a.activeElement}}});
function Ova(){for(var a=dP.prototype,b="cloneNode appendChild insertBefore removeChild replaceChild setAttribute removeAttribute querySelector querySelectorAll".split(" "),c={},d=0;d<b.length;c={$jscomp$loop$prop$method$1983:c.$jscomp$loop$prop$method$1983},d++)c.$jscomp$loop$prop$method$1983=b[d],a[c.$jscomp$loop$prop$method$1983]=function(e){return function(){return this.node[e.$jscomp$loop$prop$method$1983].apply(this.node,arguments)}}(c)}
function Pva(a,b){for(var c={},d=0;d<b.length;c={$jscomp$loop$prop$name$1985:c.$jscomp$loop$prop$name$1985},d++)c.$jscomp$loop$prop$name$1985=b[d],Object.defineProperty(a,c.$jscomp$loop$prop$name$1985,{get:function(e){return function(){return this.node[e.$jscomp$loop$prop$name$1985]}}(c),
configurable:!0})}
function Qva(){for(var a=dP.prototype,b=["textContent","innerHTML","className"],c={},d=0;d<b.length;c={$jscomp$loop$prop$name$1988:c.$jscomp$loop$prop$name$1988},d++)c.$jscomp$loop$prop$name$1988=b[d],Object.defineProperty(a,c.$jscomp$loop$prop$name$1988,{get:function(e){return function(){return this.node[e.$jscomp$loop$prop$name$1988]}}(c),
set:function(e){return function(g){this.node[e.$jscomp$loop$prop$name$1988]=g}}(c),
configurable:!0})}
var eP=function(a){this.event=a};
ea.Object.defineProperties(eP.prototype,{rootTarget:{configurable:!0,enumerable:!0,get:function(){return this.path[0]}},
localTarget:{configurable:!0,enumerable:!0,get:function(){return this.event.target}},
path:{configurable:!0,enumerable:!0,get:function(){return this.event.composedPath()}}});
var fP=dP;if(window.ShadyDOM&&window.ShadyDOM.inUse&&window.ShadyDOM.noPatch&&window.ShadyDOM.Wrapper){var Rva=window.ShadyDOM.Wrapper,gP=function(){return Rva.apply(this,arguments)||this};
l(gP,Rva);Object.getOwnPropertyNames(dP.prototype).forEach(function(a){"activeElement"!=a&&(gP.prototype[a]=dP.prototype[a])});
Pva(gP.prototype,["classList"]);fP=gP;Object.defineProperties(eP.prototype,{localTarget:{get:function(){var a=this.event.currentTarget;a=a&&hP(a).getOwnerRoot();for(var b=this.path,c=0;c<b.length;c++){var d=b[c];if(hP(d).getOwnerRoot()===a)return d}},
configurable:!0},path:{get:function(){return window.ShadyDOM.composedPath(this.event)},
configurable:!0}})}else Ova(),Pva(dP.prototype,"parentNode firstChild lastChild nextSibling previousSibling firstElementChild lastElementChild nextElementSibling previousElementSibling childNodes children classList".split(" ")),Qva();var Sva=fP,hP=function(a){a=a||document;if(a instanceof fP)return a;if(a instanceof eP)return a;var b=a.__domApi;b||(b=a instanceof Event?new eP(a):new fP(a),a.__domApi=b);return b};var Tva=/:host\(:dir\((ltr|rtl)\)\)/g,Uva=/([\s\w-#\.\[\]\*]*):dir\((ltr|rtl)\)/g,Vva=/:dir\((?:ltr|rtl)\)/,Wva=!(!window.ShadyDOM||!window.ShadyDOM.inUse),iP=[],jP=null,kP="";function Xva(){kP=document.documentElement.getAttribute("dir");kP=document.documentElement.getAttribute("dir");for(var a=0;a<iP.length;a++){var b=iP[a];b.__autoDirOptOut||b.setAttribute("dir",kP)}}
var Yva=mN(function(a){Wva||jP||(kP=document.documentElement.getAttribute("dir"),jP=new MutationObserver(Xva),jP.observe(document.documentElement,{attributes:!0,attributeFilter:["dir"]}));var b=wN(a);a=function(){var c=b.call(this)||this;c.__autoDirOptOut=!1;return c};
l(a,b);a._processStyleText=function(c,d){c=b._processStyleText.call(this,c,d);!Wva&&Vva.test(c)&&(c=this._replaceDirInCssText(c),this.__activateDir=!0);return c};
a._replaceDirInCssText=function(c){c=c.replace(Tva,":host([dir=\"$1\"])");return c=c.replace(Uva,":host([dir=\"$2\"]) $1")};
a.prototype.ready=function(){b.prototype.ready.call(this);this.__autoDirOptOut=this.hasAttribute("dir")};
a.prototype.connectedCallback=function(){b.prototype.connectedCallback&&b.prototype.connectedCallback.call(this);this.constructor.__activateDir&&(jP&&jP.takeRecords().length&&Xva(),iP.push(this),this.__autoDirOptOut||this.setAttribute("dir",kP))};
a.prototype.disconnectedCallback=function(){b.prototype.disconnectedCallback&&b.prototype.disconnectedCallback.call(this);if(this.constructor.__activateDir){var c=iP.indexOf(this);-1<c&&iP.splice(c,1)}};
a.__activateDir=!1;return a});var lP=!1,mP=[],nP=[];function Zva(){lP=!0;requestAnimationFrame(function(){lP=!1;oP(mP);setTimeout(function(){for(var a=0,b=nP.length;a<b;a++)$va(nP.shift())})})}
function oP(a){for(;a.length;)$va(a.shift())}
function $va(a){var b=a[0],c=a[1];a=a[2];try{c.apply(b,a)}catch(d){setTimeout(function(){throw d})}}
function pP(a,b,c){lP||Zva();nP.push([a,b,c])}
;/*
Copyright (c) 2019 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/
var qP=window.ShadyDOM,awa=window.ShadyCSS;function bwa(a,b){b=void 0===b?!1:b;if(!qP||!awa||!qP.handlesDynamicScoping)return null;var c=awa.ScopingShim;if(!c)return null;var d=c.scopeForNode(a),e=nN(a).getRootNode(),g=function(h){if(nN(h).getRootNode()===e){var m=Array.from(qP.nativeMethods.querySelectorAll.call(h,"*"));m.push(h);for(h=0;h<m.length;h++){var n=m[h];if(nN(n).getRootNode()===e){var p=c.currentScopeForNode(n);p!==d&&(""!==p&&c.unscopeNode(n,p),c.scopeNode(n,d))}}}};
g(a);return b?(b=new MutationObserver(function(h){for(var m=0;m<h.length;m++)for(var n=h[m],p=0;p<n.addedNodes.length;p++){var x=n.addedNodes[p];x.nodeType===Node.ELEMENT_NODE&&g(x)}}),b.observe(a,{childList:!0,
subtree:!0}),b):null}
;function rP(){document.body.removeAttribute("unresolved")}
window.WebComponents?window.addEventListener("WebComponentsReady",rP):"interactive"===document.readyState||"complete"===document.readyState?rP():window.addEventListener("DOMContentLoaded",rP);var cwa=function(){this.end=this.start=0;this.rules=this.parent=this.previous=null;this.cssText=this.parsedCssText="";this.atRule=!1;this.type=0;this.parsedSelector=this.selector=this.keyframesName=""};
function dwa(a){var b=a=a.replace(ewa,"").replace(fwa,""),c=new cwa;c.start=0;c.end=b.length;for(var d=c,e=0,g=b.length;e<g;e++)if("{"===b[e]){d.rules||(d.rules=[]);var h=d,m=h.rules[h.rules.length-1]||null;d=new cwa;d.start=e+1;d.parent=h;d.previous=m;h.rules.push(d)}else"}"===b[e]&&(d.end=e+1,d=d.parent||c);return gwa(c,a)}
function gwa(a,b){var c=b.substring(a.start,a.end-1);a.parsedCssText=a.cssText=c.trim();a.parent&&(c=b.substring(a.previous?a.previous.end:a.parent.start,a.start-1),c=_expandUnicodeEscapes$$module$third_party$javascript$polymer$v2$shadycss$src$css_parse(c),c=c.replace(hwa," "),c=c.substring(c.lastIndexOf(";")+1),c=a.parsedSelector=a.selector=c.trim(),a.atRule=0===c.indexOf("@"),a.atRule?0===c.indexOf("@media")?a.type=4:c.match(iwa)&&(a.type=7,a.keyframesName=a.selector.split(hwa).pop()):0===c.indexOf("--")?
a.type=1E3:a.type=1);if(c=a.rules)for(var d=0,e=c.length,g=void 0;d<e&&(g=c[d]);d++)gwa(g,b);return a}
function _expandUnicodeEscapes$$module$third_party$javascript$polymer$v2$shadycss$src$css_parse(a){return a.replace(/\\([0-9a-f]{1,6})\s/gi,function(b,c){b=c;for(c=6-b.length;c--;)b="0"+b;return"\\"+b})}
function jwa(a,b,c){c=void 0===c?"":c;var d="";if(a.cssText||a.rules){var e=a.rules;if(e&&!_hasMixinRules$$module$third_party$javascript$polymer$v2$shadycss$src$css_parse(e))for(var g=0,h=e.length,m=void 0;g<h&&(m=e[g]);g++)d=jwa(m,b,d);else b?b=a.cssText:(b=a.cssText,b=b.replace(kwa,"").replace(lwa,""),b=b.replace(mwa,"").replace(nwa,"")),(d=b.trim())&&(d=" "+d+"\n")}d&&(a.selector&&(c+=a.selector+" {\n"),c+=d,a.selector&&(c+="}\n\n"));return c}
function _hasMixinRules$$module$third_party$javascript$polymer$v2$shadycss$src$css_parse(a){a=a[0];return!!a&&!!a.selector&&0===a.selector.indexOf("--")}
var ewa=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,fwa=/@import[^;]*;/gim,kwa=/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?(?:[;\n]|$)/gim,lwa=/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?{[^}]*?}(?:[;\n]|$)?/gim,mwa=/@apply\s*\(?[^);]*\)?\s*(?:[;\n]|$)?/gim,nwa=/[^;:]*?:[^;]*?var\([^;]*\)(?:[;\n]|$)?/gim,iwa=/^@[^\s]*keyframes/,hwa=/\s+/g;var sP={};var owa=Promise.resolve();function pwa(a){if(a=sP[a])a._applyShimCurrentVersion=a._applyShimCurrentVersion||0,a._applyShimValidatingVersion=a._applyShimValidatingVersion||0,a._applyShimNextVersion=(a._applyShimNextVersion||0)+1}
function qwa(a){return a._applyShimCurrentVersion===a._applyShimNextVersion}
function rwa(a){a._applyShimValidatingVersion=a._applyShimNextVersion;a._validating||(a._validating=!0,owa.then(function(){a._applyShimCurrentVersion=a._applyShimNextVersion;a._validating=!1}))}
;var swa=new Set;function tP(a){if(!a)return"";"string"===typeof a&&(a=dwa(a));return jwa(a,gO)}
function twa(a){!a.__cssRules&&a.textContent&&(a.__cssRules=dwa(a.textContent));return a.__cssRules||null}
function uP(a,b,c,d){if(a){var e=!1,g=a.type;if(d&&4===g){var h=a.selector.match($ua);h&&(window.matchMedia(h[1]).matches||(e=!0))}1===g?b(a):c&&7===g?c(a):1E3===g&&(e=!0);if((a=a.rules)&&!e)for(e=0,g=a.length,h=void 0;e<g&&(h=a[e]);e++)uP(h,b,c,d)}}
function uwa(a,b){var c=a.indexOf("var(");if(-1===c)return b(a,"","","");a:{var d=0;var e=c+3;for(var g=a.length;e<g;e++)if("("===a[e])d++;else if(")"===a[e]&&0===--d)break a;e=-1}d=a.substring(c+4,e);c=a.substring(0,c);a=uwa(a.substring(e+1),b);e=d.indexOf(",");return-1===e?b(c,d.trim(),"",a):b(c,d.substring(0,e).trim(),d.substring(e+1).trim(),a)}
function vwa(a){if(void 0!==fO)return fO;if(void 0===a.__cssBuild){var b=a.getAttribute("css-build");if(b)a.__cssBuild=b;else{a:{b="template"===a.localName?a.content.firstChild:a.firstChild;if(b instanceof Comment&&(b=b.textContent.trim().split(":"),"css-build"===b[0])){b=b[1];break a}b=""}if(""!==b){var c="template"===a.localName?a.content.firstChild:a.firstChild;c.parentNode.removeChild(c)}a.__cssBuild=b}}return a.__cssBuild||""}
;var wwa=/;\s*/m,xwa=/^\s*(initial)|(inherit)\s*$/,ywa=/\s*!important/,vP=function(){this._map={}};
vP.prototype.set=function(a,b){a=a.trim();this._map[a]={properties:b,dependants:{}}};
vP.prototype.get=function(a){a=a.trim();return this._map[a]||null};
var wP=null,xP=function(){this._measureElement=this._currentElement=null;this._map=new vP};
f=xP.prototype;f.detectMixin=function(a){a=XN.test(a)||WN.test(a);XN.lastIndex=0;WN.lastIndex=0;return a};
f.transformTemplate=function(a,b){if(void 0===a._gatheredStyle){var c=[];for(var d=a.content.querySelectorAll("style"),e=0;e<d.length;e++){var g=d[e];if(g.hasAttribute("shady-unscoped")){if(!dO){var h=g.textContent;swa.has(h)||(swa.add(h),h=g.cloneNode(!0),document.head.appendChild(h));g.parentNode.removeChild(g)}}else c.push(g.textContent),g.parentNode.removeChild(g)}(c=c.join("").trim())?(d=document.createElement("style"),d.textContent=c,a.content.insertBefore(d,a.content.firstChild),c=d):c=null;
a._gatheredStyle=c}return(a=a._gatheredStyle)?this.transformStyle(a,b):null};
f.transformStyle=function(a,b){b=void 0===b?"":b;var c=twa(a);this.transformRules(c,b);a.textContent=tP(c);return c};
f.transformCustomStyle=function(a){var b=this,c=twa(a);uP(c,function(d){":root"===d.selector&&(d.selector="html");b.transformRule(d)});
a.textContent=tP(c);return c};
f.transformRules=function(a,b){var c=this;this._currentElement=b;uP(a,function(d){c.transformRule(d)});
this._currentElement=null};
f.transformRule=function(a){a.cssText=zwa(this,a.parsedCssText,a);":root"===a.selector&&(a.selector=":host > *")};
var zwa=function(a,b,c){b=b.replace(WN,function(d,e,g,h){return a._produceCssProperties(d,e,g,h,c)});
return a._consumeCssProperties(b,c)};
f=xP.prototype;f._getInitialValueForProperty=function(a){this._measureElement||(this._measureElement=document.createElement("meta"),this._measureElement.setAttribute("apply-shim-measure",""),this._measureElement.style.all="initial",document.head.appendChild(this._measureElement));return window.getComputedStyle(this._measureElement).getPropertyValue(a)};
f._fallbacksFromPreviousRules=function(a){for(var b=this,c=a;c.parent;)c=c.parent;var d={},e=!1;uP(c,function(g){(e=e||g===a)||g.selector===a.selector&&Object.assign(d,b._cssTextToMap(g.parsedCssText))});
return d};
f._consumeCssProperties=function(a,b){for(var c;c=XN.exec(a);){var d=c[0],e=c[1];c=c.index;var g=c+d.indexOf("@apply");g=a.slice(0,g);a=a.slice(c+d.length);d=b?this._fallbacksFromPreviousRules(b):{};Object.assign(d,this._cssTextToMap(g));e=this._atApplyToCssProperties(e,d);a=""+g+e+a;XN.lastIndex=c+e.length}return a};
f._atApplyToCssProperties=function(a,b){a=a.replace(wwa,"");var c=[],d=this._map.get(a);d||(this._map.set(a,{}),d=this._map.get(a));if(d){this._currentElement&&(d.dependants[this._currentElement]=!0);var e,g=d.properties;for(e in g){var h=b&&b[e];d=[e,": var(",a,"_-_",e];h&&d.push(",",h.replace(ywa,""));d.push(")");ywa.test(g[e])&&d.push(" !important");c.push(d.join(""))}}return c.join("; ")};
f._replaceInitialOrInherit=function(a,b){var c=xwa.exec(b);c&&(b=c[1]?this._getInitialValueForProperty(a):"apply-shim-inherit");return b};
f._cssTextToMap=function(a,b){b=void 0===b?!1:b;a=a.split(";");for(var c,d,e={},g=0;g<a.length;g++)if(c=a[g])d=c.split(":"),1<d.length&&(c=d[0].trim(),d=d.slice(1).join(":"),b&&(d=this._replaceInitialOrInherit(c,d)),e[c]=d);return e};
f._invalidateMixinEntry=function(a){if(wP)for(var b in a.dependants)b!==this._currentElement&&wP(b)};
f._produceCssProperties=function(a,b,c,d,e){var g=this;c&&uwa(c,function(P,S){S&&g._map.get(S)&&(d="@apply "+S+";")});
if(!d)return a;var h=this._consumeCssProperties(""+d,e);e=a.slice(0,a.indexOf("--"));var m=h=this._cssTextToMap(h,!0),n=this._map.get(b),p=n&&n.properties;p?m=Object.assign(Object.create(p),h):this._map.set(b,m);var x=[],y,B=!1;for(y in m){var G=h[y];void 0===G&&(G="initial");!p||y in p||(B=!0);x.push(""+b+"_-_"+y+": "+G)}B&&this._invalidateMixinEntry(n);n&&(n.properties=m);c&&(e=a+";"+e);return""+e+x.join("; ")+";"};
xP.prototype.detectMixin=xP.prototype.detectMixin;xP.prototype.transformStyle=xP.prototype.transformStyle;xP.prototype.transformCustomStyle=xP.prototype.transformCustomStyle;xP.prototype.transformRules=xP.prototype.transformRules;xP.prototype.transformRule=xP.prototype.transformRule;xP.prototype.transformTemplate=xP.prototype.transformTemplate;xP.prototype._separator="_-_";Object.defineProperty(xP.prototype,"invalidCallback",{get:function(){return wP},
set:function(a){wP=a}});var yP=new xP,Awa=function(){this.customStyleInterface=null;yP.invalidCallback=pwa},zP=function(a){!a.customStyleInterface&&window.ShadyCSS.CustomStyleInterface&&(a.customStyleInterface=window.ShadyCSS.CustomStyleInterface,a.customStyleInterface.transformCallback=function(b){yP.transformCustomStyle(b)},a.customStyleInterface.validateCallback=function(){requestAnimationFrame(function(){a.customStyleInterface.enqueued&&a.flushCustomStyles()})})};
f=Awa.prototype;f.prepareTemplate=function(a,b){zP(this);""===vwa(a)&&(sP[b]=a,b=yP.transformTemplate(a,b),a._styleAst=b)};
f.flushCustomStyles=function(){zP(this);if(this.customStyleInterface){var a=this.customStyleInterface.processStyles();if(this.customStyleInterface.enqueued){for(var b=0;b<a.length;b++){var c=this.customStyleInterface.getStyleForCustomStyle(a[b]);c&&yP.transformCustomStyle(c)}this.customStyleInterface.enqueued=!1}}};
f.styleSubtree=function(a,b){zP(this);b&&YN(a,b);if(a.shadowRoot)for(this.styleElement(a),a=a.shadowRoot.children||a.shadowRoot.childNodes,b=0;b<a.length;b++)this.styleSubtree(a[b]);else for(a=a.children||a.childNodes,b=0;b<a.length;b++)this.styleSubtree(a[b])};
f.styleElement=function(a){zP(this);var b=a.localName,c=b?-1<b.indexOf("-")?b:a.getAttribute&&a.getAttribute("is")||"":a.is;b=sP[c];if(!(b&&""!==vwa(b)||!b||qwa(b))){if(qwa(b)||b._applyShimValidatingVersion!==b._applyShimNextVersion)this.prepareTemplate(b,c),rwa(b);if(a=a.shadowRoot)if(a=a.querySelector("style"))a.__cssRules=b._styleAst,a.textContent=tP(b._styleAst)}};
f.styleDocument=function(a){zP(this);this.styleSubtree(document.body,a)};
if(!window.ShadyCSS||!window.ShadyCSS.ScopingShim){var AP=new Awa,Bwa=window.ShadyCSS&&window.ShadyCSS.CustomStyleInterface;window.ShadyCSS={prepareTemplate:function(a,b){AP.flushCustomStyles();AP.prepareTemplate(a,b)},
prepareTemplateStyles:function(a,b,c){window.ShadyCSS.prepareTemplate(a,b,c)},
prepareTemplateDom:function(){},
styleSubtree:function(a,b){AP.flushCustomStyles();AP.styleSubtree(a,b)},
styleElement:function(a){AP.flushCustomStyles();AP.styleElement(a)},
styleDocument:function(a){AP.flushCustomStyles();AP.styleDocument(a)},
getComputedStyleValue:function(a,b){return ava(a,b)},
flushCustomStyles:function(){AP.flushCustomStyles()},
nativeCss:gO,nativeShadow:dO,cssBuild:fO,disableRuntime:fva};Bwa&&(window.ShadyCSS.CustomStyleInterface=Bwa)}window.ShadyCSS.ApplyShim=yP;var Cwa=window.ShadyCSS,BP=mN(function(a){a=HO(RN(a));var b=Vua?a:Yva(a),c={x:"pan-x",y:"pan-y",none:"none",all:"auto"};a=function(){return b.call(this)||this};
l(a,b);a.prototype.created=function(){};
a.prototype.connectedCallback=function(){b.prototype.connectedCallback.call(this);this.isAttached=!0;this.attached()};
a.prototype.attached=function(){};
a.prototype.disconnectedCallback=function(){b.prototype.disconnectedCallback.call(this);this.isAttached=!1;this.detached()};
a.prototype.detached=function(){};
a.prototype.attributeChangedCallback=function(d,e,g,h){e!==g&&(b.prototype.attributeChangedCallback.call(this,d,e,g,h),this.attributeChanged(d,e,g))};
a.prototype.attributeChanged=function(){};
a.prototype._initializeProperties=function(){var d=Object.getPrototypeOf(this);d.hasOwnProperty("__hasRegisterFinished")||(this._registered(),d.__hasRegisterFinished=!0);b.prototype._initializeProperties.call(this);this.root=this;this.created();this._applyListeners()};
a.prototype._registered=function(){};
a.prototype.ready=function(){this._ensureAttributes();b.prototype.ready.call(this)};
a.prototype._ensureAttributes=function(){};
a.prototype._applyListeners=function(){};
a.prototype.serialize=function(d){return this._serializeValue(d)};
a.prototype.deserialize=function(d,e){return this._deserializeValue(d,e)};
a.prototype.reflectPropertyToAttribute=function(d,e,g){this._propertyToAttribute(d,e,g)};
a.prototype.serializeValueToAttribute=function(d,e,g){this._valueToNodeAttribute(g||this,d,e)};
a.prototype.extend=function(d,e){if(!d||!e)return d||e;for(var g=Object.getOwnPropertyNames(e),h=0,m=void 0;h<g.length&&(m=g[h]);h++){var n=Object.getOwnPropertyDescriptor(e,m);n&&Object.defineProperty(d,m,n)}return d};
a.prototype.mixin=function(d,e){for(var g in e)d[g]=e[g];return d};
a.prototype.chainObject=function(d,e){d&&e&&d!==e&&(d.__proto__=e);return d};
a.prototype.instanceTemplate=function(d){d=this.constructor._contentForTemplate(d);return document.importNode(d,!0)};
a.prototype.fire=function(d,e,g){g=g||{};e=null===e||void 0===e?{}:e;d=new Event(d,{bubbles:void 0===g.bubbles?!0:g.bubbles,cancelable:!!g.cancelable,composed:void 0===g.composed?!0:g.composed});d.detail=e;nN(g.node||this).dispatchEvent(d);return d};
a.prototype.listen=function(d,e,g){d=d||this;var h=this.__boundListeners||(this.__boundListeners=new WeakMap),m=h.get(d);m||(m={},h.set(d,m));h=e+g;m[h]||(m[h]=this._addMethodEventListenerToNode(d,e,g,this))};
a.prototype.unlisten=function(d,e,g){d=d||this;var h=this.__boundListeners&&this.__boundListeners.get(d);g=e+g;var m=h&&h[g];m&&(this._removeEventListenerFromNode(d,e,m),h[g]=null)};
a.prototype.setScrollDirection=function(d,e){DO(e||this,c[d]||"auto")};
a.prototype.$$=function(d){return this.root.querySelector(d)};
a.prototype.distributeContent=function(){var d=hP(this);window.ShadyDOM&&d.shadowRoot&&ShadyDOM.flush()};
a.prototype.getEffectiveChildNodes=function(){return hP(this).getEffectiveChildNodes()};
a.prototype.queryDistributedElements=function(d){return hP(this).queryDistributedElements(d)};
a.prototype.getEffectiveChildren=function(){return this.getEffectiveChildNodes().filter(function(d){return d.nodeType===Node.ELEMENT_NODE})};
a.prototype.getEffectiveTextContent=function(){for(var d=this.getEffectiveChildNodes(),e=[],g=0,h;h=d[g];g++)h.nodeType!==Node.COMMENT_NODE&&e.push(h.textContent);return e.join("")};
a.prototype.queryEffectiveChildren=function(d){return(d=this.queryDistributedElements(d))&&d[0]};
a.prototype.queryAllEffectiveChildren=function(d){return this.queryDistributedElements(d)};
a.prototype.getContentChildNodes=function(d){return(d=this.root.querySelector(d||"slot"))?hP(d).getDistributedNodes():[]};
a.prototype.getContentChildren=function(d){return this.getContentChildNodes(d).filter(function(e){return e.nodeType===Node.ELEMENT_NODE})};
a.prototype.isLightDescendant=function(d){return this!==d&&nN(this).contains(d)&&nN(this).getRootNode()===nN(d).getRootNode()};
a.prototype.isLocalDescendant=function(d){return this.root===nN(d).getRootNode()};
a.prototype.scopeSubtree=function(d,e){return bwa(d,void 0===e?!1:e)};
a.prototype.getComputedStyleValue=function(d){return Cwa.getComputedStyleValue(this,d)};
a.prototype.debounce=function(d,e,g){this._debouncers=this._debouncers||{};return this._debouncers[d]=lO(this._debouncers[d],0<g?kN.after(g):lN,e.bind(this))};
a.prototype.isDebouncerActive=function(d){this._debouncers=this._debouncers||{};d=this._debouncers[d];return!(!d||!d.isActive())};
a.prototype.flushDebouncer=function(d){this._debouncers=this._debouncers||{};(d=this._debouncers[d])&&d.flush()};
a.prototype.cancelDebouncer=function(d){this._debouncers=this._debouncers||{};(d=this._debouncers[d])&&d.cancel()};
a.prototype.async=function(d,e){return 0<e?kN.run(d.bind(this),e):~lN.run(d.bind(this))};
a.prototype.cancelAsync=function(d){0>d?lN.cancel(~d):kN.cancel(d)};
a.prototype.create=function(d,e){d=document.createElement(d);if(e)if(d.setProperties)d.setProperties(e);else for(var g in e)d[g]=e[g];return d};
a.prototype.elementMatches=function(d,e){return cP(e||this,d)};
a.prototype.toggleAttribute=function(d,e){var g=this;3===arguments.length&&(g=arguments[2]);1==arguments.length&&(e=!g.hasAttribute(d));if(e)return nN(g).setAttribute(d,""),!0;nN(g).removeAttribute(d);return!1};
a.prototype.toggleClass=function(d,e,g){g=g||this;1==arguments.length&&(e=!g.classList.contains(d));e?g.classList.add(d):g.classList.remove(d)};
a.prototype.transform=function(d,e){e=e||this;e.style.webkitTransform=d;e.style.transform=d};
a.prototype.translate3d=function(d,e,g,h){this.transform("translate3d("+d+","+e+","+g+")",h||this)};
a.prototype.arrayDelete=function(d,e){if(Array.isArray(d)){if(e=d.indexOf(e),0<=e)return d.splice(e,1)}else if(e=EN(this,d).indexOf(e),0<=e)return this.splice(d,e,1);return null};
a.prototype._logger=function(d,e){Array.isArray(e)&&1===e.length&&Array.isArray(e[0])&&(e=e[0]);switch(d){case"log":case"warn":case"error":console[d].apply(console,ka(e));}};
a.prototype._log=function(d){for(var e=[],g=0;g<arguments.length;++g)e[g-0]=arguments[g];this._logger("log",e)};
a.prototype._warn=function(d){for(var e=[],g=0;g<arguments.length;++g)e[g-0]=arguments[g];this._logger("warn",e)};
a.prototype._error=function(d){for(var e=[],g=0;g<arguments.length;++g)e[g-0]=arguments[g];this._logger("error",e)};
a.prototype._logf=function(d,e){for(var g=[],h=1;h<arguments.length;++h)g[h-1]=arguments[h];return["[%s::%s]",this.is,d].concat(ka(g))};
ea.Object.defineProperties(a.prototype,{domHost:{configurable:!0,enumerable:!0,get:function(){var d=nN(this).getRootNode();return d instanceof DocumentFragment?d.host:d}}});
ea.Object.defineProperties(a,{importMeta:{configurable:!0,enumerable:!0,get:function(){return this.prototype.importMeta}}});
a.prototype.is="";return a});var CP;CP=JO._mutablePropertyChange;var Dwa={properties:{mutableData:Boolean},_shouldPropertyChange:function(a,b,c){return CP(this,a,b,c,this.mutableData)}};var DP,Ewa=mN(function(a){var b=RN(a);if(!DP)for(a=b;a&&!DP;){var c=Object.getOwnPropertyDescriptor(a,"observedAttributes");c&&(DP=c.get);a=Object.getPrototypeOf(a.prototype).constructor}a=function(){return b.call(this)||this};
l(a,b);a.prototype._initializeProperties=function(){this.hasAttribute("disable-upgrade")?this.__isUpgradeDisabled=!0:b.prototype._initializeProperties.call(this)};
a.prototype._enableProperties=function(){this.__isUpgradeDisabled||b.prototype._enableProperties.call(this)};
a.prototype._canApplyPropertyDefault=function(d){return b.prototype._canApplyPropertyDefault.call(this,d)&&!(this.__isUpgradeDisabled&&this._isPropertyPending(d))};
a.prototype.attributeChangedCallback=function(d,e,g,h){"disable-upgrade"==d?this.__isUpgradeDisabled&&null==g&&(b.prototype._initializeProperties.call(this),this.__isUpgradeDisabled=!1,nN(this).isConnected&&b.prototype.connectedCallback.call(this)):b.prototype.attributeChangedCallback.call(this,d,e,g,h)};
a.prototype.connectedCallback=function(){this.__isUpgradeDisabled||b.prototype.connectedCallback.call(this)};
a.prototype.disconnectedCallback=function(){this.__isUpgradeDisabled||b.prototype.disconnectedCallback.call(this)};
ea.Object.defineProperties(a,{observedAttributes:{configurable:!0,enumerable:!0,get:function(){return DP.call(this).concat("disable-upgrade")}}});
return a});var Fwa={attached:!0,detached:!0,ready:!0,created:!0,beforeRegister:!0,registered:!0,attributeChanged:!0,listeners:!0,hostAttributes:!0},Gwa={attached:!0,detached:!0,ready:!0,created:!0,beforeRegister:!0,registered:!0,attributeChanged:!0,behaviors:!0,_noAccessors:!0},Hwa=Object.assign({listeners:!0,hostAttributes:!0,properties:!0,observers:!0},Gwa);
function Iwa(a,b,c,d){for(var e=b._noAccessors,g=Object.getOwnPropertyNames(b),h=0;h<g.length;h++){var m=g[h];if(!(m in d))if(e)a[m]=b[m];else{var n=Object.getOwnPropertyDescriptor(b,m);n&&(n.configurable=!0,Object.defineProperty(a,m,n))}}for(var p in Fwa)b[p]&&(c[p]=c[p]||[],c[p].push(b[p]))}
function Jwa(a,b,c){b=b||[];for(var d=a.length-1;0<=d;d--){var e=a[d];e?Array.isArray(e)?Jwa(e,b):0>b.indexOf(e)&&(!c||0>c.indexOf(e))&&b.unshift(e):console.warn("behavior is null, check for missing or 404 import")}return b}
function Kwa(a,b){for(var c in b){var d=a[c],e=b[c];a[c]=!("value"in e)&&d&&"value"in d?Object.assign({value:d.value},e):e}}
function Lwa(a,b,c){var d={},e=function(){return b.apply(this,arguments)||this};
l(e,b);e._finalizeClass=function(){if(this.hasOwnProperty("generatedFrom")){if(h)for(var n=0,p;n<h.length;n++)p=h[n],p.properties&&this.createProperties(p.properties),p.observers&&this.createObservers(p.observers,p.properties);a.properties&&this.createProperties(a.properties);a.observers&&this.createObservers(a.observers,a.properties);this._prepareTemplate()}else b._finalizeClass.call(this)};
e.prototype.created=function(){b.prototype.created.call(this);var n=d.created;if(n)for(var p=0;p<n.length;p++)n[p].call(this)};
e.prototype._registered=function(){var n=e.prototype;if(!n.hasOwnProperty("__hasRegisterFinished")){n.__hasRegisterFinished=!0;b.prototype._registered.call(this);Sd&&m(n);n=Object.getPrototypeOf(this);var p=d.beforeRegister;if(p)for(var x=0;x<p.length;x++)p[x].call(n);if(p=d.registered)for(x=0;x<p.length;x++)p[x].call(n)}};
e.prototype._applyListeners=function(){b.prototype._applyListeners.call(this);var n=d.listeners;if(n)for(var p=0;p<n.length;p++){var x=n[p];if(x)for(var y in x)this._addMethodEventListenerToNode(this,y,x[y])}};
e.prototype._ensureAttributes=function(){var n=d.hostAttributes;if(n)for(var p=n.length-1;0<=p;p--){var x=n[p],y;for(y in x)this._ensureAttribute(y,x[y])}b.prototype._ensureAttributes.call(this)};
e.prototype.ready=function(){b.prototype.ready.call(this);var n=d.ready;if(n)for(var p=0;p<n.length;p++)n[p].call(this)};
e.prototype.attached=function(){b.prototype.attached.call(this);var n=d.attached;if(n)for(var p=0;p<n.length;p++)n[p].call(this)};
e.prototype.detached=function(){b.prototype.detached.call(this);var n=d.detached;if(n)for(var p=0;p<n.length;p++)n[p].call(this)};
e.prototype.attributeChanged=function(n,p,x){b.prototype.attributeChanged.call(this);var y=d.attributeChanged;if(y)for(var B=0;B<y.length;B++)y[B].call(this,n,p,x)};
ea.Object.defineProperties(e,{properties:{configurable:!0,enumerable:!0,get:function(){var n={};if(h)for(var p=0;p<h.length;p++)Kwa(n,h[p].properties);Kwa(n,a.properties);return n}},
observers:{configurable:!0,enumerable:!0,get:function(){var n=[];if(h)for(var p=0,x;p<h.length;p++)x=h[p],x.observers&&(n=n.concat(x.observers));a.observers&&(n=n.concat(a.observers));return n}}});
if(c){Array.isArray(c)||(c=[c]);var g=b.prototype.behaviors;var h=Jwa(c,null,g);e.prototype.behaviors=g?g.concat(c):h}var m=function(n){if(h)for(var p=h,x=0;x<p.length;x++)Iwa(n,p[x],d,Hwa);Iwa(n,a,d,Gwa)};
Sd||m(e.prototype);e.generatedFrom=a;return e}
var Mwa=function(a,b){a||console.warn("Polymer.Class requires `info` argument");b=b?b(BP(HTMLElement)):BP(HTMLElement);b=Lwa(a,b,a.behaviors);Sd&&(b=Ewa(b));b.is=b.prototype.is=a.is;return b};var EP=function(a){a="function"===typeof a?a:EP.Class(a);customElements.define(a.is,a);return a};
EP.Class=Mwa;var FP=BP(HTMLElement).prototype;/*
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at
http://polymer.github.io/LICENSE.txt The complete set of authors may be found at
http://polymer.github.io/AUTHORS.txt The complete set of contributors may be
found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
part of the polymer project is also subject to an additional IP rights grant
found at http://polymer.github.io/PATENTS.txt
*/
var GP=["\n"];
GP.raw=GP.slice();var Nwa=fN(GP);Nwa.setAttribute("style","display: none;");document.head.appendChild(Nwa.content);var Owa=document.createElement("style");Owa.textContent="[hidden] { display: none !important; }";document.head.appendChild(Owa);var Pwa=["<!--css-build:shady-->\n\n <div id=\"scrim\" on-click=\"close\" class=\"style-scope app-drawer\"></div>\n\n <!-- HACK(keanulee): Bind attributes here (in addition to :host) for styling to workaround Safari\n bug. https://bugs.webkit.org/show_bug.cgi?id=170762 -->\n <div id=\"contentContainer\" opened$=\"[[opened]]\" persistent$=\"[[persistent]]\" position$=\"[[position]]\" swipe-open$=\"[[swipeOpen]]\" class=\"style-scope app-drawer\">\n <slot class=\"style-scope app-drawer\"></slot>\n </div>\n"];
Pwa.raw=["\n <style>\n :host {\n position: fixed;\n top: -120px;\n right: 0;\n bottom: -120px;\n left: 0;\n\n visibility: hidden;\n\n transition-property: visibility;\n }\n\n :host([opened]) {\n visibility: visible;\n }\n\n :host([persistent]) {\n width: var(--app-drawer-width, 256px);\n }\n\n :host([persistent][position=left]) {\n right: auto;\n }\n\n :host([persistent][position=right]) {\n left: auto;\n }\n\n #contentContainer {\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n\n width: var(--app-drawer-width, 256px);\n padding: var(--app-drawer-content-padding, 120px 0);\n\n transition-property: -webkit-transform;\n transition-property: transform;\n -webkit-transform: translate3d(-100%, 0, 0);\n transform: translate3d(-100%, 0, 0);\n\n background-color: #FFF;\n\n @apply --app-drawer-content-container;\n }\n\n #contentContainer[persistent] {\n width: 100%;\n }\n\n #contentContainer[position=right] {\n right: 0;\n left: auto;\n\n -webkit-transform: translate3d(100%, 0, 0);\n transform: translate3d(100%, 0, 0);\n }\n\n #contentContainer[swipe-open]::after {\n position: fixed;\n top: 0;\n bottom: 0;\n left: 100%;\n\n visibility: visible;\n\n width: 20px;\n\n content: '';\n }\n\n #contentContainer[swipe-open][position=right]::after {\n right: 100%;\n left: auto;\n }\n\n #contentContainer[opened] {\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n }\n\n #scrim {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n\n transition-property: opacity;\n -webkit-transform: translateZ(0);\n transform: translateZ(0);\n\n opacity: 0;\n background: var(--app-drawer-scrim-background, rgba(0, 0, 0, 0.5));\n }\n\n #scrim.visible {\n opacity: 1;\n }\n\n :host([no-transition]) #contentContainer {\n transition-property: none;\n }\n </style>\n\n <div id=\"scrim\" on-click=\"close\"></div>\n\n <!-- HACK(keanulee): Bind attributes here (in addition to :host) for styling to workaround Safari\n bug. https://bugs.webkit.org/show_bug.cgi?id=170762 -->\n <div id=\"contentContainer\" opened\\$=\"[[opened]]\" persistent\\$=\"[[persistent]]\" position\\$=\"[[position]]\" swipe-open\\$=\"[[swipeOpen]]\">\n <slot></slot>\n </div>\n"];
EP({_template:fN(Pwa),is:"app-drawer",properties:{opened:{type:Boolean,value:!1,notify:!0,reflectToAttribute:!0},persistent:{type:Boolean,value:!1,reflectToAttribute:!0},transitionDuration:{type:Number,value:200},align:{type:String,value:"left"},position:{type:String,readOnly:!0,reflectToAttribute:!0},swipeOpen:{type:Boolean,value:!1,reflectToAttribute:!0},noFocusTrap:{type:Boolean,value:!1},disableSwipe:{type:Boolean,value:!1}},observers:["resetLayout(position, isAttached)","_resetPosition(align, isAttached)",
"_styleTransitionDuration(transitionDuration)","_openedPersistentChanged(opened, persistent)"],_translateOffset:0,_trackDetails:null,_drawerState:0,_boundEscKeydownHandler:null,_firstTabStop:null,_lastTabStop:null,attached:function(){pP(this,function(){this._boundEscKeydownHandler=this._escKeydownHandler.bind(this);this.addEventListener("keydown",this._tabKeydownHandler.bind(this));this.listen(this,"track","_track");this.setScrollDirection("y")});
this.fire("app-reset-layout")},
detached:function(){document.removeEventListener("keydown",this._boundEscKeydownHandler)},
open:function(){this.opened=!0},
close:function(){this.opened=!1},
toggle:function(){this.opened=!this.opened},
getWidth:function(){return this._savedWidth||this.$.contentContainer.offsetWidth},
_isRTL:function(){return"rtl"===window.getComputedStyle(this).direction},
_resetPosition:function(){switch(this.align){case"start":this._setPosition(this._isRTL()?"right":"left");return;case"end":this._setPosition(this._isRTL()?"left":"right");return;}this._setPosition(this.align)},
_escKeydownHandler:function(a){27===a.keyCode&&(a.preventDefault(),this.close())},
_track:function(a){if(!this.persistent&&!this.disableSwipe)switch(a.preventDefault(),a.detail.state){case"start":this._trackStart(a);break;case"track":this._trackMove(a);break;case"end":this._trackEnd(a);}},
_trackStart:function(){this._drawerState=this._DRAWER_STATE.TRACKING;var a=this.$.contentContainer.getBoundingClientRect();this._savedWidth=a.width;this._translateOffset="left"===this.position?a.left:a.right-window.innerWidth;this._trackDetails=[];this._styleTransitionDuration(0);this.style.visibility="visible"},
_trackMove:function(a){this._translateDrawer(a.detail.dx+this._translateOffset);this._trackDetails.push({dx:a.detail.dx,timeStamp:Date.now()})},
_trackEnd:function(a){var b=a.detail.dx+this._translateOffset,c=this.getWidth();b="left"===this.position?0<=b||b<=-c:0>=b||b>=c;if(!b){var d=this._trackDetails;this._trackDetails=null;this._flingDrawer(a,d);if(this._drawerState===this._DRAWER_STATE.FLINGING)return}c/=2;a.detail.dx<-c?this.opened="right"===this.position:a.detail.dx>c&&(this.opened="left"===this.position);b?this.debounce("_resetDrawerState",this._resetDrawerState):this.debounce("_resetDrawerState",this._resetDrawerState,this.transitionDuration);
this._styleTransitionDuration(this.transitionDuration);this._resetDrawerTranslate();this.style.visibility=""},
_calculateVelocity:function(a,b){for(var c=Date.now(),d=c-100,e,g=0,h=b.length-1;g<=h;){var m=g+h>>1,n=b[m];n.timeStamp>=d?(e=n,h=m-1):g=m+1}return e?(a.detail.dx-e.dx)/(c-e.timeStamp||1):0},
_flingDrawer:function(a,b){b=this._calculateVelocity(a,b);if(!(Math.abs(b)<this._MIN_FLING_THRESHOLD)){this._drawerState=this._DRAWER_STATE.FLINGING;a=a.detail.dx+this._translateOffset;var c=this.getWidth(),d="left"===this.position,e=0<b;e?(b=Math.max(b,this._MIN_TRANSITION_VELOCITY),this.opened="left"===this.position):(b=Math.min(b,-this._MIN_TRANSITION_VELOCITY),this.opened="right"===this.position);b=this._FLING_INITIAL_SLOPE*(!e&&d?-(a+c):e&&!d?c-a:-a)/b;this._styleTransitionDuration(b);this._styleTransitionTimingFunction(this._FLING_TIMING_FUNCTION);
this._resetDrawerTranslate();this.debounce("_resetDrawerState",this._resetDrawerState,b)}},
_styleTransitionDuration:function(a){this.style.transitionDuration=a+"ms";this.$.contentContainer.style.transitionDuration=a+"ms";this.$.scrim.style.transitionDuration=a+"ms"},
_styleTransitionTimingFunction:function(a){this.$.contentContainer.style.transitionTimingFunction=a;this.$.scrim.style.transitionTimingFunction=a},
_translateDrawer:function(a){var b=this.getWidth();"left"===this.position?(a=Math.max(-b,Math.min(a,0)),this.$.scrim.style.opacity=1+a/b):(a=Math.max(0,Math.min(a,b)),this.$.scrim.style.opacity=1-a/b);this.translate3d(a+"px","0","0",this.$.contentContainer)},
_resetDrawerTranslate:function(){this.$.scrim.style.opacity="";this.transform("",this.$.contentContainer)},
_resetDrawerState:function(){var a=this._drawerState;a===this._DRAWER_STATE.FLINGING&&(this._styleTransitionDuration(this.transitionDuration),this._styleTransitionTimingFunction(""),this.style.visibility="");this._savedWidth=null;this._drawerState=this.opened?this.persistent?this._DRAWER_STATE.OPENED_PERSISTENT:this._DRAWER_STATE.OPENED:this._DRAWER_STATE.CLOSED;a!==this._drawerState&&(this._drawerState===this._DRAWER_STATE.OPENED?(this._setKeyboardFocusTrap(),document.addEventListener("keydown",
this._boundEscKeydownHandler),document.body.style.overflow="hidden"):(document.removeEventListener("keydown",this._boundEscKeydownHandler),document.body.style.overflow=""),a!==this._DRAWER_STATE.INIT&&this.fire("app-drawer-transitioned"))},
resetLayout:function(){this.fire("app-reset-layout")},
_setKeyboardFocusTrap:function(){if(!this.noFocusTrap){var a=hP(this).querySelectorAll("a[href]:not([tabindex=\"-1\"]),area[href]:not([tabindex=\"-1\"]),input:not([disabled]):not([tabindex=\"-1\"]),select:not([disabled]):not([tabindex=\"-1\"]),textarea:not([disabled]):not([tabindex=\"-1\"]),button:not([disabled]):not([tabindex=\"-1\"]),iframe:not([tabindex=\"-1\"]),[tabindex]:not([tabindex=\"-1\"]),[contentEditable=true]:not([tabindex=\"-1\"])");0<a.length?(this._firstTabStop=a[0],this._lastTabStop=a[a.length-1]):
this._lastTabStop=this._firstTabStop=null;(a=this.getAttribute("tabindex"))&&-1<parseInt(a,10)?this.focus():this._firstTabStop&&this._firstTabStop.focus()}},
_tabKeydownHandler:function(a){this.noFocusTrap||this._drawerState!==this._DRAWER_STATE.OPENED||9!==a.keyCode||(a.shiftKey?this._firstTabStop&&hP(a).localTarget===this._firstTabStop&&(a.preventDefault(),this._lastTabStop.focus()):this._lastTabStop&&hP(a).localTarget===this._lastTabStop&&(a.preventDefault(),this._firstTabStop.focus()))},
_openedPersistentChanged:function(a,b){this.toggleClass("visible",a&&!b,this.$.scrim);this.debounce("_resetDrawerState",this._resetDrawerState,this.transitionDuration)},
_MIN_FLING_THRESHOLD:.2,_MIN_TRANSITION_VELOCITY:1.2,_FLING_TIMING_FUNCTION:"cubic-bezier(0.667, 1, 0.667, 1)",_FLING_INITIAL_SLOPE:1.5,_DRAWER_STATE:{INIT:0,OPENED:1,OPENED_PERSISTENT:2,CLOSED:3,TRACKING:4,FLINGING:5}});var Qwa=window.Polymer;window.Polymer=function(a){return window.Polymer._polymerFn(a)};
Qwa&&Object.assign(Polymer,Qwa);Polymer._polymerFn=function(){throw Error("Load polymer.html to use the Polymer() function.")};/*
Copyright (c) 2018 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/
var HP=new Set,IP={properties:{_parentResizable:{type:Object,observer:"_parentResizableChanged"},_notifyingDescendant:{type:Boolean,value:!1}},listeners:{"iron-request-resize-notifications":"_onIronRequestResizeNotifications"},created:function(){this._interestedResizables=[];this._boundNotifyResize=this.notifyResize.bind(this);this._boundOnDescendantIronResize=this._onDescendantIronResize.bind(this)},
attached:function(){this._requestResizeNotifications()},
detached:function(){this._parentResizable?this._parentResizable.stopResizeNotificationsFor(this):(HP.delete(this),window.removeEventListener("resize",this._boundNotifyResize));this._parentResizable=null},
notifyResize:function(){this.isAttached&&(this._interestedResizables.forEach(function(a){this.resizerShouldNotify(a)&&this._notifyDescendant(a)},this),this._fireResize())},
assignParentResizable:function(a){this._parentResizable&&this._parentResizable.stopResizeNotificationsFor(this);(this._parentResizable=a)&&-1===a._interestedResizables.indexOf(this)&&(a._interestedResizables.push(this),a._subscribeIronResize(this))},
stopResizeNotificationsFor:function(a){var b=this._interestedResizables.indexOf(a);-1<b&&(this._interestedResizables.splice(b,1),this._unsubscribeIronResize(a))},
_subscribeIronResize:function(a){a.addEventListener("iron-resize",this._boundOnDescendantIronResize)},
_unsubscribeIronResize:function(a){a.removeEventListener("iron-resize",this._boundOnDescendantIronResize)},
resizerShouldNotify:function(){return!0},
_onDescendantIronResize:function(a){this._notifyingDescendant?a.stopPropagation():Md||this._fireResize()},
_fireResize:function(){this.fire("iron-resize",null,{node:this,bubbles:!1})},
_onIronRequestResizeNotifications:function(a){var b=hP(a).rootTarget;b!==this&&(b.assignParentResizable(this),this._notifyDescendant(b),a.stopPropagation())},
_parentResizableChanged:function(a){a&&window.removeEventListener("resize",this._boundNotifyResize)},
_notifyDescendant:function(a){this.isAttached&&(this._notifyingDescendant=!0,a.notifyResize(),this._notifyingDescendant=!1)},
_requestResizeNotifications:function(){if(this.isAttached)if("loading"===document.readyState){var a=this._requestResizeNotifications.bind(this);document.addEventListener("readystatechange",function c(){document.removeEventListener("readystatechange",c);a()})}else this._findParent(),this._parentResizable?this._parentResizable._interestedResizables.forEach(function(b){b!==this&&b._findParent()},this):(HP.forEach(function(b){b!==this&&b._findParent()},this),window.addEventListener("resize",this._boundNotifyResize),
this.notifyResize())},
_findParent:function(){this.assignParentResizable(null);this.fire("iron-request-resize-notifications",null,{node:this,bubbles:!0,cancelable:!0});this._parentResizable?HP.delete(this):HP.add(this)}};/*
Copyright (c) 2016 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at
http://polymer.github.io/LICENSE.txt The complete set of authors may be found at
http://polymer.github.io/AUTHORS.txt The complete set of contributors may be
found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
part of the polymer project is also subject to an additional IP rights grant
found at http://polymer.github.io/PATENTS.txt
*/
var Rwa=[IP,{listeners:{"app-reset-layout":"_appResetLayoutHandler","iron-resize":"resetLayout"},attached:function(){this.fire("app-reset-layout")},
_appResetLayoutHandler:function(a){hP(a).path[0]!==this&&(this.resetLayout(),a.stopPropagation())},
_updateLayoutStates:function(){console.error("unimplemented")},
resetLayout:function(){var a=this._updateLayoutStates.bind(this);this._layoutDebouncer=lO(this._layoutDebouncer,bua,a);mO(this._layoutDebouncer);this._notifyDescendantResize()},
_notifyLayoutChanged:function(){var a=this;requestAnimationFrame(function(){a.fire("app-reset-layout")})},
_notifyDescendantResize:function(){this.isAttached&&this._interestedResizables.forEach(function(a){this.resizerShouldNotify(a)&&this._notifyDescendant(a)},this)}}];var Swa=["<!--css-build:shady-->\n\n <div id=\"wrapper\" class=\"initializing style-scope app-header-layout\">\n <slot id=\"headerSlot\" name=\"header\" class=\"style-scope app-header-layout\"></slot>\n\n <div id=\"contentContainer\" class=\"style-scope app-header-layout\">\n <slot class=\"style-scope app-header-layout\"></slot>\n </div>\n </div>\n"];
Swa.raw=["\n <style>\n :host {\n display: block;\n /**\n * Force app-header-layout to have its own stacking context so that its parent can\n * control the stacking of it relative to other elements (e.g. app-drawer-layout).\n * This could be done using \\`isolation: isolate\\`, but that's not well supported\n * across browsers.\n */\n position: relative;\n z-index: 0;\n }\n\n #wrapper ::slotted([slot=header]) {\n @apply --layout-fixed-top;\n z-index: 1;\n }\n\n #wrapper.initializing ::slotted([slot=header]) {\n position: relative;\n }\n\n :host([has-scrolling-region]) {\n height: 100%;\n }\n\n :host([has-scrolling-region]) #wrapper ::slotted([slot=header]) {\n position: absolute;\n }\n\n :host([has-scrolling-region]) #wrapper.initializing ::slotted([slot=header]) {\n position: relative;\n }\n\n :host([has-scrolling-region]) #wrapper #contentContainer {\n @apply --layout-fit;\n overflow-y: auto;\n -webkit-overflow-scrolling: touch;\n }\n\n :host([has-scrolling-region]) #wrapper.initializing #contentContainer {\n position: relative;\n }\n\n :host([fullbleed]) {\n @apply --layout-vertical;\n @apply --layout-fit;\n }\n\n :host([fullbleed]) #wrapper,\n :host([fullbleed]) #wrapper #contentContainer {\n @apply --layout-vertical;\n @apply --layout-flex;\n }\n\n #contentContainer {\n /* Create a stacking context here so that all children appear below the header. */\n position: relative;\n z-index: 0;\n }\n\n @media print {\n :host([has-scrolling-region]) #wrapper #contentContainer {\n overflow-y: visible;\n }\n }\n\n </style>\n\n <div id=\"wrapper\" class=\"initializing\">\n <slot id=\"headerSlot\" name=\"header\"></slot>\n\n <div id=\"contentContainer\">\n <slot></slot>\n </div>\n </div>\n"];
EP({_template:fN(Swa),is:"app-header-layout",behaviors:[Rwa],properties:{hasScrollingRegion:{type:Boolean,value:!1,reflectToAttribute:!0}},observers:["resetLayout(isAttached, hasScrollingRegion)"],get header(){return hP(this.$.headerSlot).getDistributedNodes()[0]},_updateLayoutStates:function(){var a=this.header;if(this.isAttached&&a){this.$.wrapper.classList.remove("initializing");a.scrollTarget=this.hasScrollingRegion?this.$.contentContainer:this.ownerDocument.documentElement;var b=a.offsetHeight;
this.hasScrollingRegion?(a.style.left="",a.style.right=""):requestAnimationFrame(function(){var d=this.getBoundingClientRect(),e=document.documentElement.clientWidth-d.right;a.style.left=d.left+"px";a.style.right=e+"px"}.bind(this));
var c=this.$.contentContainer.style;a.fixed&&!a.condenses&&this.hasScrollingRegion?(c.marginTop=b+"px",c.paddingTop=""):(c.paddingTop=b+"px",c.marginTop="")}}});var _scrollEffects$$module$third_party$javascript$polymer$v2$app_layout$helpers$helpers={},_scrollTimer$$module$third_party$javascript$polymer$v2$app_layout$helpers$helpers=null;var Twa=[{properties:{scrollTarget:{type:HTMLElement,value:function(){return this._defaultScrollTarget}}},
observers:["_scrollTargetChanged(scrollTarget, isAttached)"],_shouldHaveListener:!0,_scrollTargetChanged:function(a,b){this._oldScrollTarget&&(this._toggleScrollListener(!1,this._oldScrollTarget),this._oldScrollTarget=null);b&&("document"===a?this.scrollTarget=this._doc:"string"===typeof a?this.scrollTarget=(b=this.domHost)&&b.$?b.$[a]:hP(this.ownerDocument).querySelector("#"+a):this._isValidScrollTarget()&&(this._oldScrollTarget=a,this._toggleScrollListener(this._shouldHaveListener,a)))},
_scrollHandler:function(){},
get _defaultScrollTarget(){return this._doc},get _doc(){return this.ownerDocument.documentElement},get _scrollTop(){return this._isValidScrollTarget()?this.scrollTarget===this._doc?window.pageYOffset:this.scrollTarget.scrollTop:0},get _scrollLeft(){return this._isValidScrollTarget()?this.scrollTarget===this._doc?window.pageXOffset:this.scrollTarget.scrollLeft:0},set _scrollTop(a){this.scrollTarget===this._doc?window.scrollTo(window.pageXOffset,a):this._isValidScrollTarget()&&(this.scrollTarget.scrollTop=
a)},set _scrollLeft(a){this.scrollTarget===this._doc?window.scrollTo(a,window.pageYOffset):this._isValidScrollTarget()&&(this.scrollTarget.scrollLeft=a)},scroll:function(a,b){if("object"===typeof a){var c=a.left;b=a.top}else c=a;c=c||0;b=b||0;this.scrollTarget===this._doc?window.scrollTo(c,b):this._isValidScrollTarget()&&(this.scrollTarget.scrollLeft=c,this.scrollTarget.scrollTop=b)},
get _scrollTargetWidth(){return this._isValidScrollTarget()?this.scrollTarget===this._doc?window.innerWidth:this.scrollTarget.offsetWidth:0},get _scrollTargetHeight(){return this._isValidScrollTarget()?this.scrollTarget===this._doc?window.innerHeight:this.scrollTarget.offsetHeight:0},_isValidScrollTarget:function(){return this.scrollTarget instanceof HTMLElement},
_toggleScrollListener:function(a,b){b=b===this._doc?window:b;a?this._boundScrollHandler||(this._boundScrollHandler=this._scrollHandler.bind(this),b.addEventListener("scroll",this._boundScrollHandler)):this._boundScrollHandler&&(b.removeEventListener("scroll",this._boundScrollHandler),this._boundScrollHandler=null)},
toggleScrollListener:function(a){this._shouldHaveListener=a;this._toggleScrollListener(a,this.scrollTarget)}},
{properties:{effects:{type:String},effectsConfig:{type:Object,value:function(){return{}}},
disabled:{type:Boolean,reflectToAttribute:!0,value:!1},threshold:{type:Number,value:0},thresholdTriggered:{type:Boolean,notify:!0,readOnly:!0,reflectToAttribute:!0}},observers:["_effectsChanged(effects, effectsConfig, isAttached)"],_updateScrollState:function(){},
isOnScreen:function(){return!1},
isContentBelow:function(){return!1},
_effectsRunFn:null,_effects:null,get _clampedScrollTop(){return Math.max(0,this._scrollTop)},attached:function(){this._scrollStateChanged()},
detached:function(){this._tearDownEffects()},
createEffect:function(a,b){var c=_scrollEffects$$module$third_party$javascript$polymer$v2$app_layout$helpers$helpers[a];if(!c)throw new ReferenceError(this._getUndefinedMsg(a));a=this._boundEffect(c,b||{});a.setUp();return a},
_effectsChanged:function(a,b,c){this._tearDownEffects();a&&c&&(a.split(" ").forEach(function(d){var e;""!==d&&((e=_scrollEffects$$module$third_party$javascript$polymer$v2$app_layout$helpers$helpers[d])?this._effects.push(this._boundEffect(e,b[d])):console.warn(this._getUndefinedMsg(d)))},this),this._setUpEffect())},
_layoutIfDirty:function(){return this.offsetWidth},
_boundEffect:function(a,b){b=b||{};var c=parseFloat(b.startsAt||0),d=parseFloat(b.endsAt||1),e=d-c,g=function(){};
d=0===c&&1===d?a.run:function(h,m){a.run.call(this,Math.max(0,(h-c)/e),m)};
return{setUp:a.setUp?a.setUp.bind(this,b):g,run:a.run?d.bind(this):g,tearDown:a.tearDown?a.tearDown.bind(this):g}},
_setUpEffect:function(){this.isAttached&&this._effects&&(this._effectsRunFn=[],this._effects.forEach(function(a){!1!==a.setUp()&&this._effectsRunFn.push(a.run)},this))},
_tearDownEffects:function(){this._effects&&this._effects.forEach(function(a){a.tearDown()});
this._effectsRunFn=[];this._effects=[]},
_runEffects:function(a,b){this._effectsRunFn&&this._effectsRunFn.forEach(function(c){c(a,b)})},
_scrollHandler:function(){this._scrollStateChanged()},
_scrollStateChanged:function(){if(!this.disabled){var a=this._clampedScrollTop;this._updateScrollState(a);0<this.threshold&&this._setThresholdTriggered(a>=this.threshold)}},
_getDOMRef:function(a){console.warn("_getDOMRef","`"+a+"` is undefined")},
_getUndefinedMsg:function(a){return"Scroll effect `"+a+"` is undefined. Did you forget to import app-layout/app-scroll-effects/effects/"+a+".html ?"}}];var JP=["<!--css-build:shady-->\n <div id=\"contentContainer\" class=\"style-scope app-header\">\n <slot id=\"slot\" class=\"style-scope app-header\"></slot>\n </div>\n"];
JP.raw=JP.slice();
EP({_template:fN(JP),is:"app-header",behaviors:[Twa,Rwa],properties:{condenses:{type:Boolean,value:!1},fixed:{type:Boolean,value:!1},reveals:{type:Boolean,value:!1},shadow:{type:Boolean,reflectToAttribute:!0,value:!1}},observers:["_configChanged(isAttached, condenses, fixed)"],_height:0,_dHeight:0,_stickyElTop:0,_stickyElRef:null,_top:0,_progress:0,_wasScrollingDown:!1,_initScrollTop:0,_initTimestamp:0,_lastTimestamp:0,_lastScrollTop:0,get _maxHeaderTop(){return this.fixed?this._dHeight:this._height+
5},get _stickyEl(){if(this._stickyElRef)return this._stickyElRef;for(var a=hP(this.$.slot).getDistributedNodes(),b=0,c;c=a[b];b++)if(c.nodeType===Node.ELEMENT_NODE)if(c.hasAttribute("sticky")){this._stickyElRef=c;break}else this._stickyElRef||(this._stickyElRef=c);return this._stickyElRef},_configChanged:function(){this.resetLayout();this._notifyLayoutChanged()},
_updateLayoutStates:function(){if(0!==this.offsetWidth||0!==this.offsetHeight){var a=this._clampedScrollTop,b=0===this._height||0===a,c=this.disabled;this._height=this.offsetHeight;this._stickyElRef=null;this.disabled=!0;b||this._updateScrollState(0,!0);this._mayMove()?this._dHeight=this._stickyEl?this._height-this._stickyEl.offsetHeight:0:this._dHeight=0;this._stickyElTop=this._stickyEl?this._stickyEl.offsetTop:0;this._setUpEffect();b?this._updateScrollState(a,!0):(this._updateScrollState(this._lastScrollTop,
!0),this._layoutIfDirty());this.disabled=c}},
_updateScrollState:function(a,b){if(0!==this._height){var c=0,d=this._top;var e=this._maxHeaderTop;var g=a-this._lastScrollTop,h=Math.abs(g),m=a>this._lastScrollTop,n=performance.now();this._mayMove()&&(c=this._clamp(this.reveals?d+g:a,0,e));a>=this._dHeight&&(c=this.condenses&&!this.fixed?Math.max(this._dHeight,c):c,this.style.transitionDuration="0ms");if(this.reveals&&!this.disabled&&100>h){if(300<n-this._initTimestamp||this._wasScrollingDown!==m)this._initScrollTop=a,this._initTimestamp=n;a>=e&&(
30<Math.abs(this._initScrollTop-a)||10<h?(m&&a>=e?c=e:!m&&a>=this._dHeight&&(c=this.condenses&&!this.fixed?this._dHeight:0),this.style.transitionDuration=this._clamp((c-d)/(g/(n-this._lastTimestamp)),0,300)+"ms"):c=this._top)}e=0===this._dHeight?0<a?1:0:c/this._dHeight;b||(this._lastScrollTop=a,this._top=c,this._wasScrollingDown=m,this._lastTimestamp=n);if(b||e!==this._progress||d!==c||0===a)this._progress=e,this._runEffects(e,c),this._transformHeader(c)}},
_mayMove:function(){return this.condenses||!this.fixed},
willCondense:function(){return 0<this._dHeight&&this.condenses},
isOnScreen:function(){return 0!==this._height&&this._top<this._height},
isContentBelow:function(){return 0===this._top?0<this._clampedScrollTop:0<=this._clampedScrollTop-this._maxHeaderTop},
_transformHeader:function(a){this.translate3d(0,-a+"px",0);this._stickyEl&&this.translate3d(0,this.condenses&&a>=this._stickyElTop?Math.min(a,this._dHeight)-this._stickyElTop+"px":0,0,this._stickyEl)},
_clamp:function(a,b,c){return Math.min(c,Math.max(b,a))},
_ensureBgContainers:function(){this._bgContainer||(this._bgContainer=document.createElement("div"),this._bgContainer.id="background",this._bgRear=document.createElement("div"),this._bgRear.id="backgroundRearLayer",this._bgContainer.appendChild(this._bgRear),this._bgFront=document.createElement("div"),this._bgFront.id="backgroundFrontLayer",this._bgContainer.appendChild(this._bgFront),hP(this.root).insertBefore(this._bgContainer,this.$.contentContainer))},
_getDOMRef:function(a){switch(a){case"backgroundFrontLayer":return this._ensureBgContainers(),this._bgFront;case"backgroundRearLayer":return this._ensureBgContainers(),this._bgRear;case"background":return this._ensureBgContainers(),this._bgContainer;case"mainTitle":return hP(this).querySelector("[main-title]");case"condensedTitle":return hP(this).querySelector("[condensed-title]");}return null},
getScrollState:function(){return{progress:this._progress,top:this._top}}});if(null!=_scrollEffects$$module$third_party$javascript$polymer$v2$app_layout$helpers$helpers["parallax-background"])throw Error("effect `parallax-background` is already registered.");
_scrollEffects$$module$third_party$javascript$polymer$v2$app_layout$helpers$helpers["parallax-background"]={setUp:function(a){var b={};a=parseFloat(a.scalar);b.background=this._getDOMRef("background");b.backgroundFrontLayer=this._getDOMRef("backgroundFrontLayer");b.backgroundRearLayer=this._getDOMRef("backgroundRearLayer");b.deltaBg=b.backgroundFrontLayer.offsetHeight-b.background.offsetHeight;0===b.deltaBg?(isNaN(a)&&(a=.8),b.deltaBg=(this._dHeight||0)*a):(isNaN(a)&&(a=1),b.deltaBg*=a);this._fxParallaxBackground=
b},
run:function(a){var b=this._fxParallaxBackground;this.transform("translate3d(0px, "+b.deltaBg*Math.min(1,a)+"px, 0px)",b.backgroundFrontLayer);b.backgroundRearLayer&&this.transform("translate3d(0px, "+b.deltaBg*Math.min(1,a)+"px, 0px)",b.backgroundRearLayer)},
tearDown:function(){delete this._fxParallaxBackground}};var KP=["<!--css-build:shady-->\n\n <slot class=\"style-scope app-toolbar\"></slot>\n"];
KP.raw=KP.slice();EP({_template:fN(KP),is:"app-toolbar"});/*
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/
if(!window.polymerSkipLoadingFontRoboto)for(var Uwa=k(["https://fonts.googleapis.com/css?family=Roboto:400,300,300italic,400italic,500,500italic,700,700italic","https://fonts.googleapis.com/css?family=Roboto+Mono:400,700"]),LP=Uwa.next();!LP.done;LP=Uwa.next()){var Vwa=LP.value,MP=document.createElement("link");MP.rel="stylesheet";MP.href=Vwa;document.head.appendChild(MP)};var NP=["<!--css-build:shady-->\n <div aria-live$=\"[[mode]]\" class=\"style-scope iron-a11y-announcer\">[[_text]]</div>\n"];NP.raw=NP.slice();var OP=function(){};
OP=EP({_template:fN(NP),is:"iron-a11y-announcer",properties:{mode:{type:String,value:"polite"},_text:{type:String,value:""}},created:function(){OP.instance||(OP.instance=this);document.addEventListener("iron-announce",this._onIronAnnounce.bind(this))},
announce:function(a){this._text="";this.async(function(){this._text=a},100)},
_onIronAnnounce:function(a){a.detail&&a.detail.text&&this.announce(a.detail.text)}});
OP.instance=null;OP.requestAvailability=function(){OP.instance||(OP.instance=document.createElement("iron-a11y-announcer"));(document.body||document.head).appendChild(OP.instance)};Polymer.IronA11yAnnouncer=OP;var Wwa={"U+0008":"backspace","U+0009":"tab","U+001B":"esc","U+0020":"space","U+007F":"del"},Xwa={8:"backspace",9:"tab",13:"enter",27:"esc",33:"pageup",34:"pagedown",35:"end",36:"home",32:"space",37:"left",38:"up",39:"right",40:"down",46:"del",106:"*"},Ywa={shift:"shiftKey",ctrl:"ctrlKey",alt:"altKey",meta:"metaKey"},Zwa=/[a-z0-9*]/,$wa=/U\+/,axa=/^arrow/,bxa=/^space(bar)?/,cxa=/^escape$/;
function dxa(a,b){var c="";if(a)if(a=a.toLowerCase()," "===a||bxa.test(a))c="space";else if(cxa.test(a))c="esc";else if(1==a.length){if(!b||Zwa.test(a))c=a}else c=axa.test(a)?a.replace("arrow",""):"multiply"==a?"*":a;return c}
function PP(a,b){var c=a.hasModifiers;if(b.key)c=dxa(b.key,c);else if(b.detail&&b.detail.key)c=dxa(b.detail.key,c);else{c=b.keyIdentifier;var d="";c&&(c in Wwa?d=Wwa[c]:$wa.test(c)?(c=parseInt(c.replace("U+","0x"),16),d=String.fromCharCode(c).toLowerCase()):d=c.toLowerCase());(c=d)||(c=b.keyCode,d="",Number(c)&&(d=65<=c&&90>=c?String.fromCharCode(32+c):112<=c&&123>=c?"f"+(c-112+1):48<=c&&57>=c?String(c-48):96<=c&&105>=c?String(c-96):Xwa[c]),c=d);c=c||""}return c===a.key&&(!a.hasModifiers||!!b.shiftKey===
!!a.shiftKey&&!!b.ctrlKey===!!a.ctrlKey&&!!b.altKey===!!a.altKey&&!!b.metaKey===!!a.metaKey)}
function exa(a){return 1===a.length?{combo:a,key:a,event:"keydown"}:a.split("+").reduce(function(b,c){var d=c.split(":");c=d[0];d=d[1];c in Ywa?(b[Ywa[c]]=!0,b.hasModifiers=!0):(b.key=c,b.event=d||"keydown");return b},{combo:a.split(":").shift()})}
function QP(a){return a.trim().split(" ").map(function(b){return exa(b)})}
var RP={properties:{keyEventTarget:{type:Object,value:function(){return this}},
stopKeyboardEventPropagation:{type:Boolean,value:!1},_boundKeyHandlers:{type:Array,value:function(){return[]}},
_imperativeKeyBindings:{type:Object,value:function(){return{}}}},
observers:["_resetKeyEventListeners(keyEventTarget, _boundKeyHandlers)"],keyBindings:{},registered:function(){this._prepKeyBindings()},
attached:function(){this._listenKeyEventListeners()},
detached:function(){this._unlistenKeyEventListeners()},
addOwnKeyBinding:function(a,b){this._imperativeKeyBindings[a]=b;this._prepKeyBindings();this._resetKeyEventListeners()},
removeOwnKeyBindings:function(){this._imperativeKeyBindings={};this._prepKeyBindings();this._resetKeyEventListeners()},
keyboardEventMatchesKeys:function(a,b){b=QP(b);for(var c=0;c<b.length;++c)if(PP(b[c],a))return!0;return!1},
_collectKeyBindings:function(){var a=this.behaviors.map(function(b){return b.keyBindings});
-1===a.indexOf(this.keyBindings)&&a.push(this.keyBindings);return a},
_prepKeyBindings:function(){this._keyBindings={};this._collectKeyBindings().forEach(function(c){for(var d in c)this._addKeyBinding(d,c[d])},this);
for(var a in this._imperativeKeyBindings)this._addKeyBinding(a,this._imperativeKeyBindings[a]);for(var b in this._keyBindings)this._keyBindings[b].sort(function(c,d){c=c[0].hasModifiers;return c===d[0].hasModifiers?0:c?-1:1})},
_addKeyBinding:function(a,b){QP(a).forEach(function(c){this._keyBindings[c.event]=this._keyBindings[c.event]||[];this._keyBindings[c.event].push([c,b])},this)},
_resetKeyEventListeners:function(){this._unlistenKeyEventListeners();this.isAttached&&this._listenKeyEventListeners()},
_listenKeyEventListeners:function(){this.keyEventTarget&&Object.keys(this._keyBindings).forEach(function(a){var b=this._onKeyBindingEvent.bind(this,this._keyBindings[a]);this._boundKeyHandlers.push([this.keyEventTarget,a,b]);this.keyEventTarget.addEventListener(a,b)},this)},
_unlistenKeyEventListeners:function(){for(var a,b,c;this._boundKeyHandlers.length;)a=this._boundKeyHandlers.pop(),b=a[0],c=a[1],a=a[2],b.removeEventListener(c,a)},
_onKeyBindingEvent:function(a,b){this.stopKeyboardEventPropagation&&b.stopPropagation();if(!b.defaultPrevented)for(var c=0;c<a.length;c++){var d=a[c][0],e=a[c][1];if(PP(d,b)&&(this._triggerKeyHandler(d,e,b),b.defaultPrevented))break}},
_triggerKeyHandler:function(a,b,c){var d=Object.create(a);d.keyboardEvent=c;a=new CustomEvent(a.event,{detail:d,cancelable:!0});this[b].call(this,a);a.defaultPrevented&&c.preventDefault()}};Polymer.IronA11yKeysBehavior=RP;EP({is:"iron-a11y-keys",_template:null,behaviors:[RP],properties:{target:{type:Object,observer:"_targetChanged"},keys:{type:String,reflectToAttribute:!0,observer:"_keysChanged"}},attached:function(){this.target||(this.target=this.parentNode)},
_targetChanged:function(a){this.keyEventTarget=a},
_keysChanged:function(){this.removeOwnKeyBindings();this.addOwnKeyBinding(this.keys,"_fireKeysPressed")},
_fireKeysPressed:function(a){this.fire("keys-pressed",a.detail,{})}});var SP={properties:{focused:{type:Boolean,value:!1,notify:!0,readOnly:!0,reflectToAttribute:!0},disabled:{type:Boolean,value:!1,notify:!0,observer:"_disabledChanged",reflectToAttribute:!0},_oldTabIndex:{type:String},_boundFocusBlurHandler:{type:Function,value:function(){return this._focusBlurHandler.bind(this)}}},
observers:["_changedControlState(focused, disabled)"],ready:function(){this.addEventListener("focus",this._boundFocusBlurHandler,!0);this.addEventListener("blur",this._boundFocusBlurHandler,!0)},
_focusBlurHandler:function(a){this._setFocused("focus"===a.type)},
_disabledChanged:function(a){this.setAttribute("aria-disabled",a?"true":"false");this.style.pointerEvents=a?"none":"";a?(this._oldTabIndex=this.getAttribute("tabindex"),this._setFocused(!1),this.tabIndex=-1,this.blur()):void 0!==this._oldTabIndex&&(null===this._oldTabIndex?this.removeAttribute("tabindex"):this.setAttribute("tabindex",this._oldTabIndex))},
_changedControlState:function(){this._controlStateChanged&&this._controlStateChanged()}};var TP=function(a){TP[" "](a);this.type=a&&a.type||"default";this.key=a&&a.key;a&&"value"in a&&(this.value=a.value)};
TP.prototype.byKey=function(a){this.key=a;return this.value};
ea.Object.defineProperties(TP.prototype,{value:{configurable:!0,enumerable:!0,get:function(){var a=this.type,b=this.key;if(a&&b)return UP[a]&&UP[a][b]},
set:function(a){var b=this.type,c=this.key;b&&c&&(b=UP[b]=UP[b]||{},null==a?delete b[c]:b[c]=a)}},
list:{configurable:!0,enumerable:!0,get:function(){if(!this.type)return[];var a=UP[this.type];return a?Object.keys(a).map(function(b){return UP[this.type][b]},this):[]}}});
TP[" "]=function(){};
var UP={};EP({is:"iron-meta",_template:null,properties:{type:{type:String,value:"default"},key:{type:String},value:{type:String,notify:!0},self:{type:Boolean,observer:"_selfChanged"},__meta:{type:Boolean,computed:"__computeMeta(type, key, value)"}},hostAttributes:{hidden:!0},__computeMeta:function(a,b,c){a=new TP({type:a,key:b});void 0!==c&&c!==a.value?a.value=c:this.value!==a.value&&(this.value=a.value);return a},
get list(){return this.__meta&&this.__meta.list},_selfChanged:function(a){a&&(this.value=this)},
byKey:function(a){return new TP({type:this.type,key:a}).value}});var VP=null,WP={properties:{validator:{type:String},invalid:{notify:!0,reflectToAttribute:!0,type:Boolean,value:!1,observer:"_invalidChanged"}},registered:function(){VP=new TP({type:"validator"})},
_invalidChanged:function(){this.invalid?this.setAttribute("aria-invalid","true"):this.removeAttribute("aria-invalid")},
get _validator(){return VP&&VP.byKey(this.validator)},hasValidator:function(){return null!=this._validator},
validate:function(a){this.invalid=void 0===a&&void 0!==this.value?!this._getValidity(this.value):!this._getValidity(a);return!this.invalid},
_getValidity:function(a){return this.hasValidator()?this._validator.validate(a):!0}};var XP=["<!--css-build:shady-->\n\n <!-- the mirror sizes the input/textarea so it grows with typing -->\n <!-- use   instead of to allow this element to be used in XHTML -->\n <div id=\"mirror\" class=\"mirror-text style-scope iron-autogrow-textarea\" aria-hidden=\"true\"> </div>\n\n <!-- size the input/textarea with a div, because the textarea has intrinsic size in ff -->\n <div class=\"textarea-container fit style-scope iron-autogrow-textarea\">\n <textarea id=\"textarea\" name$=\"[[name]]\" aria-label$=\"[[label]]\" autocomplete$=\"[[autocomplete]]\" autofocus$=\"[[autofocus]]\" autocapitalize$=\"[[autocapitalize]]\" inputmode$=\"[[inputmode]]\" placeholder$=\"[[placeholder]]\" readonly$=\"[[readonly]]\" required$=\"[[required]]\" disabled$=\"[[disabled]]\" rows$=\"[[rows]]\" minlength$=\"[[minlength]]\" maxlength$=\"[[maxlength]]\" class=\"style-scope iron-autogrow-textarea\"></textarea>\n </div>\n"];
XP.raw=XP.slice();
EP({_template:fN(XP),is:"iron-autogrow-textarea",behaviors:[WP,SP],properties:{value:{observer:"_valueChanged",type:String,notify:!0},bindValue:{observer:"_bindValueChanged",type:String,notify:!0},rows:{type:Number,value:1,observer:"_updateCached"},maxRows:{type:Number,value:0,observer:"_updateCached"},autocomplete:{type:String,value:"off"},autofocus:{type:Boolean,value:!1},autocapitalize:{type:String,value:"none"},inputmode:{type:String},placeholder:{type:String},readonly:{type:String},required:{type:Boolean},
minlength:{type:Number},maxlength:{type:Number},label:{type:String}},listeners:{input:"_onInput"},get textarea(){return this.$.textarea},get selectionStart(){return this.$.textarea.selectionStart},get selectionEnd(){return this.$.textarea.selectionEnd},set selectionStart(a){this.$.textarea.selectionStart=a},set selectionEnd(a){this.$.textarea.selectionEnd=a},attached:function(){navigator.userAgent.match(/iP(?:[oa]d|hone)/)&&(this.$.textarea.style.marginLeft="-3px")},
validate:function(){var a=this.$.textarea.validity.valid;a&&(this.required&&""===this.value?a=!1:this.hasValidator()&&(a=WP.validate.call(this,this.value)));this.invalid=!a;this.fire("iron-input-validate");return a},
_bindValueChanged:function(a){this.value=a},
_valueChanged:function(a){var b=this.textarea;b&&(b.value!==a&&(b.value=a||0===a?a:""),this.bindValue=a,this.$.mirror.innerHTML=this._valueForMirror(),this.fire("bind-value-changed",{value:this.bindValue}))},
_onInput:function(a){var b=hP(a).path;this.value=b?b[0].value:a.target.value},
_constrain:function(a){var b;a=a||[""];for(b=0<this.maxRows&&a.length>this.maxRows?a.slice(0,this.maxRows):a.slice(0);0<this.rows&&b.length<this.rows;)b.push("");return b.join("<br/>")+" "},
_valueForMirror:function(){var a=this.textarea;if(a)return this.tokens=a&&a.value?a.value.replace(/&/gm,"&").replace(/"/gm,""").replace(/'/gm,"'").replace(/</gm,"<").replace(/>/gm,">").split("\n"):[""],this._constrain(this.tokens)},
_updateCached:function(){this.$.mirror.innerHTML=this._constrain(this.tokens)}});var YP={properties:{pressed:{type:Boolean,readOnly:!0,value:!1,reflectToAttribute:!0,observer:"_pressedChanged"},toggles:{type:Boolean,value:!1,reflectToAttribute:!0},active:{type:Boolean,value:!1,notify:!0,reflectToAttribute:!0},pointerDown:{type:Boolean,readOnly:!0,value:!1},receivedFocusFromKeyboard:{type:Boolean,readOnly:!0},ariaActiveAttribute:{type:String,value:"aria-pressed",observer:"_ariaActiveAttributeChanged"}},listeners:{down:"_downHandler",up:"_upHandler",tap:"_tapHandler"},observers:["_focusChanged(focused)",
"_activeChanged(active, ariaActiveAttribute)"],keyBindings:{"enter:keydown":"_asyncClick","space:keydown":"_spaceKeyDownHandler","space:keyup":"_spaceKeyUpHandler"},_mouseEventRe:/^mouse/,_tapHandler:function(){this.toggles?this._userActivate(!this.active):this.active=!1},
_focusChanged:function(a){this._detectKeyboardFocus(a);a||this._setPressed(!1)},
_detectKeyboardFocus:function(a){this._setReceivedFocusFromKeyboard(!this.pointerDown&&a)},
_userActivate:function(a){this.active!==a&&(this.active=a,this.fire("change"))},
_downHandler:function(){this._setPointerDown(!0);this._setPressed(!0);this._setReceivedFocusFromKeyboard(!1)},
_upHandler:function(){this._setPointerDown(!1);this._setPressed(!1)},
_spaceKeyDownHandler:function(a){a=a.detail.keyboardEvent;var b=hP(a).localTarget;this.isLightDescendant(b)||(a.preventDefault(),a.stopImmediatePropagation(),this._setPressed(!0))},
_spaceKeyUpHandler:function(a){a=hP(a.detail.keyboardEvent).localTarget;this.isLightDescendant(a)||(this.pressed&&this._asyncClick(),this._setPressed(!1))},
_asyncClick:function(){this.async(function(){this.click()},1)},
_pressedChanged:function(){this._changedButtonState()},
_ariaActiveAttributeChanged:function(a,b){b&&b!=a&&this.hasAttribute(b)&&this.removeAttribute(b)},
_activeChanged:function(a){this.toggles?this.setAttribute(this.ariaActiveAttribute,a?"true":"false"):this.removeAttribute(this.ariaActiveAttribute);this._changedButtonState()},
_controlStateChanged:function(){this.disabled?this._setPressed(!1):this._changedButtonState()},
_changedButtonState:function(){this._buttonStateChanged&&this._buttonStateChanged()}},ZP=[RP,
YP];Polymer.IronButtonState=ZP;Polymer.IronButtonStateImpl=YP;var $P={properties:{name:{type:String},value:{notify:!0,type:String},required:{type:Boolean,value:!1}},attached:function(){},
detached:function(){}};var fxa={properties:{checked:{type:Boolean,value:!1,reflectToAttribute:!0,notify:!0,observer:"_checkedChanged"},toggles:{type:Boolean,value:!0,reflectToAttribute:!0},value:{type:String,value:"on",observer:"_valueChanged"}},observers:["_requiredChanged(required)"],created:function(){this._hasIronCheckedElementBehavior=!0},
_getValidity:function(){return this.disabled||!this.required||this.checked},
_requiredChanged:function(){this.required?this.setAttribute("aria-required","true"):this.removeAttribute("aria-required")},
_checkedChanged:function(){this.active=this.checked;this.fire("iron-change")},
_valueChanged:function(){if(void 0===this.value||null===this.value)this.value="on"}},gxa=[$P,
WP,fxa];var aQ=["<!--css-build:shady-->\n\n <slot class=\"style-scope iron-collapse\"></slot>\n"];
aQ.raw=aQ.slice();
EP({_template:fN(aQ),is:"iron-collapse",behaviors:[IP],properties:{horizontal:{type:Boolean,value:!1,observer:"_horizontalChanged"},opened:{type:Boolean,value:!1,notify:!0,observer:"_openedChanged"},transitioning:{type:Boolean,notify:!0,readOnly:!0},noAnimation:{type:Boolean},_desiredSize:{type:String,value:""}},get dimension(){return this.horizontal?"width":"height"},get _dimensionMax(){return this.horizontal?"maxWidth":"maxHeight"},get _dimensionMaxCss(){return this.horizontal?"max-width":"max-height"},
hostAttributes:{role:"group","aria-hidden":"true"},listeners:{transitionend:"_onTransitionEnd"},toggle:function(){this.opened=!this.opened},
show:function(){this.opened=!0},
hide:function(){this.opened=!1},
updateSize:function(a,b){a="auto"===a?"":a;b=b&&!this.noAnimation&&this.isAttached&&this._desiredSize!==a;this._desiredSize=a;this._updateTransition(!1);b&&(b=this._calcSize(),""===a&&(this.style[this._dimensionMax]="",a=this._calcSize()),this.style[this._dimensionMax]=b,this.scrollTop=this.scrollTop,this._updateTransition(!0),b=a!==b);this.style[this._dimensionMax]=a;b||this._transitionEnd()},
enableTransition:function(a){FP._warn("`enableTransition()` is deprecated, use `noAnimation` instead.");this.noAnimation=!a},
_updateTransition:function(a){this.style.transitionDuration=a&&!this.noAnimation?"":"0s"},
_horizontalChanged:function(){this.style.transitionProperty=this._dimensionMaxCss;this.style["maxWidth"===this._dimensionMax?"maxHeight":"maxWidth"]="";this.updateSize(this.opened?"auto":"0px",!1)},
_openedChanged:function(){this.setAttribute("aria-hidden",!this.opened);this._setTransitioning(!0);this.toggleClass("iron-collapse-closed",!1);this.toggleClass("iron-collapse-opened",!1);this.updateSize(this.opened?"auto":"0px",!0);this.opened&&this.focus()},
_transitionEnd:function(){this.style[this._dimensionMax]=this._desiredSize;this.toggleClass("iron-collapse-closed",!this.opened);this.toggleClass("iron-collapse-opened",this.opened);this._updateTransition(!1);this.notifyResize();this._setTransitioning(!1)},
_onTransitionEnd:function(a){hP(a).rootTarget===this&&this._transitionEnd()},
_calcSize:function(){return this.getBoundingClientRect()[this.dimension]+"px"}});var hxa={properties:{sizingTarget:{type:Object,value:function(){return this}},
fitInto:{type:Object,value:window},noOverlap:{type:Boolean},positionTarget:{type:Element},horizontalAlign:{type:String},verticalAlign:{type:String},dynamicAlign:{type:Boolean},horizontalOffset:{type:Number,value:0,notify:!0},verticalOffset:{type:Number,value:0,notify:!0},autoFitOnAttach:{type:Boolean,value:!1},_fitInfo:{type:Object}},get _fitWidth(){return this.fitInto===window?this.fitInto.innerWidth:this.fitInto.getBoundingClientRect().width},get _fitHeight(){return this.fitInto===window?this.fitInto.innerHeight:
this.fitInto.getBoundingClientRect().height},get _fitLeft(){return this.fitInto===window?0:this.fitInto.getBoundingClientRect().left},get _fitTop(){return this.fitInto===window?0:this.fitInto.getBoundingClientRect().top},get _defaultPositionTarget(){var a=hP(this).parentNode;a&&a.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&(a=a.host);return a},get _localeHorizontalAlign(){if(this._isRTL){if("right"===this.horizontalAlign)return"left";if("left"===this.horizontalAlign)return"right"}return this.horizontalAlign},
get __shouldPosition(){return(this.horizontalAlign||this.verticalAlign)&&this.positionTarget},attached:function(){"undefined"===typeof this._isRTL&&(this._isRTL="rtl"==window.getComputedStyle(this).direction);this.positionTarget=this.positionTarget||this._defaultPositionTarget;this.autoFitOnAttach&&("none"===window.getComputedStyle(this).display?setTimeout(function(){this.fit()}.bind(this)):(window.ShadyDOM&&ShadyDOM.flush(),this.fit()))},
detached:function(){this.__deferredFit&&(clearTimeout(this.__deferredFit),this.__deferredFit=null)},
fit:function(){this.position();this.constrain();this.center()},
_discoverInfo:function(){if(!this._fitInfo){var a=window.getComputedStyle(this),b=window.getComputedStyle(this.sizingTarget);this._fitInfo={inlineStyle:{top:this.style.top||"",left:this.style.left||"",position:this.style.position||""},sizerInlineStyle:{maxWidth:this.sizingTarget.style.maxWidth||"",maxHeight:this.sizingTarget.style.maxHeight||"",boxSizing:this.sizingTarget.style.boxSizing||""},positionedBy:{vertically:"auto"!==a.top?"top":"auto"!==a.bottom?"bottom":null,horizontally:"auto"!==a.left?
"left":"auto"!==a.right?"right":null},sizedBy:{height:"none"!==b.maxHeight,width:"none"!==b.maxWidth,minWidth:parseInt(b.minWidth,10)||0,minHeight:parseInt(b.minHeight,10)||0},margin:{top:parseInt(a.marginTop,10)||0,right:parseInt(a.marginRight,10)||0,bottom:parseInt(a.marginBottom,10)||0,left:parseInt(a.marginLeft,10)||0}}}},
resetFit:function(){var a=this._fitInfo||{},b;for(b in a.sizerInlineStyle)this.sizingTarget.style[b]=a.sizerInlineStyle[b];for(b in a.inlineStyle)this.style[b]=a.inlineStyle[b];this._fitInfo=null},
refit:function(){var a=this.sizingTarget.scrollLeft,b=this.sizingTarget.scrollTop;this.resetFit();this.fit();this.sizingTarget.scrollLeft=a;this.sizingTarget.scrollTop=b},
position:function(){if(this.__shouldPosition){this._discoverInfo();this.style.position="fixed";this.sizingTarget.style.boxSizing="border-box";this.style.left="0px";this.style.top="0px";var a=this.getBoundingClientRect(),b=this.__getNormalizedRect(this.positionTarget),c=this.__getNormalizedRect(this.fitInto),d=this._fitInfo.margin,e=this.__getPosition(this._localeHorizontalAlign,this.verticalAlign,{width:a.width+d.left+d.right,height:a.height+d.top+d.bottom},a,b,c);b=e.left+d.left;e=e.top+d.top;var g=
Math.min(c.right-d.right,b+a.width),h=Math.min(c.bottom-d.bottom,e+a.height);b=Math.max(c.left+d.left,Math.min(b,g-this._fitInfo.sizedBy.minWidth));e=Math.max(c.top+d.top,Math.min(e,h-this._fitInfo.sizedBy.minHeight));this.sizingTarget.style.maxWidth=Math.max(g-b,this._fitInfo.sizedBy.minWidth)+"px";this.sizingTarget.style.maxHeight=Math.max(h-e,this._fitInfo.sizedBy.minHeight)+"px";this.style.left=b-a.left+"px";this.style.top=e-a.top+"px"}},
constrain:function(){if(!this.__shouldPosition){this._discoverInfo();var a=this._fitInfo;a.positionedBy.vertically||(this.style.position="fixed",this.style.top="0px");a.positionedBy.horizontally||(this.style.position="fixed",this.style.left="0px");this.sizingTarget.style.boxSizing="border-box";var b=this.getBoundingClientRect();a.sizedBy.height||this.__sizeDimension(b,a.positionedBy.vertically,"top","bottom","Height");a.sizedBy.width||this.__sizeDimension(b,a.positionedBy.horizontally,"left","right",
"Width")}},
_sizeDimension:function(a,b,c,d,e){this.__sizeDimension(a,b,c,d,e)},
__sizeDimension:function(a,b,c,d,e){var g=this._fitInfo,h=this.__getNormalizedRect(this.fitInto);h="Width"===e?h.width:h.height;b=b===d;var m="offset"+e;this.sizingTarget.style["max"+e]=h-g.margin[b?c:d]-(b?h-a[d]:a[c])-(this[m]-this.sizingTarget[m])+"px"},
center:function(){if(!this.__shouldPosition){this._discoverInfo();var a=this._fitInfo.positionedBy;if(!a.vertically||!a.horizontally){this.style.position="fixed";a.vertically||(this.style.top="0px");a.horizontally||(this.style.left="0px");var b=this.getBoundingClientRect(),c=this.__getNormalizedRect(this.fitInto);a.vertically||(this.style.top=c.top-b.top+(c.height-b.height)/2+"px");a.horizontally||(this.style.left=c.left-b.left+(c.width-b.width)/2+"px")}}},
__getNormalizedRect:function(a){return a===document.documentElement||a===window?{top:0,left:0,width:window.innerWidth,height:window.innerHeight,right:window.innerWidth,bottom:window.innerHeight}:a.getBoundingClientRect()},
__getOffscreenArea:function(a,b,c){return Math.abs(Math.min(0,a.top)+Math.min(0,c.bottom-(a.top+b.height)))*b.width+Math.abs(Math.min(0,a.left)+Math.min(0,c.right-(a.left+b.width)))*b.height},
__getPosition:function(a,b,c,d,e,g){var h=[{verticalAlign:"top",horizontalAlign:"left",top:e.top+this.verticalOffset,left:e.left+this.horizontalOffset},{verticalAlign:"top",horizontalAlign:"right",top:e.top+this.verticalOffset,left:e.right-c.width-this.horizontalOffset},{verticalAlign:"bottom",horizontalAlign:"left",top:e.bottom-c.height-this.verticalOffset,left:e.left+this.horizontalOffset},{verticalAlign:"bottom",horizontalAlign:"right",top:e.bottom-c.height-this.verticalOffset,left:e.right-c.width-
this.horizontalOffset}];if(this.noOverlap){for(var m=0,n=h.length;m<n;m++){var p={},x;for(x in h[m])p[x]=h[m][x];h.push(p)}h[0].top=h[1].top+=e.height;h[2].top=h[3].top-=e.height;h[4].left=h[6].left+=e.width;h[5].left=h[7].left-=e.width}b="auto"===b?null:b;a="auto"===a?null:a;a&&"center"!==a||(h.push({verticalAlign:"top",horizontalAlign:"center",top:e.top+this.verticalOffset+(this.noOverlap?e.height:0),left:e.left-d.width/2+e.width/2+this.horizontalOffset}),h.push({verticalAlign:"bottom",horizontalAlign:"center",
top:e.bottom-c.height-this.verticalOffset-(this.noOverlap?e.height:0),left:e.left-d.width/2+e.width/2+this.horizontalOffset}));b&&"middle"!==b||(h.push({verticalAlign:"middle",horizontalAlign:"left",top:e.top-d.height/2+e.height/2+this.verticalOffset,left:e.left+this.horizontalOffset+(this.noOverlap?e.width:0)}),h.push({verticalAlign:"middle",horizontalAlign:"right",top:e.top-d.height/2+e.height/2+this.verticalOffset,left:e.right-c.width-this.horizontalOffset-(this.noOverlap?e.width:0)}));"middle"===
b&&"center"===a&&h.push({verticalAlign:"middle",horizontalAlign:"center",top:e.top-d.height/2+e.height/2+this.verticalOffset,left:e.left-d.width/2+e.width/2+this.horizontalOffset});for(m=0;m<h.length;m++){d=h[m];e=d.verticalAlign===b;n=d.horizontalAlign===a;if(!this.dynamicAlign&&!this.noOverlap&&e&&n){var y=d;break}p=(!b||e)&&(!a||n);if(this.dynamicAlign||p){d.offscreenArea=this.__getOffscreenArea(d,c,g);if(0===d.offscreenArea&&p){y=d;break}y=y||d;p=d.offscreenArea-y.offscreenArea;if(0>p||0===p&&(
e||n))y=d}}return y}};var bQ=Element.prototype,cQ=bQ.matches||bQ.matchesSelector||bQ.mozMatchesSelector||bQ.msMatchesSelector||bQ.oMatchesSelector||bQ.webkitMatchesSelector,ixa=function(){},jxa=function(a,b){var c=[];
return a._collectTabbableNodes(b,c)?a._sortByTabIndex(c):c};
f=ixa.prototype;f.isFocusable=function(a){return cQ.call(a,"input, select, textarea, button, object")?cQ.call(a,":not([disabled])"):cQ.call(a,"a[href], area[href], iframe, [tabindex], [contentEditable]")};
f.isTabbable=function(a){return this.isFocusable(a)&&cQ.call(a,":not([tabindex=\"-1\"])")&&this._isVisible(a)};
f._normalizedTabIndex=function(a){return this.isFocusable(a)?(a=a.getAttribute("tabindex")||0,Number(a)):-1};
f._collectTabbableNodes=function(a,b){if(a.nodeType!==Node.ELEMENT_NODE||!this._isVisible(a))return!1;var c=this._normalizedTabIndex(a),d=0<c;0<=c&&b.push(a);a="content"===a.localName||"slot"===a.localName?hP(a).getDistributedNodes():hP(a.root||a).children;for(c=0;c<a.length;c++)d=this._collectTabbableNodes(a[c],b)||d;return d};
f._isVisible=function(a){var b=a.style;return"hidden"!==b.visibility&&"none"!==b.display?(b=window.getComputedStyle(a),"hidden"!==b.visibility&&"none"!==b.display):!1};
f._sortByTabIndex=function(a){var b=a.length;if(2>b)return a;var c=Math.ceil(b/2);b=this._sortByTabIndex(a.slice(0,c));a=this._sortByTabIndex(a.slice(c));return this._mergeSortByTabIndex(b,a)};
f._mergeSortByTabIndex=function(a,b){for(var c=[];0<a.length&&0<b.length;)this._hasLowerTabOrder(a[0],b[0])?c.push(b.shift()):c.push(a.shift());return c.concat(a,b)};
f._hasLowerTabOrder=function(a,b){a=Math.max(a.tabIndex,0);b=Math.max(b.tabIndex,0);return 0===a||0===b?b>a:a>b};
var kxa=new ixa;var dQ=["<!--css-build:shady-->\n\n <slot class=\"style-scope iron-overlay-backdrop\"></slot>\n"];
dQ.raw=dQ.slice();EP({_template:fN(dQ),is:"iron-overlay-backdrop",properties:{opened:{reflectToAttribute:!0,type:Boolean,value:!1,observer:"_openedChanged"}},listeners:{transitionend:"_onTransitionend"},created:function(){this.__openedRaf=null},
attached:function(){this.opened&&this._openedChanged(this.opened)},
prepare:function(){this.opened&&!this.parentNode&&hP(document.body).appendChild(this)},
open:function(){this.opened=!0},
close:function(){this.opened=!1},
complete:function(){this.opened||this.parentNode!==document.body||hP(this.parentNode).removeChild(this)},
_onTransitionend:function(a){a&&a.target===this&&this.complete()},
_openedChanged:function(a){a?this.prepare():(a=window.getComputedStyle(this),"0s"!==a.transitionDuration&&0!=a.opacity||this.complete());this.isAttached&&(this.__openedRaf&&(window.cancelAnimationFrame(this.__openedRaf),this.__openedRaf=null),this.scrollTop=this.scrollTop,this.__openedRaf=window.requestAnimationFrame(function(){this.__openedRaf=null;this.toggleClass("opened",this.opened)}.bind(this)))}});var eQ=function(){this._overlays=[];this._minimumZ=101;this._backdropElement=null;BO(document.documentElement,"tap",function(){});
document.addEventListener("tap",this._onCaptureClick.bind(this),!0);document.addEventListener("focus",this._onCaptureFocus.bind(this),!0);document.addEventListener("keydown",this._onCaptureKeyDown.bind(this),!0)};
eQ.prototype._bringOverlayAtIndexToFront=function(a){var b=this._overlays[a];if(b){var c=this._overlays.length-1,d=this._overlays[c];d&&this._shouldBeBehindOverlay(b,d)&&c--;if(!(a>=c)){d=Math.max(this._getZ(fQ(this)),this._minimumZ);for(this._getZ(b)<=d&&this._applyOverlayZ(b,d);a<c;)this._overlays[a]=this._overlays[a+1],a++;this._overlays[c]=b}}};
eQ.prototype.addOrRemoveOverlay=function(a){a.opened?lxa(this,a):this.removeOverlay(a)};
var lxa=function(a,b){var c=a._overlays.indexOf(b);if(0<=c)a._bringOverlayAtIndexToFront(c);else{c=a._overlays.length;var d=a._overlays[c-1],e=Math.max(a._getZ(d),a._minimumZ),g=a._getZ(b);d&&a._shouldBeBehindOverlay(b,d)&&(a._applyOverlayZ(d,e),c--,e=Math.max(a._getZ(a._overlays[c-1]),a._minimumZ));g<=e&&a._applyOverlayZ(b,e);a._overlays.splice(c,0,b)}gQ(a)};
eQ.prototype.removeOverlay=function(a){a=this._overlays.indexOf(a);-1!==a&&(this._overlays.splice(a,1),gQ(this))};
var fQ=function(a){return a._overlays[a._overlays.length-1]},hQ=function(a){var b=Polymer.IronOverlayManager;
b._minimumZ=Math.max(b._minimumZ,a)};
eQ.prototype.focusOverlay=function(){var a=fQ(this);a&&a._applyFocus()};
var gQ=function(a){var b=a._overlayWithBackdrop();if(b||a._backdropElement)a.backdropElement.style.zIndex=a._getZ(b)-1,a.backdropElement.opened=!!b,a.backdropElement.prepare()};
f=eQ.prototype;f.getBackdrops=function(){for(var a=[],b=0;b<this._overlays.length;b++)this._overlays[b].withBackdrop&&a.push(this._overlays[b]);return a};
f.backdropZ=function(){return this._getZ(this._overlayWithBackdrop())-1};
f._overlayWithBackdrop=function(){for(var a=this._overlays.length-1;0<=a;a--)if(this._overlays[a].withBackdrop)return this._overlays[a]};
f._getZ=function(a){var b=this._minimumZ;a&&(a=Number(a.style.zIndex||window.getComputedStyle(a).zIndex),a===a&&(b=a));return b};
f._setZ=function(a,b){a.style.zIndex=b};
f._applyOverlayZ=function(a,b){this._setZ(a,b+2)};
f._overlayInPath=function(a){a=a||[];for(var b=0;b<a.length;b++)if(a[b]._manager===this)return a[b]};
f._onCaptureClick=function(a){var b=this._overlays.length-1;if(-1!==b)for(var c=hP(a).path,d;(d=this._overlays[b])&&this._overlayInPath(c)!==d;)if(d._onCaptureClick(a),d.allowClickThrough)b--;else break};
f._onCaptureFocus=function(a){var b=fQ(this);b&&b._onCaptureFocus(a)};
f._onCaptureKeyDown=function(a){var b=fQ(this);b&&(RP.keyboardEventMatchesKeys(a,"esc")?b._onCaptureEsc(a):RP.keyboardEventMatchesKeys(a,"tab")&&b._onCaptureTab(a))};
f._shouldBeBehindOverlay=function(a,b){return!a.alwaysOnTop&&b.alwaysOnTop};
ea.Object.defineProperties(eQ.prototype,{backdropElement:{configurable:!0,enumerable:!0,get:function(){this._backdropElement||(this._backdropElement=document.createElement("iron-overlay-backdrop"));return this._backdropElement}},
deepActiveElement:{configurable:!0,enumerable:!0,get:function(){var a=document.activeElement;a&&!1!==a instanceof Element||(a=document.body);for(;a.root&&hP(a.root).activeElement;)a=hP(a.root).activeElement;return a}}});
var mxa=new eQ;/*
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at
http://polymer.github.io/LICENSE.txt The complete set of authors may be found at
http://polymer.github.io/AUTHORS.txt The complete set of contributors may be
found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
part of the polymer project is also subject to an additional IP rights grant
found at http://polymer.github.io/PATENTS.txt
*/
var nxa=0,oxa=0,pxa=null,iQ=[],jQ=["wheel","mousewheel","DOMMouseScroll","touchstart","touchmove"],_boundScrollHandler$$module$third_party$javascript$polymer$v2$iron_overlay_behavior$iron_scroll_manager,kQ,_lockingElements$$module$third_party$javascript$polymer$v2$iron_overlay_behavior$iron_scroll_manager=[],_lockedElementCache$$module$third_party$javascript$polymer$v2$iron_overlay_behavior$iron_scroll_manager=null,_unlockedElementCache$$module$third_party$javascript$polymer$v2$iron_overlay_behavior$iron_scroll_manager=
null;function _hasCachedLockedElement$$module$third_party$javascript$polymer$v2$iron_overlay_behavior$iron_scroll_manager(a){return-1<_lockedElementCache$$module$third_party$javascript$polymer$v2$iron_overlay_behavior$iron_scroll_manager.indexOf(a)}
function _hasCachedUnlockedElement$$module$third_party$javascript$polymer$v2$iron_overlay_behavior$iron_scroll_manager(a){return-1<_unlockedElementCache$$module$third_party$javascript$polymer$v2$iron_overlay_behavior$iron_scroll_manager.indexOf(a)}
function _composedTreeContains$$module$third_party$javascript$polymer$v2$iron_overlay_behavior$iron_scroll_manager(a,b){var c,d;if(a.contains(b))return!0;a=hP(a).querySelectorAll("content,slot");for(c=0;c<a.length;++c){var e=hP(a[c]).getDistributedNodes();for(d=0;d<e.length;++d)if(e[d].nodeType===Node.ELEMENT_NODE&&_composedTreeContains$$module$third_party$javascript$polymer$v2$iron_overlay_behavior$iron_scroll_manager(e[d],b))return!0}return!1}
function _scrollInteractionHandler$$module$third_party$javascript$polymer$v2$iron_overlay_behavior$iron_scroll_manager(a){a.cancelable&&_shouldPreventScrolling$$module$third_party$javascript$polymer$v2$iron_overlay_behavior$iron_scroll_manager(a)&&a.preventDefault();a.targetTouches&&(a=a.targetTouches[0],nxa=a.pageX,oxa=a.pageY)}
function _lockScrollInteractions$$module$third_party$javascript$polymer$v2$iron_overlay_behavior$iron_scroll_manager(){_boundScrollHandler$$module$third_party$javascript$polymer$v2$iron_overlay_behavior$iron_scroll_manager=_boundScrollHandler$$module$third_party$javascript$polymer$v2$iron_overlay_behavior$iron_scroll_manager||_scrollInteractionHandler$$module$third_party$javascript$polymer$v2$iron_overlay_behavior$iron_scroll_manager.bind(void 0);for(var a=0,b=jQ.length;a<b;a++)document.addEventListener(jQ[a],
_boundScrollHandler$$module$third_party$javascript$polymer$v2$iron_overlay_behavior$iron_scroll_manager,{capture:!0,passive:!1})}
function _unlockScrollInteractions$$module$third_party$javascript$polymer$v2$iron_overlay_behavior$iron_scroll_manager(){for(var a=0,b=jQ.length;a<b;a++)document.removeEventListener(jQ[a],_boundScrollHandler$$module$third_party$javascript$polymer$v2$iron_overlay_behavior$iron_scroll_manager,{capture:!0,passive:!1})}
function _shouldPreventScrolling$$module$third_party$javascript$polymer$v2$iron_overlay_behavior$iron_scroll_manager(a){var b=hP(a).rootTarget;"touchmove"!==a.type&&pxa!==b&&(pxa=b,iQ=_getScrollableNodes$$module$third_party$javascript$polymer$v2$iron_overlay_behavior$iron_scroll_manager(hP(a).path));if(!iQ.length)return!0;if("touchstart"===a.type)return!1;a=_getScrollInfo$$module$third_party$javascript$polymer$v2$iron_overlay_behavior$iron_scroll_manager(a);return!_getScrollingNode$$module$third_party$javascript$polymer$v2$iron_overlay_behavior$iron_scroll_manager(iQ,
a.deltaX,a.deltaY)}
function _getScrollableNodes$$module$third_party$javascript$polymer$v2$iron_overlay_behavior$iron_scroll_manager(a){for(var b=[],c=a.indexOf(kQ),d=0;d<=c;d++)if(a[d].nodeType===Node.ELEMENT_NODE){var e=a[d],g=e.style;"scroll"!==g.overflow&&"auto"!==g.overflow&&(g=window.getComputedStyle(e));"scroll"!==g.overflow&&"auto"!==g.overflow||b.push(e)}return b}
function _getScrollingNode$$module$third_party$javascript$polymer$v2$iron_overlay_behavior$iron_scroll_manager(a,b,c){if(b||c)for(var d=Math.abs(c)>=Math.abs(b),e=0;e<a.length;e++){var g=a[e];if(d?0>c?0<g.scrollTop:g.scrollTop<g.scrollHeight-g.clientHeight:0>b?0<g.scrollLeft:g.scrollLeft<g.scrollWidth-g.clientWidth)return g}}
function _getScrollInfo$$module$third_party$javascript$polymer$v2$iron_overlay_behavior$iron_scroll_manager(a){var b={deltaX:a.deltaX,deltaY:a.deltaY};"deltaX"in a||("wheelDeltaX"in a&&"wheelDeltaY"in a?(b.deltaX=-a.wheelDeltaX,b.deltaY=-a.wheelDeltaY):"wheelDelta"in a?(b.deltaX=0,b.deltaY=-a.wheelDelta):"axis"in a?(b.deltaX=1===a.axis?a.detail:0,b.deltaY=2===a.axis?a.detail:0):a.targetTouches&&(a=a.targetTouches[0],b.deltaX=nxa-a.pageX,b.deltaY=oxa-a.pageY));return b}
;var lQ={properties:{opened:{observer:"_openedChanged",type:Boolean,value:!1,notify:!0},canceled:{observer:"_canceledChanged",readOnly:!0,type:Boolean,value:!1},withBackdrop:{observer:"_withBackdropChanged",type:Boolean},noAutoFocus:{type:Boolean,value:!1},noCancelOnEscKey:{type:Boolean,value:!1},noCancelOnOutsideClick:{type:Boolean,value:!1},closingReason:{type:Object},restoreFocusOnClose:{type:Boolean,value:!1},allowClickThrough:{type:Boolean},alwaysOnTop:{type:Boolean},scrollAction:{type:String},
_manager:{type:Object,value:mxa},_focusedChild:{type:Object}},listeners:{"iron-resize":"_onIronResize"},observers:["__updateScrollObservers(isAttached, opened, scrollAction)"],get backdropElement(){return this._manager.backdropElement},get _focusNode(){return this._focusedChild||hP(this).querySelector("[autofocus]")||this},get _focusableNodes(){return jxa(kxa,this)},ready:function(){this.__shouldRemoveTabIndex=this.__isAnimating=!1;this.__firstFocusableNode=this.__lastFocusableNode=null;this.__rafs=
{};this.__scrollTop=this.__scrollLeft=this.__restoreFocusNode=null;this.__onCaptureScroll=this.__onCaptureScroll.bind(this);this.__rootNodes=null;this._ensureSetup()},
attached:function(){this.opened&&this._openedChanged(this.opened);this._observer=hP(this).observeNodes(this._onNodesChange)},
detached:function(){hP(this).unobserveNodes(this._observer);this._observer=null;for(var a in this.__rafs)null!==this.__rafs[a]&&cancelAnimationFrame(this.__rafs[a]);this.__rafs={};this._manager.removeOverlay(this);this.__isAnimating&&(this.opened?this._finishRenderOpened():(this._applyFocus(),this._finishRenderClosed()))},
toggle:function(){this._setCanceled(!1);this.opened=!this.opened},
open:function(){this._setCanceled(!1);this.opened=!0},
close:function(){this._setCanceled(!1);this.opened=!1},
cancel:function(a){this.fire("iron-overlay-canceled",a,{cancelable:!0}).defaultPrevented||(this._setCanceled(!0),this.opened=!1)},
invalidateTabbables:function(){this.__firstFocusableNode=this.__lastFocusableNode=null},
_ensureSetup:function(){this._overlaySetup||(this._overlaySetup=!0,this.style.outline="none",this.style.display="none")},
_openedChanged:function(a){a?this.removeAttribute("aria-hidden"):this.setAttribute("aria-hidden","true");this.isAttached&&(this.__isAnimating=!0,this.__deraf("__openedChanged",this.__openedChanged))},
_canceledChanged:function(){this.closingReason=this.closingReason||{};this.closingReason.canceled=this.canceled},
_withBackdropChanged:function(){this.withBackdrop&&!this.hasAttribute("tabindex")?(this.setAttribute("tabindex","-1"),this.__shouldRemoveTabIndex=!0):this.__shouldRemoveTabIndex&&(this.removeAttribute("tabindex"),this.__shouldRemoveTabIndex=!1);this.opened&&this.isAttached&&gQ(this._manager)},
_prepareRenderOpened:function(){this.__restoreFocusNode=this._manager.deepActiveElement;this._preparePositioning();this.refit();this._finishPositioning();this.noAutoFocus&&document.activeElement===this._focusNode&&(this._focusNode.blur(),this.__restoreFocusNode.focus())},
_renderOpened:function(){this._finishRenderOpened()},
_renderClosed:function(){this._finishRenderClosed()},
_finishRenderOpened:function(){this.notifyResize();this.__isAnimating=!1;this.fire("iron-overlay-opened")},
_finishRenderClosed:function(){this.style.display="none";this.style.zIndex="";this.notifyResize();this.__isAnimating=!1;this.fire("iron-overlay-closed",this.closingReason)},
_preparePositioning:function(){this.style.transition=this.style.webkitTransition="none";this.style.transform=this.style.webkitTransform="none";this.style.display=""},
_finishPositioning:function(){this.style.display="none";this.scrollTop=this.scrollTop;this.style.transition=this.style.webkitTransition="";this.style.transform=this.style.webkitTransform="";this.style.display="";this.scrollTop=this.scrollTop},
_applyFocus:function(){if(this.opened)this.noAutoFocus||this._focusNode.focus();else{if(this.restoreFocusOnClose&&this.__restoreFocusNode){var a=this._manager.deepActiveElement;(a===document.body||hP(this).deepContains(a))&&this.__restoreFocusNode.focus()}this.__restoreFocusNode=null;this._focusNode.blur();this._focusedChild=null}},
_onCaptureClick:function(a){this.noCancelOnOutsideClick||this.cancel(a)},
_onCaptureFocus:function(a){if(this.withBackdrop){var b=hP(a).path;-1===b.indexOf(this)?(a.stopPropagation(),this._applyFocus()):this._focusedChild=b[0]}},
_onCaptureEsc:function(a){this.noCancelOnEscKey||this.cancel(a)},
_onCaptureTab:function(a){if(this.withBackdrop){this.__ensureFirstLastFocusables();var b=a.shiftKey,c=b?this.__firstFocusableNode:this.__lastFocusableNode;b=b?this.__lastFocusableNode:this.__firstFocusableNode;if(c===b)c=!0;else{var d=this._manager.deepActiveElement;c=d===c||d===this}c&&(a.preventDefault(),this._focusedChild=b,this._applyFocus())}},
_onIronResize:function(){this.opened&&!this.__isAnimating&&this.__deraf("refit",this.refit)},
_onNodesChange:function(){this.opened&&!this.__isAnimating&&(this.invalidateTabbables(),this.notifyResize())},
__ensureFirstLastFocusables:function(){var a=this._focusableNodes;this.__firstFocusableNode=a[0];this.__lastFocusableNode=a[a.length-1]},
__openedChanged:function(){this.opened?(this._prepareRenderOpened(),lxa(this._manager,this),this._applyFocus(),this._renderOpened()):(this._manager.removeOverlay(this),this._applyFocus(),this._renderClosed())},
__deraf:function(a,b){var c=this.__rafs;null!==c[a]&&cancelAnimationFrame(c[a]);c[a]=requestAnimationFrame(function(){c[a]=null;b.call(this)}.bind(this))},
__updateScrollObservers:function(a,b,c){a&&b&&this.__isValidScrollAction(c)?("lock"===c&&(this.__saveScrollPosition(),0<=_lockingElements$$module$third_party$javascript$polymer$v2$iron_overlay_behavior$iron_scroll_manager.indexOf(this)||(0===_lockingElements$$module$third_party$javascript$polymer$v2$iron_overlay_behavior$iron_scroll_manager.length&&_lockScrollInteractions$$module$third_party$javascript$polymer$v2$iron_overlay_behavior$iron_scroll_manager(),_lockingElements$$module$third_party$javascript$polymer$v2$iron_overlay_behavior$iron_scroll_manager.push(this),
kQ=_lockingElements$$module$third_party$javascript$polymer$v2$iron_overlay_behavior$iron_scroll_manager[_lockingElements$$module$third_party$javascript$polymer$v2$iron_overlay_behavior$iron_scroll_manager.length-1],_lockedElementCache$$module$third_party$javascript$polymer$v2$iron_overlay_behavior$iron_scroll_manager=[],_unlockedElementCache$$module$third_party$javascript$polymer$v2$iron_overlay_behavior$iron_scroll_manager=[])),this.__addScrollListeners()):(a=_lockingElements$$module$third_party$javascript$polymer$v2$iron_overlay_behavior$iron_scroll_manager.indexOf(this),
-1!==a&&(_lockingElements$$module$third_party$javascript$polymer$v2$iron_overlay_behavior$iron_scroll_manager.splice(a,1),kQ=_lockingElements$$module$third_party$javascript$polymer$v2$iron_overlay_behavior$iron_scroll_manager[_lockingElements$$module$third_party$javascript$polymer$v2$iron_overlay_behavior$iron_scroll_manager.length-1],_lockedElementCache$$module$third_party$javascript$polymer$v2$iron_overlay_behavior$iron_scroll_manager=[],_unlockedElementCache$$module$third_party$javascript$polymer$v2$iron_overlay_behavior$iron_scroll_manager=
[],0===_lockingElements$$module$third_party$javascript$polymer$v2$iron_overlay_behavior$iron_scroll_manager.length&&_unlockScrollInteractions$$module$third_party$javascript$polymer$v2$iron_overlay_behavior$iron_scroll_manager()),this.__removeScrollListeners())},
__addScrollListeners:function(){if(!this.__rootNodes){this.__rootNodes=[];if(Md)for(var a=this;a;)a.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&a.host&&this.__rootNodes.push(a),a=a.host||a.assignedSlot||a.parentNode;this.__rootNodes.push(document)}this.__rootNodes.forEach(function(b){b.addEventListener("scroll",this.__onCaptureScroll,{capture:!0,passive:!0})},this)},
__removeScrollListeners:function(){this.__rootNodes&&this.__rootNodes.forEach(function(a){a.removeEventListener("scroll",this.__onCaptureScroll,{capture:!0,passive:!0})},this);
this.isAttached||(this.__rootNodes=null)},
__isValidScrollAction:function(a){return"lock"===a||"refit"===a||"cancel"===a},
__onCaptureScroll:function(a){if(!(this.__isAnimating||0<=hP(a).path.indexOf(this)))switch(this.scrollAction){case"lock":this.__restoreScrollPosition();break;case"refit":this.__deraf("refit",this.refit);break;case"cancel":this.cancel(a);}},
__saveScrollPosition:function(){document.scrollingElement?(this.__scrollTop=document.scrollingElement.scrollTop,this.__scrollLeft=document.scrollingElement.scrollLeft):(this.__scrollTop=Math.max(document.documentElement.scrollTop,document.body.scrollTop),this.__scrollLeft=Math.max(document.documentElement.scrollLeft,document.body.scrollLeft))},
__restoreScrollPosition:function(){document.scrollingElement?(document.scrollingElement.scrollTop=this.__scrollTop,document.scrollingElement.scrollLeft=this.__scrollLeft):(document.documentElement.scrollTop=document.body.scrollTop=this.__scrollTop,document.documentElement.scrollLeft=document.body.scrollLeft=this.__scrollLeft)}},mQ=[hxa,
IP,lQ];var qxa=[{properties:{animationConfig:{type:Object},entryAnimation:{observer:"_entryAnimationChanged",type:String},exitAnimation:{observer:"_exitAnimationChanged",type:String}},_entryAnimationChanged:function(){this.animationConfig=this.animationConfig||{};this.animationConfig.entry=[{name:this.entryAnimation,node:this}]},
_exitAnimationChanged:function(){this.animationConfig=this.animationConfig||{};this.animationConfig.exit=[{name:this.exitAnimation,node:this}]},
_copyProperties:function(a,b){for(var c in b)a[c]=b[c]},
_cloneConfig:function(a){var b={isClone:!0};this._copyProperties(b,a);return b},
_getAnimationConfigRecursive:function(a,b,c){if(this.animationConfig)if(this.animationConfig.value&&"function"===typeof this.animationConfig.value)this._warn(this._logf("playAnimation","Please put 'animationConfig' inside of your components 'properties' object instead of outside of it."));else{var d=a?this.animationConfig[a]:this.animationConfig;Array.isArray(d)||(d=[d]);if(d)for(var e,g=0;e=d[g];g++)if(e.animatable)e.animatable._getAnimationConfigRecursive(e.type||a,b,c);else if(e.id){var h=b[e.id];
h?(h.isClone||(b[e.id]=this._cloneConfig(h),h=b[e.id]),this._copyProperties(h,e)):b[e.id]=e}else c.push(e)}},
getAnimationConfig:function(a){var b={},c=[];this._getAnimationConfigRecursive(a,b,c);for(var d in b)c.push(b[d]);return c}},
{_configureAnimations:function(a){var b=[],c=[];if(0<a.length)for(var d,e=0;d=a[e];e++){var g=document.createElement(d.name);if(g.isNeonAnimation){var h=null;g.configure||(g.configure=function(){return null});
h=g.configure(d);c.push({result:h,config:d})}else console.warn(this.is+":",d.name,"not found!")}for(a=0;a<c.length;a++){h=c[a].result;d=c[a].config;try{"function"!=typeof h.cancel&&(h=document.timeline.play(h))}catch(m){h=null,console.warn("Couldnt play","(",d.name,").",m)}h&&b.push({neonAnimation:g,config:d,animation:h})}return b},
_shouldComplete:function(a){for(var b=!0,c=0;c<a.length;c++)if("finished"!=a[c].animation.playState){b=!1;break}return b},
_complete:function(a){for(var b=0;b<a.length;b++)a[b].neonAnimation.complete(a[b].config);for(b=0;b<a.length;b++)a[b].animation.cancel()},
playAnimation:function(a,b){var c=this.getAnimationConfig(a);if(c){this._active=this._active||{};this._active[a]&&(this._complete(this._active[a]),delete this._active[a]);var d=this._configureAnimations(c);if(0==d.length)this.fire("neon-animation-finish",b,{bubbles:!1});else for(this._active[a]=d,c=0;c<d.length;c++)d[c].animation.onfinish=function(){this._shouldComplete(d)&&(this._complete(d),delete this._active[a],this.fire("neon-animation-finish",b,{bubbles:!1}))}.bind(this)}},
cancelAnimation:function(){for(var a in this._active){var b=this._active[a],c;for(c in b)b[c].animation&&b[c].animation.cancel&&b[c].animation.cancel()}this._active={}}}];var nQ=["<!--css-build:shady-->\n\n <div id=\"contentWrapper\" class=\"style-scope iron-dropdown\">\n <slot id=\"content\" name=\"dropdown-content\" class=\"style-scope iron-dropdown\"></slot>\n </div>\n"];nQ.raw=nQ.slice();
EP({_template:fN(nQ),is:"iron-dropdown",behaviors:[SP,RP,mQ,qxa],properties:{horizontalAlign:{type:String,value:"left",reflectToAttribute:!0},verticalAlign:{type:String,value:"top",reflectToAttribute:!0},openAnimationConfig:{type:Object},closeAnimationConfig:{type:Object},focusTarget:{type:Object},noAnimations:{type:Boolean,value:!1},allowOutsideScroll:{type:Boolean,value:!1,observer:"_allowOutsideScrollChanged"}},listeners:{"neon-animation-finish":"_onNeonAnimationFinish"},observers:["_updateOverlayPosition(positionTarget, verticalAlign, horizontalAlign, verticalOffset, horizontalOffset)"],
get containedElement(){for(var a=hP(this.$.content).getDistributedNodes(),b=0,c=a.length;b<c;b++)if(a[b].nodeType===Node.ELEMENT_NODE)return a[b]},ready:function(){this.scrollAction||(this.scrollAction=this.allowOutsideScroll?"refit":"lock");this._readied=!0},
attached:function(){this.sizingTarget&&this.sizingTarget!==this||(this.sizingTarget=this.containedElement||this)},
detached:function(){this.cancelAnimation()},
_openedChanged:function(){this.opened&&this.disabled?this.cancel():(this.cancelAnimation(),this._updateAnimationConfig(),lQ._openedChanged.apply(this,arguments))},
_renderOpened:function(){!this.noAnimations&&this.animationConfig.open?(this.$.contentWrapper.classList.add("animating"),this.playAnimation("open")):lQ._renderOpened.apply(this,arguments)},
_renderClosed:function(){!this.noAnimations&&this.animationConfig.close?(this.$.contentWrapper.classList.add("animating"),this.playAnimation("close")):lQ._renderClosed.apply(this,arguments)},
_onNeonAnimationFinish:function(){this.$.contentWrapper.classList.remove("animating");this.opened?this._finishRenderOpened():this._finishRenderClosed()},
_updateAnimationConfig:function(){for(var a=this.containedElement,b=[].concat(this.openAnimationConfig||[]).concat(this.closeAnimationConfig||[]),c=0;c<b.length;c++)b[c].node=a;this.animationConfig={open:this.openAnimationConfig,close:this.closeAnimationConfig}},
_updateOverlayPosition:function(){this.isAttached&&this.notifyResize()},
_allowOutsideScrollChanged:function(a){this._readied&&(a?this.scrollAction&&"lock"!==this.scrollAction||(this.scrollAction="refit"):this.scrollAction="lock")},
_applyFocus:function(){var a=this.focusTarget||this.containedElement;a&&this.opened&&!this.noAutoFocus?a.focus():lQ._applyFocus.apply(this,arguments)}});var oQ=["/* Most common used flex styles*/\n<dom-module id=\"iron-flex\">\n <template>\n <style scope=\"iron-flex\">.layout.horizontal, .layout.vertical {\n display: -ms-flexbox;\n display: -webkit-flex;\n display: flex;\n}\n\n.layout.inline {\n display: -ms-inline-flexbox;\n display: -webkit-inline-flex;\n display: inline-flex;\n}\n\n.layout.horizontal {\n -ms-flex-direction: row;\n -webkit-flex-direction: row;\n flex-direction: row;\n}\n\n.layout.vertical {\n -ms-flex-direction: column;\n -webkit-flex-direction: column;\n flex-direction: column;\n}\n\n.layout.wrap {\n -ms-flex-wrap: wrap;\n -webkit-flex-wrap: wrap;\n flex-wrap: wrap;\n}\n\n.layout.no-wrap {\n -ms-flex-wrap: nowrap;\n -webkit-flex-wrap: nowrap;\n flex-wrap: nowrap;\n}\n\n.layout.center, .layout.center-center {\n -ms-flex-align: center;\n -webkit-align-items: center;\n align-items: center;\n}\n\n.layout.center-justified, .layout.center-center {\n -ms-flex-pack: center;\n -webkit-justify-content: center;\n justify-content: center;\n}\n\n.flex {\n -ms-flex: 1 1 0.000000001px;\n -webkit-flex: 1;\n flex: 1;\n -webkit-flex-basis: 0.000000001px;\n flex-basis: 0.000000001px;\n}\n\n.flex-auto {\n -ms-flex: 1 1 auto;\n -webkit-flex: 1 1 auto;\n flex: 1 1 auto;\n}\n\n.flex-none {\n -ms-flex: none;\n -webkit-flex: none;\n flex: none;\n}\n\n</style>\n </template>\n</dom-module>\n/* Basic flexbox reverse styles */\n<dom-module id=\"iron-flex-reverse\">\n <template>\n <style scope=\"iron-flex-reverse\">.layout.horizontal-reverse, .layout.vertical-reverse {\n display: -ms-flexbox;\n display: -webkit-flex;\n display: flex;\n}\n\n.layout.horizontal-reverse {\n -ms-flex-direction: row-reverse;\n -webkit-flex-direction: row-reverse;\n flex-direction: row-reverse;\n}\n\n.layout.vertical-reverse {\n -ms-flex-direction: column-reverse;\n -webkit-flex-direction: column-reverse;\n flex-direction: column-reverse;\n}\n\n.layout.wrap-reverse {\n -ms-flex-wrap: wrap-reverse;\n -webkit-flex-wrap: wrap-reverse;\n flex-wrap: wrap-reverse;\n}\n\n</style>\n </template>\n</dom-module>\n/* Flexbox alignment */\n<dom-module id=\"iron-flex-alignment\">\n <template>\n <style scope=\"iron-flex-alignment\">.layout.start {\n -ms-flex-align: start;\n -webkit-align-items: flex-start;\n align-items: flex-start;\n}\n\n.layout.center, .layout.center-center {\n -ms-flex-align: center;\n -webkit-align-items: center;\n align-items: center;\n}\n\n.layout.end {\n -ms-flex-align: end;\n -webkit-align-items: flex-end;\n align-items: flex-end;\n}\n\n.layout.baseline {\n -ms-flex-align: baseline;\n -webkit-align-items: baseline;\n align-items: baseline;\n}\n\n.layout.start-justified {\n -ms-flex-pack: start;\n -webkit-justify-content: flex-start;\n justify-content: flex-start;\n}\n\n.layout.center-justified, .layout.center-center {\n -ms-flex-pack: center;\n -webkit-justify-content: center;\n justify-content: center;\n}\n\n.layout.end-justified {\n -ms-flex-pack: end;\n -webkit-justify-content: flex-end;\n justify-content: flex-end;\n}\n\n.layout.around-justified {\n -ms-flex-pack: distribute;\n -webkit-justify-content: space-around;\n justify-content: space-around;\n}\n\n.layout.justified {\n -ms-flex-pack: justify;\n -webkit-justify-content: space-between;\n justify-content: space-between;\n}\n\n.self-start {\n -ms-align-self: flex-start;\n -webkit-align-self: flex-start;\n align-self: flex-start;\n}\n\n.self-center {\n -ms-align-self: center;\n -webkit-align-self: center;\n align-self: center;\n}\n\n.self-end {\n -ms-align-self: flex-end;\n -webkit-align-self: flex-end;\n align-self: flex-end;\n}\n\n.self-stretch {\n -ms-align-self: stretch;\n -webkit-align-self: stretch;\n align-self: stretch;\n}\n\n.self-baseline {\n -ms-align-self: baseline;\n -webkit-align-self: baseline;\n align-self: baseline;\n}\n\n.layout.start-aligned {\n -ms-flex-line-pack: start; \n -ms-align-content: flex-start;\n -webkit-align-content: flex-start;\n align-content: flex-start;\n}\n\n.layout.end-aligned {\n -ms-flex-line-pack: end; \n -ms-align-content: flex-end;\n -webkit-align-content: flex-end;\n align-content: flex-end;\n}\n\n.layout.center-aligned {\n -ms-flex-line-pack: center; \n -ms-align-content: center;\n -webkit-align-content: center;\n align-content: center;\n}\n\n.layout.between-aligned {\n -ms-flex-line-pack: justify; \n -ms-align-content: space-between;\n -webkit-align-content: space-between;\n align-content: space-between;\n}\n\n.layout.around-aligned {\n -ms-flex-line-pack: distribute; \n -ms-align-content: space-around;\n -webkit-align-content: space-around;\n align-content: space-around;\n}\n\n</style>\n </template>\n</dom-module>\n/* Non-flexbox positioning helper styles */\n<dom-module id=\"iron-flex-factors\">\n <template>\n <style scope=\"iron-flex-factors\">.flex, .flex-1 {\n -ms-flex: 1 1 0.000000001px;\n -webkit-flex: 1;\n flex: 1;\n -webkit-flex-basis: 0.000000001px;\n flex-basis: 0.000000001px;\n}\n\n.flex-2 {\n -ms-flex: 2;\n -webkit-flex: 2;\n flex: 2;\n}\n\n.flex-3 {\n -ms-flex: 3;\n -webkit-flex: 3;\n flex: 3;\n}\n\n.flex-4 {\n -ms-flex: 4;\n -webkit-flex: 4;\n flex: 4;\n}\n\n.flex-5 {\n -ms-flex: 5;\n -webkit-flex: 5;\n flex: 5;\n}\n\n.flex-6 {\n -ms-flex: 6;\n -webkit-flex: 6;\n flex: 6;\n}\n\n.flex-7 {\n -ms-flex: 7;\n -webkit-flex: 7;\n flex: 7;\n}\n\n.flex-8 {\n -ms-flex: 8;\n -webkit-flex: 8;\n flex: 8;\n}\n\n.flex-9 {\n -ms-flex: 9;\n -webkit-flex: 9;\n flex: 9;\n}\n\n.flex-10 {\n -ms-flex: 10;\n -webkit-flex: 10;\n flex: 10;\n}\n\n.flex-11 {\n -ms-flex: 11;\n -webkit-flex: 11;\n flex: 11;\n}\n\n.flex-12 {\n -ms-flex: 12;\n -webkit-flex: 12;\n flex: 12;\n}\n\n</style>\n </template>\n</dom-module>\n<dom-module id=\"iron-positioning\">\n <template>\n <style scope=\"iron-positioning\">.block {\n display: block;\n}\n\n[hidden] {\n display: none !important;\n}\n\n.invisible {\n visibility: hidden !important;\n}\n\n.relative {\n position: relative;\n}\n\n.fit {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n}\n\nbody.fullbleed {\n margin: 0;\n height: 100vh;\n}\n\n.scroll {\n -webkit-overflow-scrolling: touch;\n overflow: auto;\n}\n\n.fixed-bottom, .fixed-left, .fixed-right, .fixed-top {\n position: fixed;\n}\n\n.fixed-top {\n top: 0;\n left: 0;\n right: 0;\n}\n\n.fixed-right {\n top: 0;\n right: 0;\n bottom: 0;\n}\n\n.fixed-bottom {\n right: 0;\n bottom: 0;\n left: 0;\n}\n\n.fixed-left {\n top: 0;\n bottom: 0;\n left: 0;\n}\n\n</style>\n </template>\n</dom-module>\n"];
oQ.raw=oQ.slice();var rxa=fN(oQ);rxa.setAttribute("style","display: none;");document.head.appendChild(rxa.content);Polymer.ResolveUrl={resolveCss:Jd,resolveUrl:Id,pathFromUrl:Kd};Polymer.DomModule=iN;Polymer.Async={timeOut:kN,animationFrame:bua,idlePeriod:{run:function(a){return window.requestIdleCallback?window.requestIdleCallback(a):window.setTimeout(a,16)},
cancel:function(a){window.cancelIdleCallback?window.cancelIdleCallback(a):window.clearTimeout(a)}},
microTask:lN};Polymer.dedupingMixin=mN;Polymer.wrap=nN;Polymer.PropertiesChanged=oN;Polymer.telemetry={instanceCount:pN,incrementInstanceCount:function(){pN++},
registrations:qN,register:dua,dumpRegistrations:function(){qN.forEach(_regLog$$module$third_party$javascript$polymer$v2$polymer$lib$utils$telemetry)}};Polymer.PropertiesMixin=eua;Polymer.CaseMap={dashToCamelCase:sN,camelToDashCase:tN};Polymer.PropertyAccessors=wN;Polymer.TemplateStamp=pua;Polymer.Path={isPath:xN,root:yN,isAncestor:zN,isDescendant:AN,translate:BN,matches:qua,normalize:CN,split:DN,get:EN,set:FN,isDeep:xN};Polymer.Settings={useShadow:Md,useNativeCSSProperties:Zaa,useNativeCustomElements:$aa,get rootPath(){return Nd},setRootPath:function(a){Nd=a},
get sanitizeDOMValue(){return Od},setSanitizeDOMValue:function(a){Od=a},
get passiveTouchGestures(){return Pd},setPassiveTouchGestures:function(a){Pd=a},
get strictTemplatePolicy(){return Qd},setStrictTemplatePolicy:function(a){Qd=a},
get allowTemplateFromDomModule(){return Rd},setAllowTemplateFromDomModule:function(a){Rd=a},
get legacyOptimizations(){return Sd},setLegacyOptimizations:function(a){Sd=a},
get syncInitialRender(){return Ud},setSyncInitialRender:function(a){Ud=a},
get legacyUndefined(){return Vd},setLegacyUndefined:function(a){Vd=a},
get legacyNoBatch(){return Wd},setLegacyNoBatch:function(a){Wd=a},
get legacyWarnings(){return Td},setLegacyWarnings:function(a){Td=a},
get legacyNotifyOrder(){return Xd},setLegacyNotifyOrder:function(a){Xd=a},
get orderedComputed(){return Yd},setOrderedComputed:function(a){Yd=a}};
void 0!==Polymer.rootPath&&(Nd=Polymer.rootPath);void 0!==Polymer.sanitizeDOMValue&&(Od=Polymer.sanitizeDOMValue);void 0!==Polymer.passiveTouchGestures&&(Pd=Polymer.passiveTouchGestures);void 0!==Polymer.strictTemplatePolicy&&(Qd=Polymer.strictTemplatePolicy);Rd=void 0!==Polymer.allowTemplateFromDomModule?Polymer.allowTemplateFromDomModule:!0;void 0!==Polymer.legacyOptimizations&&(Sd=Polymer.legacyOptimizations);void 0!==Polymer.syncInitialRender&&(Ud=Polymer.syncInitialRender);
void 0!==Polymer.legacyUndefined&&(Vd=Polymer.legacyUndefined);void 0!==Polymer.legacyNoBatch&&(Wd=Polymer.legacyNoBatch);void 0!==Polymer.legacyWarnings&&(Td=Polymer.legacyWarnings);void 0!==Polymer.legacyNotifyOrder&&(Xd=Polymer.legacyNotifyOrder);void 0!==Polymer.orderedComputed&&(Yd=Polymer.orderedComputed);Object.defineProperty(Polymer,"sanitizeDOMValue",{get:function(){return Od},
set:function(a){Od=a}});Polymer.PropertyEffects=PN;Polymer.StyleGather={stylesFromModules:Pua,stylesFromModule:Qua,stylesFromTemplate:QN,stylesFromModuleImports:Rua,cssFromModules:Sua,cssFromModule:Tua,cssFromTemplate:Uua,cssFromModuleImports:function(a){return(a=iN.import(a))?_cssFromModuleImports$$module$third_party$javascript$polymer$v2$polymer$lib$utils$style_gather(a):""}};Polymer.ElementMixin=RN;Polymer.updateStyles=function(a){window.ShadyCSS&&window.ShadyCSS.styleDocument(a)};
Polymer.version="3.3.0";Polymer.ArraySplice={calculateSplices:TN};Polymer.html=fN;Polymer.htmlLiteral=function(a,b){for(var c=[],d=1;d<arguments.length;++d)c[d-1]=arguments[d];return new eN(c.reduce(function(e,g,h){return e+Wta(g)+a[h+1]},a[0]))};Polymer.Element=UN;Polymer.ArraySelectorMixin=Yua;Polymer.ArraySelector=VN;Polymer.CustomStyle=iO;Polymer.Debouncer=jO;Polymer.Gestures={gestures:yO,recognizers:zO,deepTargetFind:uva,addListener:BO,removeListener:CO,register:EO,setTouchAction:DO,prevent:AO,resetMouseCanceller:function(){vO&&vO.flush()},
findOriginalTarget:_findOriginalTarget$$module$third_party$javascript$polymer$v2$polymer$lib$utils$gestures,add:BO,remove:CO};Polymer.GestureEventListeners=HO;Polymer.MutableData=JO;Polymer.OptionalMutableData=KO;Polymer.DomBind=MO;Polymer.enqueueDebouncer=mO;Polymer.flush=NO;Polymer.Templatize={templatize:SO,modelForElement:TO};Polymer.TemplateInstanceBase=RO;Polymer.DomIf=XO;Polymer.DomRepeat=ZO;Polymer.FlattenedNodesObserver=aP;Polymer.DomApi=Sva;Polymer.EventApi=eP;Polymer.dom=hP;Polymer.dom.matchesSelector=cP;Polymer.dom.flush=NO;Polymer.dom.addDebouncer=mO;Polymer.DirMixin=Yva;Polymer.RenderStatus={beforeNextRender:function(a,b,c){lP||Zva();mP.push([a,b,c])},
afterNextRender:pP,flush:function(){for(;mP.length||nP.length;)oP(mP),oP(nP);lP=!1}};Polymer.LegacyElementMixin=BP;Polymer.MutableDataBehavior={_shouldPropertyChange:function(a,b,c){return CP(this,a,b,c,!0)}};
Polymer.OptionalMutableDataBehavior=Dwa;Polymer.Class=Mwa;Polymer.mixinBehaviors=function(a,b){return Lwa({},BP(b),a)};Polymer._polymerFn=EP;var sxa=window.onLegacyPolymerFunctionDefinedCallback;sxa&&sxa();Polymer.Templatizer={templatize:function(a,b){this._templatizerTemplate=a;this.ctor=SO(a,this,{mutableData:!!b,parentModel:this._parentModel,instanceProps:this._instanceProps,forwardHostProp:this._forwardHostPropV2,notifyInstanceProp:this._notifyInstancePropV2})},
stamp:function(a){return new this.ctor(a)},
modelForElement:function(a){return TO(this._templatizerTemplate,a)}};Polymer.Base=FP;var pQ=["<!--css-build:shady-->\n"];
pQ.raw=pQ.slice();var txa=new TP({type:"iconset"});EP({_template:fN(pQ),is:"iron-icon",properties:{icon:{type:String},theme:{type:String},src:{type:String},_meta:{value:FP.create("iron-meta",{type:"iconset"})}},observers:["_updateIcon(isAttached)","_updateIcon(theme, isAttached)","_srcChanged(src, isAttached)","_iconChanged(icon, isAttached)"],_DEFAULT_ICONSET:"icons",_iconChanged:function(a){a=(a||"").split(":");this._iconName=a.pop();this._iconsetName=a.pop()||this._DEFAULT_ICONSET;this._updateIcon()},
_srcChanged:function(){this._updateIcon()},
_usesIconset:function(){return this.icon||!this.src},
_updateIcon:function(){this._usesIconset()?(this._img&&this._img.parentNode&&hP(this.root).removeChild(this._img),""===this._iconName?this._iconset&&this._iconset.removeIcon(this):this._iconsetName&&((this._iconset=txa.byKey(this._iconsetName))?(this._iconset.applyIcon(this,this._iconName,this.theme),this.unlisten(window,"iron-iconset-added","_updateIcon")):this.listen(window,"iron-iconset-added","_updateIcon"))):(this._iconset&&this._iconset.removeIcon(this),this._img||(this._img=document.createElement("img"),
this._img.style.width="100%",this._img.style.height="100%",this._img.draggable=!1),this._img.src=this.src,hP(this.root).appendChild(this._img))}});EP({is:"iron-iconset-svg",_template:null,properties:{name:{type:String,observer:"_nameChanged"},size:{type:Number,value:24},rtlMirroring:{type:Boolean,value:!1},useGlobalRtlAttribute:{type:Boolean,value:!1}},created:function(){this._meta=new TP({type:"iconset",key:null,value:null})},
attached:function(){this.style.display="none"},
getIconNames:function(){this._icons=this._createIconMap();return Object.keys(this._icons).map(function(a){return this.name+":"+a},this)},
applyIcon:function(a,b){this.removeIcon(a);if(b=this._cloneIcon(b,this.rtlMirroring&&this._targetIsRTL(a))){var c=hP(a.root||a);c.insertBefore(b,c.childNodes[0]);return a._svgIcon=b}return null},
removeIcon:function(a){a._svgIcon&&(hP(a.root||a).removeChild(a._svgIcon),a._svgIcon=null)},
_targetIsRTL:function(a){null==this.__targetIsRTL&&(this.useGlobalRtlAttribute?this.__targetIsRTL="rtl"===(document.body&&document.body.hasAttribute("dir")?document.body:document.documentElement).getAttribute("dir"):(a&&a.nodeType!==Node.ELEMENT_NODE&&(a=a.host),this.__targetIsRTL=a&&"rtl"===window.getComputedStyle(a).direction));return this.__targetIsRTL},
_nameChanged:function(){this._meta.value=null;this._meta.key=this.name;this._meta.value=this;this.async(function(){this.fire("iron-iconset-added",this,{node:window})})},
_createIconMap:function(){var a=Object.create(null);hP(this).querySelectorAll("[id]").forEach(function(b){a[b.id]=b});
return a},
_cloneIcon:function(a,b){this._icons=this._icons||this._createIconMap();return this._prepareSvgClone(this._icons[a],this.size,b)},
_prepareSvgClone:function(a,b,c){if(a){a=a.cloneNode(!0);var d=document.createElementNS("http://www.w3.org/2000/svg","svg");b=a.getAttribute("viewBox")||"0 0 "+b+" "+b;var e="pointer-events: none; display: block; width: 100%; height: 100%;";c&&a.hasAttribute("mirror-in-rtl")&&(e+="-webkit-transform:scale(-1,1);transform:scale(-1,1);transform-origin:center;");d.setAttribute("viewBox",b);d.setAttribute("preserveAspectRatio","xMidYMid meet");d.setAttribute("focusable","false");d.style.cssText=e;d.appendChild(a).removeAttribute("id");
return d}return null}});/*
Copyright (c) 2016 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/
var uxa=["<!--css-build:shady-->\n\n <a id=\"baseURIAnchor\" href=\"#\" class=\"style-scope iron-image\"></a>\n <div id=\"sizedImgDiv\" role=\"img\" hidden$=\"[[_computeImgDivHidden(sizing)]]\" aria-hidden$=\"[[_computeImgDivARIAHidden(alt)]]\" aria-label$=\"[[_computeImgDivARIALabel(alt, src)]]\" class=\"style-scope iron-image\"></div>\n <img id=\"img\" alt$=\"[[alt]]\" hidden$=\"[[_computeImgHidden(sizing)]]\" crossorigin$=\"[[crossorigin]]\" on-load=\"_imgOnLoad\" on-error=\"_imgOnError\" class=\"style-scope iron-image\">\n <div id=\"placeholder\" hidden$=\"[[_computePlaceholderHidden(preload, fade, loading, loaded)]]\" class$=\"[[_computePlaceholderClassName(preload, fade, loading, loaded)]]\" class=\"style-scope iron-image\"></div>\n"];
uxa.raw=["\n <style>\n :host {\n display: inline-block;\n overflow: hidden;\n position: relative;\n }\n\n #baseURIAnchor {\n display: none;\n }\n\n #sizedImgDiv {\n position: absolute;\n top: 0px;\n right: 0px;\n bottom: 0px;\n left: 0px;\n\n display: none;\n }\n\n #img {\n display: block;\n width: var(--iron-image-width, auto);\n height: var(--iron-image-height, auto);\n }\n\n :host([sizing]) #sizedImgDiv {\n display: block;\n }\n\n :host([sizing]) #img {\n display: none;\n }\n\n #placeholder {\n position: absolute;\n top: 0px;\n right: 0px;\n bottom: 0px;\n left: 0px;\n\n background-color: inherit;\n opacity: 1;\n\n @apply --iron-image-placeholder;\n }\n\n #placeholder.faded-out {\n transition: opacity 0.5s linear;\n opacity: 0;\n }\n </style>\n\n <a id=\"baseURIAnchor\" href=\"#\"></a>\n <div id=\"sizedImgDiv\" role=\"img\" hidden\\$=\"[[_computeImgDivHidden(sizing)]]\" aria-hidden\\$=\"[[_computeImgDivARIAHidden(alt)]]\" aria-label\\$=\"[[_computeImgDivARIALabel(alt, src)]]\"></div>\n <img id=\"img\" alt\\$=\"[[alt]]\" hidden\\$=\"[[_computeImgHidden(sizing)]]\" crossorigin\\$=\"[[crossorigin]]\" on-load=\"_imgOnLoad\" on-error=\"_imgOnError\">\n <div id=\"placeholder\" hidden\\$=\"[[_computePlaceholderHidden(preload, fade, loading, loaded)]]\" class\\$=\"[[_computePlaceholderClassName(preload, fade, loading, loaded)]]\"></div>\n"];
EP({_template:fN(uxa),is:"iron-image",properties:{src:{type:String,value:""},alt:{type:String,value:null},crossorigin:{type:String,value:null},preventLoad:{type:Boolean,value:!1},sizing:{type:String,value:null,reflectToAttribute:!0},position:{type:String,value:"center"},preload:{type:Boolean,value:!1},placeholder:{type:String,value:null,observer:"_placeholderChanged"},fade:{type:Boolean,value:!1},loaded:{notify:!0,readOnly:!0,type:Boolean,value:!1},loading:{notify:!0,readOnly:!0,type:Boolean,value:!1},
error:{notify:!0,readOnly:!0,type:Boolean,value:!1},width:{observer:"_widthChanged",type:Number,value:null},height:{observer:"_heightChanged",type:Number,value:null}},observers:["_transformChanged(sizing, position)","_loadStateObserver(src, preventLoad)"],created:function(){this._resolvedSrc=""},
_imgOnLoad:function(){this.$.img.src===this._resolveSrc(this.src)&&(this._setLoading(!1),this._setLoaded(!0),this._setError(!1))},
_imgOnError:function(){this.$.img.src===this._resolveSrc(this.src)&&(this.$.img.removeAttribute("src"),this.$.sizedImgDiv.style.backgroundImage="",this._setLoading(!1),this._setLoaded(!1),this._setError(!0))},
_computePlaceholderHidden:function(){return!this.preload||!this.fade&&!this.loading&&this.loaded},
_computePlaceholderClassName:function(){return this.preload&&this.fade&&!this.loading&&this.loaded?"faded-out":""},
_computeImgDivHidden:function(){return!this.sizing},
_computeImgDivARIAHidden:function(){return""===this.alt?"true":void 0},
_computeImgDivARIALabel:function(){return null!==this.alt?this.alt:""===this.src?"":this._resolveSrc(this.src).replace(/[?|#].*/g,"").split("/").pop()},
_computeImgHidden:function(){return!!this.sizing},
_widthChanged:function(){this.style.width=isNaN(this.width)?this.width:this.width+"px"},
_heightChanged:function(){this.style.height=isNaN(this.height)?this.height:this.height+"px"},
_loadStateObserver:function(a,b){var c=this._resolveSrc(a);c!==this._resolvedSrc&&(this._resolvedSrc="",this.$.img.removeAttribute("src"),this.$.sizedImgDiv.style.backgroundImage="",""===a||b?this._setLoading(!1):(this._resolvedSrc=c,this.$.img.src=this._resolvedSrc,this.$.sizedImgDiv.style.backgroundImage="url(\""+this._resolvedSrc+"\")",this._setLoading(!0)),this._setLoaded(!1),this._setError(!1))},
_placeholderChanged:function(){this.$.placeholder.style.backgroundImage=this.placeholder?"url(\""+this.placeholder+"\")":""},
_transformChanged:function(){var a=this.$.sizedImgDiv.style,b=this.$.placeholder.style;a.backgroundSize=b.backgroundSize=this.sizing;a.backgroundPosition=b.backgroundPosition=this.sizing?this.position:"";a.backgroundRepeat=b.backgroundRepeat=this.sizing?"no-repeat":""},
_resolveSrc:function(a){a=Id(a,this.$.baseURIAnchor.href);2<=a.length&&"/"===a[0]&&"/"!==a[1]&&(a=(location.origin||location.protocol+"//"+location.host)+a);return a}});var qQ=["<!--css-build:shady-->\n <slot id=\"content\" class=\"style-scope iron-input\"></slot>\n"];qQ.raw=qQ.slice();
EP({_template:fN(qQ),is:"iron-input",behaviors:[WP],properties:{bindValue:{type:String,value:""},value:{type:String,computed:"_computeValue(bindValue)"},allowedPattern:{type:String},autoValidate:{type:Boolean,value:!1},_inputElement:Object},observers:["_bindValueChanged(bindValue, _inputElement)"],listeners:{input:"_onInput",keypress:"_onKeypress"},created:function(){OP.requestAvailability();this._previousValidInput="";this._patternAlreadyChecked=!1},
attached:function(){this._observer=hP(this).observeNodes(function(){this._initSlottedInput()}.bind(this))},
detached:function(){this._observer&&(hP(this).unobserveNodes(this._observer),this._observer=null)},
get inputElement(){return this._inputElement},_initSlottedInput:function(){this._inputElement=this.getEffectiveChildren()[0];this.inputElement&&this.inputElement.value&&(this.bindValue=this.inputElement.value);this.fire("iron-input-ready")},
get _patternRegExp(){if(this.allowedPattern)var a=new RegExp(this.allowedPattern);else switch(this.inputElement.type){case"number":a=/[0-9.,e-]/;}return a},_bindValueChanged:function(a,b){b&&(void 0===a?b.value=null:a!==b.value&&(this.inputElement.value=a),this.autoValidate&&this.validate(),this.fire("bind-value-changed",{value:a}))},
_onInput:function(){!this.allowedPattern||this._patternAlreadyChecked||this._checkPatternValidity()||(this._announceInvalidCharacter("Invalid string of characters not entered."),this.inputElement.value=this._previousValidInput);this.bindValue=this._previousValidInput=this.inputElement.value;this._patternAlreadyChecked=!1},
_isPrintable:function(a){var b=19==a.keyCode||20==a.keyCode||45==a.keyCode||46==a.keyCode||144==a.keyCode||145==a.keyCode||32<a.keyCode&&41>a.keyCode||111<a.keyCode&&124>a.keyCode;return!(8==a.keyCode||9==a.keyCode||13==a.keyCode||27==a.keyCode)&&!(0==a.charCode&&b)},
_onKeypress:function(a){if(this.allowedPattern||"number"===this.inputElement.type){var b=this._patternRegExp;if(b&&!(a.metaKey||a.ctrlKey||a.altKey)){this._patternAlreadyChecked=!0;var c=String.fromCharCode(a.charCode);this._isPrintable(a)&&!b.test(c)&&(a.preventDefault(),this._announceInvalidCharacter("Invalid character "+c+" not entered."))}}},
_checkPatternValidity:function(){var a=this._patternRegExp;if(!a)return!0;for(var b=0;b<this.inputElement.value.length;b++)if(!a.test(this.inputElement.value[b]))return!1;return!0},
validate:function(){if(!this.inputElement)return this.invalid=!1,!0;var a=this.inputElement.checkValidity();a&&(this.required&&""===this.bindValue?a=!1:this.hasValidator()&&(a=WP.validate.call(this,this.bindValue)));this.invalid=!a;this.fire("iron-input-validate");return a},
_announceInvalidCharacter:function(a){this.fire("iron-announce",{text:a})},
_computeValue:function(a){return a}});EP({is:"iron-media-query",_template:null,properties:{queryMatches:{type:Boolean,value:!1,readOnly:!0,notify:!0},query:{type:String,observer:"queryChanged"},full:{type:Boolean,value:!1},_boundMQHandler:{value:function(){return this.queryHandler.bind(this)}},
_mq:{value:null}},attached:function(){this.style.display="none";this.queryChanged()},
detached:function(){this._remove()},
_add:function(){this._mq&&this._mq.addListener(this._boundMQHandler)},
_remove:function(){this._mq&&this._mq.removeListener(this._boundMQHandler);this._mq=null},
queryChanged:function(){this._remove();var a=this.query;a&&(this.full||"("===a[0]||(a="("+a+")"),this._mq=window.matchMedia(a),this._add(),this.queryHandler(this._mq))},
queryHandler:function(a){this._setQueryMatches(a.matches)}});var rQ=function(a){this.multi=!1;this.selection=[];this.selectCallback=a};
rQ.prototype.get=function(){return this.multi?this.selection.slice():this.selection[0]};
rQ.prototype.clear=function(a){this.selection.slice().forEach(function(b){(!a||0>a.indexOf(b))&&sQ(this,b,!1)},this)};
rQ.prototype.isSelected=function(a){return 0<=this.selection.indexOf(a)};
var sQ=function(a,b,c){if(null!=b&&c!==a.isSelected(b)){if(c)a.selection.push(b);else{var d=a.selection.indexOf(b);0<=d&&a.selection.splice(d,1)}a.selectCallback&&a.selectCallback(b,c)}};
rQ.prototype.select=function(a){this.multi?this.toggle(a):this.get()!==a&&(sQ(this,this.get(),!1),sQ(this,a,!0))};
rQ.prototype.toggle=function(a){sQ(this,a,!this.isSelected(a))};var tQ={properties:{attrForSelected:{type:String,value:null},selected:{type:String,notify:!0},selectedItem:{type:Object,readOnly:!0,notify:!0},activateEvent:{type:String,value:"tap",observer:"_activateEventChanged"},selectable:String,selectedClass:{type:String,value:"iron-selected"},selectedAttribute:{type:String,value:null},fallbackSelection:{type:String,value:null},items:{type:Array,readOnly:!0,notify:!0,value:function(){return[]}},
_excludedLocalNames:{type:Object,value:function(){return{template:1,"dom-bind":1,"dom-if":1,"dom-repeat":1}}}},
observers:["_updateAttrForSelected(attrForSelected)","_updateSelected(selected)","_checkFallback(fallbackSelection)"],created:function(){this._bindFilterItem=this._filterItem.bind(this);this._selection=new rQ(this._applySelection.bind(this))},
attached:function(){this._observer=this._observeItems(this);this._addListener(this.activateEvent)},
detached:function(){this._observer&&hP(this).unobserveNodes(this._observer);this._removeListener(this.activateEvent)},
indexOf:function(a){return this.items?this.items.indexOf(a):-1},
select:function(a){this.selected=a},
selectPrevious:function(){var a=this.items.length,b=a-1;void 0!==this.selected&&(b=(Number(this._valueToIndex(this.selected))-1+a)%a);this.selected=this._indexToValue(b)},
selectNext:function(){var a=0;void 0!==this.selected&&(a=(Number(this._valueToIndex(this.selected))+1)%this.items.length);this.selected=this._indexToValue(a)},
selectIndex:function(a){this.select(this._indexToValue(a))},
forceSynchronousItemUpdate:function(){this._observer&&"function"===typeof this._observer.flush?this._observer.flush():this._updateItems()},
get _shouldUpdateSelection(){return null!=this.selected},_checkFallback:function(){this._updateSelected()},
_addListener:function(a){this.listen(this,a,"_activateHandler")},
_removeListener:function(a){this.unlisten(this,a,"_activateHandler")},
_activateEventChanged:function(a,b){this._removeListener(b);this._addListener(a)},
_updateItems:function(){var a=hP(this).queryDistributedElements(this.selectable||"*");a=Array.prototype.filter.call(a,this._bindFilterItem);this._setItems(a)},
_updateAttrForSelected:function(){this.selectedItem&&(this.selected=this._valueForItem(this.selectedItem))},
_updateSelected:function(){this._selectSelected(this.selected)},
_selectSelected:function(){if(this.items){var a=this._valueToItem(this.selected);a?this._selection.select(a):this._selection.clear();this.fallbackSelection&&this.items.length&&void 0===this._selection.get()&&(this.selected=this.fallbackSelection)}},
_filterItem:function(a){return!this._excludedLocalNames[a.localName]},
_valueToItem:function(a){return null==a?null:this.items[this._valueToIndex(a)]},
_valueToIndex:function(a){if(this.attrForSelected)for(var b=0,c;c=this.items[b];b++){if(this._valueForItem(c)==a)return b}else return Number(a)},
_indexToValue:function(a){if(this.attrForSelected){if(a=this.items[a])return this._valueForItem(a)}else return a},
_valueForItem:function(a){if(!a)return null;if(!this.attrForSelected)return a=this.indexOf(a),-1===a?null:a;var b=a[sN(this.attrForSelected)];return void 0!=b?b:a.getAttribute(this.attrForSelected)},
_applySelection:function(a,b){this.selectedClass&&this.toggleClass(this.selectedClass,b,a);this.selectedAttribute&&this.toggleAttribute.call(a,this.selectedAttribute,b);this._selectionChange();this.fire("iron-"+(b?"select":"deselect"),{item:a})},
_selectionChange:function(){this._setSelectedItem(this._selection.get())},
_observeItems:function(a){return hP(a).observeNodes(function(b){this._updateItems();this._updateSelected();this.fire("iron-items-changed",b,{bubbles:!1,cancelable:!1})})},
_activateHandler:function(a){a=a.target;for(var b=this.items;a&&a!=this;){var c=b.indexOf(a);if(0<=c){b=this._indexToValue(c);this._itemActivate(b,a);break}a=a.parentNode}},
_itemActivate:function(a,b){this.fire("iron-activate",{selected:a,item:b},{cancelable:!0}).defaultPrevented||this.select(a)}};var vxa={properties:{multi:{type:Boolean,value:!1,observer:"multiChanged"},selectedValues:{type:Array,notify:!0,value:function(){return[]}},
selectedItems:{type:Array,readOnly:!0,notify:!0,value:function(){return[]}}},
observers:["_updateSelected(selectedValues.splices)"],select:function(a){this.multi?this._toggleSelected(a):this.selected=a},
multiChanged:function(a){this._selection.multi=a;this._updateSelected()},
get _shouldUpdateSelection(){return null!=this.selected||null!=this.selectedValues&&this.selectedValues.length},_updateAttrForSelected:function(){this.multi?this.selectedItems&&0<this.selectedItems.length&&(this.selectedValues=this.selectedItems.map(function(a){return this._indexToValue(this.indexOf(a))},this).filter(function(a){return null!=a},this)):tQ._updateAttrForSelected.apply(this)},
_updateSelected:function(){this.multi?this._selectMulti(this.selectedValues):this._selectSelected(this.selected)},
_selectMulti:function(a){a=a||[];a=(this._valuesToItems(a)||[]).filter(function(c){return null!==c&&void 0!==c});
this._selection.clear(a);for(var b=0;b<a.length;b++)sQ(this._selection,a[b],!0);this.fallbackSelection&&!this._selection.get().length&&this._valueToItem(this.fallbackSelection)&&this.select(this.fallbackSelection)},
_selectionChange:function(){var a=this._selection.get();this.multi?(this._setSelectedItems(a),this._setSelectedItem(a.length?a[0]:null)):null!==a&&void 0!==a?(this._setSelectedItems([a]),this._setSelectedItem(a)):(this._setSelectedItems([]),this._setSelectedItem(null))},
_toggleSelected:function(a){var b=this.selectedValues.indexOf(a);0>b?this.push("selectedValues",a):this.splice("selectedValues",b,1)},
_valuesToItems:function(a){return null==a?null:a.map(function(b){return this._valueToItem(b)},this)}},wxa=[tQ,
vxa];var uQ={properties:{focusedItem:{observer:"_focusedItemChanged",readOnly:!0,type:Object},attrForItemTitle:{type:String},disabled:{type:Boolean,value:!1,observer:"_disabledChanged"}},_MODIFIER_KEYS:"Alt AltGraph CapsLock Control Fn FnLock Hyper Meta NumLock OS ScrollLock Shift Super Symbol SymbolLock".split(" "),_SEARCH_RESET_TIMEOUT_MS:1E3,_previousTabIndex:0,hostAttributes:{role:"menu"},observers:["_updateMultiselectable(multi)"],listeners:{focus:"_onFocus",keydown:"_onKeydown","iron-items-changed":"_onIronItemsChanged"},
keyBindings:{up:"_onUpKey",down:"_onDownKey",esc:"_onEscKey","shift+tab:keydown":"_onShiftTabDown"},attached:function(){this._resetTabindices()},
select:function(a){this._defaultFocusAsync&&(this.cancelAsync(this._defaultFocusAsync),this._defaultFocusAsync=null);var b=this._valueToItem(a);b&&b.hasAttribute("disabled")||(this._setFocusedItem(b),vxa.select.apply(this,arguments))},
_resetTabindices:function(){var a=this.multi?this.selectedItems&&this.selectedItems[0]:this.selectedItem;this.items.forEach(function(b){b.setAttribute("tabindex",b===a?"0":"-1");b.setAttribute("aria-selected",this._selection.isSelected(b))},this)},
_updateMultiselectable:function(a){a?this.setAttribute("aria-multiselectable","true"):this.removeAttribute("aria-multiselectable")},
_focusWithKeyboardEvent:function(a){if(-1===this._MODIFIER_KEYS.indexOf(a.key)){this.cancelDebouncer("_clearSearchText");var b=this._searchText||"";b+=(a.key&&1==a.key.length?a.key:String.fromCharCode(a.keyCode)).toLocaleLowerCase();a=b.length;for(var c=0,d;d=this.items[c];c++)if(!d.hasAttribute("disabled")){var e=this.attrForItemTitle||"textContent";e=(d[e]||d.getAttribute(e)||"").trim();if(!(e.length<a)&&e.slice(0,a).toLocaleLowerCase()==b){this._setFocusedItem(d);break}}this._searchText=b;this.debounce("_clearSearchText",
this._clearSearchText,this._SEARCH_RESET_TIMEOUT_MS)}},
_clearSearchText:function(){this._searchText=""},
_focusPrevious:function(){for(var a=this.items.length,b=Number(this.indexOf(this.focusedItem)),c=1;c<a+1;c++){var d=this.items[(b-c+a)%a];if(!d.hasAttribute("disabled")){var e=hP(d).getOwnerRoot()||document;this._setFocusedItem(d);if(hP(e).activeElement==d)break}}},
_focusNext:function(){for(var a=this.items.length,b=Number(this.indexOf(this.focusedItem)),c=1;c<a+1;c++){var d=this.items[(b+c)%a];if(!d.hasAttribute("disabled")){var e=hP(d).getOwnerRoot()||document;this._setFocusedItem(d);if(hP(e).activeElement==d)break}}},
_applySelection:function(a,b){b?a.setAttribute("aria-selected","true"):a.setAttribute("aria-selected","false");tQ._applySelection.apply(this,arguments)},
_focusedItemChanged:function(a,b){b&&b.setAttribute("tabindex","-1");!a||a.hasAttribute("disabled")||this.disabled||(a.setAttribute("tabindex","0"),a.focus())},
_onIronItemsChanged:function(a){a.detail.addedNodes.length&&this._resetTabindices()},
_onShiftTabDown:function(){var a=this.getAttribute("tabindex");uQ._shiftTabPressed=!0;this._setFocusedItem(null);this.setAttribute("tabindex","-1");this.async(function(){this.setAttribute("tabindex",a);uQ._shiftTabPressed=!1},1)},
_onFocus:function(a){!uQ._shiftTabPressed&&(a=hP(a).rootTarget,a===this||"undefined"===typeof a.tabIndex||this.isLightDescendant(a))&&(this._defaultFocusAsync=this.async(function(){var b=this.multi?this.selectedItems&&this.selectedItems[0]:this.selectedItem;this._setFocusedItem(null);b?this._setFocusedItem(b):this.items[0]&&this._focusNext()}))},
_onUpKey:function(a){this._focusPrevious();a.detail.keyboardEvent.preventDefault()},
_onDownKey:function(a){this._focusNext();a.detail.keyboardEvent.preventDefault()},
_onEscKey:function(){var a=this.focusedItem;a&&a.blur()},
_onKeydown:function(a){this.keyboardEventMatchesKeys(a,"up down esc")||this._focusWithKeyboardEvent(a);a.stopPropagation()},
_activateHandler:function(a){tQ._activateHandler.call(this,a);a.stopPropagation()},
_disabledChanged:function(a){a?(this._previousTabIndex=this.hasAttribute("tabindex")?this.tabIndex:0,this.removeAttribute("tabindex")):this.hasAttribute("tabindex")||this.setAttribute("tabindex",this._previousTabIndex)},
_shiftTabPressed:!1},xxa=[wxa,RP,uQ];var vQ={hostAttributes:{role:"menubar"},keyBindings:{left:"_onLeftKey",right:"_onRightKey"},_onUpKey:function(a){this.focusedItem.click();a.detail.keyboardEvent.preventDefault()},
_onDownKey:function(a){this.focusedItem.click();a.detail.keyboardEvent.preventDefault()},
get _isRTL(){return"rtl"===window.getComputedStyle(this).direction},_onLeftKey:function(a){this._isRTL?this._focusNext():this._focusPrevious();a.detail.keyboardEvent.preventDefault()},
_onRightKey:function(a){this._isRTL?this._focusPrevious():this._focusNext();a.detail.keyboardEvent.preventDefault()},
_onKeydown:function(a){this.keyboardEventMatchesKeys(a,"up down left right esc")||this._focusWithKeyboardEvent(a)}},yxa=[xxa,
vQ];Polymer.IronMeta=TP;Polymer.IronFocusablesHelper=kxa;Polymer.IronOverlayBehaviorImpl=lQ;Polymer.IronOverlayBehavior=mQ;Polymer.IronOverlayManager=mxa;Polymer.IronOverlayManagerClass=eQ;var wQ=["<!--css-build:shady-->\n\n <slot class=\"style-scope iron-pages\"></slot>\n"];wQ.raw=wQ.slice();EP({_template:fN(wQ),is:"iron-pages",behaviors:[IP,tQ],properties:{activateEvent:{type:String,value:null}},observers:["_selectedPageChanged(selected)"],_selectedPageChanged:function(){this.async(this.notifyResize)}});var zxa={properties:{value:{type:Number,value:0,notify:!0,reflectToAttribute:!0},min:{type:Number,value:0,notify:!0},max:{type:Number,value:100,notify:!0},step:{type:Number,value:1,notify:!0},ratio:{type:Number,value:0,readOnly:!0,notify:!0}},observers:["_update(value, min, max, step)"],_calcRatio:function(a){return(this._clampValue(a)-this.min)/(this.max-this.min)},
_clampValue:function(a){return Math.min(this.max,Math.max(this.min,this._calcStep(a)))},
_calcStep:function(a){a=parseFloat(a);if(!this.step)return a;a=Math.round((a-this.min)/this.step);return 1>this.step?a/(1/this.step)+this.min:a*this.step+this.min},
_validateValue:function(){var a=this._clampValue(this.value);this.value=this.oldValue=isNaN(a)?this.oldValue:a;return this.value!==a},
_update:function(){this._validateValue();this._setRatio(100*this._calcRatio(this.value))}};Polymer.IronResizableBehavior=IP;EP({is:"iron-selector",_template:null,behaviors:[wxa]});var xQ={properties:{animationTiming:{type:Object,value:function(){return{duration:500,easing:"cubic-bezier(0.4, 0, 0.2, 1)",fill:"both"}}}},
isNeonAnimation:!0,created:function(){document.body.animate||console.warn("No web animations detected. This element will not function without a web animations polyfill.")},
timingFromConfig:function(a){if(a.timing)for(var b in a.timing)this.animationTiming[b]=a.timing[b];return this.animationTiming},
setPrefixedProperty:function(a,b,c){for(var d={transform:["webkitTransform"],transformOrigin:["mozTransformOrigin","webkitTransformOrigin"]}[b],e,g=0;e=d[g];g++)a.style[e]=c;a.style[b]=c},
complete:function(){}};EP({is:"fade-in-animation",_template:null,behaviors:[xQ],configure:function(a){return this._effect=new KeyframeEffect(a.node,[{opacity:"0"},{opacity:"1"}],this.timingFromConfig(a))}});EP({is:"fade-out-animation",_template:null,behaviors:[xQ],configure:function(a){return this._effect=new KeyframeEffect(a.node,[{opacity:"1"},{opacity:"0"}],this.timingFromConfig(a))}});/*
Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/
var yQ=["<!--css-build:shady-->\n\n <div id=\"background\" class=\"style-scope paper-ripple\"></div>\n <div id=\"waves\" class=\"style-scope paper-ripple\"></div>\n"];
yQ.raw=yQ.slice();var zQ=function(a,b,c,d){a-=c;b-=d;return Math.sqrt(a*a+b*b)},AQ=window.performance&&window.performance.now?window.performance.now.bind(window.performance):Date.now;
function Axa(a){this.element=a;this.width=this.boundingRect.width;this.height=this.boundingRect.height;this.size=Math.max(this.width,this.height)}
Axa.prototype={get boundingRect(){return this.element.getBoundingClientRect()}};function Bxa(a){this.element=a;this.color=window.getComputedStyle(a).color;this.wave=document.createElement("div");this.waveContainer=document.createElement("div");this.wave.style.backgroundColor=this.color;this.wave.classList.add("wave");this.waveContainer.classList.add("wave-container");hP(this.waveContainer).appendChild(this.wave);Cxa(this)}
var Cxa=function(a){a.maxRadius=0;a.mouseDownStart=0;a.mouseUpStart=0;a.xStart=0;a.yStart=0;a.xEnd=0;a.yEnd=0;a.slideDistance=0;a.containerMetrics=new Axa(a.element)};
Bxa.prototype={get recenters(){return this.element.recenters},get center(){return this.element.center},get mouseDownElapsed(){if(!this.mouseDownStart)return 0;var a=AQ()-this.mouseDownStart;this.mouseUpStart&&(a-=this.mouseUpElapsed);return a},get mouseUpElapsed(){return this.mouseUpStart?AQ()-this.mouseUpStart:0},get mouseDownElapsedSeconds(){return this.mouseDownElapsed/1E3},get mouseUpElapsedSeconds(){return this.mouseUpElapsed/1E3},get mouseInteractionSeconds(){return this.mouseDownElapsedSeconds+
this.mouseUpElapsedSeconds},get initialOpacity(){return this.element.initialOpacity},get opacityDecayVelocity(){return this.element.opacityDecayVelocity},get radius(){var a=1.1*Math.min(Math.sqrt(this.containerMetrics.width*this.containerMetrics.width+this.containerMetrics.height*this.containerMetrics.height),300)+5;return Math.abs(a*(1-Math.pow(80,-(this.mouseInteractionSeconds/(1.1-a/300*.2)))))},get opacity(){return this.mouseUpStart?Math.max(0,this.initialOpacity-this.mouseUpElapsedSeconds*this.opacityDecayVelocity):
this.initialOpacity},get outerOpacity(){return Math.max(0,Math.min(.3*this.mouseUpElapsedSeconds,this.opacity))},get isOpacityFullyDecayed(){return .01>this.opacity&&this.radius>=Math.min(this.maxRadius,300)},get isRestingAtMaxRadius(){return this.opacity>=this.initialOpacity&&this.radius>=Math.min(this.maxRadius,300)},get isAnimationComplete(){return this.mouseUpStart?this.isOpacityFullyDecayed:this.isRestingAtMaxRadius},get translationFraction(){return Math.min(1,this.radius/this.containerMetrics.size*
2/Math.sqrt(2))},get xNow(){return this.xEnd?this.xStart+this.translationFraction*(this.xEnd-this.xStart):this.xStart},get yNow(){return this.yEnd?this.yStart+this.translationFraction*(this.yEnd-this.yStart):this.yStart},get isMouseDown(){return this.mouseDownStart&&!this.mouseUpStart},draw:function(){this.wave.style.opacity=this.opacity;var a=this.radius/(this.containerMetrics.size/2);var b=this.xNow-this.containerMetrics.width/2;var c=this.yNow-this.containerMetrics.height/2;this.waveContainer.style.webkitTransform=
"translate("+b+"px, "+c+"px)";this.waveContainer.style.transform="translate3d("+b+"px, "+c+"px, 0)";this.wave.style.webkitTransform="scale("+a+","+a+")";this.wave.style.transform="scale3d("+a+","+a+",1)"},
downAction:function(a){var b=this.containerMetrics.width/2,c=this.containerMetrics.height/2;Cxa(this);this.mouseDownStart=AQ();this.center?(this.xStart=b,this.yStart=c,this.slideDistance=zQ(this.xStart,this.yStart,this.xEnd,this.yEnd)):(this.xStart=a?a.detail.x-this.containerMetrics.boundingRect.left:this.containerMetrics.width/2,this.yStart=a?a.detail.y-this.containerMetrics.boundingRect.top:this.containerMetrics.height/2);this.recenters&&(this.xEnd=b,this.yEnd=c,this.slideDistance=zQ(this.xStart,
this.yStart,this.xEnd,this.yEnd));a=this.containerMetrics;b=this.xStart;c=this.yStart;this.maxRadius=Math.max(zQ(b,c,0,0),zQ(b,c,a.width,0),zQ(b,c,0,a.height),zQ(b,c,a.width,a.height));this.waveContainer.style.top=(this.containerMetrics.height-this.containerMetrics.size)/2+"px";this.waveContainer.style.left=(this.containerMetrics.width-this.containerMetrics.size)/2+"px";this.waveContainer.style.width=this.containerMetrics.size+"px";this.waveContainer.style.height=this.containerMetrics.size+"px"},
upAction:function(){this.isMouseDown&&(this.mouseUpStart=AQ())},
remove:function(){hP(this.waveContainer.parentNode).removeChild(this.waveContainer)}};
EP({_template:fN(yQ),is:"paper-ripple",behaviors:[RP],properties:{initialOpacity:{type:Number,value:.25},opacityDecayVelocity:{type:Number,value:.8},recenters:{type:Boolean,value:!1},center:{type:Boolean,value:!1},ripples:{type:Array,value:function(){return[]}},
animating:{type:Boolean,readOnly:!0,reflectToAttribute:!0,value:!1},holdDown:{type:Boolean,value:!1,observer:"_holdDownChanged"},noink:{type:Boolean,value:!1},_animating:{type:Boolean},_boundAnimate:{type:Function,value:function(){return this.animate.bind(this)}}},
get target(){return this.keyEventTarget},keyBindings:{"enter:keydown":"_onEnterKeydown","space:keydown":"_onSpaceKeydown","space:keyup":"_onSpaceKeyup"},attached:function(){var a=this.keyEventTarget=11==this.parentNode.nodeType?hP(this).getOwnerRoot().host:this.parentNode;this.listen(a,"up","uiUpAction");this.listen(a,"down","uiDownAction")},
detached:function(){this.unlisten(this.keyEventTarget,"up","uiUpAction");this.unlisten(this.keyEventTarget,"down","uiDownAction");this.keyEventTarget=null},
get shouldKeepAnimating(){for(var a=0;a<this.ripples.length;++a)if(!this.ripples[a].isAnimationComplete)return!0;return!1},simulatedRipple:function(){this.downAction(null);this.async(function(){this.upAction()},1)},
uiDownAction:function(a){this.noink||this.downAction(a)},
downAction:function(a){this.holdDown&&0<this.ripples.length||(this.addRipple().downAction(a),this._animating||(this._animating=!0,this.animate()))},
uiUpAction:function(a){this.noink||this.upAction(a)},
upAction:function(a){this.holdDown||(this.ripples.forEach(function(b){b.upAction(a)}),this._animating=!0,this.animate())},
onAnimationComplete:function(){this._animating=!1;this.$.background.style.backgroundColor="";this.fire("transitionend")},
addRipple:function(){var a=new Bxa(this);hP(this.$.waves).appendChild(a.waveContainer);this.$.background.style.backgroundColor=a.color;this.ripples.push(a);this._setAnimating(!0);return a},
removeRipple:function(a){var b=this.ripples.indexOf(a);0>b||(this.ripples.splice(b,1),a.remove(),this.ripples.length||this._setAnimating(!1))},
animate:function(){if(this._animating){var a;for(a=0;a<this.ripples.length;++a){var b=this.ripples[a];b.draw();this.$.background.style.opacity=b.outerOpacity;b.isOpacityFullyDecayed&&!b.isRestingAtMaxRadius&&this.removeRipple(b)}if(this.shouldKeepAnimating||0!==this.ripples.length)window.requestAnimationFrame(this._boundAnimate);else this.onAnimationComplete()}},
_onEnterKeydown:function(){this.uiDownAction();this.async(this.uiUpAction,1)},
_onSpaceKeydown:function(){this.uiDownAction()},
_onSpaceKeyup:function(){this.uiUpAction()},
_holdDownChanged:function(a,b){void 0!==b&&(a?this.downAction():this.upAction())}});var BQ={properties:{noink:{type:Boolean,observer:"_noinkChanged"},_rippleContainer:{type:Object}},_buttonStateChanged:function(){this.focused&&this.ensureRipple()},
_downHandler:function(a){YP._downHandler.call(this,a);this.pressed&&this.ensureRipple(a)},
ensureRipple:function(a){if(!this.hasRipple()){this._ripple=this._createRipple();this._ripple.noink=this.noink;var b=this._rippleContainer||this.root;b&&hP(b).appendChild(this._ripple);if(a){b=hP(this._rippleContainer||this);var c=hP(a).rootTarget;b.deepContains(c)&&this._ripple.uiDownAction(a)}}},
getRipple:function(){this.ensureRipple();return this._ripple},
hasRipple:function(){return!!this._ripple},
_createRipple:function(){return document.createElement("paper-ripple")},
_noinkChanged:function(a){this.hasRipple()&&(this._ripple.noink=a)}};var Dxa={properties:{elevation:{type:Number,reflectToAttribute:!0,readOnly:!0}},observers:["_calculateElevation(focused, disabled, active, pressed, receivedFocusFromKeyboard)","_computeKeyboardClass(receivedFocusFromKeyboard)"],hostAttributes:{role:"button",tabindex:"0",animated:!0},_calculateElevation:function(){var a=1;this.disabled?a=0:this.active||this.pressed?a=4:this.receivedFocusFromKeyboard&&(a=3);this._setElevation(a)},
_computeKeyboardClass:function(a){this.toggleClass("keyboard-focus",a)},
_spaceKeyDownHandler:function(a){YP._spaceKeyDownHandler.call(this,a);this.hasRipple()&&1>this.getRipple().ripples.length&&this._ripple.uiDownAction()},
_spaceKeyUpHandler:function(a){YP._spaceKeyUpHandler.call(this,a);this.hasRipple()&&this._ripple.uiUpAction()}},Exa=[ZP,
SP,BQ,Dxa];var CQ={observers:["_focusedChanged(receivedFocusFromKeyboard)"],_focusedChanged:function(a){a&&this.ensureRipple();this.hasRipple()&&(this._ripple.holdDown=a)},
_createRipple:function(){var a=BQ._createRipple();a.id="ink";a.setAttribute("center","");a.classList.add("circle");return a}},DQ=[ZP,
SP,BQ,CQ];var EQ=[DQ,gxa,{_checkedChanged:function(){fxa._checkedChanged.call(this);this.hasRipple()&&(this.checked?this._ripple.setAttribute("checked",""):this._ripple.removeAttribute("checked"))},
_buttonStateChanged:function(){BQ._buttonStateChanged.call(this);!this.disabled&&this.isAttached&&(this.checked=this.active)}}];Polymer.PaperRippleBehavior=BQ;var FQ=document.createElement("template");FQ.setAttribute("style","display: none;");FQ.innerHTML="";
document.head.appendChild(FQ.content);var GQ=document.createElement("template");GQ.setAttribute("style","display: none;");GQ.innerHTML="<dom-module id=\"paper-material-styles\">\n <template>\n <style scope=\"paper-material-styles\">:host, html {\n --paper-material_-_display: block; --paper-material_-_position: relative;;\n --paper-material-elevation-1_-_box-shadow: var(--shadow-elevation-2dp_-_box-shadow);;\n --paper-material-elevation-2_-_box-shadow: var(--shadow-elevation-4dp_-_box-shadow);;\n --paper-material-elevation-3_-_box-shadow: var(--shadow-elevation-6dp_-_box-shadow);;\n --paper-material-elevation-4_-_box-shadow: var(--shadow-elevation-8dp_-_box-shadow);;\n --paper-material-elevation-5_-_box-shadow: var(--shadow-elevation-16dp_-_box-shadow);;\n}\n\n:host(.paper-material), .paper-material {\n display: var(--paper-material_-_display); position: var(--paper-material_-_position);\n}\n\n:host(.paper-material[elevation=\"1\"]), .paper-material[elevation=\"1\"] {\n box-shadow: var(--paper-material-elevation-1_-_box-shadow);\n}\n\n:host(.paper-material[elevation=\"2\"]), .paper-material[elevation=\"2\"] {\n box-shadow: var(--paper-material-elevation-2_-_box-shadow);\n}\n\n:host(.paper-material[elevation=\"3\"]), .paper-material[elevation=\"3\"] {\n box-shadow: var(--paper-material-elevation-3_-_box-shadow);\n}\n\n:host(.paper-material[elevation=\"4\"]), .paper-material[elevation=\"4\"] {\n box-shadow: var(--paper-material-elevation-4_-_box-shadow);\n}\n\n:host(.paper-material[elevation=\"5\"]), .paper-material[elevation=\"5\"] {\n box-shadow: var(--paper-material-elevation-5_-_box-shadow);\n}\n\n</style>\n </template>\n</dom-module>";
document.head.appendChild(GQ.content);var HQ=["<!--css-build:shady-->\n\n <slot class=\"style-scope paper-button\"></slot>"];
HQ.raw=HQ.slice();EP({_template:fN(HQ),is:"paper-button",behaviors:[Exa],properties:{raised:{type:Boolean,reflectToAttribute:!0,value:!1,observer:"_calculateElevation"}},_calculateElevation:function(){this.raised?Dxa._calculateElevation.apply(this):this._setElevation(0)},
registered:function(){this._template.setAttribute("strip-whitespace","")}});var IQ=document.createElement("template");IQ.setAttribute("style","display: none;");IQ.innerHTML="";
document.head.appendChild(IQ.content);var JQ=document.createElement("template");JQ.setAttribute("style","display: none;");JQ.innerHTML="";
document.head.appendChild(JQ.content);var KQ=["<!--css-build:shady-->\n\n <div class=\"header style-scope paper-card\">\n <iron-image hidden$=\"[[!image]]\" aria-hidden$=\"[[_isHidden(image)]]\" src=\"[[image]]\" alt=\"[[alt]]\" placeholder=\"[[placeholderImage]]\" preload=\"[[preloadImage]]\" fade=\"[[fadeImage]]\" class=\"style-scope paper-card\"></iron-image>\n <div hidden$=\"[[!heading]]\" class$=\"title-text [[_computeHeadingClass(image)]]\" class=\"style-scope paper-card\">[[heading]]</div>\n </div>\n\n <slot class=\"style-scope paper-card\"></slot>\n"];
KQ.raw=KQ.slice();
EP({_template:fN(KQ),is:"paper-card",properties:{heading:{type:String,value:"",observer:"_headingChanged"},image:{type:String,value:""},alt:{type:String},preloadImage:{type:Boolean,value:!1},fadeImage:{type:Boolean,value:!1},placeholderImage:{type:String,value:null},elevation:{type:Number,value:1,reflectToAttribute:!0},animatedShadow:{type:Boolean,value:!1},animated:{type:Boolean,reflectToAttribute:!0,readOnly:!0,computed:"_computeAnimated(animatedShadow)"}},_isHidden:function(a){return a?"false":
"true"},
_headingChanged:function(a){var b=this.getAttribute("heading"),c=this.getAttribute("aria-label");"string"===typeof c&&c!==b||this.setAttribute("aria-label",a)},
_computeHeadingClass:function(a){return a?" over-image":""},
_computeAnimated:function(a){return a}});var Fxa=["<!--css-build:shady-->\n\n<div id=\"checkboxContainer\" class=\"style-scope paper-checkbox\">\n <div id=\"checkbox\" class$=\"[[_computeCheckboxClass(checked, invalid)]]\" class=\"style-scope paper-checkbox\">\n <div id=\"checkmark\" class$=\"[[_computeCheckmarkClass(checked)]]\" class=\"style-scope paper-checkbox\"></div>\n </div>\n</div>\n\n<div id=\"checkboxLabel\" class=\"style-scope paper-checkbox\"><slot class=\"style-scope paper-checkbox\"></slot></div>"];
Fxa.raw=["<style>\n :host {\n display: inline-block;\n white-space: nowrap;\n cursor: pointer;\n --calculated-paper-checkbox-size: var(--paper-checkbox-size, 18px);\n /* -1px is a sentinel for the default and is replaced in \\`attached\\`. */\n --calculated-paper-checkbox-ink-size: var(--paper-checkbox-ink-size, -1px);\n @apply --paper-font-common-base;\n line-height: 0;\n -webkit-tap-highlight-color: transparent;\n }\n\n :host([hidden]) {\n display: none !important;\n }\n\n :host(:focus) {\n outline: none;\n }\n\n .hidden {\n display: none;\n }\n\n #checkboxContainer {\n display: inline-block;\n position: relative;\n width: var(--calculated-paper-checkbox-size);\n height: var(--calculated-paper-checkbox-size);\n min-width: var(--calculated-paper-checkbox-size);\n margin: var(--paper-checkbox-margin, initial);\n vertical-align: var(--paper-checkbox-vertical-align, middle);\n background-color: var(--paper-checkbox-unchecked-background-color, transparent);\n }\n\n #ink {\n position: absolute;\n\n /* Center the ripple in the checkbox by negative offsetting it by\n * (inkWidth - rippleWidth) / 2 */\n top: calc(0px - (var(--calculated-paper-checkbox-ink-size) - var(--calculated-paper-checkbox-size)) / 2);\n left: calc(0px - (var(--calculated-paper-checkbox-ink-size) - var(--calculated-paper-checkbox-size)) / 2);\n width: var(--calculated-paper-checkbox-ink-size);\n height: var(--calculated-paper-checkbox-ink-size);\n color: var(--paper-checkbox-unchecked-ink-color, var(--primary-text-color));\n opacity: 0.6;\n pointer-events: none;\n }\n\n #ink:dir(rtl) {\n right: calc(0px - (var(--calculated-paper-checkbox-ink-size) - var(--calculated-paper-checkbox-size)) / 2);\n left: auto;\n }\n\n #ink[checked] {\n color: var(--paper-checkbox-checked-ink-color, var(--primary-color));\n }\n\n #checkbox {\n position: relative;\n box-sizing: border-box;\n height: 100%;\n border: solid 2px;\n border-color: var(--paper-checkbox-unchecked-color, var(--primary-text-color));\n border-radius: 2px;\n pointer-events: none;\n -webkit-transition: background-color 140ms, border-color 140ms;\n transition: background-color 140ms, border-color 140ms;\n\n -webkit-transition-duration: var(--paper-checkbox-animation-duration, 140ms);\n transition-duration: var(--paper-checkbox-animation-duration, 140ms);\n }\n\n /* checkbox checked animations */\n #checkbox.checked #checkmark {\n -webkit-animation: checkmark-expand 140ms ease-out forwards;\n animation: checkmark-expand 140ms ease-out forwards;\n\n -webkit-animation-duration: var(--paper-checkbox-animation-duration, 140ms);\n animation-duration: var(--paper-checkbox-animation-duration, 140ms);\n }\n\n @-webkit-keyframes checkmark-expand {\n 0% {\n -webkit-transform: scale(0, 0) rotate(45deg);\n }\n 100% {\n -webkit-transform: scale(1, 1) rotate(45deg);\n }\n }\n\n @keyframes checkmark-expand {\n 0% {\n transform: scale(0, 0) rotate(45deg);\n }\n 100% {\n transform: scale(1, 1) rotate(45deg);\n }\n }\n\n #checkbox.checked {\n background-color: var(--paper-checkbox-checked-color, var(--primary-color));\n border-color: var(--paper-checkbox-checked-color, var(--primary-color));\n }\n\n #checkmark {\n position: absolute;\n width: 36%;\n height: 70%;\n border-style: solid;\n border-top: none;\n border-left: none;\n border-right-width: calc(2/15 * var(--calculated-paper-checkbox-size));\n border-bottom-width: calc(2/15 * var(--calculated-paper-checkbox-size));\n border-color: var(--paper-checkbox-checkmark-color, white);\n -webkit-transform-origin: 97% 86%;\n transform-origin: 97% 86%;\n box-sizing: content-box; /* protect against page-level box-sizing */\n }\n\n #checkmark:dir(rtl) {\n -webkit-transform-origin: 50% 14%;\n transform-origin: 50% 14%;\n }\n\n /* label */\n #checkboxLabel {\n position: relative;\n display: inline-block;\n vertical-align: middle;\n padding-left: var(--paper-checkbox-label-spacing, 8px);\n white-space: normal;\n line-height: normal;\n color: var(--paper-checkbox-label-color, var(--primary-text-color));\n @apply --paper-checkbox-label;\n }\n\n :host([checked]) #checkboxLabel {\n color: var(--paper-checkbox-label-checked-color, var(--paper-checkbox-label-color, var(--primary-text-color)));\n @apply --paper-checkbox-label-checked;\n }\n\n #checkboxLabel:dir(rtl) {\n padding-right: var(--paper-checkbox-label-spacing, 8px);\n padding-left: 0;\n }\n\n #checkboxLabel[hidden] {\n display: none;\n }\n\n /* disabled state */\n\n :host([disabled]) #checkbox {\n opacity: 0.5;\n border-color: var(--paper-checkbox-unchecked-color, var(--primary-text-color));\n }\n\n :host([disabled][checked]) #checkbox {\n background-color: var(--paper-checkbox-unchecked-color, var(--primary-text-color));\n opacity: 0.5;\n }\n\n :host([disabled]) #checkboxLabel {\n opacity: 0.65;\n }\n\n /* invalid state */\n #checkbox.invalid:not(.checked) {\n border-color: var(--paper-checkbox-error-color, var(--error-color));\n }\n</style>\n\n<div id=\"checkboxContainer\">\n <div id=\"checkbox\" class$=\"[[_computeCheckboxClass(checked, invalid)]]\">\n <div id=\"checkmark\" class$=\"[[_computeCheckmarkClass(checked)]]\"></div>\n </div>\n</div>\n\n<div id=\"checkboxLabel\"><slot></slot></div>"];
EP({_template:fN(Fxa),is:"paper-checkbox",behaviors:[EQ],hostAttributes:{role:"checkbox","aria-checked":!1,tabindex:0},properties:{ariaActiveAttribute:{type:String,value:"aria-checked"}},attached:function(){pP(this,function(){if("-1px"===this.getComputedStyleValue("--calculated-paper-checkbox-ink-size").trim()){var a=this.getComputedStyleValue("--calculated-paper-checkbox-size").trim(),b="px",c=a.match(/[A-Za-z]+$/);null!==c&&(b=c[0]);a=parseFloat(a);c=8/3*a;"px"===b&&(c=Math.floor(c),c%2!==a%2&&
c++);this.updateStyles({"--paper-checkbox-ink-size":c+b})}})},
_computeCheckboxClass:function(a,b){var c="";a&&(c+="checked ");b&&(c+="invalid");return c},
_computeCheckmarkClass:function(a){return a?"":"hidden"},
_createRipple:function(){this._rippleContainer=this.$.checkboxContainer;return CQ._createRipple.call(this)},
registered:function(){this._template.setAttribute("strip-whitespace","")}});var Gxa={hostAttributes:{role:"dialog",tabindex:"-1"},properties:{modal:{type:Boolean,value:!1},__readied:{type:Boolean,value:!1}},observers:["_modalChanged(modal, __readied)"],listeners:{tap:"_onDialogClick"},ready:function(){this.__prevNoCancelOnOutsideClick=this.noCancelOnOutsideClick;this.__prevNoCancelOnEscKey=this.noCancelOnEscKey;this.__prevWithBackdrop=this.withBackdrop;this.__readied=!0},
_modalChanged:function(a,b){b&&(a?(this.__prevNoCancelOnOutsideClick=this.noCancelOnOutsideClick,this.__prevNoCancelOnEscKey=this.noCancelOnEscKey,this.__prevWithBackdrop=this.withBackdrop,this.withBackdrop=this.noCancelOnEscKey=this.noCancelOnOutsideClick=!0):(this.noCancelOnOutsideClick=this.noCancelOnOutsideClick&&this.__prevNoCancelOnOutsideClick,this.noCancelOnEscKey=this.noCancelOnEscKey&&this.__prevNoCancelOnEscKey,this.withBackdrop=this.withBackdrop&&this.__prevWithBackdrop))},
_updateClosingReasonConfirmed:function(a){this.closingReason=this.closingReason||{};this.closingReason.confirmed=a},
_onDialogClick:function(a){for(var b=hP(a).path,c=0,d=b.indexOf(this);c<d;c++){var e=b[c];if(e.hasAttribute&&(e.hasAttribute("dialog-dismiss")||e.hasAttribute("dialog-confirm"))){this._updateClosingReasonConfirmed(e.hasAttribute("dialog-confirm"));this.close();a.stopPropagation();break}}}},Hxa=[mQ,
Gxa];var LQ=document.createElement("template");LQ.setAttribute("style","display: none;");LQ.innerHTML="";
document.head.appendChild(LQ.content);var MQ=document.createElement("template");MQ.setAttribute("style","display: none;");MQ.innerHTML="<dom-module id=\"paper-dialog-shared-styles\">\n <template>\n <style scope=\"paper-dialog-shared-styles\">:host {\n display: block;\n margin: 24px 40px;\n\n background: var(--paper-dialog-background-color, var(--primary-background-color));\n color: var(--paper-dialog-color, var(--primary-text-color));\n\n font-family: var(--paper-font-body1_-_font-family); -webkit-font-smoothing: var(--paper-font-body1_-_-webkit-font-smoothing); font-size: var(--paper-font-body1_-_font-size); font-weight: var(--paper-font-body1_-_font-weight); line-height: var(--paper-font-body1_-_line-height);\n box-shadow: var(--shadow-elevation-16dp_-_box-shadow);\n ;\n}\n\n:host > ::slotted(*) {\n margin-top: 20px;\n padding: 0 24px;\n}\n\n:host > ::slotted(.no-padding) {\n padding: 0;\n}\n\n:host > ::slotted(*:first-child) {\n margin-top: 24px;\n}\n\n:host > ::slotted(*:last-child) {\n margin-bottom: 24px;\n}\n\n:host > ::slotted(h2) {\n position: relative;\n margin: 0;\n\n font-family: var(--paper-font-title_-_font-family); -webkit-font-smoothing: var(--paper-font-title_-_-webkit-font-smoothing); white-space: var(--paper-font-title_-_white-space); overflow: var(--paper-font-title_-_overflow); text-overflow: var(--paper-font-title_-_text-overflow); font-size: var(--paper-font-title_-_font-size); font-weight: var(--paper-font-title_-_font-weight); line-height: var(--paper-font-title_-_line-height);\n ;\n}\n\n:host > ::slotted(h2:first-child) {\n margin-top: 24px;\n ;\n}\n\n:host > ::slotted(h2:last-child) {\n margin-bottom: 24px;\n ;\n}\n\n:host > ::slotted(.paper-dialog-buttons), :host > ::slotted(.buttons) {\n position: relative;\n padding: 8px 8px 8px 24px;\n margin: 0;\n\n color: var(--paper-dialog-button-color, var(--primary-color));\n\n display: var(--layout-horizontal_-_display); -ms-flex-direction: var(--layout-horizontal_-_-ms-flex-direction); -webkit-flex-direction: var(--layout-horizontal_-_-webkit-flex-direction); flex-direction: var(--layout-horizontal_-_flex-direction);\n -ms-flex-pack: var(--layout-end-justified_-_-ms-flex-pack); -webkit-justify-content: var(--layout-end-justified_-_-webkit-justify-content); justify-content: var(--layout-end-justified_-_justify-content);\n}\n\n</style>\n </template>\n</dom-module>";
document.head.appendChild(MQ.content);var NQ=["<!--css-build:shady-->\n\n <div id=\"scrollable\" class=\"scrollable style-scope paper-dialog-scrollable\" on-scroll=\"updateScrollState\">\n <slot class=\"style-scope paper-dialog-scrollable\"></slot>\n </div>\n"];
NQ.raw=NQ.slice();EP({_template:fN(NQ),is:"paper-dialog-scrollable",properties:{dialogElement:{type:Object}},get scrollTarget(){return this.$.scrollable},ready:function(){this._ensureTarget();this.classList.add("no-padding")},
attached:function(){this._ensureTarget();requestAnimationFrame(this.updateScrollState.bind(this))},
updateScrollState:function(){this.toggleClass("is-scrolled",0<this.scrollTarget.scrollTop);this.toggleClass("can-scroll",this.scrollTarget.offsetHeight<this.scrollTarget.scrollHeight);this.toggleClass("scrolled-to-bottom",this.scrollTarget.scrollTop+this.scrollTarget.offsetHeight>=this.scrollTarget.scrollHeight)},
_ensureTarget:function(){(this.dialogElement=this.dialogElement||this.parentElement)&&this.dialogElement.behaviors&&0<=this.dialogElement.behaviors.indexOf(Gxa)?(this.dialogElement.sizingTarget=this.scrollTarget,this.scrollTarget.classList.remove("fit")):this.dialogElement&&this.scrollTarget.classList.add("fit")}});var OQ=["<!--css-build:shady-->\n <slot class=\"style-scope paper-dialog\"></slot>\n"];OQ.raw=OQ.slice();EP({_template:fN(OQ),is:"paper-dialog",behaviors:[Hxa,qxa],listeners:{"neon-animation-finish":"_onNeonAnimationFinish"},_renderOpened:function(){this.cancelAnimation();this.playAnimation("entry")},
_renderClosed:function(){this.cancelAnimation();this.playAnimation("exit")},
_onNeonAnimationFinish:function(){this.opened?this._finishRenderOpened():this._finishRenderClosed()}});var PQ=document.createElement("template");PQ.setAttribute("style","display: none;");PQ.innerHTML="<iron-iconset-svg name=\"paper-dropdown-menu\" size=\"24\">\n<svg><defs>\n<g id=\"arrow-drop-down\"><path d=\"M7 10l5 5 5-5z\"></path></g>\n</defs></svg>\n</iron-iconset-svg>";document.head.appendChild(PQ.content);var QQ=document.createElement("template");QQ.setAttribute("style","display: none;");QQ.innerHTML="<dom-module id=\"paper-dropdown-menu-shared-styles\">\n <template>\n <style scope=\"paper-dropdown-menu-shared-styles\">:host {\n display: inline-block;\n position: relative;\n text-align: left;\n\n \n -webkit-tap-highlight-color: rgba(0,0,0,0);\n -webkit-tap-highlight-color: transparent;\n\n --paper-input-container-input_-_overflow: hidden; --paper-input-container-input_-_white-space: nowrap; --paper-input-container-input_-_text-overflow: ellipsis; --paper-input-container-input_-_max-width: 100%; --paper-input-container-input_-_box-sizing: border-box; --paper-input-container-input_-_cursor: pointer; --paper-input-container-input_-_font-size: initial; --paper-input-container-input_-_font-weight: initial; --paper-input-container-input_-_line-height: initial; --paper-input-container-input_-_font-family: initial; --paper-input-container-input_-_padding: initial; --paper-input-container-input_-_color: initial; --paper-input-container-input_-_text-align: initial; --paper-input-container-input_-_height: initial;;\n\n ;\n}\n\n:host(:dir(rtl)) {\n text-align: right;\n\n ;\n}\n\n:host([disabled]) {\n ;\n}\n\n:host([noink]) paper-ripple {\n display: none;\n}\n\n:host([no-label-float]) paper-ripple {\n top: 8px;\n}\n\npaper-ripple {\n top: 12px;\n left: 0px;\n bottom: 8px;\n right: 0px;\n\n position: var(--paper-dropdown-menu-ripple_-_position); top: var(--paper-dropdown-menu-ripple_-_top, 12px); right: var(--paper-dropdown-menu-ripple_-_right, 0px); bottom: var(--paper-dropdown-menu-ripple_-_bottom, 8px); left: var(--paper-dropdown-menu-ripple_-_left, 0px);\n}\n\npaper-menu-button {\n display: block;\n padding: 0;\n\n ;\n}\n\npaper-input {\n ;\n}\n\niron-icon {\n color: var(--disabled-text-color);\n\n ;\n}\n\n</style>\n </template>\n</dom-module>";
document.head.appendChild(QQ.content);var Ixa=1,Jxa=1,Kxa=1,Lxa=[SP,RP,{properties:{label:{type:String},value:{notify:!0,type:String},disabled:{type:Boolean,value:!1},invalid:{type:Boolean,value:!1,notify:!0},allowedPattern:{type:String},type:{type:String},list:{type:String},pattern:{type:String},required:{type:Boolean,value:!1},errorMessage:{type:String},charCounter:{type:Boolean,value:!1},noLabelFloat:{type:Boolean,value:!1},alwaysFloatLabel:{type:Boolean,value:!1},autoValidate:{type:Boolean,value:!1},validator:{type:String},autocomplete:{type:String,
value:"off"},autofocus:{type:Boolean,observer:"_autofocusChanged"},inputmode:{type:String},minlength:{type:Number},maxlength:{type:Number},min:{type:String},max:{type:String},step:{type:String},name:{type:String},placeholder:{type:String,value:""},readonly:{type:Boolean,value:!1},size:{type:Number},autocapitalize:{type:String,value:"none"},autocorrect:{type:String,value:"off"},autosave:{type:String},results:{type:Number},accept:{type:String},multiple:{type:Boolean},_ariaDescribedBy:{type:String,value:""},
_ariaLabelledBy:{type:String,value:""},_inputId:{type:String,value:""}},listeners:{"addon-attached":"_onAddonAttached"},keyBindings:{"shift+tab:keydown":"_onShiftTabDown"},hostAttributes:{tabindex:0},get inputElement(){this.$||(this.$={});this.$.input||(this._generateInputId(),this.$.input=this.$$("#"+this._inputId));return this.$.input},get _focusableElement(){return this.inputElement},created:function(){this._typesThatHaveText="date datetime datetime-local month time week file".split(" ")},
attached:function(){this._updateAriaLabelledBy();!UN&&this.inputElement&&-1!==this._typesThatHaveText.indexOf(this.inputElement.type)&&(this.alwaysFloatLabel=!0)},
_appendStringWithSpace:function(a,b){return a?a+" "+b:b},
_onAddonAttached:function(a){a=hP(a).rootTarget;if(a.id)this._ariaDescribedBy=this._appendStringWithSpace(this._ariaDescribedBy,a.id);else{var b="paper-input-add-on-"+Jxa++;a.id=b;this._ariaDescribedBy=this._appendStringWithSpace(this._ariaDescribedBy,b)}},
validate:function(){return this.inputElement.validate()},
_focusBlurHandler:function(a){SP._focusBlurHandler.call(this,a);this.focused&&!this._shiftTabPressed&&this._focusableElement&&this._focusableElement.focus()},
_onShiftTabDown:function(){var a=this.getAttribute("tabindex");this._shiftTabPressed=!0;this.setAttribute("tabindex","-1");this.async(function(){this.setAttribute("tabindex",a);this._shiftTabPressed=!1},1)},
_handleAutoValidate:function(){this.autoValidate&&this.validate()},
updateValueAndPreserveCaret:function(a){try{var b=this.inputElement.selectionStart;this.value=a;this.inputElement.selectionStart=b;this.inputElement.selectionEnd=b}catch(c){this.value=a}},
_computeAlwaysFloatLabel:function(a,b){return b||a},
_updateAriaLabelledBy:function(){var a=hP(this.root).querySelector("label");if(a){if(a.id)var b=a.id;else b="paper-input-label-"+Ixa++,a.id=b;this._ariaLabelledBy=b}else this._ariaLabelledBy=""},
_generateInputId:function(){this._inputId&&""!==this._inputId||(this._inputId="input-"+Kxa++)},
_onChange:function(a){this.shadowRoot&&this.fire(a.type,{sourceEvent:a},{node:this,bubbles:a.bubbles,cancelable:a.cancelable})},
_autofocusChanged:function(){if(this.autofocus&&this._focusableElement){var a=document.activeElement;a instanceof HTMLElement&&a!==document.body&&a!==document.documentElement||this._focusableElement.focus()}}}];var Mxa={attached:function(){this.fire("addon-attached")},
update:function(){}};var RQ=["<!--css-build:shady-->\n\n <span class=\"style-scope paper-input-char-counter\">[[_charCounterStr]]</span>\n"];RQ.raw=RQ.slice();
EP({_template:fN(RQ),is:"paper-input-char-counter",behaviors:[Mxa],properties:{_charCounterStr:{type:String,value:"0"}},update:function(a){if(a.inputElement){a.value=a.value||"";var b=a.value.toString().length.toString();a.inputElement.hasAttribute("maxlength")&&(b+="/"+a.inputElement.getAttribute("maxlength"));this._charCounterStr=b}}});var SQ=["<!--css-build:shady-->\n\n <div class=\"floated-label-placeholder style-scope paper-input-container\" aria-hidden=\"true\" hidden=\"[[noLabelFloat]]\"> </div>\n\n <div class=\"input-wrapper style-scope paper-input-container\">\n <span class=\"prefix style-scope paper-input-container\"><slot name=\"prefix\" class=\"style-scope paper-input-container\"></slot></span>\n\n <div class$=\"[[_computeInputContentClass(noLabelFloat,alwaysFloatLabel,focused,invalid,_inputHasContent)]]\" id=\"labelAndInputContainer\" class=\"style-scope paper-input-container\">\n <slot name=\"label\" class=\"style-scope paper-input-container\"></slot>\n <slot name=\"input\" class=\"style-scope paper-input-container\"></slot><slot name=\"after-input\" class=\"style-scope paper-input-container\"></slot>\n </div>\n\n <span class=\"suffix style-scope paper-input-container\"><slot name=\"suffix\" class=\"style-scope paper-input-container\"></slot></span>\n </div>\n\n <div class$=\"[[_computeUnderlineClass(focused,invalid)]]\" class=\"style-scope paper-input-container\">\n <div class=\"unfocused-line style-scope paper-input-container\"></div>\n <div class=\"focused-line style-scope paper-input-container\"></div>\n </div>\n\n <div class$=\"[[_computeAddOnContentClass(focused,invalid)]]\" class=\"style-scope paper-input-container\">\n <slot name=\"add-on\" class=\"style-scope paper-input-container\"></slot>\n </div>\n"];
SQ.raw=SQ.slice();var TQ=["\n"];
TQ.raw=TQ.slice();var Nxa=fN(TQ);Nxa.setAttribute("style","display: none;");document.head.appendChild(Nxa.content);
EP({_template:fN(SQ),is:"paper-input-container",properties:{noLabelFloat:{type:Boolean,value:!1},alwaysFloatLabel:{type:Boolean,value:!1},attrForValue:{type:String,value:"bind-value"},autoValidate:{type:Boolean,value:!1},invalid:{observer:"_invalidChanged",type:Boolean,value:!1},focused:{readOnly:!0,type:Boolean,value:!1,notify:!0},noUnfloatedLabelError:{type:Boolean,value:!1},_addons:{type:Array},_inputHasContent:{type:Boolean,value:!1},_inputSelector:{type:String,value:"input,iron-input,textarea,.paper-input-input"},
_boundOnFocus:{type:Function,value:function(){return this._onFocus.bind(this)}},
_boundOnBlur:{type:Function,value:function(){return this._onBlur.bind(this)}},
_boundOnInput:{type:Function,value:function(){return this._onInput.bind(this)}},
_boundValueChanged:{type:Function,value:function(){return this._onValueChanged.bind(this)}}},
listeners:{"addon-attached":"_onAddonAttached","iron-input-validate":"_onIronInputValidate"},get _valueChangedEvent(){return this.attrForValue+"-changed"},get _propertyForValue(){return sN(this.attrForValue)},get _inputElement(){return hP(this).querySelector(this._inputSelector)},get _inputElementValue(){return this._inputElement[this._propertyForValue]||this._inputElement.value},ready:function(){this.__isFirstValueUpdate=!0;this._addons||(this._addons=[]);this.addEventListener("focus",this._boundOnFocus,
!0);this.addEventListener("blur",this._boundOnBlur,!0)},
attached:function(){this.attrForValue?this._inputElement.addEventListener(this._valueChangedEvent,this._boundValueChanged):this.addEventListener("input",this._onInput);this._inputElementValue&&""!=this._inputElementValue?this._handleValueAndAutoValidate(this._inputElement):this._handleValue(this._inputElement)},
_onAddonAttached:function(a){this._addons||(this._addons=[]);a=a.target;-1===this._addons.indexOf(a)&&(this._addons.push(a),this.isAttached&&this._handleValue(this._inputElement))},
_onFocus:function(){this._setFocused(!0)},
_onBlur:function(){this._setFocused(!1);this._handleValueAndAutoValidate(this._inputElement)},
_onInput:function(a){this._handleValueAndAutoValidate(a.target)},
_onValueChanged:function(a){var b=a.target;if(this.__isFirstValueUpdate&&(this.__isFirstValueUpdate=!1,void 0===b.value||""===b.value))return;this._handleValueAndAutoValidate(a.target)},
_handleValue:function(a){var b=this._inputElementValue;b||0===b||"number"===a.type&&!a.checkValidity()?this._inputHasContent=!0:this._inputHasContent=!1;this.updateAddons({inputElement:a,value:b,invalid:this.invalid})},
_handleValueAndAutoValidate:function(a){this.autoValidate&&a&&(this.invalid=!(a.validate?a.validate(this._inputElementValue):a.checkValidity()));this._handleValue(a)},
_onIronInputValidate:function(){this.invalid=this._inputElement.invalid},
_invalidChanged:function(){this._addons&&this.updateAddons({invalid:this.invalid})},
updateAddons:function(a){for(var b,c=0;b=this._addons[c];c++)b.update(a)},
_computeInputContentClass:function(a,b,c,d,e){var g="input-content";a?(e&&(g+=" label-is-hidden"),d&&!this.noUnfloatedLabelError&&(g+=" is-invalid")):(a=this.querySelector("label"),b||e?(g+=" label-is-floating",this.$.labelAndInputContainer.style.position="static",d?g+=" is-invalid":c&&(g+=" label-is-highlighted")):(a&&(this.$.labelAndInputContainer.style.position="relative"),d&&!this.noUnfloatedLabelError&&(g+=" is-invalid")));c&&(g+=" focused");return g},
_computeUnderlineClass:function(a,b){var c="underline";b?c+=" is-invalid":a&&(c+=" is-highlighted");return c},
_computeAddOnContentClass:function(a,b){var c="add-on-content";b?c+=" is-invalid":a&&(c+=" is-highlighted");return c}});var Oxa=["<!--css-build:shady-->\n\n <!--\n If the paper-input-error element is directly referenced by an\n `aria-describedby` attribute, such as when used as a paper-input add-on,\n then applying `visibility: hidden;` to the paper-input-error element itself\n does not hide the error.\n\n For more information, see:\n https://www.w3.org/TR/accname-1.1/#mapping_additional_nd_description\n -->\n <div id=\"a11yWrapper\" class=\"style-scope paper-input-error\">\n <slot class=\"style-scope paper-input-error\"></slot>\n </div>\n"];
Oxa.raw=["\n <style>\n :host {\n display: inline-block;\n visibility: hidden;\n\n color: var(--paper-input-container-invalid-color, var(--error-color));\n\n @apply --paper-font-caption;\n @apply --paper-input-error;\n position: absolute;\n left:0;\n right:0;\n }\n\n :host([invalid]) {\n visibility: visible;\n }\n\n #a11yWrapper {\n visibility: hidden;\n }\n\n :host([invalid]) #a11yWrapper {\n visibility: visible;\n }\n </style>\n\n <!--\n If the paper-input-error element is directly referenced by an\n \\`aria-describedby\\` attribute, such as when used as a paper-input add-on,\n then applying \\`visibility: hidden;\\` to the paper-input-error element itself\n does not hide the error.\n\n For more information, see:\n https://www.w3.org/TR/accname-1.1/#mapping_additional_nd_description\n -->\n <div id=\"a11yWrapper\">\n <slot></slot>\n </div>\n"];
EP({_template:fN(Oxa),is:"paper-input-error",behaviors:[Mxa],properties:{invalid:{readOnly:!0,reflectToAttribute:!0,type:Boolean}},update:function(a){this._setInvalid(a.invalid)}});var UQ=["<!--css-build:shady-->\n\n <paper-input-container id=\"container\" no-label-float=\"[[noLabelFloat]]\" always-float-label=\"[[_computeAlwaysFloatLabel(alwaysFloatLabel,placeholder)]]\" auto-validate$=\"[[autoValidate]]\" disabled$=\"[[disabled]]\" invalid=\"[[invalid]]\" no-unfloated-label-error=\"[[noUnfloatedLabelError]]\" class=\"style-scope paper-input\">\n\n <slot name=\"prefix\" slot=\"prefix\" class=\"style-scope paper-input\"></slot>\n\n <label hidden$=\"[[!label]]\" aria-hidden=\"true\" for$=\"[[_inputId]]\" slot=\"label\" class=\"style-scope paper-input\">[[label]]</label>\n\n <!-- Need to bind maxlength so that the paper-input-char-counter works correctly -->\n <iron-input bind-value=\"{{value}}\" slot=\"input\" class=\"input-element style-scope paper-input\" id$=\"[[_inputId]]\" maxlength$=\"[[maxlength]]\" allowed-pattern=\"[[allowedPattern]]\" invalid=\"{{invalid}}\" validator=\"[[validator]]\">\n <input aria-labelledby$=\"[[_ariaLabelledBy]]\" aria-describedby$=\"[[_ariaDescribedBy]]\" disabled$=\"[[disabled]]\" title$=\"[[title]]\" type$=\"[[type]]\" pattern$=\"[[pattern]]\" required$=\"[[required]]\" autocomplete$=\"[[autocomplete]]\" autofocus$=\"[[autofocus]]\" inputmode$=\"[[inputmode]]\" minlength$=\"[[minlength]]\" maxlength$=\"[[maxlength]]\" min$=\"[[min]]\" max$=\"[[max]]\" step$=\"[[step]]\" name$=\"[[name]]\" placeholder$=\"[[placeholder]]\" readonly$=\"[[readonly]]\" list$=\"[[list]]\" size$=\"[[size]]\" autocapitalize$=\"[[autocapitalize]]\" autocorrect$=\"[[autocorrect]]\" on-change=\"_onChange\" tabindex$=\"[[tabIndex]]\" autosave$=\"[[autosave]]\" results$=\"[[results]]\" accept$=\"[[accept]]\" multiple$=\"[[multiple]]\" class=\"style-scope paper-input\">\n </iron-input>\n\n <slot name=\"suffix\" slot=\"suffix\" class=\"style-scope paper-input\"></slot>\n\n <template is=\"dom-if\" if=\"[[errorMessage]]\" class=\"style-scope paper-input\">\n <paper-input-error aria-live=\"assertive\" slot=\"add-on\" class=\"style-scope paper-input\">[[errorMessage]]</paper-input-error>\n </template>\n\n <template is=\"dom-if\" if=\"[[charCounter]]\" class=\"style-scope paper-input\">\n <paper-input-char-counter slot=\"add-on\" class=\"style-scope paper-input\"></paper-input-char-counter>\n </template>\n\n </paper-input-container>\n "];
UQ.raw=UQ.slice();EP({is:"paper-input",_template:fN(UQ),behaviors:[Lxa,$P],properties:{value:{type:String},noUnfloatedLabelError:{type:Boolean,value:!1}},get _focusableElement(){return this.inputElement._inputElement},listeners:{"iron-input-ready":"_onIronInputReady"},_onIronInputReady:function(){this.$.nativeInput||(this.$.nativeInput=this.$$("input"));this.inputElement&&-1!==this._typesThatHaveText.indexOf(this.$.nativeInput.type)&&(this.alwaysFloatLabel=!0);this.inputElement.bindValue&&this.$.container._handleValueAndAutoValidate(this.inputElement)}});EP({is:"paper-menu-grow-height-animation",_template:null,behaviors:[xQ],configure:function(a){var b=a.node,c=b.getBoundingClientRect().height;return this._effect=new KeyframeEffect(b,[{height:c/2+"px"},{height:c+"px"}],this.timingFromConfig(a))}});
EP({is:"paper-menu-grow-width-animation",_template:null,behaviors:[xQ],configure:function(a){var b=a.node,c=b.getBoundingClientRect().width;return this._effect=new KeyframeEffect(b,[{width:c/2+"px"},{width:c+"px"}],this.timingFromConfig(a))}});
EP({is:"paper-menu-shrink-width-animation",_template:null,behaviors:[xQ],configure:function(a){var b=a.node,c=b.getBoundingClientRect().width;return this._effect=new KeyframeEffect(b,[{width:c+"px"},{width:c-c/20+"px"}],this.timingFromConfig(a))}});
EP({is:"paper-menu-shrink-height-animation",_template:null,behaviors:[xQ],configure:function(a){var b=a.node,c=b.getBoundingClientRect().height;this.setPrefixedProperty(b,"transformOrigin","0 0");return this._effect=new KeyframeEffect(b,[{height:c+"px",transform:"translateY(0)"},{height:c/2+"px",transform:"translateY(-20px)"}],this.timingFromConfig(a))}});var VQ=["<!--css-build:shady-->\n\n <div id=\"trigger\" on-tap=\"toggle\" class=\"style-scope paper-menu-button\">\n <slot name=\"dropdown-trigger\" class=\"style-scope paper-menu-button\"></slot>\n </div>\n\n <iron-dropdown id=\"dropdown\" opened=\"{{opened}}\" horizontal-align=\"[[horizontalAlign]]\" vertical-align=\"[[verticalAlign]]\" dynamic-align=\"[[dynamicAlign]]\" horizontal-offset=\"[[horizontalOffset]]\" vertical-offset=\"[[verticalOffset]]\" no-overlap=\"[[noOverlap]]\" open-animation-config=\"[[openAnimationConfig]]\" close-animation-config=\"[[closeAnimationConfig]]\" no-animations=\"[[noAnimations]]\" focus-target=\"[[_dropdownContent]]\" allow-outside-scroll=\"[[allowOutsideScroll]]\" restore-focus-on-close=\"[[restoreFocusOnClose]]\" on-iron-overlay-canceled=\"__onIronOverlayCanceled\" class=\"style-scope paper-menu-button\">\n <div slot=\"dropdown-content\" class=\"dropdown-content style-scope paper-menu-button\">\n <slot id=\"content\" name=\"dropdown-content\" class=\"style-scope paper-menu-button\"></slot>\n </div>\n </iron-dropdown>\n"];
VQ.raw=VQ.slice();var WQ={ANIMATION_CUBIC_BEZIER:"cubic-bezier(.3,.95,.5,1)",MAX_ANIMATION_TIME_MS:400},XQ=function(){};
f=XQ.prototype;f.registered=function(){this._prepKeyBindings()};
f.addOwnKeyBinding=function(a,b){this._imperativeKeyBindings[a]=b;this._prepKeyBindings();this._resetKeyEventListeners()};
f.removeOwnKeyBindings=function(){this._imperativeKeyBindings={};this._prepKeyBindings();this._resetKeyEventListeners()};
f.keyboardEventMatchesKeys=function(a,b){b=QP(b);for(var c=0;c<b.length;++c)if(PP(b[c],a))return!0;return!1};
f._collectKeyBindings=function(){var a=this.behaviors.map(function(b){return b.keyBindings});
-1===a.indexOf(this.keyBindings)&&a.push(this.keyBindings);return a};
f._prepKeyBindings=function(){this._keyBindings={};this._collectKeyBindings().forEach(function(c){for(var d in c)this._addKeyBinding(d,c[d])},this);
for(var a in this._imperativeKeyBindings)this._addKeyBinding(a,this._imperativeKeyBindings[a]);for(var b in this._keyBindings)this._keyBindings[b].sort(function(c,d){c=c[0].hasModifiers;return c===d[0].hasModifiers?0:c?-1:1})};
f._addKeyBinding=function(a,b){QP(a).forEach(function(c){this._keyBindings[c.event]=this._keyBindings[c.event]||[];this._keyBindings[c.event].push([c,b])},this)};
f._resetKeyEventListeners=function(){this._unlistenKeyEventListeners();this.isAttached&&this._listenKeyEventListeners()};
f._listenKeyEventListeners=function(){this.keyEventTarget&&Object.keys(this._keyBindings).forEach(function(a){var b=this._onKeyBindingEvent.bind(this,this._keyBindings[a]);this._boundKeyHandlers.push([this.keyEventTarget,a,b]);this.keyEventTarget.addEventListener(a,b)},this)};
f._unlistenKeyEventListeners=function(){for(var a,b,c;this._boundKeyHandlers.length;)a=this._boundKeyHandlers.pop(),b=a[0],c=a[1],a=a[2],b.removeEventListener(c,a)};
f._onKeyBindingEvent=function(a,b){this.stopKeyboardEventPropagation&&b.stopPropagation();if(!b.defaultPrevented)for(var c=0;c<a.length;c++){var d=a[c][0],e=a[c][1];if(PP(d,b)&&(this._triggerKeyHandler(d,e,b),b.defaultPrevented))break}};
f._triggerKeyHandler=function(a,b,c){var d=Object.create(a);d.keyboardEvent=c;a=new CustomEvent(a.event,{detail:d,cancelable:!0});this[b].call(this,a);a.defaultPrevented&&c.preventDefault()};
f._focusBlurHandler=function(a){this._setFocused("focus"===a.type)};
f._changedControlState=function(){this._controlStateChanged&&this._controlStateChanged()};
f._setFocused=function(){};
XQ=EP({_template:fN(VQ),is:"paper-menu-button",behaviors:[RP,SP],properties:{opened:{type:Boolean,value:!1,notify:!0,observer:"_openedChanged"},horizontalAlign:{type:String,value:"left",reflectToAttribute:!0},verticalAlign:{type:String,value:"top",reflectToAttribute:!0},dynamicAlign:{type:Boolean},horizontalOffset:{type:Number,value:0,notify:!0},verticalOffset:{type:Number,value:0,notify:!0},noOverlap:{type:Boolean},noAnimations:{type:Boolean,value:!1},ignoreSelect:{type:Boolean,value:!1},closeOnActivate:{type:Boolean,
value:!1},openAnimationConfig:{type:Object,value:function(){return[{name:"fade-in-animation",timing:{delay:100,duration:200}},{name:"paper-menu-grow-width-animation",timing:{delay:100,duration:150,easing:WQ.ANIMATION_CUBIC_BEZIER}},{name:"paper-menu-grow-height-animation",timing:{delay:100,duration:275,easing:WQ.ANIMATION_CUBIC_BEZIER}}]}},
closeAnimationConfig:{type:Object,value:function(){return[{name:"fade-out-animation",timing:{duration:150}},{name:"paper-menu-shrink-width-animation",timing:{delay:100,duration:50,easing:WQ.ANIMATION_CUBIC_BEZIER}},{name:"paper-menu-shrink-height-animation",timing:{duration:200,easing:"ease-in"}}]}},
allowOutsideScroll:{type:Boolean,value:!1},restoreFocusOnClose:{type:Boolean,value:!0},_dropdownContent:{type:Object}},hostAttributes:{role:"group","aria-haspopup":"true"},listeners:{"iron-activate":"_onIronActivate","iron-select":"_onIronSelect"},get contentElement(){for(var a=hP(this.$.content).getDistributedNodes(),b=0,c=a.length;b<c;b++)if(a[b].nodeType===Node.ELEMENT_NODE)return a[b]},toggle:function(){this.opened?this.close():this.open()},
open:function(){this.disabled||this.$.dropdown.open()},
close:function(){this.$.dropdown.close()},
_onIronSelect:function(){this.ignoreSelect||this.close()},
_onIronActivate:function(){this.closeOnActivate&&this.close()},
_openedChanged:function(a,b){a?(this._dropdownContent=this.contentElement,this.fire("paper-dropdown-open")):null!=b&&this.fire("paper-dropdown-close")},
_disabledChanged:function(a){SP._disabledChanged.apply(this,arguments);a&&this.opened&&this.close()},
__onIronOverlayCanceled:function(a){var b=this.$.trigger;-1<hP(a.detail).path.indexOf(b)&&a.preventDefault()}});
Object.keys(WQ).forEach(function(a){XQ[a]=WQ[a]});var YQ=["<!--css-build:shady-->\n\n <!-- this div fulfills an a11y requirement for combobox, do not remove -->\n <span role=\"button\" class=\"style-scope paper-dropdown-menu\"></span>\n <paper-menu-button id=\"menuButton\" vertical-align=\"[[verticalAlign]]\" horizontal-align=\"[[horizontalAlign]]\" dynamic-align=\"[[dynamicAlign]]\" vertical-offset=\"[[_computeMenuVerticalOffset(noLabelFloat, verticalOffset)]]\" disabled=\"[[disabled]]\" no-animations=\"[[noAnimations]]\" on-iron-select=\"_onIronSelect\" on-iron-deselect=\"_onIronDeselect\" opened=\"{{opened}}\" close-on-activate=\"\" allow-outside-scroll=\"[[allowOutsideScroll]]\" restore-focus-on-close=\"[[restoreFocusOnClose]]\" class=\"style-scope paper-dropdown-menu\">\n <!-- support hybrid mode: user might be using paper-menu-button 1.x which distributes via <content> -->\n <div class=\"dropdown-trigger style-scope paper-dropdown-menu\" slot=\"dropdown-trigger\">\n <paper-ripple class=\"style-scope paper-dropdown-menu\"></paper-ripple>\n <!-- paper-input has type=\"text\" for a11y, do not remove -->\n <paper-input type=\"text\" invalid=\"[[invalid]]\" readonly=\"\" disabled=\"[[disabled]]\" value=\"[[value]]\" placeholder=\"[[placeholder]]\" error-message=\"[[errorMessage]]\" always-float-label=\"[[alwaysFloatLabel]]\" no-label-float=\"[[noLabelFloat]]\" label=\"[[label]]\" class=\"style-scope paper-dropdown-menu\">\n <!-- support hybrid mode: user might be using paper-input 1.x which distributes via <content> -->\n <iron-icon icon=\"paper-dropdown-menu:arrow-drop-down\" suffix=\"\" slot=\"suffix\" class=\"style-scope paper-dropdown-menu\"></iron-icon>\n </paper-input>\n </div>\n <slot id=\"content\" name=\"dropdown-content\" slot=\"dropdown-content\" class=\"style-scope paper-dropdown-menu\"></slot>\n </paper-menu-button>\n"];
YQ.raw=YQ.slice();
EP({_template:fN(YQ),is:"paper-dropdown-menu",behaviors:[ZP,SP,$P,WP],properties:{selectedItemLabel:{type:String,notify:!0,readOnly:!0},selectedItem:{type:Object,notify:!0,readOnly:!0},value:{type:String,notify:!0},label:{type:String},placeholder:{type:String},errorMessage:{type:String},opened:{type:Boolean,notify:!0,value:!1,observer:"_openedChanged"},allowOutsideScroll:{type:Boolean,value:!1},noLabelFloat:{type:Boolean,value:!1,reflectToAttribute:!0},alwaysFloatLabel:{type:Boolean,value:!1},noAnimations:{type:Boolean,
value:!1},horizontalAlign:{type:String,value:"right"},verticalAlign:{type:String,value:"top"},verticalOffset:Number,dynamicAlign:{type:Boolean},restoreFocusOnClose:{type:Boolean,value:!0}},listeners:{tap:"_onTap"},keyBindings:{"up down":"open",esc:"close"},hostAttributes:{role:"combobox","aria-autocomplete":"none","aria-haspopup":"true"},observers:["_selectedItemChanged(selectedItem)"],attached:function(){var a=this.contentElement;a&&a.selectedItem&&this._setSelectedItem(a.selectedItem)},
get contentElement(){for(var a=hP(this.$.content).getDistributedNodes(),b=0,c=a.length;b<c;b++)if(a[b].nodeType===Node.ELEMENT_NODE)return a[b]},open:function(){this.$.menuButton.open()},
close:function(){this.$.menuButton.close()},
_onIronSelect:function(a){this._setSelectedItem(a.detail.item)},
_onIronDeselect:function(){this._setSelectedItem(null)},
_onTap:function(a){_findOriginalTarget$$module$third_party$javascript$polymer$v2$polymer$lib$utils$gestures(a)===this&&this.open()},
_selectedItemChanged:function(a){this.value=a=a?a.label||a.getAttribute("label")||a.textContent.trim():"";this._setSelectedItemLabel(a)},
_computeMenuVerticalOffset:function(a,b){return b?b:a?-4:8},
_getValidity:function(){return this.disabled||!this.required||this.required&&!!this.value},
_openedChanged:function(){var a=this.opened?"true":"false",b=this.contentElement;b&&b.setAttribute("aria-expanded",a)}});var Pxa=["<!--css-build:shady-->\n\n <iron-icon id=\"icon\" src=\"[[src]]\" icon=\"[[icon]]\" alt$=\"[[alt]]\" class=\"style-scope paper-icon-button\"></iron-icon>\n "];
Pxa.raw=["\n <style>\n :host {\n display: inline-block;\n position: relative;\n padding: 8px;\n outline: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n cursor: pointer;\n z-index: 0;\n line-height: 1;\n\n width: 40px;\n height: 40px;\n\n /* NOTE: Both values are needed, since some phones require the value to be \\`transparent\\`. */\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n -webkit-tap-highlight-color: transparent;\n\n /* Because of polymer/2558, this style has lower specificity than * */\n box-sizing: border-box !important;\n\n @apply --paper-icon-button;\n }\n\n :host #ink {\n color: var(--paper-icon-button-ink-color, var(--primary-text-color));\n opacity: 0.6;\n }\n\n :host([disabled]) {\n color: var(--paper-icon-button-disabled-text, var(--disabled-text-color));\n pointer-events: none;\n cursor: auto;\n\n @apply --paper-icon-button-disabled;\n }\n\n :host([hidden]) {\n display: none !important;\n }\n\n :host(:hover) {\n @apply --paper-icon-button-hover;\n }\n\n iron-icon {\n --iron-icon-width: 100%;\n --iron-icon-height: 100%;\n }\n </style>\n\n <iron-icon id=\"icon\" src=\"[[src]]\" icon=\"[[icon]]\" alt$=\"[[alt]]\"></iron-icon>\n "];
EP({is:"paper-icon-button",_template:fN(Pxa),hostAttributes:{role:"button",tabindex:"0"},behaviors:[DQ],properties:{src:{type:String},icon:{type:String},alt:{type:String,observer:"_altChanged"}},_altChanged:function(a,b){var c=this.getAttribute("aria-label");c&&b!=c||this.setAttribute("aria-label",a)},
registered:function(){this._template.setAttribute("strip-whitespace","")}});var ZQ=["<!--css-build:shady-->\n\n <paper-input-container no-label-float$=\"[[noLabelFloat]]\" always-float-label=\"[[_computeAlwaysFloatLabel(alwaysFloatLabel,placeholder)]]\" auto-validate$=\"[[autoValidate]]\" disabled$=\"[[disabled]]\" invalid=\"[[invalid]]\" no-unfloated-label-error=\"[[noUnfloatedLabelError]]\" class=\"style-scope paper-textarea\">\n\n <label hidden$=\"[[!label]]\" aria-hidden=\"true\" for$=\"[[_inputId]]\" slot=\"label\" class=\"style-scope paper-textarea\">[[label]]</label>\n\n <iron-autogrow-textarea class=\"paper-input-input style-scope paper-textarea\" slot=\"input\" id$=\"[[_inputId]]\" aria-labelledby$=\"[[_ariaLabelledBy]]\" aria-describedby$=\"[[_ariaDescribedBy]]\" bind-value=\"{{value}}\" invalid=\"{{invalid}}\" validator$=\"[[validator]]\" disabled$=\"[[disabled]]\" autocomplete$=\"[[autocomplete]]\" autofocus$=\"[[autofocus]]\" inputmode$=\"[[inputmode]]\" name$=\"[[name]]\" placeholder$=\"[[placeholder]]\" readonly$=\"[[readonly]]\" required$=\"[[required]]\" minlength$=\"[[minlength]]\" maxlength$=\"[[maxlength]]\" autocapitalize$=\"[[autocapitalize]]\" rows$=\"[[rows]]\" max-rows$=\"[[maxRows]]\" on-change=\"_onChange\"></iron-autogrow-textarea>\n\n <template is=\"dom-if\" if=\"[[errorMessage]]\" class=\"style-scope paper-textarea\">\n <paper-input-error aria-live=\"assertive\" slot=\"add-on\" class=\"style-scope paper-textarea\">[[errorMessage]]</paper-input-error>\n </template>\n\n <template is=\"dom-if\" if=\"[[charCounter]]\" class=\"style-scope paper-textarea\">\n <paper-input-char-counter slot=\"add-on\" class=\"style-scope paper-textarea\"></paper-input-char-counter>\n </template>\n\n </paper-input-container>\n"];
ZQ.raw=ZQ.slice();
EP({_template:fN(ZQ),is:"paper-textarea",behaviors:[Lxa,$P],properties:{_ariaLabelledBy:{observer:"_ariaLabelledByChanged",type:String},_ariaDescribedBy:{observer:"_ariaDescribedByChanged",type:String},value:{type:String},rows:{type:Number,value:1},maxRows:{type:Number,value:0},noUnfloatedLabelError:{type:Boolean,value:!1}},get selectionStart(){return this.$.input.textarea.selectionStart},set selectionStart(a){this.$.input.textarea.selectionStart=a},get selectionEnd(){return this.$.input.textarea.selectionEnd},set selectionEnd(a){this.$.input.textarea.selectionEnd=
a},_ariaLabelledByChanged:function(a){this._focusableElement.setAttribute("aria-labelledby",a)},
_ariaDescribedByChanged:function(a){this._focusableElement.setAttribute("aria-describedby",a)},
get _focusableElement(){return this.inputElement.textarea}});var Qxa={hostAttributes:{role:"option",tabindex:"0"}},$Q=[ZP,SP,Qxa];var aR=document.createElement("template");aR.setAttribute("style","display: none;");aR.innerHTML="<dom-module id=\"paper-item-shared-styles\">\n <template>\n <style scope=\"paper-item-shared-styles\">:host, .paper-item {\n display: block;\n position: relative;\n min-height: var(--paper-item-min-height, 48px);\n padding: 0px 16px;\n}\n\n.paper-item {\n font-family: var(--paper-font-subhead_-_font-family); -webkit-font-smoothing: var(--paper-font-subhead_-_-webkit-font-smoothing); font-size: var(--paper-font-subhead_-_font-size); font-weight: var(--paper-font-subhead_-_font-weight); line-height: var(--paper-font-subhead_-_line-height);\n border:none;\n outline: none;\n background: white;\n width: 100%;\n text-align: left;\n}\n\n:host([hidden]), .paper-item[hidden] {\n display: none !important;\n}\n\n:host(.iron-selected), .paper-item.iron-selected {\n font-weight: var(--paper-item-selected-weight, bold);\n\n background-color: var(--paper-item-selected_-_background-color); font-weight: var(--paper-item-selected_-_font-weight, var(--paper-item-selected-weight, bold));\n}\n\n:host([disabled]), .paper-item[disabled] {\n color: var(--paper-item-disabled-color, var(--disabled-text-color));\n\n ;\n}\n\n:host(:focus), .paper-item:focus {\n position: relative;\n outline: 0;\n\n background-color: var(--paper-item-focused_-_background-color);\n}\n\n:host(:focus):before, .paper-item:focus:before {\n position: var(--layout-fit_-_position); top: var(--layout-fit_-_top); right: var(--layout-fit_-_right); bottom: var(--layout-fit_-_bottom); left: var(--layout-fit_-_left);\n\n background: currentColor;\n content: '';\n opacity: var(--dark-divider-opacity);\n pointer-events: none;\n\n background: var(--paper-item-focused-before_-_background, currentColor);\n}\n\n</style>\n </template>\n</dom-module>";
document.head.appendChild(aR.content);var bR=["<!--css-build:shady-->\n \n\n <div id=\"contentIcon\" class=\"content-icon style-scope paper-icon-item\">\n <slot name=\"item-icon\" class=\"style-scope paper-icon-item\"></slot>\n </div>\n <slot class=\"style-scope paper-icon-item\"></slot>\n"];
bR.raw=bR.slice();EP({_template:fN(bR),is:"paper-icon-item",behaviors:[$Q]});Polymer.PaperItemBehavior=$Q;Polymer.PaperItemBehaviorImpl=Qxa;var cR=["<!--css-build:shady-->\n\n <slot class=\"style-scope paper-item-body\"></slot>\n"];
cR.raw=cR.slice();EP({_template:fN(cR),is:"paper-item-body"});var dR=["<!--css-build:shady-->\n <slot class=\"style-scope paper-item\"></slot>\n"];dR.raw=dR.slice();EP({_template:fN(dR),is:"paper-item",behaviors:[$Q]});var eR=["<!--css-build:shady-->\n\n <slot class=\"style-scope paper-listbox\"></slot>\n"];eR.raw=eR.slice();EP({_template:fN(eR),is:"paper-listbox",behaviors:[xxa],hostAttributes:{role:"listbox"}});var fR=document.createElement("template");fR.setAttribute("style","display: none;");fR.innerHTML="<dom-module id=\"paper-material-shared-styles\">\n <template>\n <style scope=\"paper-material-shared-styles\">:host {\n display: block;\n position: relative;\n}\n\n:host([elevation=\"1\"]) {\n box-shadow: var(--shadow-elevation-2dp_-_box-shadow);\n}\n\n:host([elevation=\"2\"]) {\n box-shadow: var(--shadow-elevation-4dp_-_box-shadow);\n}\n\n:host([elevation=\"3\"]) {\n box-shadow: var(--shadow-elevation-6dp_-_box-shadow);\n}\n\n:host([elevation=\"4\"]) {\n box-shadow: var(--shadow-elevation-8dp_-_box-shadow);\n}\n\n:host([elevation=\"5\"]) {\n box-shadow: var(--shadow-elevation-16dp_-_box-shadow);\n}\n\n</style>\n </template>\n</dom-module>";
document.head.appendChild(fR.content);var gR=["<!--css-build:shady-->\n \n\n <slot class=\"style-scope paper-material\"></slot>\n"];gR.raw=gR.slice();EP({_template:fN(gR),is:"paper-material",properties:{elevation:{type:Number,reflectToAttribute:!0,value:1},animated:{type:Boolean,reflectToAttribute:!0,value:!1}}});Polymer.PaperMenuButton=XQ;var hR=["<!--css-build:shady-->\n\n <div id=\"progressContainer\" class=\"style-scope paper-progress\">\n <div id=\"secondaryProgress\" hidden$=\"[[_hideSecondaryProgress(secondaryRatio)]]\" class=\"style-scope paper-progress\"></div>\n <div id=\"primaryProgress\" class=\"style-scope paper-progress\"></div>\n </div>\n"];
hR.raw=hR.slice();
EP({_template:fN(hR),is:"paper-progress",behaviors:[zxa],properties:{secondaryProgress:{type:Number,value:0},secondaryRatio:{type:Number,value:0,readOnly:!0},indeterminate:{type:Boolean,value:!1,observer:"_toggleIndeterminate"},disabled:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_disabledChanged"}},observers:["_progressChanged(secondaryProgress, value, min, max, indeterminate)"],hostAttributes:{role:"progressbar"},_toggleIndeterminate:function(a){this.toggleClass("indeterminate",a,this.$.primaryProgress)},
_transformProgress:function(a,b){a.style.transform=a.style.webkitTransform="scaleX("+b/100+")"},
_mainRatioChanged:function(a){this._transformProgress(this.$.primaryProgress,a)},
_progressChanged:function(a,b,c,d,e){a=this._clampValue(a);b=this._clampValue(b);var g=100*this._calcRatio(a),h=100*this._calcRatio(b);this._setSecondaryRatio(g);this._transformProgress(this.$.secondaryProgress,g);this._transformProgress(this.$.primaryProgress,h);this.secondaryProgress=a;e?this.removeAttribute("aria-valuenow"):this.setAttribute("aria-valuenow",b);this.setAttribute("aria-valuemin",c);this.setAttribute("aria-valuemax",d)},
_disabledChanged:function(a){this.setAttribute("aria-disabled",a?"true":"false")},
_hideSecondaryProgress:function(a){return 0===a}});var Rxa=["<!--css-build:shady-->\n\n <div id=\"radioContainer\" class=\"style-scope paper-radio-button\">\n <div id=\"offRadio\" class=\"style-scope paper-radio-button\"></div>\n <div id=\"onRadio\" class=\"style-scope paper-radio-button\"></div>\n </div>\n\n <div id=\"radioLabel\" class=\"style-scope paper-radio-button\"><slot class=\"style-scope paper-radio-button\"></slot></div>\n "];
Rxa.raw=["\n <style>\n :host {\n display: inline-block;\n line-height: 0;\n white-space: nowrap;\n cursor: pointer;\n @apply --paper-font-common-base;\n --calculated-paper-radio-button-size: var(--paper-radio-button-size, 16px);\n /* -1px is a sentinel for the default and is replace in \\`attached\\`. */\n --calculated-paper-radio-button-ink-size: var(--paper-radio-button-ink-size, -1px);\n }\n\n :host(:focus) {\n outline: none;\n }\n\n #radioContainer {\n @apply --layout-inline;\n @apply --layout-center-center;\n position: relative;\n width: var(--calculated-paper-radio-button-size);\n height: var(--calculated-paper-radio-button-size);\n vertical-align: middle;\n\n @apply --paper-radio-button-radio-container;\n }\n\n #ink {\n position: absolute;\n top: 50%;\n left: 50%;\n right: auto;\n width: var(--calculated-paper-radio-button-ink-size);\n height: var(--calculated-paper-radio-button-ink-size);\n color: var(--paper-radio-button-unchecked-ink-color, var(--primary-text-color));\n opacity: 0.6;\n pointer-events: none;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n }\n\n #ink[checked] {\n color: var(--paper-radio-button-checked-ink-color, var(--primary-color));\n }\n\n #offRadio, #onRadio {\n position: absolute;\n box-sizing: border-box;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n border-radius: 50%;\n }\n\n #offRadio {\n border: 2px solid var(--paper-radio-button-unchecked-color, var(--primary-text-color));\n background-color: var(--paper-radio-button-unchecked-background-color, transparent);\n transition: border-color 0.28s;\n }\n\n #onRadio {\n background-color: var(--paper-radio-button-checked-color, var(--primary-color));\n -webkit-transform: scale(0);\n transform: scale(0);\n transition: -webkit-transform ease 0.28s;\n transition: transform ease 0.28s;\n will-change: transform;\n }\n\n :host([checked]) #offRadio {\n border-color: var(--paper-radio-button-checked-color, var(--primary-color));\n }\n\n :host([checked]) #onRadio {\n -webkit-transform: scale(0.5);\n transform: scale(0.5);\n }\n\n #radioLabel {\n line-height: normal;\n position: relative;\n display: inline-block;\n vertical-align: middle;\n margin-left: var(--paper-radio-button-label-spacing, 10px);\n white-space: normal;\n color: var(--paper-radio-button-label-color, var(--primary-text-color));\n\n @apply --paper-radio-button-label;\n }\n\n :host([checked]) #radioLabel {\n @apply --paper-radio-button-label-checked;\n }\n\n #radioLabel:dir(rtl) {\n margin-left: 0;\n margin-right: var(--paper-radio-button-label-spacing, 10px);\n }\n\n #radioLabel[hidden] {\n display: none;\n }\n\n /* disabled state */\n\n :host([disabled]) #offRadio {\n border-color: var(--paper-radio-button-unchecked-color, var(--primary-text-color));\n opacity: 0.5;\n }\n\n :host([disabled][checked]) #onRadio {\n background-color: var(--paper-radio-button-unchecked-color, var(--primary-text-color));\n opacity: 0.5;\n }\n\n :host([disabled]) #radioLabel {\n /* slightly darker than the button, so that it's readable */\n opacity: 0.65;\n }\n </style>\n\n <div id=\"radioContainer\">\n <div id=\"offRadio\"></div>\n <div id=\"onRadio\"></div>\n </div>\n\n <div id=\"radioLabel\"><slot></slot></div>\n "];
EP({is:"paper-radio-button",_template:fN(Rxa),behaviors:[EQ],hostAttributes:{role:"radio","aria-checked":!1,tabindex:0},properties:{ariaActiveAttribute:{type:String,value:"aria-checked"}},ready:function(){this._rippleContainer=this.$.radioContainer},
attached:function(){pP(this,function(){if("-1px"===this.getComputedStyleValue("--calculated-paper-radio-button-ink-size").trim()){var a=parseFloat(this.getComputedStyleValue("--calculated-paper-radio-button-size").trim()),b=Math.floor(3*a);b%2!==a%2&&b++;this.updateStyles({"--paper-radio-button-ink-size":b+"px"})}})},
registered:function(){this._template.setAttribute("strip-whitespace","")}});var iR=["<!--css-build:shady-->\n\n <slot class=\"style-scope paper-radio-group\"></slot>\n"];iR.raw=iR.slice();
EP({_template:fN(iR),is:"paper-radio-group",behaviors:[yxa],hostAttributes:{role:"radiogroup"},properties:{attrForSelected:{type:String,value:"name"},selectedAttribute:{type:String,value:"checked"},selectable:{type:String,value:"paper-radio-button"},allowEmptySelection:{type:Boolean,value:!1}},select:function(a){var b=this._valueToItem(a);if(!b||!b.hasAttribute("disabled")){if(this.selected){b=this._valueToItem(this.selected);if(this.selected==a)if(this.allowEmptySelection)a="";else{b&&(b.checked=
!0);return}b&&(b.checked=!1)}tQ.select.apply(this,[a]);this.fire("paper-radio-group-changed")}},
_activateFocusedItem:function(){this._itemActivate(this._valueForItem(this.focusedItem),this.focusedItem)},
_onUpKey:function(a){this._focusPrevious();a.preventDefault();this._activateFocusedItem()},
_onDownKey:function(a){this._focusNext();a.preventDefault();this._activateFocusedItem()},
_onLeftKey:function(a){vQ._onLeftKey.apply(this,arguments);this._activateFocusedItem()},
_onRightKey:function(a){vQ._onRightKey.apply(this,arguments);this._activateFocusedItem()}});var jR=["<!--css-build:shady-->\n\n <div id=\"sliderContainer\" class$=\"[[_getClassNames(disabled, pin, snaps, immediateValue, min, expand, dragging, transiting, editable)]]\" class=\"style-scope paper-slider\">\n <div class=\"bar-container style-scope paper-slider\">\n <paper-progress disabled$=\"[[disabled]]\" id=\"sliderBar\" aria-hidden=\"true\" min=\"[[min]]\" max=\"[[max]]\" step=\"[[step]]\" value=\"[[immediateValue]]\" secondary-progress=\"[[secondaryProgress]]\" on-down=\"_bardown\" on-up=\"_resetKnob\" on-track=\"_bartrack\" on-tap=\"_barclick\" class=\"style-scope paper-slider\">\n </paper-progress>\n </div>\n\n <template is=\"dom-if\" if=\"[[snaps]]\" class=\"style-scope paper-slider\">\n <div class=\"slider-markers style-scope paper-slider\">\n <template is=\"dom-repeat\" items=\"[[markers]]\" class=\"style-scope paper-slider\">\n <div class=\"slider-marker style-scope paper-slider\"></div>\n </template>\n </div>\n </template>\n\n <div id=\"sliderKnob\" class=\"slider-knob style-scope paper-slider\" on-down=\"_knobdown\" on-up=\"_resetKnob\" on-track=\"_onTrack\" on-transitionend=\"_knobTransitionEnd\">\n <div class=\"slider-knob-inner style-scope paper-slider\" value$=\"[[immediateValue]]\"></div>\n </div>\n </div>\n\n <template is=\"dom-if\" if=\"[[editable]]\" class=\"style-scope paper-slider\">\n <paper-input id=\"input\" type=\"number\" step=\"[[step]]\" min=\"[[min]]\" max=\"[[max]]\" class=\"slider-input style-scope paper-slider\" disabled$=\"[[disabled]]\" value=\"[[immediateValue]]\" on-change=\"_changeValue\" on-keydown=\"_inputKeyDown\" no-label-float=\"\">\n </paper-input>\n </template>\n"];
jR.raw=jR.slice();
EP({_template:fN(jR),is:"paper-slider",behaviors:[RP,$P,DQ,zxa],properties:{value:{type:Number,value:0},snaps:{type:Boolean,value:!1,notify:!0},pin:{type:Boolean,value:!1,notify:!0},secondaryProgress:{type:Number,value:0,notify:!0,observer:"_secondaryProgressChanged"},editable:{type:Boolean,value:!1},immediateValue:{type:Number,value:0,readOnly:!0,notify:!0},maxMarkers:{type:Number,value:0,notify:!0},expand:{type:Boolean,value:!1,readOnly:!0},ignoreBarTouch:{type:Boolean,value:!1},dragging:{type:Boolean,
value:!1,readOnly:!0,notify:!0},transiting:{type:Boolean,value:!1,readOnly:!0},markers:{type:Array,readOnly:!0,value:function(){return[]}}},
observers:["_updateKnob(value, min, max, snaps, step)","_valueChanged(value)","_immediateValueChanged(immediateValue)","_updateMarkers(maxMarkers, min, max, snaps)"],hostAttributes:{role:"slider",tabindex:0},keyBindings:{left:"_leftKey",right:"_rightKey","down pagedown home":"_decrementKey","up pageup end":"_incrementKey"},ready:function(){this.ignoreBarTouch&&DO(this.$.sliderBar,"auto")},
increment:function(){this.value=this._clampValue(this.value+this.step)},
decrement:function(){this.value=this._clampValue(this.value-this.step)},
_updateKnob:function(a,b,c){this.setAttribute("aria-valuemin",b);this.setAttribute("aria-valuemax",c);this.setAttribute("aria-valuenow",a);this._positionKnob(100*this._calcRatio(a))},
_valueChanged:function(){this.fire("value-change",{composed:!0})},
_immediateValueChanged:function(){this.dragging?this.fire("immediate-value-change",{composed:!0}):this.value=this.immediateValue},
_secondaryProgressChanged:function(){this.secondaryProgress=this._clampValue(this.secondaryProgress)},
_expandKnob:function(){this._setExpand(!0)},
_resetKnob:function(){this.cancelDebouncer("expandKnob");this._setExpand(!1)},
_positionKnob:function(a){this._setImmediateValue(this._calcStep(this._calcKnobPosition(a)));this._setRatio(100*this._calcRatio(this.immediateValue));this.$.sliderKnob.style.left=this.ratio+"%";this.dragging&&(this._knobstartx=this.ratio*this._w/100,this.translate3d(0,0,0,this.$.sliderKnob))},
_calcKnobPosition:function(a){return(this.max-this.min)*a/100+this.min},
_onTrack:function(a){a.stopPropagation();switch(a.detail.state){case"start":this._trackStart(a);break;case"track":this._trackX(a);break;case"end":this._trackEnd();}},
_trackStart:function(){this._setTransiting(!1);this._w=this.$.sliderBar.offsetWidth;this._knobstartx=this._startx=this._x=this.ratio*this._w/100;this._minx=-this._startx;this._maxx=this._w-this._startx;this.$.sliderKnob.classList.add("dragging");this._setDragging(!0)},
_trackX:function(a){this.dragging||this._trackStart(a);this._x=this._startx+Math.min(this._maxx,Math.max(this._minx,a.detail.dx*(this._isRTL?-1:1)));a=this._calcStep(this._calcKnobPosition(this._x/this._w*100));this._setImmediateValue(a);a=this._calcRatio(this.immediateValue)*this._w-this._knobstartx;this.translate3d(a+"px",0,0,this.$.sliderKnob)},
_trackEnd:function(){var a=this.$.sliderKnob.style;this.$.sliderKnob.classList.remove("dragging");this._setDragging(!1);this._resetKnob();this.value=this.immediateValue;a.transform=a.webkitTransform="";this.fire("change",{composed:!0})},
_knobdown:function(a){this._expandKnob();a.preventDefault();this.focus()},
_bartrack:function(a){this._allowBarEvent(a)&&this._onTrack(a)},
_barclick:function(a){this._w=this.$.sliderBar.offsetWidth;var b=this.$.sliderBar.getBoundingClientRect();b=(a.detail.x-b.left)/this._w*100;this._isRTL&&(b=100-b);var c=this.ratio;this._setTransiting(!0);this._positionKnob(b);c===this.ratio&&this._setTransiting(!1);this.async(function(){this.fire("change",{composed:!0})});
a.preventDefault();this.focus()},
_bardown:function(a){this._allowBarEvent(a)&&(this.debounce("expandKnob",this._expandKnob,60),this._barclick(a))},
_knobTransitionEnd:function(a){a.target===this.$.sliderKnob&&this._setTransiting(!1)},
_updateMarkers:function(a,b,c,d){d||this._setMarkers([]);b=Math.round((c-b)/this.step);b>a&&(b=a);if(0>b||!isFinite(b))b=0;this._setMarkers(Array(b))},
_mergeClasses:function(a){return Object.keys(a).filter(function(b){return a[b]}).join(" ")},
_getClassNames:function(){return this._mergeClasses({disabled:this.disabled,pin:this.pin,snaps:this.snaps,ring:this.immediateValue<=this.min,expand:this.expand,dragging:this.dragging,transiting:this.transiting,editable:this.editable})},
_allowBarEvent:function(a){return!this.ignoreBarTouch||a.detail.sourceEvent instanceof MouseEvent},
get _isRTL(){void 0===this.__isRTL&&(this.__isRTL="rtl"===window.getComputedStyle(this).direction);return this.__isRTL},_leftKey:function(a){this._isRTL?this._incrementKey(a):this._decrementKey(a)},
_rightKey:function(a){this._isRTL?this._decrementKey(a):this._incrementKey(a)},
_incrementKey:function(a){this.disabled||("end"===a.detail.key?this.value=this.max:this.increment(),this.fire("change"),a.preventDefault())},
_decrementKey:function(a){this.disabled||("home"===a.detail.key?this.value=this.min:this.decrement(),this.fire("change"),a.preventDefault())},
_changeValue:function(a){this.value=a.target.value;this.fire("change",{composed:!0})},
_inputKeyDown:function(a){a.stopPropagation()},
_createRipple:function(){this._rippleContainer=this.$.sliderKnob;return CQ._createRipple.call(this)},
_focusedChanged:function(a){a&&this.ensureRipple();this.hasRipple()&&(this._ripple.style.display=a?"":"none",this._ripple.holdDown=a)},
registered:function(){this._template.setAttribute("strip-whitespace","")}});var Sxa={properties:{active:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"__activeChanged"},alt:{type:String,value:"loading",observer:"__altChanged"},__coolingDown:{type:Boolean,value:!1}},__computeContainerClasses:function(a,b){return[a||b?"active":"",b?"cooldown":""].join(" ")},
__activeChanged:function(a,b){this.__setAriaHidden(!a);this.__coolingDown=!a&&b},
__altChanged:function(a){"loading"===a?this.alt=this.getAttribute("aria-label")||a:(this.__setAriaHidden(""===a),this.setAttribute("aria-label",a))},
__setAriaHidden:function(a){a?this.setAttribute("aria-hidden","true"):this.removeAttribute("aria-hidden")},
__reset:function(){this.__coolingDown=this.active=!1}};var kR=document.createElement("template");kR.setAttribute("style","display: none;");kR.innerHTML="<dom-module id=\"paper-spinner-styles\">\n <template>\n <style scope=\"paper-spinner-styles\">:host {\n display: inline-block;\n position: relative;\n width: 28px;\n height: 28px;\n\n \n --paper-spinner-container-rotation-duration: 1568ms;\n\n \n --paper-spinner-expand-contract-duration: 1333ms;\n\n \n --paper-spinner-full-cycle-duration: 5332ms;\n\n \n --paper-spinner-cooldown-duration: 400ms;\n}\n\n#spinnerContainer {\n width: 100%;\n height: 100%;\n\n \n direction: ltr;\n}\n\n#spinnerContainer.active {\n -webkit-animation: container-rotate var(--paper-spinner-container-rotation-duration) linear infinite;\n animation: container-rotate var(--paper-spinner-container-rotation-duration) linear infinite;\n}\n\n@-webkit-keyframes container-rotate {\nto {\n -webkit-transform: rotate(360deg)\n}\n\n}\n\n@keyframes container-rotate {\nto {\n transform: rotate(360deg)\n}\n\n}\n\n.spinner-layer {\n position: absolute;\n width: 100%;\n height: 100%;\n opacity: 0;\n white-space: nowrap;\n color: var(--paper-spinner-color, var(--google-blue-500));\n}\n\n.layer-1 {\n color: var(--paper-spinner-layer-1-color, var(--google-blue-500));\n}\n\n.layer-2 {\n color: var(--paper-spinner-layer-2-color, var(--google-red-500));\n}\n\n.layer-3 {\n color: var(--paper-spinner-layer-3-color, var(--google-yellow-500));\n}\n\n.layer-4 {\n color: var(--paper-spinner-layer-4-color, var(--google-green-500));\n}\n\n.active .spinner-layer {\n -webkit-animation-name: fill-unfill-rotate;\n -webkit-animation-duration: var(--paper-spinner-full-cycle-duration);\n -webkit-animation-timing-function: cubic-bezier(0.4, 0.0, 0.2, 1);\n -webkit-animation-iteration-count: infinite;\n animation-name: fill-unfill-rotate;\n animation-duration: var(--paper-spinner-full-cycle-duration);\n animation-timing-function: cubic-bezier(0.4, 0.0, 0.2, 1);\n animation-iteration-count: infinite;\n opacity: 1;\n}\n\n.active .spinner-layer.layer-1 {\n -webkit-animation-name: fill-unfill-rotate, layer-1-fade-in-out;\n animation-name: fill-unfill-rotate, layer-1-fade-in-out;\n}\n\n.active .spinner-layer.layer-2 {\n -webkit-animation-name: fill-unfill-rotate, layer-2-fade-in-out;\n animation-name: fill-unfill-rotate, layer-2-fade-in-out;\n}\n\n.active .spinner-layer.layer-3 {\n -webkit-animation-name: fill-unfill-rotate, layer-3-fade-in-out;\n animation-name: fill-unfill-rotate, layer-3-fade-in-out;\n}\n\n.active .spinner-layer.layer-4 {\n -webkit-animation-name: fill-unfill-rotate, layer-4-fade-in-out;\n animation-name: fill-unfill-rotate, layer-4-fade-in-out;\n}\n\n@-webkit-keyframes fill-unfill-rotate {\n12.5% {\n -webkit-transform: rotate(135deg)\n}\n\n25% {\n -webkit-transform: rotate(270deg)\n}\n\n37.5% {\n -webkit-transform: rotate(405deg)\n}\n\n50% {\n -webkit-transform: rotate(540deg)\n}\n\n62.5% {\n -webkit-transform: rotate(675deg)\n}\n\n75% {\n -webkit-transform: rotate(810deg)\n}\n\n87.5% {\n -webkit-transform: rotate(945deg)\n}\n\nto {\n -webkit-transform: rotate(1080deg)\n}\n\n}\n\n@keyframes fill-unfill-rotate {\n12.5% {\n transform: rotate(135deg)\n}\n\n25% {\n transform: rotate(270deg)\n}\n\n37.5% {\n transform: rotate(405deg)\n}\n\n50% {\n transform: rotate(540deg)\n}\n\n62.5% {\n transform: rotate(675deg)\n}\n\n75% {\n transform: rotate(810deg)\n}\n\n87.5% {\n transform: rotate(945deg)\n}\n\nto {\n transform: rotate(1080deg)\n}\n\n}\n\n@-webkit-keyframes layer-1-fade-in-out {\n0% {\n opacity: 1\n}\n\n25% {\n opacity: 1\n}\n\n26% {\n opacity: 0\n}\n\n89% {\n opacity: 0\n}\n\n90% {\n opacity: 1\n}\n\nto {\n opacity: 1\n}\n\n}\n\n@keyframes layer-1-fade-in-out {\n0% {\n opacity: 1\n}\n\n25% {\n opacity: 1\n}\n\n26% {\n opacity: 0\n}\n\n89% {\n opacity: 0\n}\n\n90% {\n opacity: 1\n}\n\nto {\n opacity: 1\n}\n\n}\n\n@-webkit-keyframes layer-2-fade-in-out {\n0% {\n opacity: 0\n}\n\n15% {\n opacity: 0\n}\n\n25% {\n opacity: 1\n}\n\n50% {\n opacity: 1\n}\n\n51% {\n opacity: 0\n}\n\nto {\n opacity: 0\n}\n\n}\n\n@keyframes layer-2-fade-in-out {\n0% {\n opacity: 0\n}\n\n15% {\n opacity: 0\n}\n\n25% {\n opacity: 1\n}\n\n50% {\n opacity: 1\n}\n\n51% {\n opacity: 0\n}\n\nto {\n opacity: 0\n}\n\n}\n\n@-webkit-keyframes layer-3-fade-in-out {\n0% {\n opacity: 0\n}\n\n40% {\n opacity: 0\n}\n\n50% {\n opacity: 1\n}\n\n75% {\n opacity: 1\n}\n\n76% {\n opacity: 0\n}\n\nto {\n opacity: 0\n}\n\n}\n\n@keyframes layer-3-fade-in-out {\n0% {\n opacity: 0\n}\n\n40% {\n opacity: 0\n}\n\n50% {\n opacity: 1\n}\n\n75% {\n opacity: 1\n}\n\n76% {\n opacity: 0\n}\n\nto {\n opacity: 0\n}\n\n}\n\n@-webkit-keyframes layer-4-fade-in-out {\n0% {\n opacity: 0\n}\n\n65% {\n opacity: 0\n}\n\n75% {\n opacity: 1\n}\n\n90% {\n opacity: 1\n}\n\nto {\n opacity: 0\n}\n\n}\n\n@keyframes layer-4-fade-in-out {\n0% {\n opacity: 0\n}\n\n65% {\n opacity: 0\n}\n\n75% {\n opacity: 1\n}\n\n90% {\n opacity: 1\n}\n\nto {\n opacity: 0\n}\n\n}\n\n.circle-clipper {\n display: inline-block;\n position: relative;\n width: 50%;\n height: 100%;\n overflow: hidden;\n}\n\n.spinner-layer::after {\n content: '';\n left: 45%;\n width: 10%;\n border-top-style: solid;\n}\n\n.spinner-layer::after, .circle-clipper .circle {\n box-sizing: border-box;\n position: absolute;\n top: 0;\n border-width: var(--paper-spinner-stroke-width, 3px);\n border-radius: 50%;\n}\n\n.circle-clipper .circle {\n bottom: 0;\n width: 200%;\n border-style: solid;\n border-bottom-color: transparent !important;\n}\n\n.circle-clipper.left .circle {\n left: 0;\n border-right-color: transparent !important;\n -webkit-transform: rotate(129deg);\n transform: rotate(129deg);\n}\n\n.circle-clipper.right .circle {\n left: -100%;\n border-left-color: transparent !important;\n -webkit-transform: rotate(-129deg);\n transform: rotate(-129deg);\n}\n\n.active .gap-patch::after, .active .circle-clipper .circle {\n -webkit-animation-duration: var(--paper-spinner-expand-contract-duration);\n -webkit-animation-timing-function: cubic-bezier(0.4, 0.0, 0.2, 1);\n -webkit-animation-iteration-count: infinite;\n animation-duration: var(--paper-spinner-expand-contract-duration);\n animation-timing-function: cubic-bezier(0.4, 0.0, 0.2, 1);\n animation-iteration-count: infinite;\n}\n\n.active .circle-clipper.left .circle {\n -webkit-animation-name: left-spin;\n animation-name: left-spin;\n}\n\n.active .circle-clipper.right .circle {\n -webkit-animation-name: right-spin;\n animation-name: right-spin;\n}\n\n@-webkit-keyframes left-spin {\n0% {\n -webkit-transform: rotate(130deg)\n}\n\n50% {\n -webkit-transform: rotate(-5deg)\n}\n\nto {\n -webkit-transform: rotate(130deg)\n}\n\n}\n\n@keyframes left-spin {\n0% {\n transform: rotate(130deg)\n}\n\n50% {\n transform: rotate(-5deg)\n}\n\nto {\n transform: rotate(130deg)\n}\n\n}\n\n@-webkit-keyframes right-spin {\n0% {\n -webkit-transform: rotate(-130deg)\n}\n\n50% {\n -webkit-transform: rotate(5deg)\n}\n\nto {\n -webkit-transform: rotate(-130deg)\n}\n\n}\n\n@keyframes right-spin {\n0% {\n transform: rotate(-130deg)\n}\n\n50% {\n transform: rotate(5deg)\n}\n\nto {\n transform: rotate(-130deg)\n}\n\n}\n\n#spinnerContainer.cooldown {\n -webkit-animation: container-rotate var(--paper-spinner-container-rotation-duration) linear infinite, fade-out var(--paper-spinner-cooldown-duration) cubic-bezier(0.4, 0.0, 0.2, 1);\n animation: container-rotate var(--paper-spinner-container-rotation-duration) linear infinite, fade-out var(--paper-spinner-cooldown-duration) cubic-bezier(0.4, 0.0, 0.2, 1);\n}\n\n@-webkit-keyframes fade-out {\n0% {\n opacity: 1\n}\n\nto {\n opacity: 0\n}\n\n}\n\n@keyframes fade-out {\n0% {\n opacity: 1\n}\n\nto {\n opacity: 0\n}\n\n}\n\n</style>\n </template>\n</dom-module>";
document.head.appendChild(kR.content);var lR=["<!--css-build:shady-->\n\n <div id=\"spinnerContainer\" class-name=\"[[__computeContainerClasses(active, __coolingDown)]]\" on-animationend=\"__reset\" on-webkit-animation-end=\"__reset\" class=\"style-scope paper-spinner-lite\">\n <div class=\"spinner-layer style-scope paper-spinner-lite\">\n <div class=\"circle-clipper left style-scope paper-spinner-lite\">\n <div class=\"circle style-scope paper-spinner-lite\"></div>\n </div>\n <div class=\"circle-clipper right style-scope paper-spinner-lite\">\n <div class=\"circle style-scope paper-spinner-lite\"></div>\n </div>\n </div>\n </div>\n "];lR.raw=lR.slice();
EP({_template:fN(lR),is:"paper-spinner-lite",behaviors:[Sxa],registered:function(){this._template.setAttribute("strip-whitespace","")}});var mR=["<!--css-build:shady-->\n\n <div id=\"spinnerContainer\" class-name=\"[[__computeContainerClasses(active, __coolingDown)]]\" on-animationend=\"__reset\" on-webkit-animation-end=\"__reset\" class=\"style-scope paper-spinner\">\n <div class=\"spinner-layer layer-1 style-scope paper-spinner\">\n <div class=\"circle-clipper left style-scope paper-spinner\">\n <div class=\"circle style-scope paper-spinner\"></div>\n </div>\n <div class=\"circle-clipper right style-scope paper-spinner\">\n <div class=\"circle style-scope paper-spinner\"></div>\n </div>\n </div>\n\n <div class=\"spinner-layer layer-2 style-scope paper-spinner\">\n <div class=\"circle-clipper left style-scope paper-spinner\">\n <div class=\"circle style-scope paper-spinner\"></div>\n </div>\n <div class=\"circle-clipper right style-scope paper-spinner\">\n <div class=\"circle style-scope paper-spinner\"></div>\n </div>\n </div>\n\n <div class=\"spinner-layer layer-3 style-scope paper-spinner\">\n <div class=\"circle-clipper left style-scope paper-spinner\">\n <div class=\"circle style-scope paper-spinner\"></div>\n </div>\n <div class=\"circle-clipper right style-scope paper-spinner\">\n <div class=\"circle style-scope paper-spinner\"></div>\n </div>\n </div>\n\n <div class=\"spinner-layer layer-4 style-scope paper-spinner\">\n <div class=\"circle-clipper left style-scope paper-spinner\">\n <div class=\"circle style-scope paper-spinner\"></div>\n </div>\n <div class=\"circle-clipper right style-scope paper-spinner\">\n <div class=\"circle style-scope paper-spinner\"></div>\n </div>\n </div>\n </div>\n "];
mR.raw=mR.slice();EP({_template:fN(mR),is:"paper-spinner",behaviors:[Sxa],registered:function(){this._template.setAttribute("strip-whitespace","")}});var nR=["<!--css-build:shady-->\n\n <div class=\"tab-content style-scope paper-tab\">\n <slot class=\"style-scope paper-tab\"></slot>\n </div>\n"];
nR.raw=nR.slice();EP({_template:fN(nR),is:"paper-tab",behaviors:[SP,ZP,BQ],properties:{link:{type:Boolean,value:!1,reflectToAttribute:!0}},hostAttributes:{role:"tab"},listeners:{down:"_updateNoink",tap:"_onTap"},attached:function(){this._updateNoink()},
get _parentNoink(){var a=hP(this).parentNode;return!!a&&!!a.noink},_updateNoink:function(){this.noink=!!this.noink||!!this._parentNoink},
_onTap:function(a){if(this.link){var b=this.queryEffectiveChildren("a");b&&a.target!==b&&b.click()}}});var oR=["<iron-iconset-svg name=\"paper-tabs\" size=\"24\">\n<svg><defs>\n<g id=\"chevron-left\"><path d=\"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z\"></path></g>\n<g id=\"chevron-right\"><path d=\"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z\"></path></g>\n</defs></svg>\n</iron-iconset-svg>"];oR.raw=oR.slice();var Txa=fN(oR);document.head.appendChild(Txa.content);var Uxa=["<!--css-build:shady-->\n\n <paper-icon-button icon=\"paper-tabs:chevron-left\" alt=\"[[altPrevious]]\" class$=\"[[_computeScrollButtonClass(_leftHidden, scrollable, hideScrollButtons)]]\" on-up=\"_onScrollButtonUp\" on-down=\"_onLeftScrollButtonDown\" tabindex=\"-1\" disabled=\"[[_leftHidden]]\" aria-hidden$=\"[[_makeString(_leftHidden)]]\" class=\"style-scope paper-tabs\"></paper-icon-button>\n\n <div id=\"tabsContainer\" on-track=\"_scroll\" on-down=\"_down\" class=\"style-scope paper-tabs\">\n <div id=\"tabsContent\" class$=\"[[_computeTabsContentClass(scrollable, fitContainer)]]\" class=\"style-scope paper-tabs\">\n <div id=\"selectionBar\" class$=\"[[_computeSelectionBarClass(noBar, alignBottom)]]\" on-transitionend=\"_onBarTransitionEnd\" class=\"style-scope paper-tabs\"></div>\n <slot class=\"style-scope paper-tabs\"></slot>\n </div>\n </div>\n\n <paper-icon-button icon=\"paper-tabs:chevron-right\" alt=\"[[altNext]]\" class$=\"[[_computeScrollButtonClass(_rightHidden, scrollable, hideScrollButtons)]]\" on-up=\"_onScrollButtonUp\" on-down=\"_onRightScrollButtonDown\" tabindex=\"-1\" disabled=\"[[_rightHidden]]\" aria-hidden$=\"[[_makeString(_rightHidden)]]\" class=\"style-scope paper-tabs\"></paper-icon-button>\n"];
Uxa.raw=["\n <style>\n :host {\n @apply --layout;\n @apply --layout-center;\n\n height: 48px;\n font-size: 14px;\n font-weight: 500;\n overflow: hidden;\n -moz-user-select: none;\n -ms-user-select: none;\n -webkit-user-select: none;\n user-select: none;\n\n /* NOTE: Both values are needed, since some phones require the value to be \\`transparent\\`. */\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n -webkit-tap-highlight-color: transparent;\n\n @apply --paper-tabs;\n }\n\n :host(:dir(rtl)) {\n @apply --layout-horizontal-reverse;\n }\n\n #tabsContainer {\n position: relative;\n height: 100%;\n white-space: nowrap;\n overflow: hidden;\n @apply --layout-flex-auto;\n @apply --paper-tabs-container;\n }\n\n #tabsContent {\n height: 100%;\n -moz-flex-basis: auto;\n -ms-flex-basis: auto;\n flex-basis: auto;\n @apply --paper-tabs-content;\n }\n\n #tabsContent.scrollable {\n position: absolute;\n white-space: nowrap;\n }\n\n #tabsContent:not(.scrollable),\n #tabsContent.scrollable.fit-container {\n @apply --layout-horizontal;\n }\n\n #tabsContent.scrollable.fit-container {\n min-width: 100%;\n }\n\n #tabsContent.scrollable.fit-container > ::slotted(*) {\n /* IE - prevent tabs from compressing when they should scroll. */\n -ms-flex: 1 0 auto;\n -webkit-flex: 1 0 auto;\n flex: 1 0 auto;\n }\n\n .hidden {\n display: none;\n }\n\n .not-visible {\n opacity: 0;\n cursor: default;\n }\n\n paper-icon-button {\n width: 48px;\n height: 48px;\n padding: 12px;\n margin: 0 4px;\n }\n\n #selectionBar {\n position: absolute;\n height: 0;\n bottom: 0;\n left: 0;\n right: 0;\n border-bottom: 2px solid var(--paper-tabs-selection-bar-color, var(--paper-yellow-a100));\n -webkit-transform: scale(0);\n transform: scale(0);\n -webkit-transform-origin: left center;\n transform-origin: left center;\n transition: -webkit-transform;\n transition: transform;\n\n @apply --paper-tabs-selection-bar;\n }\n\n #selectionBar.align-bottom {\n top: 0;\n bottom: auto;\n }\n\n #selectionBar.expand {\n transition-duration: 0.15s;\n transition-timing-function: cubic-bezier(0.4, 0.0, 1, 1);\n }\n\n #selectionBar.contract {\n transition-duration: 0.18s;\n transition-timing-function: cubic-bezier(0.0, 0.0, 0.2, 1);\n }\n\n #tabsContent > ::slotted(:not(#selectionBar)) {\n height: 100%;\n }\n </style>\n\n <paper-icon-button icon=\"paper-tabs:chevron-left\" alt=\"[[altPrevious]]\" class$=\"[[_computeScrollButtonClass(_leftHidden, scrollable, hideScrollButtons)]]\" on-up=\"_onScrollButtonUp\" on-down=\"_onLeftScrollButtonDown\" tabindex=\"-1\" disabled=\"[[_leftHidden]]\" aria-hidden$=\"[[_makeString(_leftHidden)]]\"></paper-icon-button>\n\n <div id=\"tabsContainer\" on-track=\"_scroll\" on-down=\"_down\">\n <div id=\"tabsContent\" class$=\"[[_computeTabsContentClass(scrollable, fitContainer)]]\">\n <div id=\"selectionBar\" class$=\"[[_computeSelectionBarClass(noBar, alignBottom)]]\" on-transitionend=\"_onBarTransitionEnd\"></div>\n <slot></slot>\n </div>\n </div>\n\n <paper-icon-button icon=\"paper-tabs:chevron-right\" alt=\"[[altNext]]\" class$=\"[[_computeScrollButtonClass(_rightHidden, scrollable, hideScrollButtons)]]\" on-up=\"_onScrollButtonUp\" on-down=\"_onRightScrollButtonDown\" tabindex=\"-1\" disabled=\"[[_rightHidden]]\" aria-hidden$=\"[[_makeString(_rightHidden)]]\"></paper-icon-button>\n"];
EP({_template:fN(Uxa),is:"paper-tabs",behaviors:[IP,yxa],properties:{noink:{type:Boolean,value:!1,observer:"_noinkChanged"},noBar:{type:Boolean,value:!1},noSlide:{type:Boolean,value:!1},scrollable:{type:Boolean,value:!1},fitContainer:{type:Boolean,value:!1},disableDrag:{type:Boolean,value:!1},hideScrollButtons:{type:Boolean,value:!1},alignBottom:{type:Boolean,value:!1},selectable:{type:String,value:"paper-tab"},autoselect:{type:Boolean,value:!1},autoselectDelay:{type:Number,value:0},altNext:{type:String,
value:""},altPrevious:{type:String,value:""},_step:{type:Number,value:10},_holdDelay:{type:Number,value:1},_leftHidden:{type:Boolean,value:!1},_rightHidden:{type:Boolean,value:!1},_previousTab:{type:Object}},hostAttributes:{role:"tablist"},listeners:{"iron-resize":"_onTabSizingChanged","iron-items-changed":"_onTabSizingChanged","iron-select":"_onIronSelect","iron-deselect":"_onIronDeselect"},keyBindings:{"left:keyup right:keyup":"_onArrowKeyup"},created:function(){this._holdJob=null;this._pendingActivationTimeout=
this._pendingActivationItem=void 0;this._bindDelayedActivationHandler=this._delayedActivationHandler.bind(this);this.addEventListener("blur",this._onBlurCapture.bind(this),!0)},
ready:function(){this.setScrollDirection("y",this.$.tabsContainer)},
detached:function(){this._cancelPendingActivation()},
_noinkChanged:function(a){hP(this).querySelectorAll("paper-tab").forEach(a?this._setNoinkAttribute:this._removeNoinkAttribute)},
_setNoinkAttribute:function(a){a.setAttribute("noink","")},
_removeNoinkAttribute:function(a){a.removeAttribute("noink")},
_computeScrollButtonClass:function(a,b,c){return!b||c?"hidden":a?"not-visible":""},
_computeTabsContentClass:function(a,b){return a?"scrollable"+(b?" fit-container":""):" fit-container"},
_computeSelectionBarClass:function(a,b){return a?"hidden":b?"align-bottom":""},
_onTabSizingChanged:function(){this.debounce("_onTabSizingChanged",function(){this._scroll();this._tabChanged(this.selectedItem)},10)},
_makeString:function(a){return""+a},
_onIronSelect:function(a){this._tabChanged(a.detail.item,this._previousTab);this._previousTab=a.detail.item;this.cancelDebouncer("tab-changed")},
_onIronDeselect:function(){this.debounce("tab-changed",function(){this._tabChanged(null,this._previousTab);this._previousTab=null},1)},
_activateHandler:function(){this._cancelPendingActivation();uQ._activateHandler.apply(this,arguments)},
_scheduleActivation:function(a,b){this._pendingActivationItem=a;this._pendingActivationTimeout=this.async(this._bindDelayedActivationHandler,b)},
_delayedActivationHandler:function(){var a=this._pendingActivationItem;this._pendingActivationTimeout=this._pendingActivationItem=void 0;a.fire(this.activateEvent,null,{bubbles:!0,cancelable:!0})},
_cancelPendingActivation:function(){void 0!==this._pendingActivationTimeout&&(this.cancelAsync(this._pendingActivationTimeout),this._pendingActivationTimeout=this._pendingActivationItem=void 0)},
_onArrowKeyup:function(){this.autoselect&&this._scheduleActivation(this.focusedItem,this.autoselectDelay)},
_onBlurCapture:function(a){a.target===this._pendingActivationItem&&this._cancelPendingActivation()},
get _tabContainerScrollSize(){return Math.max(0,this.$.tabsContainer.scrollWidth-this.$.tabsContainer.offsetWidth)},_scroll:function(a,b){this.scrollable&&this._affectScroll(b&&-b.ddx||0)},
_down:function(){this.async(function(){this._defaultFocusAsync&&(this.cancelAsync(this._defaultFocusAsync),this._defaultFocusAsync=null)},1)},
_affectScroll:function(a){this.$.tabsContainer.scrollLeft+=a;a=this.$.tabsContainer.scrollLeft;this._leftHidden=0===a;this._rightHidden=a===this._tabContainerScrollSize},
_onLeftScrollButtonDown:function(){this._scrollToLeft();this._holdJob=setInterval(this._scrollToLeft.bind(this),this._holdDelay)},
_onRightScrollButtonDown:function(){this._scrollToRight();this._holdJob=setInterval(this._scrollToRight.bind(this),this._holdDelay)},
_onScrollButtonUp:function(){clearInterval(this._holdJob);this._holdJob=null},
_scrollToLeft:function(){this._affectScroll(-this._step)},
_scrollToRight:function(){this._affectScroll(this._step)},
_tabChanged:function(a,b){if(a){var c=this.$.tabsContent.getBoundingClientRect(),d=c.width,e=a.getBoundingClientRect();c=e.left-c.left;this._pos={width:this._calcPercent(e.width,d),left:this._calcPercent(c,d)};if(this.noSlide||null==b)this.$.selectionBar.classList.remove("expand"),this.$.selectionBar.classList.remove("contract"),this._positionBar(this._pos.width,this._pos.left);else{var g=b.getBoundingClientRect();b=this.items.indexOf(b);a=this.items.indexOf(a);this.$.selectionBar.classList.add("expand");
a=b<a;this._isRTL&&(a=!a);a?this._positionBar(this._calcPercent(e.left+e.width-g.left,d)-5,this._left):this._positionBar(this._calcPercent(g.left+g.width-e.left,d)-5,this._calcPercent(c,d)+5);this.scrollable&&this._scrollToSelectedIfNeeded(e.width,c)}}else this.$.selectionBar.classList.remove("expand"),this.$.selectionBar.classList.remove("contract"),this._positionBar(0,0)},
_scrollToSelectedIfNeeded:function(a,b){b-=this.$.tabsContainer.scrollLeft;0>b?this.$.tabsContainer.scrollLeft+=b:(b+=a-this.$.tabsContainer.offsetWidth,0<b&&(this.$.tabsContainer.scrollLeft+=b))},
_calcPercent:function(a,b){return 100*a/b},
_positionBar:function(a,b){a=a||0;b=b||0;this._width=a;this._left=b;this.transform("translateX("+b+"%) scaleX("+a/100+")",this.$.selectionBar)},
_onBarTransitionEnd:function(){var a=this.$.selectionBar.classList;a.contains("expand")?(a.remove("expand"),a.add("contract"),this._positionBar(this._pos.width,this._pos.left)):a.contains("contract")&&a.remove("contract")}});var pR=["<!--css-build:shady-->\n\n <span id=\"label\" class=\"style-scope paper-toast\">{{text}}</span>\n <slot class=\"style-scope paper-toast\"></slot>\n"];
pR.raw=pR.slice();var qR=null;
EP({_template:fN(pR),is:"paper-toast",behaviors:[mQ],properties:{fitInto:{type:Object,value:window,observer:"_onFitIntoChanged"},horizontalAlign:{type:String,value:"left"},verticalAlign:{type:String,value:"bottom"},duration:{type:Number,value:3E3},text:{type:String,value:""},noCancelOnOutsideClick:{type:Boolean,value:!0},noAutoFocus:{type:Boolean,value:!0}},listeners:{transitionend:"__onTransitionEnd"},get visible(){FP._warn("`visible` is deprecated, use `opened` instead");return this.opened},get _canAutoClose(){return 0<
this.duration&&Infinity!==this.duration},created:function(){this._autoClose=null;OP.requestAvailability()},
show:function(a){"string"==typeof a&&(a={text:a});for(var b in a)0===b.indexOf("_")?FP._warn("The property \""+b+"\" is private and was not set."):b in this?this[b]=a[b]:FP._warn("The property \""+b+"\" is not valid.");this.open()},
hide:function(){this.close()},
__onTransitionEnd:function(a){a&&a.target===this&&"opacity"===a.propertyName&&(this.opened?this._finishRenderOpened():this._finishRenderClosed())},
_openedChanged:function(){null!==this._autoClose&&(this.cancelAsync(this._autoClose),this._autoClose=null);this.opened?(qR&&qR!==this&&qR.close(),qR=this,this.fire("iron-announce",{text:this.text}),this._canAutoClose&&(this._autoClose=this.async(this.close,this.duration))):qR===this&&(qR=null);lQ._openedChanged.apply(this,arguments)},
_renderOpened:function(){this.classList.add("paper-toast-open")},
_renderClosed:function(){this.classList.remove("paper-toast-open")},
_onFitIntoChanged:function(a){this.positionTarget=a}});var rR=["<!--css-build:shady-->\n\n <div class=\"toggle-container style-scope paper-toggle-button\">\n <div id=\"toggleBar\" class=\"toggle-bar style-scope paper-toggle-button\"></div>\n <div id=\"toggleButton\" class=\"toggle-button style-scope paper-toggle-button\"></div>\n </div>\n\n <div class=\"toggle-label style-scope paper-toggle-button\"><slot class=\"style-scope paper-toggle-button\"></slot></div>\n "];
rR.raw=rR.slice();EP({is:"paper-toggle-button",_template:fN(rR),behaviors:[EQ],hostAttributes:{role:"button","aria-pressed":"false",tabindex:0},properties:{},listeners:{track:"_ontrack"},__calculateIsRtl:function(){return"rtl"===window.getComputedStyle(this).direction},
attached:function(){this.__calculateIsRtl()&&this.setAttribute("dir","rtl");pP(this,function(){DO(this,"pan-y")})},
_ontrack:function(a){a=a.detail;"start"===a.state?this._trackStart(a):"track"===a.state?this._trackMove(a):"end"===a.state&&this._trackEnd(a)},
_trackStart:function(){this._isRtl=this.__calculateIsRtl();this._width=this.$.toggleBar.offsetWidth/2;this._trackChecked=this.checked;this.$.toggleButton.classList.add("dragging")},
_trackMove:function(a){a=a.dx;this._x=this._isRtl?Math.max(-this._width,Math.min(0,this._trackChecked?-this._width+a:a)):Math.min(this._width,Math.max(0,this._trackChecked?this._width+a:a));this.translate3d(this._x+"px",0,0,this.$.toggleButton);this._isRtl?this._userActivate(this._x<-this._width/2):this._userActivate(this._x>this._width/2)},
_trackEnd:function(){this.$.toggleButton.classList.remove("dragging");this.transform("",this.$.toggleButton)},
_createRipple:function(){this._rippleContainer=this.$.toggleButton;var a=BQ._createRipple();a.id="ink";a.setAttribute("recenters","");a.classList.add("circle","toggle-ink");return a},
registered:function(){this._template.setAttribute("strip-whitespace","")}});var sR=["<!--css-build:shady-->\n\n <div id=\"tooltip\" class=\"hidden style-scope paper-tooltip\">\n <slot class=\"style-scope paper-tooltip\"></slot>\n </div>\n"];
sR.raw=sR.slice();
EP({_template:fN(sR),is:"paper-tooltip",hostAttributes:{role:"tooltip",tabindex:-1},properties:{for:{type:String,observer:"_findTarget"},manualMode:{type:Boolean,value:!1,observer:"_manualModeChanged"},position:{type:String,value:"bottom"},fitToVisibleBounds:{type:Boolean,value:!1},offset:{type:Number,value:14},marginTop:{type:Number,value:14},animationDelay:{type:Number,value:500,observer:"_delayChange"},animationEntry:{type:String,value:""},animationExit:{type:String,value:""},animationConfig:{type:Object,
value:function(){return{entry:[{name:"fade-in-animation",node:this,timing:{delay:0}}],exit:[{name:"fade-out-animation",node:this}]}}},
_showing:{type:Boolean,value:!1}},listeners:{webkitAnimationEnd:"_onAnimationEnd"},get target(){var a=hP(this).parentNode,b=hP(this).getOwnerRoot();return this.for?hP(b).querySelector("#"+this.for):a.nodeType==Node.DOCUMENT_FRAGMENT_NODE?b.host:a},attached:function(){this._findTarget()},
detached:function(){this.manualMode||this._removeListeners()},
playAnimation:function(a){"entry"===a?this.show():"exit"===a&&this.hide()},
cancelAnimation:function(){this.$.tooltip.classList.add("cancel-animation")},
show:function(){if(!this._showing){if(""===hP(this).textContent.trim()){for(var a=!0,b=hP(this).getEffectiveChildNodes(),c=0;c<b.length;c++)if(""!==b[c].textContent.trim()){a=!1;break}if(a)return}this._showing=!0;this.$.tooltip.classList.remove("hidden");this.$.tooltip.classList.remove("cancel-animation");this.$.tooltip.classList.remove(this._getAnimationType("exit"));this.updatePosition();this._animationPlaying=!0;this.$.tooltip.classList.add(this._getAnimationType("entry"))}},
hide:function(){this._showing&&(this._animationPlaying?(this._showing=!1,this._cancelAnimation()):(this._onAnimationFinish(),this._showing=!1,this._animationPlaying=!0))},
updatePosition:function(){if(this._target&&this.offsetParent){var a=this.offset;14!=this.marginTop&&14==this.offset&&(a=this.marginTop);var b=this.offsetParent.getBoundingClientRect(),c=this._target.getBoundingClientRect(),d=this.getBoundingClientRect(),e=(c.width-d.width)/2,g=(c.height-d.height)/2,h=c.left-b.left,m=c.top-b.top;switch(this.position){case"top":var n=h+e;var p=m-d.height-a;break;case"bottom":n=h+e;p=m+c.height+a;break;case"left":n=h-d.width-a;p=m+g;break;case"right":n=h+c.width+
a,p=m+g;}this.fitToVisibleBounds?(b.left+n+d.width>window.innerWidth?(this.style.right="0px",this.style.left="auto"):(this.style.left=Math.max(0,n)+"px",this.style.right="auto"),b.top+p+d.height>window.innerHeight?(this.style.bottom=b.height+"px",this.style.top="auto"):(this.style.top=Math.max(-b.top,p)+"px",this.style.bottom="auto")):(this.style.left=n+"px",this.style.top=p+"px")}},
_addListeners:function(){this._target&&(this.listen(this._target,"mouseenter","show"),this.listen(this._target,"focus","show"),this.listen(this._target,"mouseleave","hide"),this.listen(this._target,"blur","hide"),this.listen(this._target,"tap","hide"));this.listen(this.$.tooltip,"animationend","_onAnimationEnd");this.listen(this,"mouseenter","hide")},
_findTarget:function(){this.manualMode||this._removeListeners();this._target=this.target;this.manualMode||this._addListeners()},
_delayChange:function(a){500!==a&&this.updateStyles({"--paper-tooltip-delay-in":a+"ms"})},
_manualModeChanged:function(){this.manualMode?this._removeListeners():this._addListeners()},
_cancelAnimation:function(){this.$.tooltip.classList.remove(this._getAnimationType("entry"));this.$.tooltip.classList.remove(this._getAnimationType("exit"));this.$.tooltip.classList.remove("cancel-animation");this.$.tooltip.classList.add("hidden")},
_onAnimationFinish:function(){this._showing&&(this.$.tooltip.classList.remove(this._getAnimationType("entry")),this.$.tooltip.classList.remove("cancel-animation"),this.$.tooltip.classList.add(this._getAnimationType("exit")))},
_onAnimationEnd:function(){this._animationPlaying=!1;this._showing||(this.$.tooltip.classList.remove(this._getAnimationType("exit")),this.$.tooltip.classList.add("hidden"))},
_getAnimationType:function(a){if("entry"===a&&""!==this.animationEntry)return this.animationEntry;if("exit"===a&&""!==this.animationExit)return this.animationExit;if(this.animationConfig[a]&&"string"===typeof this.animationConfig[a][0].name){if(this.animationConfig[a][0].timing&&this.animationConfig[a][0].timing.delay&&0!==this.animationConfig[a][0].timing.delay){var b=this.animationConfig[a][0].timing.delay;"entry"===a?this.updateStyles({"--paper-tooltip-delay-in":b+"ms"}):"exit"===a&&this.updateStyles({"--paper-tooltip-delay-out":b+
"ms"})}return this.animationConfig[a][0].name}},
_removeListeners:function(){this._target&&(this.unlisten(this._target,"mouseenter","show"),this.unlisten(this._target,"focus","show"),this.unlisten(this._target,"mouseleave","hide"),this.unlisten(this._target,"blur","hide"),this.unlisten(this._target,"tap","hide"));this.unlisten(this.$.tooltip,"animationend","_onAnimationEnd");this.unlisten(this,"mouseenter","hide")}});/*
Math.uuid.js (v1.4)
http://www.broofa.com
mailto:robert@broofa.com
Copyright (c) 2010 Robert Kieffer
Dual licensed under the MIT and GPL licenses.
*/
var Vxa="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split("");/*
The MIT License (MIT)
Copyright (c) 2015-present Dan Abramov
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
var tR=function(){return function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={exports:{},id:d,loaded:!1};return a[d].call(e.exports,e,e.exports,b),e.loaded=!0,e.exports}
var c={};return b.m=a,b.c=c,b.p="",b(0)}([function(a,b,c){function d(n){return n&&n.__esModule?n:{"default":n}}
b.__esModule=!0;b.compose=b.applyMiddleware=b.bindActionCreators=b.combineReducers=b.createStore=void 0;a=c(2);a=d(a);var e=c(7);e=d(e);var g=c(6);g=d(g);var h=c(5);h=d(h);var m=c(1);m=d(m);c=c(3);d(c);b.createStore=a["default"];b.combineReducers=e["default"];b.bindActionCreators=g["default"];b.applyMiddleware=h["default"];b.compose=m["default"]},
function(a,b){b.__esModule=!0;b["default"]=function(){for(var c=arguments.length,d=Array(c),e=0;c>e;e++)d[e]=arguments[e];if(0===d.length)return function(g){return g};
c=function(){var g=d[d.length-1],h=d.slice(0,-1);return{v:function(){return h.reduceRight(function(m,n){return n(m)},g.apply(void 0,arguments))}}}();
return"object"==typeof c?c.v:void 0}},
function(a,b,c){function d(m,n,p){function x(Ya){if("function"!=typeof Ya)throw Error("Expected listener to be a function.");var Mb=!0;ca===S&&(ca=S.slice());return ca.push(Ya),function(){if(Mb){Mb=!1;ca===S&&(ca=S.slice());var Vb=ca.indexOf(Ya);ca.splice(Vb,1)}}}
function y(Ya){if(!(0,e["default"])(Ya))throw Error("Actions must be plain objects. Use custom middleware for async actions.");if(void 0===Ya.type)throw Error("Actions may not have an undefined \"type\" property. Have you misspelled a constant?");if(Ja)throw Error("Reducers may not dispatch actions.");try{Ja=!0,P=G(P,Ya)}finally{Ja=!1}for(var Mb=S=ca,Vb=0;Mb.length>Vb;Vb++)Mb[Vb]();return Ya}
var B;if("function"==typeof n&&void 0===p&&(p=n,n=void 0),void 0!==p){if("function"!=typeof p)throw Error("Expected the enhancer to be a function.");return p(d)(m,n)}if("function"!=typeof m)throw Error("Expected the reducer to be a function.");var G=m,P=n,S=[],ca=S,Ja=!1;return y({type:h.INIT}),B={dispatch:y,subscribe:x,getState:function(){return P},
replaceReducer:function(Ya){if("function"!=typeof Ya)throw Error("Expected the nextReducer to be a function.");G=Ya;y({type:h.INIT})}},B[g["default"]]=function(){var Ya;
return Ya={subscribe:function(Mb){function Vb(){Mb.next&&Mb.next(P)}
if("object"!=typeof Mb)throw new TypeError("Expected the observer to be an object.");Vb();return{unsubscribe:x(Vb)}}},Ya[g["default"]]=function(){return this},Ya},B}
b.__esModule=!0;b.ActionTypes=void 0;b["default"]=d;var e=(a=c(4))&&a.__esModule?a:{"default":a},g=(c=c(11))&&c.__esModule?c:{"default":c},h=b.ActionTypes={INIT:"@@redux/INIT"}},
function(a,b){b.__esModule=!0;b["default"]=function(c){"undefined"!=typeof console&&"function"==typeof console.error&&console.error(c);try{throw Error(c)}catch(d){}}},
function(a,b,c){var d=c(8),e=c(9),g=c(10);b=Object.prototype;var h=Function.prototype.toString,m=b.hasOwnProperty,n=h.call(Object),p=b.toString;a.exports=function(x){if(!g(x)||"[object Object]"!=p.call(x)||e(x))return!1;x=d(x);if(null===x)return!0;x=m.call(x,"constructor")&&x.constructor;return"function"==typeof x&&x instanceof x&&h.call(x)==n}},
function(a,b,c){b.__esModule=!0;var d=Object.assign||function(g){for(var h=1;arguments.length>h;h++){var m=arguments[h],n;for(n in m)Object.prototype.hasOwnProperty.call(m,n)&&(g[n]=m[n])}return g};
b["default"]=function(){for(var g=arguments.length,h=Array(g),m=0;g>m;m++)h[m]=arguments[m];return function(n){return function(p,x,y){p=n(p,x,y);var B=p.dispatch;x=[];var G={getState:p.getState,dispatch:function(P){return B(P)}};
return x=h.map(function(P){return P(G)}),B=e["default"].apply(void 0,x)(p.dispatch),d({},p,{dispatch:B})}}};
var e=function(g){return g&&g.__esModule?g:{"default":g}}(c(1))},
function(a,b){function c(d,e){return function(){return e(d.apply(void 0,arguments))}}
b.__esModule=!0;b["default"]=function(d,e){if("function"==typeof d)return c(d,e);if("object"!=typeof d||null===d)throw Error("bindActionCreators expected an object or a function, instead received "+(null===d?"null":typeof d)+". Did you write \"import ActionCreators from\" instead of \"import * as ActionCreators from\"?");for(var g=Object.keys(d),h={},m=0;g.length>m;m++){var n=g[m],p=d[n];"function"==typeof p&&(h[n]=c(p,e))}return h}},
function(a,b,c){function d(g){Object.keys(g).forEach(function(h){var m=g[h];if(void 0===m(void 0,{type:e.ActionTypes.INIT}))throw Error("Reducer \""+h+"\" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined.");var n="@@redux/PROBE_UNKNOWN_ACTION_"+Math.random().toString(36).substring(7).split("").join(".");if(void 0===m(void 0,{type:n}))throw Error("Reducer \""+h+"\" returned undefined when probed with a random type. Don't try to handle "+(
e.ActionTypes.INIT+" or other actions in \"redux/*\" namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined."))})}
b.__esModule=!0;b["default"]=function(g){for(var h=Object.keys(g),m={},n=0;h.length>n;n++){var p=h[n];"function"==typeof g[p]&&(m[p]=g[p])}var x=Object.keys(m);try{d(m)}catch(B){var y=B}return function(){var B=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},G=arguments[1];if(y)throw y;for(var P=!1,S={},ca=0;x.length>ca;ca++){var Ja=x[ca],Ya=B[Ja],Mb=(0,m[Ja])(Ya,G);if(void 0===Mb)throw B=G&&G.type,Error("Given action "+(B&&"\""+B+"\""||"an action")+", reducer \""+Ja+"\" returned undefined. To ignore an action, you must explicitly return the previous state.");
S[Ja]=Mb;P=P||Mb!==Ya}return P?S:B}};
var e=c(2);c(4);c(3)},
function(a){var b=Object.getPrototypeOf;a.exports=function(c){return b(Object(c))}},
function(a){a.exports=function(b){var c=!1;if(null!=b&&"function"!=typeof b.toString)try{c=!!(b+"")}catch(d){}return c}},
function(a){a.exports=function(b){return!!b&&"object"==typeof b}},
function(a,b,c){(function(d){a.exports=c(12)(d||window||this)}).call(b,function(){return this}())},
function(a){a.exports=function(b){var c;b=b.Symbol;return"function"==typeof b?b.observable?c=b.observable:(c="function"==typeof b["for"]?b["for"]("observable"):b("observable"),b.observable=c):c="@@observable",c}}])};
"object"==typeof exports&&"object"==typeof module?module.exports=tR():"function"==typeof define&&define.amd?define([],tR):"object"==typeof exports?exports.Redux=tR():this.Redux=tR();!0;var uR=function(a){this.name_=a;this.files_=[];this.directories_=[];this.directoryMap_={}};
uR.prototype.getDirectory=function(a){return this.directoryMap_[a]};
uR.prototype.getName=function(){return this.name_};var wR=function(a,b){this.callback_=b;this.hasError_=!1;this.unscannedDirectories_=[];this.maxConcurrentScans_=5;this.fileOps_=this.directoryOps_=0;this.rootDirectory_=new uR("");Wxa(this,a,this.rootDirectory_);vR(this)},Xxa=function(a,b){this.entry=a;
this.parent=b},Wxa=function(a,b,c){for(var d=0;d<b.length;d++){var e=b[d];
e.isFile?(a.fileOps_++,e.file(r(a.handleFileSuccess_,a,c),r(a.handleFileError_,a))):a.unscannedDirectories_.push(new Xxa(e,c))}},vR=function(a){if(0<a.unscannedDirectories_.length&&a.directoryOps_<a.maxConcurrentScans_&&!a.hasError_){a.directoryOps_++;
var b=a.unscannedDirectories_.shift(),c=b.entry,d=new uR(c.name);b=b.parent;b.directoryMap_[d.getName()]=d;b.directories_.push(d);c=c.createReader();c.readEntries(r(a.handleDirectorySuccess_,a,c,d),r(a.handleDirectoryError_,a))}0!=a.directoryOps_||0!=a.fileOps_||0!=a.unscannedDirectories_.length&&!a.hasError_||a.callback_(a.rootDirectory_.files_,a.rootDirectory_.directories_,a.hasError_)};
wR.prototype.handleDirectorySuccess_=function(a,b,c){Wxa(this,c,b);0==c.length?(this.directoryOps_--,vR(this)):a.readEntries(r(this.handleDirectorySuccess_,this,a,b),r(this.handleDirectoryError_,this))};
wR.prototype.handleDirectoryError_=function(){this.hasError_=!0;this.directoryOps_--;vR(this)};
wR.prototype.handleFileSuccess_=function(a,b){a.files_.push(b);this.fileOps_--;vR(this)};
wR.prototype.handleFileError_=function(){this.hasError_=!0;this.fileOps_--;vR(this)};var xR=function(a){Wv.call(this);Hv(a,"drop",this.onObjectsDropped_,!1,this);Hv(a,"dragenter",this.onFilesDragged_,!1,this);Hv(a,"dragover",this.onFilesDragged_,!1,this)};
t(xR,Wv);var yR=function(a,b){vv.call(this,"c");this.files=a;this.directories=b};
t(yR,vv);var Yxa=function(a){vv.call(this,"d");this.errorDescription=a};
t(Yxa,vv);xR.prototype.onObjectsDropped_=function(a){a.preventDefault();var b=a.event_.dataTransfer;if((a=b&&b.items)&&0<a.length&&a[0].webkitGetAsEntry){b=[];for(var c=0;c<a.length;c++)b.push(a[c].webkitGetAsEntry());var d=this;new wR(b,function(e,g,h){h?d.dispatchEvent(new Yxa("Error occurred while reading from the file system.")):d.dispatchEvent(new yR(e,g))})}else(a=b&&b.files)&&this.dispatchEvent(new yR(a,[]))};
xR.prototype.onFilesDragged_=function(a){a.preventDefault()};var zR=function(a,b){this.name_=a;this.inputElement_=b};
zR.prototype.getName=function(){return this.name_};var AR=function(a,b,c){Wv.call(this);this.overlayTarget_=a;this.parentOverlay_=null!=a?a.parentNode:vh("scotty-overlay-parent");this.selectorType_=b||"single_file";this.acceptTypes_=c||[];this.overlay_=Zxa(this,this.overlayTarget_,this.selectorType_,this.acceptTypes_)};
t(AR,Wv);var BR=function(a,b,c){vv.call(this,"e");this.files=a;this.directories=b;this.legacyFile=c};
t(BR,vv);AR.prototype.hideOverlay=function(){this.overlay_.style.display="none"};
var Zxa=function(a,b,c,d){var e=document.createElement("input");e.setAttribute("type","file");e.setAttribute("name","Filedata");Hv(e,"change",a.onFilesSelected_,!1,a);"multiple_file"===c&&(e.multiple="true");"single_directory"===c&&(e.webkitdirectory="true");0<d.length&&e.setAttribute("accept",d.join(","));e.style.position="absolute";e.style.overflow="hidden";e.style.height="0px";e.style.width="0px";e.style.opacity="0";if(null!=a.overlayTarget_)return e.style.height=b.offsetHeight+"px",e.style.width=
b.offsetWidth+"px",a.parentOverlay_&&(a.parentOverlay_.style.position="relative"),Bh(e,b),fj(e,new Wg(b.offsetLeft,b.offsetTop)),e;a.parentOverlay_.appendChild(e);return e};
AR.prototype.click=function(){this.overlay_.click()};
AR.prototype.onFilesSelected_=function(a){a:{try{var b=void 0!==new XMLHttpRequest().upload;break a}catch(p){}b=!1}if(b){a=a.target.files;b=[];if("single_directory"===this.selectorType_&&(Re||Oe)){b=new uR("");if(File.prototype.hasOwnProperty("webkitRelativePath"))for(var c=0;c<a.length;c++)for(var d=a[c],e=d.webkitRelativePath.split("/"),g=b,h=0;h<e.length;h++){var m=e[h];if(h==e.length-1){"."!=m&&g.files_.push(d);break}var n=g.getDirectory(m);void 0==n&&(m=n=new uR(m),g.directoryMap_[m.getName()]=
m,g.directories_.push(m));g=n}b=b.directories_}this.dispatchEvent(new BR(a,b,null))}else a=a.target.value,a.match(/^c:\\fakepath\\/i)&&(a=a.substring(12)),this.dispatchEvent(new BR([],[],new zR(a,this.overlay_)));this.parentOverlay_.removeChild(this.overlay_);this.overlay_=Zxa(this,this.overlayTarget_,this.selectorType_,this.acceptTypes_)};var $xa=function(a,b){this.uploadUrl_=a;this.chunkGranularity_=b};
$xa.prototype.getUploadUrl=function(){return this.uploadUrl_};var CR=function(){Wv.call(this)};
t(CR,Wv);var DR=function(a){vv.call(this,a)};
t(DR,vv);var aya=function(){this.maxRetries_=6;this.maxRetryDelayMs_=6E4;this.maxChunkSize_=1073741824;this.detectCorruptedBlob_=this.retryOnHttpClientErrorEnabled_=!1};
f=aya.prototype;f.setMaxRetries=function(a){this.maxRetries_=a};
f.setMaxRetryDelayMs=function(a){this.maxRetryDelayMs_=a};
f.setMaxChunkSize=function(a){this.maxChunkSize_=a};
f.setRetryOnHttpClientErrorEnabled=function(a){this.retryOnHttpClientErrorEnabled_=a};
f.setDetectCorruptedBlobEnabled=function(a){this.detectCorruptedBlob_=a};var ER=function(a,b,c,d,e){Wv.call(this);c=document.createElement("form");c.setAttribute("method",b);c.setAttribute("enctype","multipart/form-data");c.setAttribute("encoding","multipart/form-data");var g=document.createElement("input");g.setAttribute("type","hidden");g.setAttribute("name","metadata");g.setAttribute("value",e);c.appendChild(g);c.appendChild(d);this.form_=c;a=new cx(a);Xw(a,"upload_protocol","multipart");this.url_=a.toString();this.method_=b;this.metadata_=e;this.request_=new HM;this.state_=
"Ready";this.errorDescription_=null;this.eventHandler_=new Sv(this);ok(this,this.eventHandler_);this.eventHandler_.listen(this.request_,"success",this.onTransferSuccess_);this.eventHandler_.listen(this.request_,"error",this.onTransferError_)};
t(ER,CR);f=ER.prototype;f.run=function(){this.state_="Transferring";var a=this.request_,b=this.form_;if(a.active_)throw Error("[goog.net.IframeIo] Unable to send, already active.");var c=new cx(this.url_||b.action);a.lastUri_=c;a.form_=b;ed(a.form_,c.toString());rta(a)};
f.getBytesTransferred=function(){return null};
f.getIntermediateResponseHeaders=function(){return null};
f.getResponseCode=function(){return null};
f.getResponseHeaders=function(){return null};
f.getResponseText=function(){return this.request_&&this.request_.getResponseText()||null};
f.getErrorDescription=function(){return this.errorDescription_};
f.getTransferHandle=function(){return null};
f.isCancelSupported=function(){return!0};
f.cancel=function(){this.request_&&this.request_.abort();this.state_="Cancelled";this.dispatchEvent(new DR("j"))};
f.isPauseSupported=function(){return!1};
f.pause=function(){};
f.unpause=function(){};
f.onTransferSuccess_=function(){this.state_="Complete";this.dispatchEvent(new DR("g"))};
f.onTransferError_=function(){this.errorDescription_="Transfer failed.";this.state_="Error";this.dispatchEvent(new DR("i"))};var FR=function(){Fx.call(this)};
t(FR,Fx);FR.prototype.createXhr=function(){var a=Fx.prototype.createXhr.call(this);a.upload&&(a.upload.onprogress=r(this.onProgress_,this));return a};
FR.prototype.onProgress_=function(a){this.dispatchEvent(a)};var bya=function(){this.attempt_=-1;this.delayCallId_=null;this.initialDelay_=250;this.maxDelayMs_=6E4;this.maxAttempts_=-1;this.backoffMultiplier_=2},dya=function(a,b){var c=a.attempt_+1;
if(0<a.maxAttempts_&&c>a.maxAttempts_)return!1;0==c?b():a.delayCallId_=xw(function(){a.delayCallId_=null;b()},cya(a),a);
a.attempt_=c;return!0};
bya.prototype.reset=function(){this.delayCallId_&&yw(this.delayCallId_);this.attempt_=-1};
var cya=function(a){var b=a.initialDelay_*Math.pow(a.backoffMultiplier_,a.attempt_);0<=a.maxDelayMs_&&(b=Math.min(b,a.maxDelayMs_));return b};var eya=["Content-Length","Content-Type","Content-Encoding","Transfer-Encoding"],GR=function(a,b){for(var c in a)if(c.toLowerCase()===b.toLowerCase())return a[c]},fya=function(a,b){for(var c in a)if(c.toLowerCase()===b.toLowerCase()){delete a[c];
break}},gya=function(a){a=u.clone(a);
for(var b=0;b<eya.length;++b){var c=eya[b],d=GR(a,c);d&&(a["X-Goog-Upload-Header-"+c]=d,fya(a,c))}return a},hya=function(a){a=u.clone(a);
fya(a,"X-Goog-Upload-Status");return a};var HR=function(a){Wv.call(this);a=a||new aya;this.request_=this.state_=null;this.withCredentials_=!1;this.transferHandle_=null;this.lastEndOffset_=this.offset_=this.bytesTransferred_=0;this.retryIterator_=new bya;this.retryIterator_.maxAttempts_=a.maxRetries_;this.retryIterator_.maxDelayMs_=a.maxRetryDelayMs_;this.errorDescription_=null;this.eventHandler_=new Sv(this);ok(this,this.eventHandler_);this.url_=this.blob_=null;this.method_=void 0;this.metadata_=this.headers_=null;this.maxChunkSize_=a.maxChunkSize_;
this.chunkSize_=null;this.retryOnHttpClientErrorEnabled_=a.retryOnHttpClientErrorEnabled_;this.requireUploadRequestModification_=!1;this.originalBlobSize_=0;this.detectCorruptedBlobEnabled_=a.detectCorruptedBlob_;this.intermediateResponseHeaders_=this.responseText_=this.responseHeaders_=this.responseCode_=null};
t(HR,CR);f=HR.prototype;f.run=function(){IR(this)};
f.getBytesTransferred=function(){return this.bytesTransferred_};
f.getIntermediateResponseHeaders=function(){return this.intermediateResponseHeaders_};
f.getResponseCode=function(){return this.responseCode_};
f.getResponseHeaders=function(){return this.responseHeaders_};
f.getResponseText=function(){return this.responseText_};
f.getErrorDescription=function(){return this.errorDescription_};
f.getTransferHandle=function(){return this.transferHandle_};
f.isCancelSupported=function(){return!0};
f.cancel=function(){if("Response received"!=this.state_&&"Error"!=this.state_){this.eventHandler_.removeAll();this.request_&&this.request_.abort();this.retryIterator_.reset();if("Upload"===this.state_||"Query"===this.state_){var a=new FR;a.withCredentials_=this.withCredentials_;a.send(this.transferHandle_.getUploadUrl(),"POST","",{"X-Goog-Upload-Command":"cancel"})}this.state_="Cancel";this.bytesTransferred_=0;this.dispatchEvent(new DR("j"))}};
f.isPauseSupported=function(){return!1};
f.pause=function(){};
f.unpause=function(){};
var IR=function(a){var b=r(a.continueTransferInternal_,a);dya(a.retryIterator_,b)||JR(a,"Transfer encountered too many consecutive failures.")};
HR.prototype.continueTransferInternal_=function(){switch(this.state_){case"Start":this.start_();break;case"Upload":this.upload_();break;case"Query":this.request_=new FR;this.eventHandler_.removeAll();this.eventHandler_.listen(this.request_,"complete",this.onQueryComplete_);var a=Object.assign({},this.headers_||{},{"X-Goog-Upload-Command":"query"});this.request_.send(this.transferHandle_.getUploadUrl(),"POST","",a);break;default:throw Error("Invalid upload state!");}};
var JR=function(a,b){a.state_="Error";a.errorDescription_=b;a.dispatchEvent(new DR("i"))};
f=HR.prototype;f.start_=function(){this.request_=new FR;var a=u.clone(this.headers_);null!=this.blob_.size&&(a["Content-Length"]=this.blob_.size);a=gya(a);a["X-Goog-Upload-Protocol"]="resumable";a["X-Goog-Upload-Command"]="start";this.eventHandler_.removeAll();this.eventHandler_.listen(this.request_,"complete",this.onStartComplete_);this.request_.withCredentials_=this.withCredentials_;this.request_.send(this.url_,this.method_,this.metadata_,a)};
f.onStartComplete_=function(a){var b=a.target;if(KR(b))LR(this,b);else if(MR(b)){a=XK(a.target.getAllResponseHeaders());b={};for(var c in a)ec(c.toLowerCase(),"x-goog-upload-header-")&&(b[c.substring(21)]=a[c]);this.intermediateResponseHeaders_=b;this.dispatchEvent(new DR("h"));c=GR(a,"X-Goog-Upload-URL");a=(a=GR(a,"X-Goog-Upload-Chunk-Granularity"))?parseInt(a,10):1;void 0===c||isNaN(a)||0>=a?JR(this,"Server returned invalid headers."):(this.chunkSize_=Math.floor(this.maxChunkSize_/a)*a,this.transferHandle_=
new $xa(c,a),this.dispatchEvent(new DR("k")),this.state_="Upload",this.retryIterator_.reset(),IR(this))}else IR(this)};
f.upload_=function(){var a=this.transferHandle_.getUploadUrl(),b=this.blob_.size;if(zsa()){var c=this.chunkSize_;var d=this.offset_+c>=b;b=WK(this.blob_,this.offset_,d?b:this.offset_+c)}else this.offset_=0,b=this.blob_,d=!0;this.request_=new FR;this.request_.withCredentials_=this.withCredentials_;this.eventHandler_.removeAll();this.eventHandler_.listen(this.request_,"progress",this.onUploadProgress_);c=r(this.onUploadComplete_,this,this.offset_+b.size,d);this.eventHandler_.listen(this.request_,"complete",
c);d=Object.assign({},this.headers_||{},{"X-Goog-Upload-Command":"upload"+(d?", finalize":""),"X-Goog-Upload-Offset":this.offset_});this.request_.send(a,"POST",b,d)};
f.onUploadProgress_=function(a){this.bytesTransferred_=this.offset_+a.loaded;this.dispatchEvent(new DR("f"))};
f.onUploadComplete_=function(a,b,c){c=c.target;(this.retryOnHttpClientErrorEnabled_?iya(c)||404==c.getStatus():KR(c))?(this.bytesTransferred_=a,LR(this,c)):MR(c)?b?JR(this,"Got a non-final success response after issuing a finalize command."):(this.offset_=this.bytesTransferred_=a,this.retryIterator_.reset(),IR(this)):jya(this)?JR(this,"Blob has been modified or corrupted."):(this.requireUploadRequestModification_=400==c.getStatus(),this.state_="Query",IR(this))};
f.onQueryComplete_=function(a){var b=a.target;KR(b)?(200===b.getStatus()&&(this.bytesTransferred_=this.blob_.size),LR(this,b)):MR(b)?(a=XK(a.target.getAllResponseHeaders()),a=parseInt(GR(a,"X-Goog-Upload-Size-Received"),10),isNaN(a)?JR(this,"Server did not respond with current offset."):a<this.offset_?JR(this,"Server lost bytes! Expected an offset of at least "+this.offset_+", but got an offset of "+a+"."):this.requireUploadRequestModification_&&this.offset_===a?JR(this,"Server returned the same offset as the last failed upload attempt."):(
this.requireUploadRequestModification_=!1,this.offset_<a&&this.retryIterator_.reset(),this.offset_=this.bytesTransferred_=a,this.state_="Upload",IR(this))):IR(this)};
var LR=function(a,b){a.responseCode_=b.getStatus();var c=XK(b.getAllResponseHeaders());a.responseHeaders_=hya(c);a.responseText_=b.getResponseText();a.state_="Response received";a.dispatchEvent(new DR("g"))},MR=function(a){var b=a.getStatus();
a=XK(a.getAllResponseHeaders());a=GR(a,"X-Goog-Upload-Status");return 200===b&&"active"===a},iya=function(a){a=XK(a.getAllResponseHeaders());
return"final"===GR(a,"X-Goog-Upload-Status")},KR=function(a){if(iya(a))return!0;
a=a.getStatus();return 400<=a&&500>a},jya=function(a){if(!a.detectCorruptedBlobEnabled_||!a.blob_||0>=a.originalBlobSize_)return!1;
if(a.blob_.size!==a.originalBlobSize_)return!0;try{var b=WK(a.blob_,0,1);if(!b)return!0;var c=new UK;VK(c);c.readAsBinaryString(b);return a.blob_.size!==a.originalBlobSize_}catch(d){return!0}};var NR=function(a,b,c,d,e,g){Wv.call(this);this.payload_=d;this.url_=a;this.method_=b;this.headers_=c;this.metadata_=e;this.metadataOverhead_=0;this.encoding_=g||"binary";a=new Rg;this.boundary_="scotty-"+zd()+"-"+a.toIsoString();this.transferRequest_=null;this.bytesTransferred_=0;this.responseText_=this.responseHeaders_=this.responseCode_=null;this.state_="Ready";this.errorDescription_=null;this.eventHandler_=new Sv(this);ok(this,this.eventHandler_)};
t(NR,CR);f=NR.prototype;
f.run=function(){var a=u.clone(this.headers_);null!=this.payload_.length&&(a["Content-Length"]=this.payload_.length);a=gya(a);a["X-Goog-Upload-Protocol"]="multipart";a["Content-Type"]="multipart/related; boundary="+this.boundary_;this.state_="Transferring";this.transferRequest_=new FR;this.eventHandler_.removeAll();this.eventHandler_.listen(this.transferRequest_,"progress",this.onTransferProgress_);this.eventHandler_.listen(this.transferRequest_,"complete",this.onTransferComplete_);this.transferRequest_.send(this.url_,
this.method_,kya(this),a)};
f.getBytesTransferred=function(){return this.bytesTransferred_};
f.getIntermediateResponseHeaders=function(){return null};
f.getResponseCode=function(){return this.responseCode_};
f.getResponseHeaders=function(){return this.responseHeaders_};
f.getResponseText=function(){return this.responseText_};
f.getErrorDescription=function(){return this.errorDescription_};
f.getTransferHandle=function(){return null};
f.isCancelSupported=function(){return!0};
f.cancel=function(){"Complete"!=this.state_&&"Error"!=this.state_&&(this.eventHandler_.removeAll(),this.transferRequest_&&this.transferRequest_.abort(),this.state_="Cancel",this.dispatchEvent(new DR("j")))};
f.isPauseSupported=function(){return!1};
f.pause=function(){};
f.unpause=function(){};
f.onTransferProgress_=function(a){this.bytesTransferred_=Math.max(0,a.loaded-this.metadataOverhead_);this.dispatchEvent(new DR("f"))};
f.onTransferComplete_=function(a){var b=a.target.getStatus();void 0===b||-1===b?(this.errorDescription_="Connection broken before response was received.",this.state_="Error",this.dispatchEvent(new DR("i"))):(this.responseCode_=b,a=a.target,b=XK(a.getAllResponseHeaders()),this.responseHeaders_=hya(b),this.responseText_=a.getResponseText(),this.state_="Complete",this.dispatchEvent(new DR("g")))};
var kya=function(a){var b="--"+a.boundary_+"\r\nContent-Disposition: form-data; name=\"metadata\"\r\n\r\n"+(a.metadata_+"\r\n--")+a.boundary_+"\r\nContent-Disposition: form-data; name=\"Filedata\"\r\nContent-Transfer-Encoding: "+(a.encoding_+"\r\n\r\n")+a.payload_+"\r\n--"+a.boundary_+"--\r\n";a.metadataOverhead_=b.length-a.payload_.length;return b};
NR.prototype.createXhrRequest=function(){return new FR};var OR=function(){},lya=function(a,b,c){if(c instanceof zR)return new ER(a,"POST",b,c.inputElement_,"");
if("string"===typeof c||c instanceof String)return new NR(a,"POST",b,c,"");var d=new HR(void 0);d.url_=a;d.method_="POST";d.headers_=b;d.blob_=c;d.originalBlobSize_=c.size;d.metadata_="";d.state_="Start";return d};
OR.prototype.resumeTransfer=function(a,b,c){c=new HR(c);c.blob_=a;c.originalBlobSize_=a.size;c.transferHandle_=b;a=b.chunkGranularity_;c.chunkSize_=Math.floor(c.maxChunkSize_/a)*a;c.state_="Query";return c};
OR.prototype.newTransferFromBase64String=function(a,b,c,d,e){return new NR(a,b,c,d,e,"base64")};
OR.prototype.isFileOrBlob_=function(a){return a instanceof Blob||"[object File]"===a.toString()||"[object Blob]"===a.toString()};var PR=function(a,b,c){a.timeOfStartCall=new Date().getTime();var d=c||q,e=d.document,g=Ra(d);g&&(a.nonce=g);if("help"==a.flow){var h=Sa("document.location.href",d);!a.helpCenterContext&&h&&(a.helpCenterContext=h.substring(0,1200));h=!0;if(b&&JSON&&JSON.stringify){var m=JSON.stringify(b);(h=1200>=m.length)&&(a.psdJson=m)}h||(b={invalidPsd:!0})}b=[a,b,c];d.GOOGLE_FEEDBACK_START_ARGUMENTS=b;c=a.serverUri||"//www.google.com/tools/feedback";if(h=d.GOOGLE_FEEDBACK_START)h.apply(d,b);else{d=c+"/load.js?";
for(var n in a)b=a[n],null!=b&&!$a(b)&&(d+=encodeURIComponent(n)+"="+encodeURIComponent(b)+"&");a=ah(e).createElement("SCRIPT");g&&a.setAttribute("nonce",g);jd(a,hi(d));e.body.appendChild(a)}};
Na("userfeedback.api.startFeedback",PR,void 0);var mya={};function nya(){return mya.version||(mya.version="version".replace(/\-([a-z])/g,function(a,b){return b.toUpperCase()}))}
;var oya=/\.vflset|-vfl[a-zA-Z0-9_+=-]+/,pya=/-[a-zA-Z]{2,3}_[a-zA-Z]{2,3}(?=(\/|$))/;function QR(a,b){var c=RR(a);spf.script.load(a,c,b)}
function SR(a,b){a=RR(a);spf.script.ignore(a,b)}
function RR(a){var b="";if(a){var c=a.indexOf("jsbin/"),d=a.lastIndexOf(".js"),e=c+6;-1<c&&-1<d&&d>e&&(b=a.substring(e,d),b=b.replace(oya,""),b=b.replace(pya,""),b=b.replace("debug-",""),b=b.replace("tracing-",""))}return b}
;var TR=function(){this.loading=!1;this.currentProgram_=this.vm_=null};
TR.prototype.initialize=function(a,b,c,d){var e=this;b?(this.loading=!0,QR(b,function(){e.loading=!1;if(window.botguard)qya(e,c,d);else{var g=RR(b);spf.script.unload(g);g=Error("Unable to load Botguard");g.params="from "+b;xe(g)}})):a&&(eval(a),window.botguard?qya(this,c,d):xe(Error("Unable to load Botguard from JS")))};
TR.prototype.isInitialized=function(){return!!this.vm_};
TR.prototype.isInitializedWithProgram=function(a){return this.isInitialized()&&!!a&&this.currentProgram_===a};
var qya=function(a,b,c){try{a.vm_=new window.botguard.bg(b),a.currentProgram_=b}catch(d){xe(d)}c&&c(b)};
TR.prototype.invoke=function(a){a=void 0===a?{}:a;return this.vm_?this.vm_.invoke(void 0,void 0,a):null};
TR.prototype.dispose=function(){this.currentProgram_=this.vm_=null};var rya=[],UR=!1;function sya(){if("1"!=u.getValueByKeys(z("PLAYER_CONFIG",{}),"args","privembed")){var a=function(){UR=!0;"google_ad_status"in window?re("DCLKSTAT",1):re("DCLKSTAT",2)};
QR("//static.doubleclick.net/instream/ad_status.js",a);rya.push(Fn(Dn,function(){UR||"google_ad_status"in window||(SR("//static.doubleclick.net/instream/ad_status.js",a),UR=!0,re("DCLKSTAT",3))},5E3))}}
function tya(){return parseInt(z("DCLKSTAT",0),10)}
;var VR=new TR,uya=!1,vya=0,wya="";function xya(a){A("botguard_periodic_refresh")?vya=nn():A("botguard_always_refresh")&&(wya=a)}
function yya(a){if(a){if(VR.loading)return!1;if(A("botguard_periodic_refresh"))return 72E5<nn()-vya;if(A("botguard_always_refresh"))return wya!=a}else return!1;return!uya}
function zya(){return VR.isInitialized()}
function Aya(a){a=void 0===a?{}:a;return VR.invoke(a)}
;var WR=new TR;function Bya(){var a=u.clone(Cya),b;return jw(new Yv(function(c,d){a.onSuccess=function(e){Nm(e)?c(e):d(new YR("Request failed, status="+e.status,"net.badstatus",e))};
a.onError=function(e){d(new YR("Unknown request error","net.unknown",e))};
a.onTimeout=function(e){d(new YR("Request timed out","net.timeout",e))};
b=Vm("//googleads.g.doubleclick.net/pagead/id",a)}),function(c){c instanceof kw&&b.abort();
return cw(c)})}
var YR=function(a,b,c){hb.call(this,a+", errorCode="+b);this.errorCode=b;this.xhr=c;this.name="PromiseAjaxError"};
l(YR,hb);var ZR=function(a){this.wrappedPromise_=void 0===a?null:a;this.state_=0;this.value_=null};
ZR.prototype.then=function(a,b,c){return this.wrappedPromise_?this.wrappedPromise_.then(a,b,c):1===this.state_&&a?(a=a.call(c,this.value_),Lk(a)?a:Dya(a)):2===this.state_&&b?(a=b.call(c,this.value_),Lk(a)?a:Eya(a)):this};
ZR.prototype.getValue=function(){return this.value_};
ZR.prototype.isRejected=function(){return 2==this.state_};
Kk(ZR);var Eya=function(a){var b=new ZR;a=void 0===a?null:a;b.state_=2;b.value_=void 0===a?null:a;return b},Dya=function(a){var b=new ZR;
a=void 0===a?null:a;b.state_=1;b.value_=void 0===a?null:a;return b};var aS=function(a){hb.call(this,a.message||a.description||a.name);this.isMissing=a instanceof $R;this.isTimeout=a instanceof YR&&"net.timeout"==a.errorCode;this.isCanceled=a instanceof kw};
l(aS,hb);aS.prototype.name="BiscottiError";var $R=function(){hb.call(this,"Biscotti ID is missing from server")};
l($R,hb);$R.prototype.name="BiscottiMissingError";var Cya={format:"RAW",method:"GET",timeout:5E3,withCredentials:!0},bS=null;function im(){if("1"===u.getValueByKeys(z("PLAYER_CONFIG",{}),"args","privembed"))return cw(Error("Biscotti ID is not available in private embed mode"));bS||(bS=jw(Bya().then(Fya),function(a){return Gya(2,a)}));
return bS}
function Fya(a){a=a.responseText;if(!ec(a,")]}'"))throw new $R;a=JSON.parse(a.substr(4));if(1<(a.type||1))throw new $R;a=a.id;jm(a);bS=Dya(a);Hya(18E5,2);return a}
function Gya(a,b){b=new aS(b);jm("");bS=Eya(b);0<a&&Hya(12E4,a-1);throw b}
function Hya(a,b){Im(function(){jw(Bya().then(Fya,function(c){return Gya(b,c)}),Ta)},a)}
var Iya=function(){try{var a=Sa("yt.ads.biscotti.getId_");return a?a():im()}catch(b){return cw(b)}};function cS(a,b,c){var d=void 0===d?!0:d;var e=z("VALID_SESSION_TEMPDATA_DOMAINS",[]),g=oi(window.location.href);g&&e.push(g);g=oi(a);if(wb(e,g)||!g&&ec(a,"/"))if(A("autoescape_tempdata_url")&&(e=document.createElement("a"),fd(e,a),a=e.href),a&&(a=qi(a),a=ri(a)))d&&(b.itct||b.ved)&&(b.csn=b.csn||Wo()),c?(c=parseInt(c,10),isFinite(c)&&0<c&&(d="ST-"+Ad(a).toString(36),b=b?xi(b):"",Wn(d,b,c||5))):(c="ST-"+Ad(a).toString(36),b=b?xi(b):"",Wn(c,b,5))}
;function Jya(a,b){if(a.commandMetadata&&a.commandMetadata.webCommandMetadata&&a.commandMetadata.webCommandMetadata.url){a=mm(a.commandMetadata.webCommandMetadata.url).adurl;var c;if(c=a)c=oi(a),c=null===c?null:c.split(".").reverse(),c=null===c?!1:"com"==c[0]&&c[1].match(/^youtube(?:kids|-nocookie)?$/)?!0:!1;c&&cS(qi(a),{encoded_ad_playback_context:b})}}
;var dS=Sa("ytglobal.prefsUserPrefsPrefs_")||{};Na("ytglobal.prefsUserPrefsPrefs_",dS,void 0);var eS=function(){this.cookieName_=z("ALT_PREF_COOKIE_NAME","PREF");var a=Ig.get(""+this.cookieName_,void 0);if(a){a=decodeURIComponent(a).split("&");for(var b=0;b<a.length;b++){var c=a[b].split("="),d=c[0];(c=c[1])&&(dS[d]=c.toString())}}};
eS.prototype.get=function(a,b){fS(a);gS(a);a=void 0!==dS[a]?dS[a].toString():null;return null!=a?a:b?b:""};
eS.prototype.set=function(a,b){fS(a);gS(a);if(null==b)throw Error("ExpectedNotNull");dS[a]=b.toString()};
var hS=function(a,b){return!!((Kya("f"+(Math.floor(b/31)+1))||0)&1<<b%31)},iS=function(a,b,c){a="f"+(Math.floor(b/31)+1);
b=1<<b%31;var d=Kya(a)||0;d=c?d|b:d&~b;0==d?delete dS[a]:(c=d.toString(16),dS[a]=c.toString())};
eS.prototype.remove=function(a){fS(a);gS(a);delete dS[a]};
eS.prototype.save=function(){Wn(this.cookieName_,this.dump(),63072E3)};
eS.prototype.clear=function(){u.clear(dS)};
eS.prototype.dump=function(){var a=[],b;for(b in dS)a.push(b+"="+encodeURIComponent(String(dS[b])));return a.join("&")};
var gS=function(a){if(/^f([1-9][0-9]*)$/.test(a))throw Error("ExpectedRegexMatch: "+a)},fS=function(a){if(!/^\w+$/.test(a))throw Error("ExpectedRegexMismatch: "+a);
},Kya=function(a){a=void 0!==dS[a]?dS[a].toString():null;
return null!=a&&/^[A-Fa-f0-9]+$/.test(a)?parseInt(a,16):null};
Ua(eS);var Lya=new Map([["dark","USER_INTERFACE_THEME_DARK"],["light","USER_INTERFACE_THEME_LIGHT"]]),Mya={"/youtuberedoriginals":!0,"/originals":!0},Nya=["/fashion","/channel/UCrpQ4p1Ql_hG8rKXIKM1MOQ","/channel/UCTApTkbpcqiLL39WUlne4ig","/channel/UCW5PCzG3KQvbOX4zc3KY0lQ"],jS=!1,kS=null,lS=void 0;
function mS(){var a=nS(!0);a={isWide:"1"==Ig.get("wide","0"),theme:a};var b=kS;if(b?!u.equals(b,a):a)b={currentValue:a},lS&&(b.timeSinceLastSnapshotSecs=Math.round((nn()-lS)/1E3)),kS&&(b.previousValue=kS),co("appSettingsCaptured",b),kS=a,lS=nn()}
function nS(a){a=void 0===a?!1:a;var b=hS(eS.getInstance(),165)?"USER_INTERFACE_THEME_DARK":"USER_INTERFACE_THEME_LIGHT";return a?b:Oya()||b}
function Oya(){var a=void 0===a?window.location.href:a;if(A("kevlar_disable_theme_param"))return null;var b=mi(ni(5,a));if(Pya(b))return"USER_INTERFACE_THEME_DARK";a=mm(a).theme;return Lya.get(a)||null}
function Pya(a){return!A("disable_dark_fashion_destination_launch")&&Nya.some(function(b){return a.startsWith(b)})?!0:Mya.hasOwnProperty(a)&&!A("desktop_themeable_vulcan")}
;var Qya=["load","abort","error"],oS=function(a){this.transformedData=null;this.invalidAspectRatio=this.cropped=!1;this.maxAspectRatio_=a;this.disableAnimation_=!1;this.image_=new Image;this.angle_=this.dataUrl_=this.mime_=this.reject_=this.resolve_=null};
oS.prototype.transform=function(a){var b=this;this.mime_=a.type;Kz(wsa(a),this.dataUrlRead_,this.readError_,this);Kz(vsa(a.slice(0,65536)),this.exifRead_,this.readError_,this);return new Promise(function(c,d){b.resolve_=c;b.reject_=d})};
oS.prototype.dataUrlRead_=function(a){this.dataUrl_=a;null!=this.angle_&&Rya(this)};
oS.prototype.exifRead_=function(a){a:if(a=new DataView(a),2>a.byteLength||65496!==a.getUint16(0))a=-2;else{for(var b=2,c=a.byteLength;b<c;){var d=a.getUint16(b),e=a.getUint16(b+2);if(65505===d){b+=4;d=a.getUint32(b);e=a.getUint16(b+4);if(1165519206!==d||0!==e)break;b+=6;d=18761===a.getUint16(b);b+=a.getUint32(b+4,d);e=a.getUint16(b,d);b+=2;for(var g=0;g<e;g++){if(274===a.getUint16(b,d)){b+=8;a=a.getUint16(b,d);break a}b+=12}}else if(255!==d>>8)break;else b+=e+2}a=-1}switch(a){case 8:this.angle_=270;
break;case 3:this.angle_=180;break;case 6:this.angle_=90;break;default:this.angle_=0;}null!=this.dataUrl_&&Rya(this)};
oS.prototype.readError_=function(){this.reject_()};
var Rya=function(a){Gv(a.image_,Qya,a.completeTransform_,!1,a);gd(a.image_,yc(a.dataUrl_));"about:invalid#zClosurez"!=a.image_.src&&"data:image/"===a.image_.src.substr(0,11)||a.reject_()};
oS.prototype.completeTransform_=function(){if("about:invalid#zClosurez"!=this.image_.src){var a=yc(this.dataUrl_),b=this.image_.naturalHeight?this.image_.naturalWidth/this.image_.naturalHeight:null;this.invalidAspectRatio=b>this.maxAspectRatio_||b<1/this.maxAspectRatio_;if("image/gif"!==this.mime_||this.disableAnimation_){var c=this.image_.naturalWidth,d=this.image_.naturalHeight,e=b=0,g=this.image_.naturalHeight?this.image_.naturalWidth/this.image_.naturalHeight:null;g>this.maxAspectRatio_?(c=this.maxAspectRatio_*
d,b=(c-this.image_.naturalWidth)/2,this.cropped=!0):g<1/this.maxAspectRatio_?(d=this.maxAspectRatio_*c,e=(d-this.image_.naturalHeight)/2,this.cropped=!0):"image/gif"===this.mime_&&this.disableAnimation_&&(this.cropped=!0);if(90==this.angle_||270==this.angle_)g=c,c=d,d=g,g=b,b=e,e=g;switch(this.angle_){case 90:e-=c;break;case 180:b-=c;e-=d;break;case 270:b-=d;}this.cropped||0!==this.angle_%360?(a=document.createElement("canvas"),a.width=c||1,a.height=d||1,this.image_.naturalWidth&&this.image_.naturalHeight&&(
c=a.getContext("2d"),c.rotate(Math.PI/180*this.angle_),c.drawImage(this.image_,b,e,this.image_.naturalWidth,this.image_.naturalHeight)),this.transformedData=yc(a.toDataURL(this.mime_))):this.transformedData=a}else this.transformedData=a;this.resolve_(this)}};var pS=function(a,b){vv.call(this,a);this.value=b};
l(pS,vv);
var qS=function(a,b,c,d,e,g,h){h=void 0===h?!1:h;Wv.call(this);var m=this;this.url_=a;this.channelId_=b;this.maxFileSizeMb_=c;this.maxAspectRatio_=d;this.dropZoneEl_=e;this.rejectInvalidAspectRatio_=h;this.selectButtonEl_=g;this.reject_=this.resolve_=this.uploadPromise_=null;this.dropZoneOverlay_=new xR(this.dropZoneEl_);this.selectOverlay_=new AR(this.selectButtonEl_);"INPUT"==this.selectButtonEl_.nextSibling.tagName&&this.selectButtonEl_.nextSibling.setAttribute("accept","image/*");this.uploader_=new OR;
this.image_=this.transfer_=null;this.handler_=new Sv(this);ok(this,this.handler_);this.handler_.listen(this.dropZoneOverlay_,"c",this.onChange_).listen(this.dropZoneEl_,"dragover",this.onHover_).listen(this.dropZoneEl_,"dragleave",this.onHover_).listen(g,"click",function(){m.selectOverlay_.click()}).listen(this.selectOverlay_,"e",this.onChange_)};
l(qS,Wv);qS.prototype.disposeInternal=function(){for(var a=this.selectButtonEl_.nextSibling;a&&a.parentNode&&"INPUT"==a.tagName;)a.parentNode.removeChild(a),a=this.selectButtonEl_.nextSibling;this.cancel();Wv.prototype.disposeInternal.call(this)};
qS.prototype.uploadPromise=function(){if(null==this.image_)return null;this.uploadPromise_||this.upload_();return this.uploadPromise_};
qS.prototype.cancel=function(){rS(this);this.image_=null};
var rS=function(a){a.transfer_&&a.transfer_.cancel();a.transfer_=null;a.uploadPromise_=null;a.resolve_=null;a.reject_=null};
f=qS.prototype;f.upload_=function(){var a=this;rS(this);this.transfer_=lya(this.url_,{"X-YouTube-ChannelId":this.channelId_},this.image_);this.handler_.listenOnce(this.transfer_,"g",this.onUploadComplete_);this.handler_.listenOnce(this.transfer_,"i",this.onUploadError_);this.transfer_.run();this.uploadPromise_=new Promise(function(b,c){a.resolve_=b;a.reject_=c})};
f.onChange_=function(a){a.files.length&&(this.image_=a.files[0],this.image_.size>1048576*this.maxFileSizeMb_?(this.image_=null,this.dispatchEvent(new pS("yt.comments.ImageUploadOverlay.FILE_TOO_LARGE_EVENT"))):(this.upload_(),new oS(this.maxAspectRatio_).transform(this.image_).then(r(this.onPreview_,this),r(this.onPreviewError_,this))))};
f.onPreview_=function(a){if(a.invalidAspectRatio&&(this.rejectInvalidAspectRatio_&&(this.image_=null),this.dispatchEvent(new pS("yt.comments.ImageUploadOverlay.FILE_INVALID_ASPECT_RATIO_EVENT")),this.rejectInvalidAspectRatio_))return;a.cropped&&this.dispatchEvent(new pS("yt.comments.ImageUploadOverlay.CROPPED_EVENT"));this.dispatchEvent(new pS("yt.comments.ImageUploadOverlay.CHANGE_EVENT",a.transformedData))};
f.onPreviewError_=function(){this.image_=null;this.dispatchEvent(new pS("yt.comments.ImageUploadOverlay.INVALID_EVENT"))};
f.onHover_=function(a){a.stopPropagation();a.preventDefault();if("dragover"===a.type)a=!0;else if("dragleave"===a.type)a=!1;else return;this.dispatchEvent(new pS("yt.comments.ImageUploadOverlay.HOVER_EVENT",a))};
f.onUploadComplete_=function(){var a=Ek(this.transfer_.getResponseText());this.resolve_(a.encryptedBlobId)};
f.onUploadError_=function(){this.reject_();rS(this)};var Sya={"consent.google.com":!0,"consent.youtube.com":!0,"consent-daily-0.sandbox.youtube.com":!0,"consent-daily-1.sandbox.youtube.com":!0,"consent-daily-2.sandbox.youtube.com":!0,"consent-daily-3.sandbox.youtube.com":!0,"consent-daily-4.sandbox.youtube.com":!0,"consent-daily-5.sandbox.youtube.com":!0,"consent-daily-6.sandbox.youtube.com":!0,"consent-autopush.sandbox.youtube.com":!0,"daily-0.consent.corp.youtube.com":!0,"daily-1.consent.corp.youtube.com":!0,"daily-2.consent.corp.youtube.com":!0,
"daily-3.consent.corp.youtube.com":!0,"daily-4.consent.corp.youtube.com":!0,"daily-5.consent.corp.youtube.com":!0,"daily-6.consent.corp.youtube.com":!0,"autopush.consent.corp.youtube.com":!0,"dev.consent.corp.youtube.com":!0,"consent-daily-0.sandbox.google.com":!0,"consent-daily-1.sandbox.google.com":!0,"consent-daily-2.sandbox.google.com":!0,"consent-daily-3.sandbox.google.com":!0,"consent-daily-4.sandbox.google.com":!0,"consent-daily-5.sandbox.google.com":!0,"consent-daily-6.sandbox.google.com":!0,
"consent-autopush.sandbox.google.com":!0,"daily-0.consent.corp.google.com":!0,"daily-1.consent.corp.google.com":!0,"daily-2.consent.corp.google.com":!0,"daily-3.consent.corp.google.com":!0,"daily-4.consent.corp.google.com":!0,"daily-5.consent.corp.google.com":!0,"daily-6.consent.corp.google.com":!0,"autopush.consent.corp.google.com":!0,"dev.consent.corp.google.com":!0};function sS(a,b){if(!a.includes("DATE_PLACEHOLDER"))return a;var c=new Date(0);c.setUTCSeconds(b);return a.replace("DATE_PLACEHOLDER",c.toLocaleString([],{month:"numeric",day:"numeric",year:"2-digit",hour:"2-digit",minute:"2-digit"}))}
;function tS(a){var b;vm(["fullscreenEnabled","webkitFullscreenEnabled","mozFullScreenEnabled","msFullscreenEnabled"],document)?uS()==a&&(b=document):b=a;b&&(a=vm(["exitFullscreen","webkitExitFullscreen","mozCancelFullScreen","msExitFullscreen"],b))&&a.call(b)}
function Tya(){var a=document;return ub(["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"],function(b){return"on"+b.toLowerCase()in a})}
function uS(){var a=vm(["fullscreenElement","webkitFullscreenElement","mozFullScreenElement","msFullscreenElement"],document);return a?a:null}
;function vS(a,b){b=void 0===b?!0:b;a.addEventListener("wheel",Uya);a.overscrollConfig={cooldown:b}}
function wS(a){a.overscrollConfig=void 0;a.removeEventListener("wheel",Uya)}
function Uya(a){var b=a.deltaY,c=a.target,d=null;if(window.Polymer&&window.Polymer.Element){c=a.path||a.composedPath&&a.composedPath();c=k(c);for(var e=c.next();!e.done&&(e=e.value,!Vya(e,b));e=c.next())if(e.overscrollConfig){d=e;break}}else for(;c&&!Vya(c,b);){if(c.overscrollConfig){d=c;break}c=c.parentElement}d&&(b=d.overscrollConfig,b.cooldown?(d=a.deltaY,c=b.lastDeltaY||0,b.lastDeltaY=d,e=b.lastStopped||0,c&&e&&0<c==0<d?Math.abs(c)>=Math.abs(d)?(d=e+1200,c=!1):(d=e+600,c=!0):(d=fb()+600,c=!0),
d>fb()&&(a.preventDefault(),c&&(b.lastStopped=fb()))):a.preventDefault())}
function Vya(a,b){return 0>b&&0<a.scrollTop||0<b&&a.scrollTop<a.scrollHeight-a.clientHeight-1?(a=getComputedStyle(a).overflowY,"auto"==a||"scroll"==a):!1}
;var xS=function(a){lk.call(this);this.eventHandlers_=[];this.context_=a||this};
l(xS,lk);xS.prototype.listenAll=function(a,b,c){for(var d=0;d<b.length;d++){var e=a,g=b[d],h=c;h=ve(r(h,this.context_));h={target:e,name:g,callback:h};e.addEventListener(g,h.callback,void 0);this.eventHandlers_.push(h)}};
xS.prototype.unlisten=function(a){for(var b=0;b<this.eventHandlers_.length;b++)if(this.eventHandlers_[b]==a){this.eventHandlers_.splice(b,1);a.target.removeEventListener(a.name,a.callback);break}};
xS.prototype.disposeInternal=function(){for(;this.eventHandlers_.length;){var a=this.eventHandlers_.pop();a.target.removeEventListener(a.name,a.callback)}lk.prototype.disposeInternal.call(this)};var yS=function(a){a=a||{};var b={},c={};this.url=a.url||"";this.args=a.args||u.clone(b);this.assets=a.assets||{};this.attrs=a.attrs||u.clone(c);this.fallback=a.fallback||null;this.fallbackMessage=a.fallbackMessage||null;this.html5=!!a.html5;this.disable=a.disable||{};this.loaded=!!a.loaded;this.messages=a.messages||{}};
yS.prototype.clone=function(){var a=new yS,b;for(b in this)if(this.hasOwnProperty(b)){var c=this[b];"object"==Va(c)?a[b]=u.clone(c):a[b]=c}return a};function Wya(a){a.addEventListener("click",function(b){var c=b.target;c&&c.getAttribute("href")&&(c=c.getAttribute("href"),kd(c,void 0,Sb("_blank")),b.preventDefault(),b.stopImmediatePropagation())})}
;function zS(a,b,c){b=void 0===b?{}:b;Za(b)&&(b={callback:b});c||b._c&&b._c.jsl&&b._c.jsl.h||u.extend(b,{_c:{jsl:{h:z("GAPI_HINT_PARAMS",void 0)}}});(b.gapiHintOverride||z("GAPI_HINT_OVERRIDE"))&&(c=mm(document.location.href).gapi_jsh)&&u.extend(b,{_c:{jsl:{h:c}}});FJ(a,b)}
;var AS=function(a,b,c){this.currentVersion_=dG;this.invalidationTag_=c;this.invalidationCallback_=b;b=a.objectId;!a.useNewTango&&b.startsWith("chat~")&&(b=b.replace("chat~","i:"));this.objectId_=a.useNewTango?new mI(a.objectId,!1):new mI(a.objectId,!1,a.objectSource);this.appAuthTokens_=this.tokenRefreshTimeoutId_=this.subscription_=this.tangoClientStoppable_=this.tangoClient_=null;var d=fw();b=a.requiresAuthToken?d.promise.then(this.getAuthTokenPromise_.bind(this)):d.promise;this.initializationPromise_=
b.then(this.initialize_.bind(this,a));jw(b,this.handleInitializationFailure_.bind(this));zS("auth",function(){d.resolve()})};
t(AS,lk);
AS.prototype.initialize_=function(a,b){var c=new tma(a.channelUri,a.senderUri,a.clientName,a.sessionIndex,void 0,void 0,void 0,a.pageId);b&&this.setAppAuthToken_(b);if(a.useNewTango){b=a.clientName;var d=new cx("https://client-channel.google.com/client-channel/client"),e=new cx("https://client-channel.google.com/client-channel/channel"),g=new cx("https://signaler-pa.clients6.google.com"),h=new cx("https://signaler-pa.googleapis.com");c=fna(new DI(b,d,e,g,h),c);c.apiKey=a.apiKey;a.sessionIndex&&(c.authUser=
a.sessionIndex);a.pageId&&(c.pageId=a.pageId)}else c=CI.create(c,a.clientType),c.tangoClientName=this.invalidationTag_,c.tangoApplicationName=a.clientName;this.appAuthTokens_&&c.withAppAuthTokens(this.appAuthTokens_);a=c.build();this.tangoClient_=a instanceof uI?new vI(a):new AI(new nI(a.doormanUri,a.authMethod),a);this.tangoClientStoppable_=this.tangoClient_.start()};
AS.prototype.handleInitializationFailure_=function(){};
AS.prototype.getAuthTokenPromise_=function(){var a=Xya();if(a)return bw(a);var b=fw();Zm("/live_chat_push_config_ajax",{urlParams:{action_get_token:1},postParams:{topic:this.objectId_.name},onSuccess:function(c,d){b.resolve({token:d.token,token_lifetime_ms:d.token_lifetime_ms,expiration_time:fb()+d.token_lifetime_ms})},
onError:function(c,d){b.reject(d)}});
return b.promise};
var Xya=function(){var a=z("LIVE_CHAT_TANGO_AUTH_TOKEN_DATA");return a&&a.expiration_time>fb()?a:null};
f=AS.prototype;f.setAppAuthToken_=function(a){re("LIVE_CHAT_TANGO_AUTH_TOKEN_DATA",a);this.appAuthTokens_?this.appAuthTokens_.next(a.token):this.appAuthTokens_=new bI(a.token);a=a.expiration_time-fb();this.tokenRefreshTimeoutId_=Im(function(){this.getAuthTokenPromise_().then(this.setAppAuthToken_.bind(this))}.bind(this),a)};
f.disposeInternal=function(){this.initializationPromise_.cancel();this.tokenRefreshTimeoutId_&&(Km(this.tokenRefreshTimeoutId_),this.tokenRefreshTimeoutId_=null);this.subscription_&&this.subscription_.unsubscribe();this.tangoClientStoppable_&&this.tangoClientStoppable_.stop();AS.superClass_.disposeInternal.call(this)};
f.register=function(){this.initializationPromise_.then(function(){var a=this,b=this.objectId_;this.subscription_=this.tangoClient_.signalsFor(b).subscribe(function(c){if(!(b.name!=a.objectId_.name||b.legacySource!=a.objectId_.legacySource||c.version&&0>=c.version.compare(a.currentVersion_))){var d=c.payload;d=d?JSON.parse(d):void 0;a.invalidationCallback_(b.name,d);c.version&&(a.currentVersion_=c.version)}},function(){})},null,this)};
f.unregister=function(){this.initializationPromise_.then(function(){null!=this.subscription_&&(this.subscription_.unsubscribe(),this.subscription_=null)},null,this)};
f.setObjectId=function(a){this.unregister();this.objectId_=null==this.objectId_.legacySource?new mI(a,!1):new mI(a,!1,this.objectId_.legacySource);this.register()};
f.waitForInitialized=function(){return this.initializationPromise_};var Sta=function(){};
Sta.prototype.flush=function(a){a=void 0===a?[]:a;if(A("enable_client_streamz_web")){a=k(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;var c=new SM;c=mg(c,1,b.metricName_);for(var d=b,e=[],g=0;g<d.fields_.length;g++)e.push(d.fields_[g].field_name);c=mg(c,3,e||[]);d=[];e=[];g=k(b.cellMap_.keys());for(var h=g.next();!h.done;h=g.next())e.push(h.value.split(","));for(g=0;g<e.length;g++){h=e[g];var m=b.cellType_;for(var n=b.getCells(h)||[],p=[],x=0;x<n.length;x++){var y=n[x];y=y&&y.cellValue_;var B=
new aN;switch(m){case 3:ug(B,1,$M[0],Number(y));break;case 2:ug(B,2,$M[0],Number(y));}p.push(B)}m=p;for(n=0;n<m.length;n++){p=m[n];x=new XM;p=xg(x,2,p);x=h;y=[];B=b;for(var G=[],P=0;P<B.fields_.length;P++)G.push(B.fields_[P].field_type);B=G;for(G=0;G<B.length;G++){P=B[G];var S=x[G],ca=new ZM;switch(P){case 3:ug(ca,1,YM[0],String(S));break;case 2:ug(ca,2,YM[0],Number(S));break;case 1:ug(ca,3,YM[0],"true"==S);}y.push(ca)}zg(p,1,y);d.push(p)}}zg(c,4,d);b={serializedIncrementBatch:jf(c.serializeBinary())};
co("streamzIncremented",b)}}};function BS(a,b,c){return wo(bo,a,b,c,void 0,void 0)}
function CS(a,b,c){xo(bo,a,b,[c],void 0)}
function DS(a,b){mb(b,function(c){Ao(bo,a,c)})}
function ES(a,b,c){mb(b,function(d){Bo(bo,a,d,c)})}
;function FS(){var a=Vo(),b=Wo();b&&a&&ES(b,[a],!0)}
;var GS;function HS(){if(!GS){GS=new dN;var a=Be("client_streamz_web_flush_count",-1);-1!==a&&(GS.invocationLimit=a);a=Be("client_streamz_web_flush_interval_seconds",-1);-1!==a&&(GS.flushInterval=1E3*a)}return GS}
;var IS=function(){this.shownElements_=new Set;this.hiddenElements_=new Set;this.visibleState_=new Map;this.csn_=null;this.client_=bo};
IS.prototype.setClient=function(a){this.client_=a};
var JS=function(){var a=IS.getInstance();a.clear();a.csn_=Wo()};
IS.prototype.clear=function(){this.shownElements_.clear();this.hiddenElements_.clear();this.visibleState_.clear();this.csn_=null};
var LS=function(a,b,c){var d=Yya(b),e=b;A("enable_ve_tracker_key")&&(e=b.visualElement?b.visualElement:d);var g=a.shownElements_.has(e),h=a.visibleState_.get(e);a.shownElements_.add(e);a.visibleState_.set(e,!0);b.impressionLog&&!g&&b.impressionLog();if(d||b.visualElement)if(c=Zya(a,b,c))if(e=!(!b.data||!b.data.loggingDirectives),KS(b)||e)d=b.visualElement?b.visualElement:go(d),e||g?KS(b)&4?h||Ao(a.client_,c,d):KS(b)&1&&!g&&zo(a.client_,c,d):zo(a.client_,c,d,void 0)},MS=function(a,b,c){var d=Yya(b),
e=b;
A("enable_ve_tracker_key")&&(e=b.visualElement?b.visualElement:d);var g=a.hiddenElements_.has(e),h=a.visibleState_.get(e);a.hiddenElements_.add(e);a.visibleState_.set(e,!1);if(!1===h)return!0;if(!d&&!b.visualElement)return!1;c=Zya(a,b,c);if(!c||!KS(b)&&b.data&&b.data.loggingDirectives)return!1;d=b.visualElement?b.visualElement:go(d);KS(b)&8?Bo(a.client_,c,d):KS(b)&2&&!g&&(a=a.client_,b={csn:c,ve:jo(d),eventType:2},g={cttAuthInfo:void 0,sequenceGroup:c},"UNDEFINED_CSN"==c?yo("visualElementHidden",
b,g):Tn("visualElementHidden",b,a,g));return!0},NS=function(a,b,c){var d=Array.from(b.children);
b.shadowRoot&&(d=d.concat(b.shadowRoot.children));if(d&&d.length){b=d.length;for(var e=0;e<b;e++){var g=d[e],h=g.screenLayer||c;MS(a,g,h)||NS(a,g,h)}}};
IS.prototype.elementShouldLogGesture=function(a,b){return!!((parseInt(a.data&&a.data.loggingDirectives&&a.data.loggingDirectives.gestures&&a.data.loggingDirectives.gestures.types||"",10)||0)&b)};
var Yya=function(a){return a.data&&a.data.loggingDirectives?a.data.loggingDirectives.trackingParams||"":a.data&&a.data.trackingParams||""},Zya=function(a,b,c){var d=Wo(c);
return null===a.csn_||d==a.csn_||c?d:(c=Error("VETracker called before newScreen()"),c.params="Caller: "+b.tagName+" Previous CSN: "+a.csn_+(" Current CSN: "+d),xe(c),null)},KS=function(a){return parseInt(a.data&&a.data.loggingDirectives&&a.data.loggingDirectives.visibility&&a.data.loggingDirectives.visibility.types||"",10)||1};
Ua(IS);function OS(a,b){b=void 0===b?null:b;a={youThereEventType:a};b||(b=Wo());b&&(a.clientScreenNonce=b);co("youThere",a)}
;var PS=function(a){this.app=this.name=this.id="";this.type="REMOTE_CONTROL";this.obfuscatedGaiaId=this.avatar=this.username="";this.connected=!1;this.capabilities=new Set;this.experiments=new Set;this.theme="u";this.msn=-1;this.localChannel=null;this.queuedMessages=new Ak;this.localChannelEncryptionKey=this.remoteControllerUrl="";a&&(this.id=a.id||a.name,this.name=a.name,this.app=a.app,this.type=a.type||"REMOTE_CONTROL",this.username=a.user||"",this.avatar=a.userAvatarUri||"",this.obfuscatedGaiaId=
a.obfuscatedGaiaId||"",this.theme=a.theme||"u",$ya(this,a.capabilities||""),this.setExperiments(a.experiments||""),this.remoteControllerUrl=a.remoteControllerUrl||"",this.localChannelEncryptionKey=a.localChannelEncryptionKey||"")};
PS.prototype.toDisplayString=function(){var a=this.name||"";this.username&&(a=a+" ("+this.username+")");return a};
PS.prototype.copy=function(){var a=new PS({id:this.id,name:this.name,app:this.app,type:this.type,user:this.username,userAvatarUri:this.avatar,obfuscatedGaiaId:this.obfuscatedGaiaId,theme:this.theme,capabilities:Array.from(this.capabilities.values()).join(","),experiments:Array.from(this.experiments.values()).join(",")});a.connected=this.connected;a.remoteControllerUrl=this.remoteControllerUrl;a.localChannelEncryptionKey=this.localChannelEncryptionKey;return a};
PS.prototype.equals=function(a){return a?this.id==a.id:!1};
var $ya=function(a,b){a.capabilities.clear();nb(b.split(","),db(u.contains,lda)).forEach(function(c){a.capabilities.add(c)})};
PS.prototype.setExperiments=function(a){var b=this;this.experiments.clear();a.split(",").forEach(function(c){b.experiments.add(c)})};var aza=function(a,b){this.action=a;this.params=b||{}};var QS=function(a,b){lk.call(this);this.delay_=new Az(this.onTick_,0,this);ok(this,this.delay_);this.interval_=5E3;this.nextTickTime_=0;if(Za(a))b&&(a=r(a,b));else if(a&&Za(a.handleEvent))a=r(a.handleEvent,a);else throw Error("Invalid listener argument");this.listener_=a};
t(QS,lk);f=QS.prototype;f.onTick_=function(){this.interval_=Math.min(3E5,2*this.interval_);this.listener_();this.nextTickTime_&&this.start()};
f.start=function(){var a=this.interval_+15E3*Math.random();this.delay_.startIfNotActive(a);this.nextTickTime_=fb()+a};
f.stop=function(){this.delay_.stop();this.nextTickTime_=0};
f.isActive=function(){return this.delay_.isActive()};
f.reset=function(){this.delay_.stop();this.interval_=5E3};var RS=function(a,b,c){this.pathPrefix_=a;this.defaultQueryParams_=b;this.pubsub_=new Mk;this.reconnectTimer_=new QS(this.safeReconnect_,this);this.channel_=this.logger_=null;this.disposed_=!1;this.connectionParams_=null;this.sCookie_="";this.disconnectUi_=this.connectUi_=0;this.pendingMessages_=[];this.enableAsyncTest_=c||!1};
t(RS,cy);f=RS.prototype;f.subscribe=function(a,b,c){return this.pubsub_.subscribe(a,b,c)};
f.unsubscribe=function(a,b,c){return this.pubsub_.unsubscribe(a,b,c)};
f.unsubscribeByKey=function(a){return this.pubsub_.unsubscribeByKey(a)};
f.publish=function(a,b){return this.pubsub_.publish.apply(this.pubsub_,arguments)};
f.dispose=function(){this.disposed_||(this.disposed_=!0,nk(this.pubsub_),this.disconnect(),nk(this.reconnectTimer_),this.reconnectTimer_=null)};
f.isDisposed=function(){return this.disposed_};
var bza=function(a){return{firstTestResults:[""],secondTestResults:!a.channel_.useChunked_,sessionId:a.channel_.getSessionId(),arrayId:a.channel_.lastArrayId_}};
f=RS.prototype;
f.connect=function(a,b,c){if(!this.channel_||2!=this.channel_.getState()){this.sCookie_="";this.reconnectTimer_.stop();this.connectionParams_=a||null;this.connectUi_=b||0;a=this.pathPrefix_+"/test";b=this.pathPrefix_+"/bind";var d=new Nx("1",c?c.firstTestResults:null,c?c.secondTestResults:null,this.enableAsyncTest_),e=this.channel_;e&&(e.handler_=null);d.handler_=this;this.channel_=d;e?(e.getState(),this.channel_.connect(a,b,this.defaultQueryParams_,e.getSessionId(),e.lastArrayId_)):c?this.channel_.connect(a,
b,this.defaultQueryParams_,c.sessionId,c.arrayId):this.channel_.connect(a,b,this.defaultQueryParams_)}};
f.disconnect=function(a){this.disconnectUi_=a||0;this.reconnectTimer_.stop();this.channel_&&(3==this.channel_.getState()&&Xx(this.channel_),this.channel_.disconnect());this.disconnectUi_=0};
f.sendMessage=function(a,b){a={_sc:a};b&&u.extend(a,b);this.isReconnecting()||2==(this.channel_?this.channel_.getState():0)?this.pendingMessages_.push(a):this.channel_&&3==this.channel_.getState()&&this.channel_.sendMap(a)};
f.channelOpened=function(){this.reconnectTimer_.reset();this.connectionParams_=null;this.connectUi_=0;if(this.pendingMessages_.length){var a=this.pendingMessages_;this.pendingMessages_=[];for(var b=0,c=a.length;b<c;++b)this.channel_.sendMap(a[b])}this.publish("handlerOpened")};
f.channelError=function(a,b){a=2==b&&401==this.channel_.lastStatusCode_;4==b||a||this.reconnectTimer_.start();this.publish("handlerError",b)};
f.channelClosed=function(a,b,c){if(!this.isReconnecting())this.publish("handlerClosed");else if(c)for(a=0,b=c.length;a<b;++a){var d=c[a].map;d&&this.pendingMessages_.push(d)}};
f.getAdditionalParams=function(){var a={v:2};this.sCookie_&&(a.gsessionid=this.sCookie_);0!=this.connectUi_&&(a.ui=""+this.connectUi_);0!=this.disconnectUi_&&(a.ui=""+this.disconnectUi_);this.connectionParams_&&u.extend(a,this.connectionParams_);return a};
f.channelHandleArray=function(a,b){"S"==b[0]?this.sCookie_=b[1]:"gracefulReconnect"==b[0]?(this.reconnectTimer_.start(),this.channel_.disconnect()):this.publish("handlerMessage",new aza(b[0],b[1]))};
f.setAuthorizationHeader=function(a){if(this.channel_){var b=this.channel_.extraHeaders_||{};a?b.Authorization=a:delete b.Authorization;this.channel_.setExtraHeaders(b)}};
var cza=function(a,b){(a.defaultQueryParams_.loungeIdToken=b)||a.reconnectTimer_.stop()};
f=RS.prototype;f.getReconnectTimeout=function(){return this.isReconnecting()?this.reconnectTimer_.nextTickTime_-fb():NaN};
f.isReconnecting=function(){return this.reconnectTimer_.isActive()};
f.reconnect=function(){var a=this.reconnectTimer_;a.delay_.fire();a.start()};
f.forceUnsafeReconnect=function(){this.channel_&&(this.channel_.disconnect(),this.reconnect_())};
f.safeReconnect_=function(){var a=this.channel_,b=0;a.backChannelRequest_&&b++;a.forwardChannelRequest_&&b++;0!=b||this.reconnect_()};
f.reconnect_=function(){this.connect(this.connectionParams_,this.connectUi_)};var SS=function(a){this.scheme="https";this.port=this.domain="";this.basePath="/api/lounge";this.supportCors=!0;a=a||document.location.href;var b=Number(ni(4,a))||"";b&&(this.port=":"+b);this.domain=oi(a)||"";a=Kc;0<=a.search("MSIE")&&(a=a.match(/MSIE ([\d.]+)/)[1],0>sc(a,"10.0")&&(this.supportCors=!1))},TS=function(a,b){var c=a.basePath;
if(Ia(void 0)?0:a.supportCors)c=a.scheme+"://"+a.domain+a.port+a.basePath;return Ai(c+b,{})};
SS.prototype.sendRequest=function(a,b,c,d,e){a={format:"JSON",method:a,context:this,timeout:5E3,withCredentials:!1,onSuccess:db(this.onSuccess_,d,!0),onError:db(this.onError_,e),onTimeout:db(this.onTimeout_,e)};c&&(a.postParams=c,a.headers={"Content-Type":"application/x-www-form-urlencoded"});return Vm(b,a)};
SS.prototype.onSuccess_=function(a,b,c,d){b?a(d):a({text:c.responseText})};
SS.prototype.onError_=function(a,b){a(Error("Request error: "+b.status))};
SS.prototype.onTimeout_=function(a){a(Error("request timed out"))};var dza=fb(),US=null,VS=Array(50),WS=-1,XS=!1,hza=function(){var a=eza;fza();US.push(a);gza(US)},YS=function(a,b){fza();
var c=US,d=iza(a,String(b));0==c.length?jza(d):(gza(c),mb(c,function(e){e(d)}))},fza=function(){US||(US=Sa("yt.mdx.remote.debug.handlers_")||[],Na("yt.mdx.remote.debug.handlers_",US,void 0))},jza=function(a){var b=(WS+1)%50;
WS=b;VS[b]=a;XS||(XS=49==b)},gza=function(a){var b=VS;
if(b[0]){var c=WS,d=XS?c:-1;do{d=(d+1)%50;var e=b[d];mb(a,function(g){g(e)})}while(d!=c);
VS=Array(50);WS=-1;XS=!1}},iza=function(a,b){var c=(fb()-dza)/1E3;
c.toFixed&&(c=c.toFixed(3));var d=[];d.push("[",c+"s","] ");d.push("[","yt.mdx.remote","] ");d.push(a+": "+b,"\n");return d.join("")};var ZS=function(a){a=a||{};this.name=a.name||"";this.id=a.id||a.screenId||"";this.token=a.token||a.loungeToken||"";this.uuid=a.uuid||a.dialId||""},$S=function(a,b){return!!b&&(a.id==b||a.uuid==b)},kza=function(a){return{name:a.name,
screenId:a.id,loungeToken:a.token,dialId:a.uuid}},lza=function(a){return new ZS(a)},mza=function(a){return Wa(a)?pb(a,lza):[]},aT=function(a){return a?"{name:\""+a.name+"\",id:"+a.id.substr(0,6)+"..,token:"+(a.token?".."+a.token.slice(-6):"-")+",uuid:"+(a.uuid?".."+a.uuid.slice(-6):"-")+"}":"null"},bT=function(a){return Wa(a)?"["+pb(a,aT).join(",")+"]":"null"};var nza=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(a){var b=16*Math.random()|0;return("x"==a?b:b&3|8).toString(16)})},oza=function(a){return pb(a,function(b){return{key:b.id,
name:b.name}})},cT=function(a,b){return ub(a,function(c){return c||b?!c!=!b?!1:c.id==b.id:!0})},dT=function(a,b){return ub(a,function(c){return $S(c,b)})};var eT=function(a){a=void 0===a?!1:a;lk.call(this);this.pubSub_=new Mk(a);ok(this,this.pubSub_)};
t(eT,lk);f=eT.prototype;f.subscribe=function(a,b,c){return this.isDisposed()?0:this.pubSub_.subscribe(a,b,c)};
f.unsubscribe=function(a,b,c){return this.isDisposed()?!1:this.pubSub_.unsubscribe(a,b,c)};
f.unsubscribeByKey=function(a){return this.isDisposed()?!1:this.pubSub_.unsubscribeByKey(a)};
f.publish=function(a,b){return this.isDisposed()?!1:this.pubSub_.publish.apply(this.pubSub_,arguments)};
f.subscribeAll=function(a,b){for(var c in a)this.subscribe(c,a[c],b)};
f.unsubscribeAll=function(a,b){for(var c in a)this.unsubscribe(c,a[c],b)};
f.getPubSub=function(){return this.pubSub_};var fT=function(a){eT.call(this);this.logName_=a;this.screens=[]};
t(fT,eT);fT.prototype.getScreens=function(){return this.screens};
fT.prototype.contains=function(a){return!!cT(this.screens,a)};
fT.prototype.get=function(a){return a?dT(this.screens,a):null};
var pza=function(a,b){var c=a.get(b.uuid)||a.get(b.id);if(c)return a=c.name,c.id=b.id||c.id,c.name=b.name,c.token=b.token,c.uuid=b.uuid||c.uuid,c.name!=a;a.screens.push(b);return!0},qza=function(a,b){var c=a.screens.length!=b.length;
a.screens=nb(a.screens,function(g){return!!cT(b,g)});
for(var d=0,e=b.length;d<e;d++)c=pza(a,b[d])||c;return c},rza=function(a,b){var c=a.screens.length;
a.screens=nb(a.screens,function(d){return!(d||b?!d!=!b?0:d.id==b.id:1)});
return a.screens.length<c};
fT.prototype.info=function(a){YS(this.logName_,a)};
fT.prototype.warn=function(a){YS(this.logName_,a)};var gT=function(a,b,c,d){eT.call(this);this.http_=a;this.pairingCode_=b;this.deviceId_=c;this.friendlyName_=d;this.pollIndex_=0;this.xhr_=null;this.timer_=NaN};
l(gT,eT);f=gT.prototype;f.start=function(){!this.xhr_&&isNaN(this.timer_)&&this.poll_()};
f.stop=function(){this.xhr_&&(this.xhr_.abort(),this.xhr_=null);isNaN(this.timer_)||(Km(this.timer_),this.timer_=NaN)};
f.disposeInternal=function(){this.stop();eT.prototype.disposeInternal.call(this)};
f.poll_=function(){this.timer_=NaN;this.xhr_=Vm(TS(this.http_,"/pairing/get_screen"),{method:"POST",postParams:{pairing_code:this.pairingCode_},timeout:5E3,onSuccess:r(this.onSuccess_,this),onError:r(this.onError_,this),onTimeout:r(this.onTimeout_,this)})};
f.onSuccess_=function(a,b){this.xhr_=null;a=b.screen||{};a.dialId=this.deviceId_;a.name=this.friendlyName_;this.publish("pairingComplete",new ZS(a))};
f.onError_=function(a){this.xhr_=null;a.status&&404==a.status?this.pollIndex_>=sza.length?this.publish("pairingFailed",Error("DIAL polling timed out")):(a=sza[this.pollIndex_],this.timer_=Im(r(this.poll_,this),a),this.pollIndex_++):this.publish("pairingFailed",Error("Server error "+a.status))};
f.onTimeout_=function(){this.xhr_=null;this.publish("pairingFailed",Error("Server not responding"))};
var sza=[2E3,2E3,1E3,1E3,1E3,2E3,2E3,5E3,5E3,1E4];var jT=function(a,b,c){var d=c&&0<c?c:0;c=d?fb()+1E3*d:0;if((d=d?hT():iT())&&window.JSON){Ka(b)||(b=JSON.stringify(b,void 0));try{d.set(a,b,c)}catch(e){d.remove(a)}}},kT=function(a){var b=iT(),c=hT();
if(!b&&!c||!window.JSON)return null;try{var d=b.get(a)}catch(e){}if(!Ka(d))try{d=c.get(a)}catch(e){}if(!Ka(d))return null;try{d=JSON.parse(d,void 0)}catch(e){}return d},lT=function(a){try{var b=iT(),c=hT();
b&&b.remove(a);c&&c.remove(a)}catch(d){}},tza=function(){var a=hT();
a&&wta(a,a.mechanism.__iterator__(!0))},hT=Nb(function(){var a=new Vk;
return a.isAvailable()?new NM(a):null}),iT=Nb(function(){var a=new Wk;
return a.isAvailable()?new NM(a):null});var mT,qT=function(){var a=nT(),b=oT();wb(a,b);if(pT()){var c=a;var d=Gb;for(var e=0,g=c.length,h;e<g;){var m=e+g>>1;var n=d(b,c[m]);0<n?e=m+1:(g=m,h=!n)}d=h?e:~e;0>d&&Fb(c,-(d+1),0,b)}a=uza(a);if(0==a.length)try{Xn("remote_sid")}catch(p){}else try{Wn("remote_sid",a.join(","),-1)}catch(p){}},nT=function(){var a=kT("yt-remote-connected-devices")||[];
Hb(a);return a},uza=function(a){if(0==a.length)return[];
var b=a[0].indexOf("#"),c=-1==b?a[0]:a[0].substring(0,b);return pb(a,function(d,e){return 0==e?d:d.substring(c.length)})},vza=function(a){jT("yt-remote-connected-devices",a,86400)},oT=function(){if(rT)return rT;
var a=kT("yt-remote-device-id");a||(a=nza(),jT("yt-remote-device-id",a,31536E3));for(var b=nT(),c=1,d=a;wb(b,d);)c++,d=a+"#"+c;return rT=d},wza=function(){return kT("yt-remote-session-browser-channel")},pT=function(){return kT("yt-remote-session-screen-id")},zza=function(a){5<a.length&&(a=a.slice(a.length-5));
var b=pb(xza(),function(d){return d.loungeToken}),c=pb(a,function(d){return d.loungeToken});
sb(c,function(d){return!wb(b,d)})&&yza();
jT("yt-remote-local-screens",a,31536E3)},xza=function(){return kT("yt-remote-local-screens")||[]},yza=function(){jT("yt-remote-lounge-token-expiration",!0,86400)},Aza=function(a,b){jT("yt-remote-session-browser-channel",a);
jT("yt-remote-session-screen-id",b);a=nT();b=oT();wb(a,b)||a.push(b);vza(a);qT()},sT=function(a){a||(lT("yt-remote-session-screen-id"),lT("yt-remote-session-video-id"));
qT();a=nT();zb(a,oT());vza(a)},Bza=function(){if(!mT){var a=cl();
a&&(mT=new Nk(a))}return mT?!!mT.get("yt-remote-use-staging-server"):!1},rT="";var uT=function(a){fT.call(this,"LocalScreenService");this.http_=a;this.loungeTokenRefreshTimer_=NaN;tT(this);this.info("Initializing with "+bT(this.screens))};
t(uT,fT);f=uT.prototype;f.start=function(){tT(this)&&this.publish("screenChange");!kT("yt-remote-lounge-token-expiration")&&Cza(this);Km(this.loungeTokenRefreshTimer_);this.loungeTokenRefreshTimer_=Im(r(this.start,this),1E4)};
f.add=function(a,b){tT(this);pza(this,a);vT(this,!1);this.publish("screenChange");b(a);a.token||Cza(this)};
f.remove=function(a,b){var c=tT(this);rza(this,a)&&(vT(this,!1),c=!0);b(a);c&&this.publish("screenChange")};
f.updateName=function(a,b,c,d){var e=tT(this),g=this.get(a.id);g?(g.name!=b&&(g.name=b,vT(this,!1),e=!0),c(a)):d(Error("no such local screen."));e&&this.publish("screenChange")};
f.disposeInternal=function(){Km(this.loungeTokenRefreshTimer_);uT.superClass_.disposeInternal.call(this)};
var Cza=function(a){if(a.screens.length){var b=pb(a.screens,function(d){return d.id}),c=TS(a.http_,"/pairing/get_lounge_token_batch");
a.http_.sendRequest("POST",c,{screen_ids:b.join(",")},r(a.handleLoungeTokens_,a),r(a.handleLoungeTokenError_,a))}};
uT.prototype.handleLoungeTokens_=function(a){tT(this);var b=this.screens.length;a=a&&a.screens||[];for(var c=0,d=a.length;c<d;++c){var e=a[c],g=this.get(e.screenId);g&&(g.token=e.loungeToken,--b)}vT(this,!b);b&&this.warn("Missed "+b+" lounge tokens.")};
uT.prototype.handleLoungeTokenError_=function(a){this.warn("Requesting lounge tokens failed: "+a)};
var tT=function(a){var b=mza(xza());b=nb(b,function(c){return!c.uuid});
return qza(a,b)},vT=function(a,b){zza(pb(a.screens,kza));
b&&yza()};var wT=function(a,b){eT.call(this);this.getScreensToCheck_=b;b=(b=kT("yt-remote-online-screen-ids")||"")?b.split(","):[];for(var c={},d=this.getScreensToCheck_(),e=0,g=d.length;e<g;++e){var h=d[e].id;c[h]=wb(b,h)}this.screenIdSet_=c;this.http_=a;this.refreshTimer_=this.fastCheckEndTime_=NaN;this.currentRequest_=null;this.info_("Initialized with "+Gk(this.screenIdSet_))};
l(wT,eT);wT.prototype.isOnline=function(a){return!!this.screenIdSet_[a]};
wT.prototype.start=function(){var a=parseInt(kT("yt-remote-fast-check-period")||"0",10);(this.fastCheckEndTime_=fb()-144E5<a?0:a)?xT(this):(this.fastCheckEndTime_=fb()+3E5,jT("yt-remote-fast-check-period",this.fastCheckEndTime_),this.requestScreenAvailability_())};
wT.prototype.isEmpty=function(){return u.isEmpty(this.screenIdSet_)};
wT.prototype.update=function(){this.info_("Updating availability on schedule.");var a=this.getScreensToCheck_(),b=u.filter(this.screenIdSet_,function(c,d){return c&&!!dT(a,d)},this);
yT(this,b)};
var Dza=function(a,b,c){var d=TS(a.http_,"/pairing/get_screen_availability");a.http_.sendRequest("POST",d,{lounge_token:b.token},r(function(e){e=e.screens||[];for(var g=0,h=e.length;g<h;++g)if(e[g].loungeToken==b.token){c("online"==e[g].status);return}c(!1)},a),r(function(){c(!1)},a))};
wT.prototype.disposeInternal=function(){Km(this.refreshTimer_);this.refreshTimer_=NaN;this.currentRequest_&&(this.currentRequest_.abort(),this.currentRequest_=null);eT.prototype.disposeInternal.call(this)};
var yT=function(a,b){a:if(u.getCount(b)!=u.getCount(a.screenIdSet_))var c=!1;else{c=u.getKeys(b);for(var d=0,e=c.length;d<e;++d)if(!a.screenIdSet_[c[d]]){c=!1;break a}c=!0}c||(a.info_("Updated online screens: "+Gk(a.screenIdSet_)),a.screenIdSet_=b,a.publish("screenChange"));Eza(a)},xT=function(a){isNaN(a.refreshTimer_)||Km(a.refreshTimer_);
a.refreshTimer_=Im(r(a.requestScreenAvailability_,a),0<a.fastCheckEndTime_&&a.fastCheckEndTime_<fb()?2E4:1E4)};
f=wT.prototype;f.requestScreenAvailability_=function(){Km(this.refreshTimer_);this.refreshTimer_=NaN;this.currentRequest_&&this.currentRequest_.abort();var a=Fza(this);if(u.getCount(a)){var b=TS(this.http_,"/pairing/get_screen_availability"),c={lounge_token:u.getKeys(a).join(",")};this.currentRequest_=this.http_.sendRequest("POST",b,c,r(this.onScreenAvailability_,this,a),r(this.onScreenAvailabilityError_,this))}else yT(this,{}),xT(this)};
f.onScreenAvailability_=function(a,b){this.currentRequest_=null;var c=u.getKeys(Fza(this));if(Ib(c,u.getKeys(a))){b=b.screens||[];c={};for(var d=0,e=b.length;d<e;++d)c[a[b[d].loungeToken]]="online"==b[d].status;yT(this,c);xT(this)}else this.warn_("Changing Screen set during request."),this.requestScreenAvailability_()};
f.onScreenAvailabilityError_=function(a){this.warn_("Screen availability failed: "+a);this.currentRequest_=null;xT(this)};
f.info_=function(a){YS("OnlineScreenService",a)};
f.warn_=function(a){YS("OnlineScreenService",a)};
var Fza=function(a){var b={};mb(a.getScreensToCheck_(),function(c){c.token?b[c.token]=c.id:this.warn_("Requesting availability of screen w/o lounge token.")});
return b},Eza=function(a){a=u.getKeys(u.filter(a.screenIdSet_,function(b){return b}));
Hb(a);a.length?jT("yt-remote-online-screen-ids",a.join(","),60):lT("yt-remote-online-screen-ids")};var zT=function(a){fT.call(this,"ScreenService");this.http_=a;this.onlineScreenService_=this.localScreenService_=null;this.automaticScreens_=[];this.deviceToScreenId_={};Gza(this)};
t(zT,fT);f=zT.prototype;f.start=function(){this.localScreenService_.start();this.onlineScreenService_.start();this.screens.length&&(this.publish("screenChange"),this.onlineScreenService_.isEmpty()||this.publish("onlineScreenChange"))};
f.add=function(a,b,c){this.localScreenService_.add(a,b,c)};
f.remove=function(a,b,c){this.localScreenService_.remove(a,b,c);this.onlineScreenService_.update()};
f.updateName=function(a,b,c,d){this.localScreenService_.contains(a)?this.localScreenService_.updateName(a,b,c,d):(a="Updating name of unknown screen: "+a.name,this.warn(a),d(Error(a)))};
f.getScreens=function(a){return a?this.screens:Bb(this.screens,nb(this.automaticScreens_,function(b){return!this.contains(b)},this))};
f.getOnlineScreens=function(){return nb(this.getScreens(!0),function(a){return this.onlineScreenService_.isOnline(a.id)},this)};
var Iza=function(a,b,c,d,e,g){a.info("getAutomaticScreenByIds "+c+" / "+b);c||(c=a.deviceToScreenId_[b]);var h=a.getScreens();if(h=(c?dT(h,c):null)||dT(h,b)){h.uuid=b;var m=AT(a,h);Dza(a.onlineScreenService_,m,function(n){e(n?m:null)})}else c?Hza(a,c,r(function(n){var p=AT(this,new ZS({name:d,
screenId:c,loungeToken:n,dialId:b||""}));Dza(this.onlineScreenService_,p,function(x){e(x?p:null)})},a),g):e(null)};
zT.prototype.getScreenByPollingPairingCode=function(a,b,c,d,e){this.info("getDialScreenByPairingCode "+a+" / "+b);var g=new gT(this.http_,a,b,c);g.subscribe("pairingComplete",r(function(h){nk(g);d(AT(this,h))},this));
g.subscribe("pairingFailed",function(h){nk(g);e(h)});
g.start();return r(g.stop,g)};
var Jza=function(a,b){for(var c=0,d=a.screens.length;c<d;++c)if(a.screens[c].name==b)return a.screens[c];return null};
zT.prototype.getScreenByPairingCode=function(a,b,c,d){Vm(TS(this.http_,"/pairing/get_screen"),{method:"POST",postParams:{pairing_code:a},timeout:5E3,onSuccess:r(function(e,g){e=new ZS(g.screen||{});if(!e.name||Jza(this,e.name)){a:{g=e.name;for(var h=2,m=b(g,h);Jza(this,m);){h++;if(20<h)break a;m=b(g,h)}g=m}e.name=g}c(AT(this,e))},this),
onError:r(function(e){d(Error("pairing request failed: "+e.status))},this),
onTimeout:r(function(){d(Error("pairing request timed out."))},this)})};
zT.prototype.disposeInternal=function(){nk(this.localScreenService_);nk(this.onlineScreenService_);zT.superClass_.disposeInternal.call(this)};
var Hza=function(a,b,c,d){a.info("requestLoungeToken_ for "+b);var e={postParams:{screen_ids:b},method:"POST",context:a,onSuccess:function(g,h){g=h&&h.screens||[];g[0]&&g[0].screenId==b?c(g[0].loungeToken):d(Error("Missing lounge token in token response"))},
onError:function(){d(Error("Request screen lounge token failed"))}};
Vm(TS(a.http_,"/pairing/get_lounge_token_batch"),e)},Kza=function(a){a.screens=a.localScreenService_.getScreens();
for(var b=u.transpose(a.deviceToScreenId_),c=0,d=a.screens.length;c<d;++c){var e=a.screens[c];e.uuid=b[e.id]||""}a.info("Updated manual screens: "+bT(a.screens))};
zT.prototype.handleScreenChange_=function(){Kza(this);this.publish("screenChange");this.onlineScreenService_.update()};
var Gza=function(a){BT(a);a.localScreenService_=new uT(a.http_);a.localScreenService_.subscribe("screenChange",r(a.handleScreenChange_,a));Kza(a);a.automaticScreens_=mza(kT("yt-remote-automatic-screen-cache")||[]);BT(a);a.info("Initializing automatic screens: "+bT(a.automaticScreens_));a.onlineScreenService_=new wT(a.http_,r(a.getScreens,a,!0));a.onlineScreenService_.subscribe("screenChange",r(function(){this.publish("onlineScreenChange")},a))},AT=function(a,b){var c=a.get(b.id);
c?(c.uuid=b.uuid,b=c):((c=dT(a.automaticScreens_,b.uuid))?(c.id=b.id,c.token=b.token,b=c):a.automaticScreens_.push(b),jT("yt-remote-automatic-screen-cache",pb(a.automaticScreens_,kza)));BT(a);a.deviceToScreenId_[b.uuid]=b.id;jT("yt-remote-device-id-map",a.deviceToScreenId_,31536E3);return b},BT=function(a){a.deviceToScreenId_=kT("yt-remote-device-id-map")||{}};
zT.prototype.dispose=zT.prototype.dispose;var CT=function(a,b,c){eT.call(this);this.logName_=c;this.screenService_=a;this.receiver_=b;this.screen_=null};
t(CT,eT);f=CT.prototype;f.onSessionStarted=function(a){this.screen_=a;this.publish("sessionScreen",this.screen_)};
f.onSessionStopped=function(a){this.isDisposed()||(a&&this.warn(""+a),this.screen_=null,this.publish("sessionScreen",null))};
f.info=function(a){YS(this.logName_,a)};
f.warn=function(a){YS(this.logName_,a)};
f.getCastSession=function(){return null};
f.setDisplayStatus=function(a){var b=this.receiver_;a?(b.displayStatus=new chrome.cast.ReceiverDisplayStatus(a,[]),b.displayStatus.showStop=!0):b.displayStatus=null;chrome.cast.setReceiverDisplayStatus(b,r(function(){this.info("Updated receiver status for "+b.friendlyName+": "+a)},this),r(function(){this.warn("Failed to update receiver status for: "+b.friendlyName)},this))};
f.disposeInternal=function(){this.setDisplayStatus("");CT.superClass_.disposeInternal.call(this)};var DT=function(a,b){CT.call(this,a,b,"CastSession");this.session_=null;this.sessionStatusTimeoutKey_=0;this.boundSessionUpdate_=r(this.onSessionUpdate_,this);this.boundYoutubeMessage_=r(this.onYoutubeMessage_,this);this.sessionStatusTimeoutKey_=Im(r(function(){Lza(this,null)},this),12E4)};
t(DT,CT);f=DT.prototype;f.setCastSession=function(a){if(this.session_){if(this.session_==a)return;this.warn("Overriding cast sesison with new session object");this.session_.removeUpdateListener(this.boundSessionUpdate_);this.session_.removeMessageListener("urn:x-cast:com.google.youtube.mdx",this.boundYoutubeMessage_)}this.session_=a;this.session_.addUpdateListener(this.boundSessionUpdate_);this.session_.addMessageListener("urn:x-cast:com.google.youtube.mdx",this.boundYoutubeMessage_);Mza(this)};
f.launchWithParams=function(a){this.info("launchWithParams no-op for Cast: "+Gk(a))};
f.stop=function(){if(this.session_)this.session_.stop(r(function(){this.onSessionStopped()},this),r(function(){this.onSessionStopped(Error("Failed to stop receiver app."))},this));else
this.onSessionStopped(Error("Stopping cast device witout session."))};
f.setDisplayStatus=Ta;f.disposeInternal=function(){this.info("disposeInternal");Km(this.sessionStatusTimeoutKey_);this.sessionStatusTimeoutKey_=0;this.session_&&(this.session_.removeUpdateListener(this.boundSessionUpdate_),this.session_.removeMessageListener("urn:x-cast:com.google.youtube.mdx",this.boundYoutubeMessage_));this.session_=null;DT.superClass_.disposeInternal.call(this)};
var Mza=function(a){a.info("sendYoutubeMessage_: getMdxSessionStatus "+Gk(void 0));var b={type:"getMdxSessionStatus"};a.session_?a.session_.sendMessage("urn:x-cast:com.google.youtube.mdx",b,Ta,r(function(){this.warn("Failed to send message: getMdxSessionStatus.")},a)):a.warn("Sending yt message without session: "+Gk(b))};
DT.prototype.onYoutubeMessage_=function(a,b){if(!this.isDisposed())if(b){if(b=Ex(b),$a(b))switch(a=""+b.type,b=b.data||{},this.info("onYoutubeMessage_: "+a+" "+Gk(b)),a){case"mdxSessionStatus":Lza(this,b.screenId);break;default:this.warn("Unknown youtube message: "+a);}else this.warn("Unable to parse message.");}else this.warn("No data in message.")};
var Lza=function(a,b){Km(a.sessionStatusTimeoutKey_);if(b){if(a.info("onConnectedScreenId_: Received screenId: "+b),!a.screen_||a.screen_.id!=b){var c=r(a.onSessionStarted,a),d=r(a.onSessionStopped,a);a.getScreen_(b,c,d,5)}}else a.onSessionStopped(Error("Waiting for session status timed out."))};
DT.prototype.getScreen_=function(a,b,c,d){Iza(this.screenService_,this.receiver_.label,a,this.receiver_.friendlyName,r(function(e){e?b(e):0<=d?(this.warn("Screen "+a+" appears to be offline. "+d+" retries left."),Im(r(this.getScreen_,this,a,b,c,d-1),300)):c(Error("Unable to fetch screen."))},this),c)};
DT.prototype.getCastSession=function(){return this.session_};
DT.prototype.onSessionUpdate_=function(a){this.isDisposed()||a||(this.warn("Cast session died."),this.onSessionStopped())};var ET=function(a,b,c){CT.call(this,a,b,"DialSession");this.session_=this.launchData_=null;this.reversePairingCode_="";this.theme_=c;this.connectData_=null;this.deferredLaunch_=Ta;this.deferredLaunchDeadlineTimer_=NaN;this.boundSessionUpdate_=r(this.onSessionUpdate_,this);this.cancelPolling_=Ta};
t(ET,CT);ET.prototype.setCastSession=function(a){this.session_=a;this.session_.addUpdateListener(this.boundSessionUpdate_)};
ET.prototype.launchWithParams=function(a){this.connectData_=a;this.deferredLaunch_()};
ET.prototype.stop=function(){this.cancelPolling_();this.cancelPolling_=Ta;Km(this.deferredLaunchDeadlineTimer_);if(this.session_)this.session_.stop(r(this.onSessionStopped,this,null),r(this.onSessionStopped,this,"Failed to stop DIAL device."));else this.onSessionStopped()};
ET.prototype.disposeInternal=function(){this.cancelPolling_();this.cancelPolling_=Ta;Km(this.deferredLaunchDeadlineTimer_);this.session_&&this.session_.removeUpdateListener(this.boundSessionUpdate_);this.session_=null;ET.superClass_.disposeInternal.call(this)};
var Nza=function(a){a.cancelPolling_=a.screenService_.getScreenByPollingPairingCode(a.reversePairingCode_,a.receiver_.label,a.receiver_.friendlyName,r(function(b){this.cancelPolling_=Ta;this.onSessionStarted(b)},a),r(function(b){this.cancelPolling_=Ta;
this.onSessionStopped(b)},a))};
ET.prototype.onSessionUpdate_=function(a){this.isDisposed()||a||(this.warn("DIAL session died."),this.cancelPolling_(),this.cancelPolling_=Ta,this.onSessionStopped())};
var Oza=function(a){var b={};b.pairingCode=a.reversePairingCode_;b.theme=a.theme_;if(a.connectData_){var c=a.connectData_.currentTime||0;b.v=a.connectData_.videoId;b.t=c}Bza()&&(b.env_useStageMdx=1);return xi(b)};
ET.prototype.initReversePairingPromise_=function(a){this.reversePairingCode_=nza();if(this.connectData_){var b=new chrome.cast.DialLaunchResponse(!0,Oza(this));a(b);Nza(this)}else this.deferredLaunch_=r(function(){Km(this.deferredLaunchDeadlineTimer_);this.deferredLaunch_=Ta;this.deferredLaunchDeadlineTimer_=NaN;var c=new chrome.cast.DialLaunchResponse(!0,Oza(this));a(c);Nza(this)},this),this.deferredLaunchDeadlineTimer_=Im(r(function(){this.deferredLaunch_()},this),100)};
ET.prototype.initScreenLookupPromise_=function(a,b,c){Iza(this.screenService_,this.launchData_.receiver.label,a,this.receiver_.friendlyName,r(function(d){d&&d.token?(this.onSessionStarted(d),b(new chrome.cast.DialLaunchResponse(!1))):this.initReversePairingPromise_(b,c)},this),r(function(d){this.warn("Failed to get DIAL screen: "+d);
this.initReversePairingPromise_(b,c)},this))};var FT=function(a,b){CT.call(this,a,b,"ManualSession");this.deferredLaunchDeadlineTimer_=Im(r(this.launchWithParams,this,null),150)};
t(FT,CT);FT.prototype.stop=function(){this.onSessionStopped()};
FT.prototype.setCastSession=Ta;FT.prototype.launchWithParams=function(){Km(this.deferredLaunchDeadlineTimer_);this.deferredLaunchDeadlineTimer_=NaN;var a=dT(this.screenService_.getScreens(),this.receiver_.label);if(a)this.onSessionStarted(a);else this.onSessionStopped(Error("No such screen"))};
FT.prototype.disposeInternal=function(){Km(this.deferredLaunchDeadlineTimer_);this.deferredLaunchDeadlineTimer_=NaN;FT.superClass_.disposeInternal.call(this)};var GT=function(a,b,c,d){eT.call(this);this.screenService_=a;this.appId_=b||"233637DE";this.theme_=c||"cl";this.disableDial_=d||!1;this.launchParams_=this.session_=null;this.hasCastReceiver_=!1;this.customReceivers_=[];this.boundReceiverActionListener_=r(this.onReceiverAction_,this)};
t(GT,eT);
GT.prototype.init=function(a,b){chrome.cast.timeout.requestSession=3E4;var c=new chrome.cast.SessionRequest(this.appId_);this.disableDial_||(c.dialRequest=new chrome.cast.DialRequest("YouTube"));var d=chrome.cast.AutoJoinPolicy.TAB_AND_ORIGIN_SCOPED;a=a?chrome.cast.DefaultActionPolicy.CAST_THIS_TAB:chrome.cast.DefaultActionPolicy.CREATE_SESSION;var e=r(this.onReceiverUpdated_,this);c=new chrome.cast.ApiConfig(c,r(this.onSessionEstablished_,this),e,d,a);c.customDialLaunchCallback=r(this.onDialLaunchRequested_,this);
chrome.cast.initialize(c,r(function(){this.isDisposed()||(chrome.cast.addReceiverActionListener(this.boundReceiverActionListener_),hza(),this.screenService_.subscribe("onlineScreenChange",r(this.onScreenChange_,this)),this.customReceivers_=Pza(this),chrome.cast.setCustomReceivers(this.customReceivers_,Ta,r(function(g){this.warn_("Failed to set initial custom receivers: "+Gk(g))},this)),this.publish("yt-remote-cast2-availability-change",HT(this)),b(!0))},this),r(function(g){this.warn_("Failed to initialize API: "+
Gk(g));
b(!1)},this))};
GT.prototype.setConnectedScreenStatus=function(a,b){this.info_("Setting connected screen ID: "+a+" -> "+b);if(this.session_){var c=this.session_.screen_;if(!a||c&&c.id!=a)this.info_("Unsetting old screen status: "+this.session_.receiver_.friendlyName),IT(this,null)}if(a&&b){if(!this.session_){c=dT(this.screenService_.getScreens(),a);if(!c){this.info_("setConnectedScreenStatus: Unknown screen.");return}a=Qza(this,c);a||(this.info_("setConnectedScreenStatus: Connected receiver not custom..."),a=new chrome.cast.Receiver(c.uuid?
c.uuid:c.id,c.name),a.receiverType=chrome.cast.ReceiverType.CUSTOM,this.customReceivers_.push(a),chrome.cast.setCustomReceivers(this.customReceivers_,Ta,r(function(d){this.warn_("Failed to set initial custom receivers: "+Gk(d))},this)));
this.info_("setConnectedScreenStatus: new active receiver: "+a.friendlyName);IT(this,new FT(this.screenService_,a),!0)}this.session_.setDisplayStatus(b)}else this.info_("setConnectedScreenStatus: no screen.")};
var Qza=function(a,b){return b?ub(a.customReceivers_,function(c){return $S(b,c.label)},a):null};
f=GT.prototype;f.setLaunchParams=function(a){this.isDisposed()?this.warn_("Setting connection data on disposed cast v2"):this.session_?this.session_.launchWithParams(a):this.warn_("Setting connection data without a session")};
f.stopSession=function(){this.isDisposed()?this.warn_("Stopping session on disposed cast v2"):this.session_?(this.session_.stop(),IT(this,null)):this.info_("Stopping non-existing session")};
f.requestSession=function(){chrome.cast.requestSession(r(this.onSessionEstablished_,this),r(this.onSessionRequestFailed_,this))};
f.disposeInternal=function(){this.screenService_.unsubscribe("onlineScreenChange",r(this.onScreenChange_,this));window.chrome&&chrome.cast&&chrome.cast.removeReceiverActionListener(this.boundReceiverActionListener_);var a=eza,b=Sa("yt.mdx.remote.debug.handlers_");zb(b||[],a);nk(this.session_);GT.superClass_.disposeInternal.call(this)};
f.info_=function(a){YS("Controller",a)};
f.warn_=function(a){YS("Controller",a)};
var eza=function(a){window.chrome&&chrome.cast&&chrome.cast.logMessage&&chrome.cast.logMessage(a)},HT=function(a){return a.hasCastReceiver_||!!a.customReceivers_.length||!!a.session_},IT=function(a,b,c){b!=a.session_&&(nk(a.session_),(a.session_=b)?(c?a.publish("yt-remote-cast2-receiver-resumed",b.receiver_):a.publish("yt-remote-cast2-receiver-selected",b.receiver_),b.subscribe("sessionScreen",r(a.onSessionScreen_,a,b)),b.screen_?a.publish("yt-remote-cast2-session-change",b.screen_):c&&a.session_.launchWithParams(null)):
a.publish("yt-remote-cast2-session-change",null))};
f=GT.prototype;f.onSessionScreen_=function(a,b){this.session_==a&&(b||IT(this,null),this.publish("yt-remote-cast2-session-change",b))};
f.onReceiverAction_=function(a,b){if(!this.isDisposed())if(a)switch(a.friendlyName=chrome.cast.unescape(a.friendlyName),this.info_("onReceiverAction_ "+a.label+" / "+a.friendlyName+"-- "+b),b){case chrome.cast.ReceiverAction.CAST:if(this.session_)if(this.session_.receiver_.label!=a.label)this.info_("onReceiverAction_: Stopping active receiver: "+this.session_.receiver_.friendlyName),this.session_.stop();else{this.info_("onReceiverAction_: Casting to active receiver.");this.session_.screen_&&this.publish("yt-remote-cast2-session-change",
this.session_.screen_);break}switch(a.receiverType){case chrome.cast.ReceiverType.CUSTOM:IT(this,new FT(this.screenService_,a));break;case chrome.cast.ReceiverType.DIAL:IT(this,new ET(this.screenService_,a,this.theme_));break;case chrome.cast.ReceiverType.CAST:IT(this,new DT(this.screenService_,a));break;default:this.warn_("Unknown receiver type: "+a.receiverType);}break;case chrome.cast.ReceiverAction.STOP:this.session_&&this.session_.receiver_.label==a.label?this.session_.stop():this.warn_("Stopping receiver w/o session: "+
a.friendlyName);}else this.warn_("onReceiverAction_ called without receiver.")};
f.onDialLaunchRequested_=function(a){if(this.isDisposed())return Promise.reject(Error("disposed"));var b=a.receiver;b.receiverType!=chrome.cast.ReceiverType.DIAL&&(this.warn_("Not DIAL receiver: "+b.friendlyName),b.receiverType=chrome.cast.ReceiverType.DIAL);var c=this.session_?this.session_.receiver_:null;if(!c||c.label!=b.label)return this.warn_("Receiving DIAL launch request for non-clicked DIAL receiver: "+b.friendlyName),Promise.reject(Error("illegal DIAL launch"));if(c&&c.label==b.label&&c.receiverType!=
chrome.cast.ReceiverType.DIAL){if(this.session_.screen_)return this.info_("Reselecting dial screen."),this.publish("yt-remote-cast2-session-change",this.session_.screen_),Promise.resolve(new chrome.cast.DialLaunchResponse(!1));this.warn_("Changing CAST intent from \""+c.receiverType+"\" to \"dial\" for "+b.friendlyName);IT(this,new ET(this.screenService_,b,this.theme_))}b=this.session_;b.launchData_=a;return b.launchData_.appState==chrome.cast.DialAppState.RUNNING?new Promise(r(b.initScreenLookupPromise_,
b,(b.launchData_.extraData||{}).screenId||null)):new Promise(r(b.initReversePairingPromise_,b))};
f.onSessionEstablished_=function(a){if(!this.isDisposed()){this.info_("New cast session ID: "+a.sessionId);var b=a.receiver;if(b.receiverType!=chrome.cast.ReceiverType.CUSTOM){if(!this.session_)if(b.receiverType==chrome.cast.ReceiverType.CAST)this.info_("Got resumed cast session before resumed mdx connection."),b.friendlyName=chrome.cast.unescape(b.friendlyName),IT(this,new DT(this.screenService_,b),!0);else{this.warn_("Got non-cast session without previous mdx receiver event, or mdx resume.");return}var c=
this.session_.receiver_,d=dT(this.screenService_.getScreens(),c.label);d&&$S(d,b.label)&&c.receiverType!=chrome.cast.ReceiverType.CAST&&b.receiverType==chrome.cast.ReceiverType.CAST&&(this.info_("onSessionEstablished_: manual to cast session change "+b.friendlyName),nk(this.session_),this.session_=new DT(this.screenService_,b),this.session_.subscribe("sessionScreen",r(this.onSessionScreen_,this,this.session_)),this.session_.launchWithParams(null));this.session_.setCastSession(a)}}};
f.getCastSession=function(){return this.session_?this.session_.getCastSession():null};
f.onSessionRequestFailed_=function(a){this.isDisposed()||(this.warn_("Failed to estabilish a session: "+Gk(a)),a.code!=chrome.cast.ErrorCode.CANCEL&&IT(this,null))};
f.onReceiverUpdated_=function(a){this.info_("Receiver availability updated: "+a);if(!this.isDisposed()){var b=HT(this);this.hasCastReceiver_=a==chrome.cast.ReceiverAvailability.AVAILABLE;HT(this)!=b&&this.publish("yt-remote-cast2-availability-change",HT(this))}};
var Pza=function(a){var b=a.screenService_.getOnlineScreens(),c=a.session_&&a.session_.receiver_;a=pb(b,function(d){c&&$S(d,c.label)&&(c=null);var e=d.uuid?d.uuid:d.id,g=Qza(this,d);g?(g.label=e,g.friendlyName=d.name):(g=new chrome.cast.Receiver(e,d.name),g.receiverType=chrome.cast.ReceiverType.CUSTOM);return g},a);
c&&(c.receiverType!=chrome.cast.ReceiverType.CUSTOM&&(c=new chrome.cast.Receiver(c.label,c.friendlyName),c.receiverType=chrome.cast.ReceiverType.CUSTOM),a.push(c));return a};
GT.prototype.onScreenChange_=function(){this.isDisposed()||(this.customReceivers_=Pza(this),this.info_("Updating custom receivers: "+Gk(this.customReceivers_)),chrome.cast.setCustomReceivers(this.customReceivers_,Ta,r(function(){this.warn_("Failed to set custom receivers.")},this)),this.publish("yt-remote-cast2-availability-change",HT(this)))};
GT.prototype.setLaunchParams=GT.prototype.setLaunchParams;GT.prototype.setConnectedScreenStatus=GT.prototype.setConnectedScreenStatus;GT.prototype.stopSession=GT.prototype.stopSession;GT.prototype.getCastSession=GT.prototype.getCastSession;GT.prototype.requestSession=GT.prototype.requestSession;GT.prototype.init=GT.prototype.init;GT.prototype.dispose=GT.prototype.dispose;var Vza=function(a,b,c,d,e,g){Rza()?Sza(a,d,e,g)&&(KT(!0),window.chrome&&chrome.cast&&chrome.cast.isAvailable?Tza(b):(window.__onGCastApiAvailable=function(h,m){h?Tza(b):(LT("Failed to load cast API: "+m),MT(!1),KT(!1),lT("yt-remote-cast-available"),lT("yt-remote-cast-receiver"),Uza(),b(!1))},c?QR("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js"):0<=window.navigator.userAgent.indexOf("Android")&&0<=window.navigator.userAgent.indexOf("Chrome/")&&window.navigator.presentation?Sfa():!window.chrome||
!window.navigator.presentation||0<=window.navigator.userAgent.indexOf("Edge")?GA():(HA(),FA(Qfa.map(Rfa))))):JT("Cannot initialize because not running Chrome")},Uza=function(){JT("dispose");
var a=NT();a&&a.dispose();Na("yt.mdx.remote.cloudview.instance_",null,void 0);Wza(!1);jn(Xza);Xza.length=0},OT=function(){return!!kT("yt-remote-cast-installed")},Yza=function(){var a=kT("yt-remote-cast-receiver");
return a?a.friendlyName:null},Zza=function(){JT("clearCurrentReceiver");
lT("yt-remote-cast-receiver")},$za=function(){return OT()?NT()?NT().getCastSession():(LT("getCastSelector: Cast is not initialized."),null):(LT("getCastSelector: Cast API is not installed!"),null)},PT=function(a,b){aAa()?NT().setConnectedScreenStatus(a,b):LT("setConnectedScreenStatus called before ready.")},Rza=function(){var a=0<=Kc.search(/ (CrMo|Chrome|CriOS)\//);
return df||a},Sza=function(a,b,c,d){var e=!1;
NT()||(a=new GT(a,b,c,d),a.subscribe("yt-remote-cast2-availability-change",function(g){jT("yt-remote-cast-available",g);ln("yt-remote-cast2-availability-change",g)}),a.subscribe("yt-remote-cast2-receiver-selected",function(g){JT("onReceiverSelected: "+g.friendlyName);
jT("yt-remote-cast-receiver",g);ln("yt-remote-cast2-receiver-selected",g)}),a.subscribe("yt-remote-cast2-receiver-resumed",function(g){JT("onReceiverResumed: "+g.friendlyName);
jT("yt-remote-cast-receiver",g)}),a.subscribe("yt-remote-cast2-session-change",function(g){JT("onSessionChange: "+aT(g));
g||lT("yt-remote-cast-receiver");ln("yt-remote-cast2-session-change",g)}),Na("yt.mdx.remote.cloudview.instance_",a,void 0),e=!0);
JT("cloudview.createSingleton_: "+e);return e},NT=function(){return Sa("yt.mdx.remote.cloudview.instance_")},Tza=function(a){MT(!0);
KT(!1);NT().init(!1,function(b){b?(Wza(!0),kn("yt-remote-cast2-api-ready")):(LT("Failed to initialize cast API."),MT(!1),lT("yt-remote-cast-available"),lT("yt-remote-cast-receiver"),Uza());a(b)})},JT=function(a){YS("cloudview",a)},LT=function(a){YS("cloudview",a)},MT=function(a){JT("setCastInstalled_ "+a);
jT("yt-remote-cast-installed",a)},aAa=function(){return!!Sa("yt.mdx.remote.cloudview.apiReady_")},Wza=function(a){JT("setApiReady_ "+a);
Na("yt.mdx.remote.cloudview.apiReady_",a,void 0)},KT=function(a){Na("yt.mdx.remote.cloudview.initializing_",a,void 0)},Xza=[];var QT=function(a){this.index=-1;this.videoId=this.listId="";this.volume=this.playerState=-1;this.muted=!1;this.audioTrackId=null;this.playerTimeAt_=this.playerTime_=0;this.trackData=null;this.hasNext=this.hasPrevious=!1;this.loadedTime=this.duration_=this.seekableEnd_=this.seekableStart_=0;this.liveIngestionTime_=NaN;this.isLive_=!1;this.reset(a)},RT=function(a){a.audioTrackId=null;
a.trackData=null;a.playerState=-1;a.hasPrevious=!1;a.hasNext=!1;a.playerTime_=0;a.playerTimeAt_=fb();a.seekableStart_=0;a.seekableEnd_=0;a.duration_=0;a.loadedTime=0;a.liveIngestionTime_=NaN;a.isLive_=!1},ST=function(a){return 1==a.playerState?(fb()-a.playerTimeAt_)/1E3:0};
QT.prototype.reset=function(a){this.listId="";this.index=-1;this.videoId="";RT(this);this.volume=-1;this.muted=!1;a&&(this.index=a.index,this.listId=a.listId,this.videoId=a.videoId,this.playerState=a.playerState,this.volume=a.volume,this.muted=a.muted,this.audioTrackId=a.audioTrackId,this.trackData=a.trackData,this.hasPrevious=a.hasPrevious,this.hasNext=a.hasNext,this.playerTime_=a.playerTime,this.playerTimeAt_=a.playerTimeAt,this.seekableStart_=a.seekableStart,this.seekableEnd_=a.seekableEnd,this.duration_=
a.duration,this.loadedTime=a.loadedTime,this.liveIngestionTime_=a.liveIngestionTime,this.isLive_=!isNaN(this.liveIngestionTime_))};
QT.prototype.isAdPlaying=function(){return 1081==this.playerState};
var TT=function(a,b){a.playerTime_=b;a.playerTimeAt_=fb()};
QT.prototype.setDuration=function(a){this.duration_=isNaN(a)?0:a};
var UT=function(a){switch(a.playerState){case 1:case 1081:return(fb()-a.playerTimeAt_)/1E3+a.playerTime_;case-1E3:return 0;}return a.playerTime_};
QT.prototype.getSeekableStartTime=function(){return 0<this.seekableStart_?this.seekableStart_+ST(this):this.seekableStart_};
QT.prototype.getSeekableEndTime=function(){return this.isLive_?this.seekableEnd_+ST(this):this.seekableEnd_};
QT.prototype.getDuration=function(){return this.isLive_?this.duration_+ST(this):this.duration_};
QT.prototype.getLiveIngestionTime=function(){return this.isLive_?this.liveIngestionTime_+ST(this):this.liveIngestionTime_};
var VT=function(a,b,c){var d=a.videoId;a.videoId=b;a.index=c;b!=d&&RT(a)},WT=function(a){var b={};
b.index=a.index;b.listId=a.listId;b.videoId=a.videoId;b.playerState=a.playerState;b.volume=a.volume;b.muted=a.muted;b.audioTrackId=a.audioTrackId;b.trackData=u.unsafeClone(a.trackData);b.hasPrevious=a.hasPrevious;b.hasNext=a.hasNext;b.playerTime=a.playerTime_;b.playerTimeAt=a.playerTimeAt_;b.seekableStart=a.seekableStart_;b.seekableEnd=a.seekableEnd_;b.duration=a.duration_;b.loadedTime=a.loadedTime;b.liveIngestionTime=a.liveIngestionTime_;return b};
QT.prototype.clone=function(){return new QT(WT(this))};var ZT=function(a,b){eT.call(this);this.state_=0;this.connection_=a;this.contextSubscriptions_=[];this.actionQueue_=new xta;this.castSession_=this.castMedia_=null;this.boundCastStatusListener_=r(this.onCastStatusUpdate_,this);this.boundCastMediaListener_=r(this.onCastMediaChange_,this);this.boundCastMediaUpdateListener_=r(this.onCastMediaUpdate_,this);this.boundCloudviewAvailabilityChange_=r(this.onCloudviewAvailabilityChange_,this);var c=0;a?(c=a.getProxyState(),3!=c&&(a.subscribe("proxyStateChange",
this.setState_,this),bAa(this))):c=3;0!=c&&(b?this.setState_(c):Im(r(function(){this.setState_(c)},this),0));
(a=$za())&&XT(this,a);this.subscribe("yt-remote-cast2-session-change",this.boundCloudviewAvailabilityChange_)};
l(ZT,eT);ZT.prototype.getState=function(){return this.state_};
ZT.prototype.isReconnecting=function(){return 2==this.state_};
ZT.prototype.getReconnectTimeout=function(){return this.connection_.getReconnectTimeout()};
ZT.prototype.reconnect=function(){this.connection_.reconnect()};
var $T=function(a){return new QT(a.connection_.getPlayerContextData())};
f=ZT.prototype;f.getOtherConnectedRemoteId=function(){return this.connection_.getOtherConnectedRemoteId()};
f.getAutoplayMode=function(){return this.connection_.getAutoplayMode()};
f.getAutoplayVideoId=function(){return this.connection_.getAutoplayVideoId()};
f.play=function(){this.isReady_()?(this.castMedia_?this.castMedia_.play(null,Ta,aU(this,"play")):this.sendMessage_("play"),bU(this,1,UT($T(this))),this.publish("remotePlayerChange")):cU(this,this.play)};
f.pause=function(){this.isReady_()?(this.castMedia_?this.castMedia_.pause(null,Ta,aU(this,"pause")):this.sendMessage_("pause"),bU(this,2,UT($T(this))),this.publish("remotePlayerChange")):cU(this,this.pause)};
f.seekTo=function(a){if(this.isReady_()){if(this.castMedia_){var b=$T(this),c=new chrome.cast.media.SeekRequest;c.currentTime=a;c.resumeState=1==b.playerState||3==b.playerState?chrome.cast.media.ResumeState.PLAYBACK_START:chrome.cast.media.ResumeState.PLAYBACK_PAUSE;this.castMedia_.seek(c,Ta,aU(this,"seekTo",{newTime:a}))}else this.sendMessage_("seekTo",{newTime:a});bU(this,3,a);this.publish("remotePlayerChange")}else cU(this,db(this.seekTo,a))};
f.stop=function(){if(this.isReady_()){this.castMedia_?this.castMedia_.stop(null,Ta,aU(this,"stopVideo")):this.sendMessage_("stopVideo");var a=$T(this);a.index=-1;a.videoId="";RT(a);dU(this,a);this.publish("remotePlayerChange")}else cU(this,this.stop)};
f.setVolume=function(a,b){if(this.isReady_()){var c=$T(this);if(this.castSession_){if(c.volume!=a){var d=Math.round(a)/100;this.castSession_.setReceiverVolumeLevel(d,r(function(){this.info_("set receiver volume: "+d)},this),r(function(){this.warn_("failed to set receiver volume.")},this))}c.muted!=b&&this.castSession_.setReceiverMuted(b,r(function(){this.info_("set receiver muted: "+b)},this),r(function(){this.warn_("failed to set receiver muted.")},this))}else{var e={volume:a,
muted:b};-1!=c.volume&&(e.delta=a-c.volume);this.sendMessage_("setVolume",e)}c.muted=b;c.volume=a;dU(this,c)}else cU(this,db(this.setVolume,a,b))};
f.setSubtitlesTrack=function(a,b){if(this.isReady_()){var c=$T(this);a={videoId:a};b&&(c.trackData={trackName:b.name,languageCode:b.languageCode,sourceLanguageCode:b.translationLanguage?b.translationLanguage.languageCode:"",languageName:b.languageName,kind:b.kind},a.style=Gk(b.style),u.extend(a,c.trackData));this.sendMessage_("setSubtitlesTrack",a);dU(this,c)}else cU(this,db(this.setSubtitlesTrack,a,b))};
f.setLocationInfo=function(a,b,c){if(this.isReady_()){var d={};c?d.locationOverrideToken=c:(d.latitudeE7=a,d.longitudeE7=b);this.sendMessage_("setLocationInfo",d)}else cU(this,db(this.setLocationInfo,a,b,c))};
f.setAudioTrack=function(a,b){this.isReady_()?(b=b.getLanguageInfo().getId(),this.sendMessage_("setAudioTrack",{videoId:a,audioTrackId:b}),a=$T(this),a.audioTrackId=b,dU(this,a)):cU(this,db(this.setAudioTrack,a,b))};
f.getNowPlaying=function(){this.isReady_()?this.sendMessage_("getNowPlaying"):cU(this,this.getNowPlaying)};
f.addVideo=function(a){this.isReady_()?this.sendMessage_("addVideo",{videoId:a}):cU(this,db(this.addVideo,a))};
f.addPlaylist=function(a){this.isReady_()?this.sendMessage_("addVideos",{listId:a}):cU(this,db(this.addPlaylist,a))};
f.addVideos=function(a){0==a.length?this.warn_("Ignore add videos request due to empty list"):this.isReady_()?this.sendMessage_("addVideos",{videoIds:a.join(",")}):cU(this,db(this.addVideos,a))};
f.removeVideo=function(a){this.isReady_()?this.sendMessage_("removeVideo",{videoId:a}):cU(this,db(this.removeVideo,a))};
f.moveVideo=function(a,b,c){this.isReady_()?this.sendMessage_("moveVideo",{videoId:a,delta:(b>=c?c:c-1)-b}):cU(this,db(this.moveVideo,a,b,c))};
f.insertVideo=function(a){this.isReady_()?this.sendMessage_("insertVideo",{videoId:a}):cU(this,db(this.insertVideo,a))};
f.playVideo=function(a,b,c,d,e,g,h){var m=$T(this);c=c||0;var n={videoId:a,currentIndex:c};VT(m,a,c);Ia(b)&&(TT(m,b),n.currentTime=b);Ia(d)&&(n.listId=d);null!=e&&(n.playerParams=e);null!=g&&(n.clickTrackingParams=g);null!=h&&(n.locationInfo=Gk(h));this.sendMessage_("setPlaylist",n);d||dU(this,m)};
f.playVideoList=function(a,b){var c=$T(this),d=lb(b,a);b={videoId:a,videoIds:b.join(",")};this.sendMessage_("setPlaylist",b);VT(c,a,d);dU(this,c)};
f.prevVideo=function(a,b){if(this.isReady_()){if(a&&b){var c=$T(this);VT(c,a,b);dU(this,c)}this.sendMessage_("previous")}else cU(this,db(this.prevVideo,a,b))};
f.nextVideo=function(a,b){if(this.isReady_()){if(a&&b){var c=$T(this);VT(c,a,b);dU(this,c)}this.sendMessage_("next")}else cU(this,db(this.nextVideo,a,b))};
f.clearPlaylist=function(){if(this.isReady_()){this.sendMessage_("clearPlaylist");var a=$T(this);a.reset();dU(this,a);this.publish("remotePlayerChange")}else cU(this,this.clearPlaylist)};
f.dismissAutoplay=function(){this.isReady_()?this.sendMessage_("dismissAutoplay"):cU(this,this.dismissAutoplay)};
f.setAutoplayEnabled=function(a){this.isReady_()?a?this.sendMessage_("setAutoplayMode",{autoplayMode:"ENABLED"}):this.sendMessage_("setAutoplayMode",{autoplayMode:"DISABLED"}):cU(this,db(this.setAutoplayEnabled,a))};
f.dispose=function(){if(3!=this.state_){var a=this.state_;this.state_=3;this.publish("proxyStateChange",a,this.state_)}eT.prototype.dispose.call(this)};
f.disposeInternal=function(){cAa(this);this.connection_=null;this.actionQueue_.clear();XT(this,null);eT.prototype.disposeInternal.call(this)};
var bAa=function(a){mb("nowAutoplaying autoplayDismissed remotePlayerChange remoteQueueChange autoplayModeChange autoplayUpNext previousNextChange".split(" "),function(b){this.contextSubscriptions_.push(this.connection_.subscribe(b,db(this.onProxyEvent_,b),this))},a)},cAa=function(a){mb(a.contextSubscriptions_,function(b){this.connection_.unsubscribeByKey(b)},a);
a.contextSubscriptions_.length=0};
ZT.prototype.isReady_=function(){return 1==this.getState()};
var cU=function(a,b){50>a.actionQueue_.getCount()&&a.actionQueue_.enqueue(b)},bU=function(a,b,c){var d=$T(a);
TT(d,c);-1E3!=d.playerState&&(d.playerState=b);dU(a,d)};
ZT.prototype.sendMessage_=function(a,b){this.connection_.sendMessage(a,b)};
var dU=function(a,b){cAa(a);a.connection_.setPlayerContextData(WT(b));bAa(a)};
ZT.prototype.setState_=function(a){if((a!=this.state_||2==a)&&3!=this.state_&&0!=a){var b=this.state_;this.state_=a;this.publish("proxyStateChange",b,a);if(1==a)for(;!this.actionQueue_.isEmpty();)this.actionQueue_.dequeue().apply(this);else 3==a&&this.dispose()}};
ZT.prototype.onProxyEvent_=function(a,b){this.publish(a,b)};
var XT=function(a,b){a.castSession_&&(a.castSession_.removeUpdateListener(a.boundCastStatusListener_),a.castSession_.removeMediaListener(a.boundCastMediaListener_),a.onCastMediaChange_(null));a.castSession_=b;if(a.castSession_&&(a.info_("Setting cast session: "+a.castSession_.sessionId),a.castSession_.addUpdateListener(a.boundCastStatusListener_),a.castSession_.addMediaListener(a.boundCastMediaListener_),a.castSession_.media.length))a.onCastMediaChange_(a.castSession_.media[0])};
ZT.prototype.getCastSession=function(){return this.castSession_};
ZT.prototype.onCastStatusUpdate_=function(a){if(!a)this.onCastMediaChange_(null),XT(this,null);else if(this.castSession_.receiver.volume){a=this.castSession_.receiver.volume;var b=$T(this),c=Math.round(100*a.level||0);if(b.volume!=c||b.muted!=a.muted)this.info_("Cast volume update: "+a.level+(a.muted?" muted":"")),b.volume=c,b.muted=!!a.muted,dU(this,b)}};
ZT.prototype.onCastMediaChange_=function(a){this.info_("Cast media: "+!!a);this.castMedia_&&this.castMedia_.removeUpdateListener(this.boundCastMediaUpdateListener_);if(this.castMedia_=a)this.castMedia_.addUpdateListener(this.boundCastMediaUpdateListener_),dAa(this),this.publish("remotePlayerChange")};
var dAa=function(a){var b=a.castMedia_.media,c=a.castMedia_.customData;if(b&&c){var d=$T(a);b.contentId!=d.videoId&&a.info_("Cast changing video to: "+b.contentId);d.videoId=b.contentId;d.playerState=c.playerState;TT(d,a.castMedia_.getEstimatedTime());dU(a,d)}else a.info_("No cast media video. Ignoring state update.")};
f=ZT.prototype;f.onCastMediaUpdate_=function(a){if(a)dAa(this),this.publish("remotePlayerChange");else this.onCastMediaChange_(null)};
f.toggleVideoInfo=function(){this.sendMessage_("sendDebugCommand",{debugCommand:"stats4nerds "})};
f.onCloudviewAvailabilityChange_=function(){var a=$za();a&&XT(this,a)};
f.info_=function(a){YS("CP",a)};
f.warn_=function(a){YS("CP",a)};
var aU=function(a,b,c){return r(function(d){this.warn_("Failed to "+b+" with cast v2 channel. Error code: "+d.code);d.code!=chrome.cast.ErrorCode.TIMEOUT&&(this.warn_("Retrying "+b+" using MDx browser channel."),this.sendMessage_(b,c))},a)};var eU=function(a,b,c){eT.call(this);this.connectTimerId_=NaN;this.reconnecting_=!1;this.idleDisconnectTimerId_=this.clientSetVideoTimerId_=this.playingSyncTimerId_=this.reconnectedCheckScreenTimeout_=NaN;this.listeners_=[];this.autoplayMode_=this.autoplayVideoId_=this.clientVideoId_=this.playerContext_=this.handler_=null;this.http_=a;this.listeners_.push(Cm(window,"beforeunload",r(this.handleBeforeUnload_,this)));this.connectedDevices_=[];this.playerContext_=new QT;this.currentScreenId_=b.id;this.handler_=
eAa(this,c);this.handler_.subscribe("handlerOpened",this.onChannelOpened_,this);this.handler_.subscribe("handlerClosed",this.onChannelClosed_,this);this.handler_.subscribe("handlerError",this.onChannelError_,this);this.handler_.subscribe("handlerMessage",this.onChannelMessage_,this);cza(this.handler_,b.token);this.subscribe("remoteQueueChange",function(){var d=this.playerContext_.videoId;pT()&&jT("yt-remote-session-video-id",d)},this)};
l(eU,eT);
eU.prototype.connect=function(a,b){if(b){var c=b.listId,d=b.videoId,e=b.playerParams,g=b.clickTrackingParams,h=b.index,m={videoId:d},n=b.currentTime;b=b.locationInfo;Ia(n)&&(m.currentTime=5>=n?0:n);e&&(m.playerParams=e);b&&(m.locationInfo=b);g&&(m.clickTrackingParams=g);c&&(m.listId=c);Ia(h)&&(m.currentIndex=h);c&&(this.playerContext_.listId=c);this.playerContext_.videoId=d;this.playerContext_.index=h||0;this.playerContext_.state=3;TT(this.playerContext_,n);this.autoplayMode_="UNSUPPORTED";fU("Connecting with setPlaylist and params: "+
Gk(m));this.handler_.connect({method:"setPlaylist",params:Gk(m)},a,wza())}else fU("Connecting without params"),this.handler_.connect({},a,wza());fAa(this)};
eU.prototype.dispose=function(){this.isDisposed()||(this.publish("beforeDispose"),gU(this,3));eT.prototype.dispose.call(this)};
eU.prototype.disposeInternal=function(){hU(this);iU(this);jU(this);Km(this.clientSetVideoTimerId_);this.clientSetVideoTimerId_=NaN;Km(this.idleDisconnectTimerId_);this.idleDisconnectTimerId_=NaN;this.clientVideoId_=null;Em(this.listeners_);this.listeners_.length=0;this.handler_.dispose();eT.prototype.disposeInternal.call(this);this.autoplayMode_=this.autoplayVideoId_=this.connectedDevices_=this.playerContext_=this.handler_=null};
var fU=function(a){YS("conn",a)};
eU.prototype.handleBeforeUnload_=function(){this.disconnect_(2)};
var eAa=function(a,b){return new RS(TS(a.http_,"/bc"),b)},gU=function(a,b){a.publish("proxyStateChange",b)},fAa=function(a){a.connectTimerId_=Im(r(function(){fU("Connecting timeout");
this.disconnect_(1)},a),2E4)},hU=function(a){Km(a.connectTimerId_);
a.connectTimerId_=NaN},jU=function(a){Km(a.reconnectedCheckScreenTimeout_);
a.reconnectedCheckScreenTimeout_=NaN},gAa=function(a){iU(a);
a.playingSyncTimerId_=Im(r(function(){this.sendMessage_("getNowPlaying")},a),2E4)},iU=function(a){Km(a.playingSyncTimerId_);
a.playingSyncTimerId_=NaN};
eU.prototype.isConnected_=function(){var a=this.handler_;return!!a.channel_&&3==a.channel_.getState()&&isNaN(this.connectTimerId_)};
eU.prototype.onChannelOpened_=function(){fU("Channel opened");this.reconnecting_&&(this.reconnecting_=!1,jU(this),this.reconnectedCheckScreenTimeout_=Im(r(function(){fU("Timing out waiting for a screen.");this.disconnect_(1)},this),15E3));
Aza(bza(this.handler_),this.currentScreenId_)};
eU.prototype.onChannelClosed_=function(){fU("Channel closed");isNaN(this.connectTimerId_)?sT(!0):sT();this.dispose()};
eU.prototype.onChannelError_=function(a){sT();isNaN(this.getReconnectTimeout_())?(fU("Channel error: "+a+" without reconnection"),this.dispose()):(this.reconnecting_=!0,fU("Channel error: "+a+" with reconnection in "+this.getReconnectTimeout_()+" ms"),gU(this,2))};
var iAa=function(a,b){b&&(hU(a),jU(a));b==a.isConnected_()?b&&(gU(a,1),a.sendMessage_("getSubtitlesTrack")):b?(a.getOtherConnectedRemoteId_()&&a.playerContext_.reset(),gU(a,1),a.sendMessage_("getNowPlaying"),hAa(a)):a.disconnect_(1)},jAa=function(a,b){var c=b.params.videoId;
delete b.params.videoId;c==a.playerContext_.videoId&&(u.isEmpty(b.params)?a.playerContext_.trackData=null:a.playerContext_.trackData=b.params,a.publish("remotePlayerChange"))},kAa=function(a,b){var c=b.params.videoId||b.params.video_id,d=parseInt(b.params.currentIndex,10);
a.playerContext_.listId=b.params.listId||a.playerContext_.listId;VT(a.playerContext_,c,d);a.publish("remoteQueueChange")},mAa=function(a,b){b.params=b.params||{};
kAa(a,b);lAa(a,b);a.publish("autoplayDismissed")},lAa=function(a,b){var c=parseInt(b.params.currentTime||b.params.current_time,10);
TT(a.playerContext_,isNaN(c)?0:c);c=parseInt(b.params.state,10);c=isNaN(c)?-1:c;-1==c&&-1E3==a.playerContext_.playerState&&(c=-1E3);a.playerContext_.playerState=c;c=Number(b.params.loadedTime);a.playerContext_.loadedTime=isNaN(c)?0:c;a.playerContext_.setDuration(Number(b.params.duration));c=a.playerContext_;var d=Number(b.params.liveIngestionTime);c.liveIngestionTime_=d;c.isLive_=isNaN(d)?!1:!0;c=a.playerContext_;d=Number(b.params.seekableStartTime);b=Number(b.params.seekableEndTime);c.seekableStart_=
isNaN(d)?0:d;c.seekableEnd_=isNaN(b)?0:b;1==a.playerContext_.playerState?gAa(a):iU(a);a.publish("remotePlayerChange")};
eU.prototype.onAdStateChange_=function(a){if(-1E3!=this.playerContext_.playerState){var b=1085;switch(parseInt(a.params.adState,10)){case 1:b=1081;break;case 2:b=1084;break;case 0:b=1083;}this.playerContext_.playerState=b;a=parseInt(a.params.currentTime,10);TT(this.playerContext_,isNaN(a)?0:a);this.publish("remotePlayerChange")}};
var nAa=function(a,b){var c="true"==b.params.muted;a.playerContext_.volume=parseInt(b.params.volume,10);a.playerContext_.muted=c;a.publish("remotePlayerChange")},oAa=function(a,b){a.autoplayVideoId_=b.params.videoId;
a.publish("nowAutoplaying",parseInt(b.params.timeout,10))},pAa=function(a,b){var c="true"==b.params.hasNext;
a.playerContext_.hasPrevious="true"==b.params.hasPrevious;a.playerContext_.hasNext=c;a.publish("previousNextChange")};
f=eU.prototype;f.onChannelMessage_=function(a){a.params?fU("Received: action="+a.action+", params="+Gk(a.params)):fU("Received: action="+a.action+" {}");switch(a.action){case"loungeStatus":a=Ex(a.params.devices);this.connectedDevices_=pb(a,function(c){return new PS(c)});
a=!!ub(this.connectedDevices_,function(c){return"LOUNGE_SCREEN"==c.type});
iAa(this,a);break;case"loungeScreenDisconnected":Ab(this.connectedDevices_,function(c){return"LOUNGE_SCREEN"==c.type});
iAa(this,!1);break;case"remoteConnected":var b=new PS(Ex(a.params.device));ub(this.connectedDevices_,function(c){return c.equals(b)})||xb(this.connectedDevices_,b);
break;case"remoteDisconnected":b=new PS(Ex(a.params.device));Ab(this.connectedDevices_,function(c){return c.equals(b)});
break;case"gracefulDisconnect":break;case"playlistModified":kAa(this,a);break;case"nowPlaying":mAa(this,a);break;case"onStateChange":lAa(this,a);break;case"onAdStateChange":this.onAdStateChange_(a);break;case"onVolumeChanged":nAa(this,a);break;case"onSubtitlesTrackChanged":jAa(this,a);break;case"nowAutoplaying":oAa(this,a);break;case"autoplayDismissed":this.publish("autoplayDismissed");break;case"autoplayUpNext":this.autoplayVideoId_=a.params.videoId||null;this.publish("autoplayUpNext",
this.autoplayVideoId_);break;case"onAutoplayModeChanged":this.autoplayMode_=a.params.autoplayMode;this.publish("autoplayModeChange",this.autoplayMode_);"DISABLED"==this.autoplayMode_&&this.publish("autoplayDismissed");break;case"onHasPreviousNextChanged":pAa(this,a);break;case"requestAssistedSignIn":this.publish("assistedSignInRequested",a.params.authCode);break;default:fU("Unrecognized action: "+a.action);}};
f.resetClientVideoId_=function(){if(this.clientVideoId_){var a=this.clientVideoId_;this.clientVideoId_=null;this.playerContext_.videoId!=a&&this.sendMessage_("getNowPlaying")}};
f.getProxyState_=function(){var a=3;this.isDisposed()||(a=0,isNaN(this.getReconnectTimeout_())?this.isConnected_()&&(a=1):a=2);return a};
f.disconnect_=function(a){fU("Disconnecting with "+a);hU(this);this.publish("beforeDisconnect",a);1==a&&sT();this.handler_.disconnect(a);this.dispose()};
f.getPlayerContextData_=function(){var a=this.playerContext_;this.clientVideoId_&&(a=this.playerContext_.clone(),VT(a,this.clientVideoId_,a.index));return WT(a)};
f.setPlayerContextData_=function(a){var b=new QT(a);b.videoId&&b.videoId!=this.playerContext_.videoId&&(this.clientVideoId_=b.videoId,Km(this.clientSetVideoTimerId_),this.clientSetVideoTimerId_=Im(r(this.resetClientVideoId_,this),5E3));var c=[];this.playerContext_.listId==b.listId&&this.playerContext_.videoId==b.videoId&&this.playerContext_.index==b.index||c.push("remoteQueueChange");this.playerContext_.playerState==b.playerState&&this.playerContext_.volume==b.volume&&this.playerContext_.muted==b.muted&&
UT(this.playerContext_)==UT(b)&&Gk(this.playerContext_.trackData)==Gk(b.trackData)||c.push("remotePlayerChange");this.playerContext_.reset(a);mb(c,function(d){this.publish(d)},this)};
f.getOtherConnectedRemoteId_=function(){var a=this.handler_.defaultQueryParams_.id,b=ub(this.connectedDevices_,function(c){return"REMOTE_CONTROL"==c.type&&c.id!=a});
return b?b.id:""};
f.getReconnectTimeout_=function(){return this.handler_.getReconnectTimeout()};
f.getAutoplayMode_=function(){return this.autoplayMode_||"UNSUPPORTED"};
f.getAutoplayVideoId_=function(){return this.autoplayVideoId_||""};
f.reconnect_=function(){!isNaN(this.getReconnectTimeout_())&&this.handler_.reconnect()};
var hAa=function(a){Km(a.idleDisconnectTimerId_);a.idleDisconnectTimerId_=Im(r(a.disconnect_,a,1),864E5)};
eU.prototype.sendMessage_=function(a,b){b?fU("Sending: action="+a+", params="+Gk(b)):fU("Sending: action="+a);this.handler_.sendMessage(a,b)};
eU.prototype.sendMessageWithUserAction_=function(a,b){this.sendMessage_(a,b);hAa(this)};
eU.prototype.subscribe=eU.prototype.subscribe;eU.prototype.unsubscribeByKey=eU.prototype.unsubscribeByKey;eU.prototype.getProxyState=eU.prototype.getProxyState_;eU.prototype.disconnect=eU.prototype.disconnect_;eU.prototype.getPlayerContextData=eU.prototype.getPlayerContextData_;eU.prototype.setPlayerContextData=eU.prototype.setPlayerContextData_;eU.prototype.getOtherConnectedRemoteId=eU.prototype.getOtherConnectedRemoteId_;eU.prototype.getReconnectTimeout=eU.prototype.getReconnectTimeout_;
eU.prototype.getAutoplayMode=eU.prototype.getAutoplayMode_;eU.prototype.getAutoplayVideoId=eU.prototype.getAutoplayVideoId_;eU.prototype.reconnect=eU.prototype.reconnect_;eU.prototype.sendMessage=eU.prototype.sendMessageWithUserAction_;var kU=function(a){fT.call(this,"ScreenServiceProxy");this.instance_=a;this.subscriptionKeys_=[];this.subscriptionKeys_.push(this.instance_.$_s("screenChange",r(this.onScreenChange_,this)));this.subscriptionKeys_.push(this.instance_.$_s("onlineScreenChange",r(this.onOnlineScreenChange_,this)))};
l(kU,fT);f=kU.prototype;f.getScreens=function(a){return this.instance_.$_gs(a)};
f.getOnlineScreens=function(){return this.instance_.$_gos()};
f.contains=function(a){return!!this.instance_.$_c(a)};
f.get=function(a){return this.instance_.$_g(a)};
f.start=function(){this.instance_.$_st()};
f.add=function(a,b,c){this.instance_.$_a(a,b,c)};
f.remove=function(a,b,c){this.instance_.$_r(a,b,c)};
f.updateName=function(a,b,c,d){this.instance_.$_un(a,b,c,d)};
f.getScreenByPairingCode=function(a,b,c,d){this.instance_.$_gspc(a,b,c,d)};
f.getScreenByPollingPairingCode=function(a,b,c,d,e){return this.instance_.$_gsppc(a,b,c,d,e)};
f.disposeInternal=function(){for(var a=0,b=this.subscriptionKeys_.length;a<b;++a)this.instance_.$_ubk(this.subscriptionKeys_[a]);this.subscriptionKeys_.length=0;this.instance_=null;fT.prototype.disposeInternal.call(this)};
f.onScreenChange_=function(){this.publish("screenChange")};
f.onOnlineScreenChange_=function(){this.publish("onlineScreenChange")};
zT.prototype.$_st=zT.prototype.start;zT.prototype.$_gspc=zT.prototype.getScreenByPairingCode;zT.prototype.$_gsppc=zT.prototype.getScreenByPollingPairingCode;zT.prototype.$_c=zT.prototype.contains;zT.prototype.$_g=zT.prototype.get;zT.prototype.$_a=zT.prototype.add;zT.prototype.$_un=zT.prototype.updateName;zT.prototype.$_r=zT.prototype.remove;zT.prototype.$_gs=zT.prototype.getScreens;zT.prototype.$_gos=zT.prototype.getOnlineScreens;zT.prototype.$_s=zT.prototype.subscribe;zT.prototype.$_ubk=zT.prototype.unsubscribeByKey;var vAa=function(a){a=z("MDX_CONFIG")||a;tza();qT();lU||(lU=new SS(a?a.loungeApiHost:void 0),Bza()&&(lU.basePath="/api/loungedev"));mU||(mU=Sa("yt.mdx.remote.deferredProxies_")||[],Na("yt.mdx.remote.deferredProxies_",mU,void 0));qAa();var b=nU();if(!b){var c=new zT(lU);Na("yt.mdx.remote.screenService_",c,void 0);b=nU();var d=!1,e=void 0,g=void 0,h=!1;a&&(d=!!a.loadCastApiSetupScript,e=a.appId,g=a.theme,h=!!a.disableDial);Vza(c,function(m){m?oU()&&PT(oU(),"YouTube TV"):c.subscribe("onlineScreenChange",
function(){ln("yt-remote-receiver-availability-change")})},d,e,g,h)}a&&!Sa("yt.mdx.remote.initialized_")&&(Na("yt.mdx.remote.initialized_",!0,void 0),pU("Initializing: "+Gk(a)),qU.push(gn("yt-remote-cast2-availability-change",function(){ln("yt-remote-receiver-availability-change")})),qU.push(gn("yt-remote-cast2-receiver-selected",function(){rAa();
ln("yt-remote-auto-connect","cast-selector-receiver")})),qU.push(gn("yt-remote-cast2-receiver-resumed",function(){ln("yt-remote-receiver-resumed","cast-selector-receiver")})),qU.push(gn("yt-remote-cast2-session-change",sAa)),qU.push(gn("yt-remote-connection-change",function(m){m?PT(oU(),"YouTube TV"):rU()||(PT(null,null),Zza())})),d=sU(),a.isAuto&&(d.id+="#dial"),A("desktop_enable_autoplay")&&(d.capabilities=["atp"]),d.name=a.device,d.app=a.app,(g=a.theme)&&(d.theme=g),pU(" -- with channel params: "+
Gk(d)),tAa(d),b.start(),oU()||uAa())},wAa=function(){var a=nU().getOnlineScreens(),b=tU();
b&&uU()&&(cT(a,b)||a.push(b));return oza(a)},xAa=function(){var a=wAa(),b=tU();
b||(b=rU());return ub(a,function(c){return b&&$S(b,c.key)?!0:!1})},tU=function(){var a=oU();
if(!a)return null;var b=nU().getScreens();return dT(b,a)},sAa=function(a){pU("remote.onCastSessionChange_: "+aT(a));
if(a){var b=tU();b&&b.id==a.id?PT(b.id,"YouTube TV"):(b&&yAa(),zAa(a,1))}else uU()&&yAa()},yAa=function(){aAa()?NT().stopSession():LT("stopSession called before API ready.");
var a=uU();a&&(a.disconnect(1),vU(null))},AAa=function(){var a=uU();
return a&&3!=a.getProxyState()?new ZT(uU(),void 0):null},pU=function(a){YS("remote",a)},nU=function(){if(!wU){var a=Sa("yt.mdx.remote.screenService_");
wU=a?new kU(a):null}return wU},oU=function(){return Sa("yt.mdx.remote.currentScreenId_")},BAa=function(a){Na("yt.mdx.remote.currentScreenId_",a,void 0)},rAa=function(){Na("yt.mdx.remote.connectData_",null,void 0)},uU=function(){return Sa("yt.mdx.remote.connection_")},vU=function(a){var b=uU();
rAa();a||BAa("");Na("yt.mdx.remote.connection_",a,void 0);mU&&(mb(mU,function(c){c(a)}),mU.length=0);
b&&!a?ln("yt-remote-connection-change",!1):!b&&a&&ln("yt-remote-connection-change",!0)},rU=function(){var a=pT();
if(!a)return null;var b=nU().getScreens();return dT(b,a)},zAa=function(a,b){BAa(a.id);
a=new eU(lU,a,sU());a.connect(b,Sa("yt.mdx.remote.connectData_"));a.subscribe("beforeDisconnect",function(c){ln("yt-remote-before-disconnect",c)});
a.subscribe("beforeDispose",function(){uU()&&vU(null)});
vU(a)},uAa=function(){var a=rU();
a?(pU("Resume connection to: "+aT(a)),zAa(a,0)):(sT(),Zza(),pU("Skipping connecting because no session screen found."))},lU=null,mU=null,wU=null,qAa=function(){var a=sU();
if(u.isEmpty(a)){a=oT();var b=kT("yt-remote-session-name")||"",c=kT("yt-remote-session-app")||"";a={device:"REMOTE_CONTROL",id:a,name:b,app:c,mdxVersion:3};Na("yt.mdx.remote.channelParams_",a,void 0)}},sU=function(){return Sa("yt.mdx.remote.channelParams_")||{}},tAa=function(a){a?(jT("yt-remote-session-app",a.app),jT("yt-remote-session-name",a.name)):(lT("yt-remote-session-app"),lT("yt-remote-session-name"));
Na("yt.mdx.remote.channelParams_",a,void 0)},qU=[];var xU=window.yt&&window.yt.msgs_||window.ytcfg&&window.ytcfg.msgs||{};Na("yt.msgs_",xU,void 0);function yU(a,b,c){b=void 0===b?{}:b;a=(a=a in xU?xU[a]:c)||"";c={};for(var d in b)c.$jscomp$loop$prop$ph$1990=d,a=a.replace(new RegExp("\\$"+c.$jscomp$loop$prop$ph$1990,"gi"),function(e){return function(){return b[e.$jscomp$loop$prop$ph$1990]}}(c)),c={$jscomp$loop$prop$ph$1990:c.$jscomp$loop$prop$ph$1990};
return a}
function CAa(a,b){return DAa(a in xU?xU[a]:{},b)}
function DAa(a,b){var c=z("I18N_PLURAL_RULES");c||(c=function(d){return 1==d?"one":"other"});
return(a=a["case"+b]||a[c(b)])?a.replace("#",b.toString()):b+""}
;var EAa=/cssbin\/(?:debug-)?([a-zA-Z0-9_-]+?)(?:-2x|-web|-rtl|-vfl|.css)/;function FAa(a){a=a||"";var b=a.match(EAa);spf.style.load(a,b?b[1]:"",void 0)}
;function zU(a,b,c,d){b=void 0===b?{}:b;c=void 0===c?"":c;d=void 0===d?window:d;d=d.location;a=Ai(a,b)+c;a=a instanceof uc?a:Bc(a);d.href=vc(a)}
function GAa(a,b,c){b=void 0===b?{}:b;c=void 0===c?!1:c;var d=z("EVENT_ID");d&&(b.ei||(b.ei=d));b&&cS(a,b);if(c)return!1;(window.ytspf||{}).enabled?spf.navigate(a):zU(a);return!0}
;var BU=function(a,b,c,d){lk.call(this);var e=this;this.containerElement_=this.targetElement_=a;this.playerId_=b;this.isCurrentPlayerApiSetup_=!1;this.api={};this.playerRemoveEventListener_=this.playerAddEventListener_=null;this.pubsub_=new Mk;ok(this,this.pubsub_);this.globalCallbacks_={};this.currentPlayerType_=this.readyCallback_=this.elementId_=this.unmodifiedConfig_=this.config_=null;this.creatingPlayer_=!1;this.bootstrapPlayer_=this.createPlayerCallback_=null;this.wrappedCallbacks_={};this.internalEvents_=
["onReady"];this.lastError_=null;this.readyPollTimer_=NaN;this.globalCallbackTimerIds_={};this.webPlayerContextConfig_=d;AU(this);this.addEventListener_("WATCH_LATER_VIDEO_ADDED",this.onPlayerWatchLaterVideoAdded_.bind(this));this.addEventListener_("WATCH_LATER_VIDEO_REMOVED",this.onPlayerWatchLaterVideoRemoved_.bind(this));this.addEventListener_("onAdAnnounce",this.a11yAnnounce_.bind(this));this.mouseWheelListeners_=new xS(this);ok(this,this.mouseWheelListeners_);this.initialLoadConfigTimerId_=0;
c?this.initialLoadConfigTimerId_=Im(function(){e.loadNewVideoConfig(c)},0):d&&(HAa(this),IAa(this))};
l(BU,lk);BU.prototype.getId=function(){return this.playerId_};
BU.prototype.loadNewVideoConfig=function(a){if(!this.isDisposed()){this.initialLoadConfigTimerId_&&(Km(this.initialLoadConfigTimerId_),this.initialLoadConfigTimerId_=0);a instanceof yS||(a=new yS(a));this.unmodifiedConfig_=a;this.config_=a.clone();HAa(this);this.readyCallback_||(this.readyCallback_=CU(this,this.config_.args.jsapicallback||"onYouTubePlayerReady"));this.config_.args.jsapicallback=null;if(a=this.config_.attrs.width)this.containerElement_.style.width=ej(Number(a)||a,!0);if(a=this.config_.attrs.height)this.containerElement_.style.height=
ej(Number(a)||a,!0);IAa(this);this.isReady_()&&JAa(this)}};
var HAa=function(a){a.elementId_=(a.webPlayerContextConfig_?a.webPlayerContextConfig_.rootElementId:a.config_.attrs.id)||a.elementId_;"video-player"==a.elementId_&&(a.elementId_=a.playerId_,a.config_.attrs.id=a.playerId_);a.containerElement_.id==a.elementId_&&(a.elementId_+="-player",a.config_.attrs.id=a.elementId_)};
BU.prototype.getConfig_=function(){return this.unmodifiedConfig_};
var JAa=function(a){a.config_&&!a.config_.loaded&&(a.config_.loaded=!0,"0"!=a.config_.args.autoplay?a.api.loadVideoByPlayerVars(a.config_.args):a.api.cueVideoByPlayerVars(a.config_.args))},KAa=function(a){var b=!0,c=DU(a);
c&&a.config_&&(a=EU(a),b=(c?c.dataset?c.dataset[nya()]:c.getAttribute("data-version"):null)==a);return b&&!!Sa("yt.player.Application.create")},IAa=function(a){if(!a.isDisposed()&&!a.creatingPlayer_){var b=KAa(a);
if(b&&"html5"==(DU(a)?"html5":null))a.currentPlayerType_="html5",a.isReady_()||FU(a);else if(LAa(a),a.currentPlayerType_="html5",b&&a.bootstrapPlayer_)a.targetElement_.appendChild(a.bootstrapPlayer_),FU(a);else{a.config_&&(a.config_.loaded=!0);var c=!1;a.createPlayerCallback_=function(){c=!0;var d=Sa("yt.player.Application.create"),e=a.config_?a.config_.clone():void 0;d(a.targetElement_,e,a.webPlayerContextConfig_);FU(a)};
a.creatingPlayer_=!0;b?a.createPlayerCallback_():(QR(EU(a),a.createPlayerCallback_),FAa(a.webPlayerContextConfig_?a.webPlayerContextConfig_.cssUrl:a.config_.assets.css),MAa(a)&&!c&&Na("yt.player.Application.create",null,void 0))}}},DU=function(a){var b=bh(document,a.elementId_);
!b&&a.containerElement_&&a.containerElement_.querySelector&&(b=a.containerElement_.querySelector("#"+a.elementId_));return b},FU=function(a){if(!a.isDisposed()){var b=DU(a),c=!1;
b&&b.getApiInterface&&b.getApiInterface()&&(c=!0);c?(a.creatingPlayer_=!1,b.isNotServable&&a.config_&&b.isNotServable(a.config_.args.video_id)||NAa(a)):a.readyPollTimer_=Im(function(){FU(a)},50)}},NAa=function(a){AU(a);
a.isCurrentPlayerApiSetup_=!0;var b=DU(a);b.addEventListener&&(a.playerAddEventListener_=GU(a,b,"addEventListener"));b.removeEventListener&&(a.playerRemoveEventListener_=GU(a,b,"removeEventListener"));var c=b.getApiInterface();c=c.concat(b.getInternalApiInterface());for(var d=0;d<c.length;d++){var e=c[d];a.api[e]||(a.api[e]=GU(a,b,e))}for(var g in a.globalCallbacks_)a.playerAddEventListener_(g,a.globalCallbacks_[g]);JAa(a);a.readyCallback_&&a.readyCallback_(a.api);a.pubsub_.publish("onReady",a.api)},
GU=function(a,b,c){var d=b[c];
return function(){try{return a.lastError_=null,d.apply(b,arguments)}catch(e){"sendAbandonmentPing"!=c&&(e.message+=" ("+c+")",a.lastError_=e,xe(e))}}},AU=function(a){a.isCurrentPlayerApiSetup_=!1;
if(a.playerRemoveEventListener_)for(var b in a.globalCallbacks_)a.playerRemoveEventListener_(b,a.globalCallbacks_[b]);for(var c in a.globalCallbackTimerIds_)Km(parseInt(c,10));a.globalCallbackTimerIds_={};a.playerAddEventListener_=null;a.playerRemoveEventListener_=null;for(var d in a.api)a.api[d]=null;a.api.addEventListener=a.addEventListener_.bind(a);a.api.removeEventListener=a.removeEventListener_.bind(a);a.api.destroy=a.dispose.bind(a);a.api.getLastError=a.getLastError_.bind(a);a.api.getPlayerType=
a.getPlayerType_.bind(a);a.api.getCurrentVideoConfig=a.getConfig_.bind(a);a.api.loadNewVideoConfig=a.loadNewVideoConfig.bind(a);a.api.isReady=a.isReady_.bind(a)};
BU.prototype.isReady_=function(){return this.isCurrentPlayerApiSetup_};
BU.prototype.addEventListener_=function(a,b){var c=this,d=CU(this,b);d&&(wb(this.internalEvents_,a)||this.globalCallbacks_[a]||(b=OAa(this,a),this.playerAddEventListener_&&this.playerAddEventListener_(a,b)),this.pubsub_.subscribe(a,d),"onReady"==a&&this.isReady_()&&Im(function(){d(c.api)},0))};
BU.prototype.removeEventListener_=function(a,b){this.isDisposed()||(b=CU(this,b))&&this.pubsub_.unsubscribe(a,b)};
var CU=function(a,b){var c=b;if("string"==typeof b){if(a.wrappedCallbacks_[b])return a.wrappedCallbacks_[b];c=function(){var d=Sa(b);d&&d.apply(q,arguments)};
a.wrappedCallbacks_[b]=c}return c?c:null},OAa=function(a,b){var c="ytPlayer"+b+a.playerId_;
a.globalCallbacks_[b]=c;q[c]=function(d){var e=Im(function(){a.isDisposed()||(a.pubsub_.publish(b,d),u.remove(a.globalCallbackTimerIds_,String(e)))},0);
u.add(a.globalCallbackTimerIds_,String(e),!0)};
return c};
f=BU.prototype;f.a11yAnnounce_=function(a){kn("a11y-announce",a)};
f.onPlayerWatchLaterVideoAdded_=function(a){kn("WATCH_LATER_VIDEO_ADDED",a)};
f.onPlayerWatchLaterVideoRemoved_=function(a){kn("WATCH_LATER_VIDEO_REMOVED",a)};
f.getPlayerType_=function(){return this.currentPlayerType_||(DU(this)?"html5":null)};
f.getLastError_=function(){return this.lastError_};
var LAa=function(a){a.cancel();AU(a);a.currentPlayerType_=null;a.config_&&(a.config_.loaded=!1);var b=DU(a);b&&(KAa(a)||!MAa(a)?a.bootstrapPlayer_=b:(b&&b.destroy&&b.destroy(),a.bootstrapPlayer_=null));zh(a.targetElement_)};
BU.prototype.cancel=function(){this.createPlayerCallback_&&SR(EU(this),this.createPlayerCallback_);Km(this.readyPollTimer_);this.creatingPlayer_=!1};
BU.prototype.disposeInternal=function(){LAa(this);if(this.bootstrapPlayer_&&this.config_&&this.bootstrapPlayer_.destroy)try{this.bootstrapPlayer_.destroy()}catch(b){we(b)}this.wrappedCallbacks_=null;for(var a in this.globalCallbacks_)q[this.globalCallbacks_[a]]=null;this.unmodifiedConfig_=this.config_=this.api=null;delete this.targetElement_;delete this.containerElement_;lk.prototype.disposeInternal.call(this)};
var MAa=function(a){return a.config_&&a.config_.args&&a.config_.args.fflags?-1!=a.config_.args.fflags.indexOf("player_destroy_old_version=true"):!1},EU=function(a){return a.webPlayerContextConfig_?a.webPlayerContextConfig_.jsUrl:a.config_.assets.js};var HU={},PAa="player_uid_"+(1E9*Math.random()>>>0);function QAa(a,b){var c=void 0===c?!0:c;a=Ka(a)?bh(document,a):a;var d=PAa+"_"+bb(a),e=HU[d];if(e&&c)return e.loadNewVideoConfig(b),e.api;e=new BU(a,d,b,void 0);HU[d]=e;kn("player-added",e.api);mk(e,db(RAa,e));return e.api}
function RAa(a){delete HU[a.getId()]}
;var IU=function(a){this.playerClient_=a},SAa=function(a,b,c){c=void 0===c?{}:c;
return a.playerClient_.setOption("ad",b,c)};
IU.prototype.getOptions_=function(){return this.playerClient_.getOptions("ad")||[]};function TAa(a){return a.docid||a.video_id||a.videoId||a.id||null}
;var UAa=/^https?:\/\/([^.]*\.moatads\.com\/|e[0-9]+\.yt\.srs\.doubleverify\.com|pagead2\.googlesyndication\.com\/pagead\/gen_204\?id=yt3p&sr=1&|pm\.adsafeprotected\.com\/youtube|pm\.test-adsafeprotected\.com\/youtube|youtube[0-9]+\.moatpixel\.com\/)/,VAa=/^https?:\/\/(www\.google\.com\/pagead\/xsul|www\.youtube\.com\/pagead\/slav)/,WAa=/^https?.*#ocr$|^https?:\/\/(aksecure\.imrworldwide\.com\/|cdn\.imrworldwide\.com\/|secure\-..\.imrworldwide\.com\/)/;function JU(a,b,c,d){!a&&(void 0===c?0:c)&&xe(Error("Player URL validator detects invalid url. "+(void 0===d?"":d)+": "+b));return a}
function XAa(a){var b=void 0===b?!1:b;if(!(b=JU(UAa.test(a),a,b,"Active View 3rd Party Integration URL"))){var c=void 0===c?!1:c;b=JU(VAa.test(a),a,c,"Google/YouTube Brand Lift URL")}if(!(c=b)){var d=void 0===d?!1:d;c=JU(WAa.test(a),a,d,"Nielsen OCR URL")}return c}
;var KU=function(a,b,c){this.actionName=a;this.optionalAction=void 0===b?!1:b;this.args=void 0===c?null:c;this.disableBroadcast=!1;this.returnValue=[]},YAa=function(a,b,c){this.actionName=a;
this.context=b;this.handler=c},ZAa=function(a,b){this.actionName=a;
this.context=b};var LU=new Map,$Aa=new Map,aBa=function(a,b){var c=bb(a);LU.has(c)&&En(function(){var d=Error("Unable to register component, already registered");d.params="Name: "+(b.is||b)+" Definition: "+a;cn(d,"WARNING")},5E3);
LU.set(c,b);$Aa.set(b.is,c)},MU=function(a){a=bb(a);
return LU.get(a)},NU=function(a){a=$Aa.get(a);
return LU.get(a)};function OU(a,b){for(var c in b)b.hasOwnProperty(c)&&(a=Gi(a,c,b[c]));return a}
function bBa(a,b,c){b.urlEndpoint&&"TARGET_NEW_WINDOW"==b.urlEndpoint.target?a.target="_blank":c?a.target=c:a.removeAttribute("target")}
function PU(a,b,c){c=void 0===c?!1:c;if(!a)return null;if(a.adInfoDialogEndpoint||a.confirmDialogEndpoint||a.guideBuilderEndpoint||a.modalEndpoint||a.shareEndpoint||a.shareEntityEndpoint||a.subscriptionManagerEndpoint||a.videoEditorEndpoint||a.backstageImageUploadEndpoint||a.createBackstagePostDialogEndpoint||a.createCommentReplyDialogEndpoint||a.updateCommentDialogEndpoint||a.updateCommentReplyDialogEndpoint||a.flowEndpoint||a.liveChatDialogEndpoint||a.showLiveChatItemEndpoint||a.unlimitedCreateFamilyEndpoint||
a.unlimitedFamilyFlowEndpoint||a.userFeedbackEndpoint||a.ypcCancelSurveyEndpoint||a.clientActionEndpoint)return b=Be("polymer_report_client_url_requested_rate"),!c&&Math.random()<b&&(b=Error("urlForEndpoint used on client endpoint"),b.params=a,xe(b)),null;var d=Be("polymer_report_missing_web_navigation_endpoint_rate");!a.commandMetadata&&!a.clickTrackingParams&&Math.random()<d&&(c=Error("Missing navigation data"),c.params=a,we(c,"WARNING"));c="";if(a.commandMetadata&&a.commandMetadata.webCommandMetadata&&
a.commandMetadata.webCommandMetadata.url)c=a.commandMetadata.webCommandMetadata.url;else if(a.searchEndpoint)Math.random()<d&&(c=Error("Should not manually handle search"),c.params=a,we(c,"WARNING")),c="/results?search_query="+encodeURIComponent(a.searchEndpoint.query).replace(/%20/g,"+"),a.searchEndpoint.params&&(c+="&sp="+a.searchEndpoint.params);else if(a.watchEndpoint)Math.random()<d&&(c=Error("Should not manually handle watch"),c.params=a,we(c,"WARNING")),c="/watch?v="+a.watchEndpoint.videoId,
a.watchEndpoint.playlistId&&(c+="&list="+a.watchEndpoint.playlistId),a.watchEndpoint.index&&(c+="&index="+a.watchEndpoint.index),a.watchEndpoint.startTimeSeconds&&(c+="&t="+a.watchEndpoint.startTimeSeconds);else if(a.browseEndpoint){d=a.browseEndpoint.browseId;var e=a.browseEndpoint.canonicalBaseUrl;e?c=e:d&&(c=d.substr(0,2),c="FE"==c?"FEwhat_to_watch"==d?"/":"FEmy_videos"==d?"/my_videos":"/feed/"+d.substr(2):"VL"==c?"/playlist?list="+d.substr(2):"/channel/"+d);c&&a.browseEndpoint.query&&(c=OU(c+
"/search",{query:a.browseEndpoint.query}));c&&a.browseEndpoint.params&&(c=OU(c,{params:a.browseEndpoint.params}))}else{if(a.urlEndpoint)return a.urlEndpoint.url;a.signInEndpoint?(c="https://accounts.google.com/ServiceLogin",d={},u.extend(d,b||{},{"continue":window.location.href.split("#")[0],action_handle_signin:!0,passive:!0}),b=d):a.uploadEndpoint?c="//www.youtube.com/upload":a.liveChatEndpoint?(c=u.clone(a.liveChatEndpoint),$a(a.liveChatEndpoint.continuation)&&(d=Object.keys(a.liveChatEndpoint.continuation)[0],
c.continuation=a.liveChatEndpoint.continuation[d].continuation),c=OU("/live_chat/get_live_chat",c)):a.liveChatReplayEndpoint?(c=u.clone(a.liveChatReplayEndpoint),c.currentPlayerState&&(u.extend(c,c.currentPlayerState),delete c.currentPlayerState),c=OU("/live_chat_replay/get_live_chat_replay",c)):a.liveChatItemContextMenuEndpoint?c=OU("/live_chat/get_live_chat_item_context_menu",a.liveChatItemContextMenuEndpoint):a.liveChatPurchaseMessageEndpoint?c=OU("/live_chat/get_live_chat_message_buy_flow",a.liveChatPurchaseMessageEndpoint):
a.openSuperStickerBuyFlowCommand?c=OU("/live_chat/get_live_chat_super_sticker_buy_flow",a.openSuperStickerBuyFlowCommand):a.videoEditEndpoint?c=OU("/edit",{video_id:a.videoEditEndpoint.videoId}):a.liveDashboardEndpoint?c=a.liveDashboardEndpoint.videoId?OU("/live_dashboard",{v:a.liveDashboardEndpoint.videoId}):"/live_dashboard":a.signalNavigationEndpoint&&a.signalNavigationEndpoint.signal&&"WEBCAM"==a.signalNavigationEndpoint.signal?c="/webcam":a.getPdgBuyFlowCommand&&(c=OU(a.getPdgBuyFlowCommand.buyflowApiPath,
{params:a.getPdgBuyFlowCommand.params}))}return c?OU(c,b||{}):(b=Error("Error: Can't construct url for endpoint"),b.params=a,we(b),null)}
function QU(a){if(a){if(a.browseEndpoint)return!!a.browseEndpoint.nofollow;if(a.watchEndpoint)return!!a.watchEndpoint.nofollow;if(a.urlEndpoint)return!!a.urlEndpoint.nofollow}return!1}
;var RU=function(){};
RU.prototype.getUrl=function(){};
RU.prototype.getNavigationEventDetails=function(){};var SU=function(){};
SU.prototype.getUrl=function(a,b){b=void 0===b?!1:b;return a.hasOwnProperty("shareEndpoint")?null:PU(a,null,b)};
SU.prototype.setTarget=function(a,b,c){bBa(a,b,c)};
SU.prototype.getNavigationEventDetails=function(a,b){a={endpoint:a,actions:[]};b=(b.path?b.path[0]:b.target).icon||"";var c=b.indexOf(":");0<c&&(b=b.substr(c+1));b&&a.actions.push(b);return a};var cBa=/Command$/,dBa=/Endpoint$/,eBa=new Map,TU=null;function UU(a){return{runs:[{text:a}]}}
function VU(a,b){if(!a)return null;a=Object.keys(a);a=k(a);for(var c=a.next();!c.done;c=a.next()){c=c.value;var d=c.toLowerCase();if(-1<d.indexOf(b,d.length-b.length))return c}return null}
function WU(a,b){var c=b+a,d=eBa.get(c);if(d)return d;a=b+"-"+a.replace(/([A-Z])/g,"-$1").toLowerCase();eBa.set(c,a);return a}
function fBa(a){for(var b=Object.keys(a),c=0,d=b.length;c<d;c++){var e=b[c];if(dBa.test(e)||cBa.test(e))return gBa(a[e])}return[]}
function gBa(a){return a.command?[a.command]:a.clientActions||a.actions||a.commands||[]}
function XU(a){if(a&&a.simpleText)return a.simpleText;var b="";if(a&&a.runs)for(var c=0,d=a.runs.length;c<d;c++)a.runs[c].text&&(b+=a.runs[c].text);return b}
function YU(){TU||(TU=MU(RU))||(TU=new SU);return TU}
function ZU(a,b){b=void 0===b?!1:b;var c=YU();return c&&a&&!u.isEmpty(a)?c.getUrl(a,b):""}
;var $U=function(){this.actionRoutingMap=new Map};
$U.prototype.triggerAction=function(a,b){for(var c=[],d=1;d<arguments.length;++d)c[d-1]=arguments[d];c=new KU(a,!1,c);aV(this,c);return c.returnValue};
$U.prototype.triggerOptionalAction=function(a,b){for(var c=[],d=1;d<arguments.length;++d)c[d-1]=arguments[d];c=new KU(a,!0,c);aV(this,c);return c.returnValue};
var hBa=function(a,b,c){b.forEach(function(d){var e=VU(d,"action")||VU(d,"command")||VU(d,"endpoint");e&&(e=WU(e,"yt"),d.signalAction&&(e+="-"+d.signalAction.signal.toLowerCase().replace(/_/g,"-")),a.triggerOptionalAction(e,d,c,void 0))})},aV=function(a,b){a=a.actionRoutingMap.get(b.actionName);
b.optionalAction||a?a&&iBa(b,a):(a=Error("Unhandled action"),a.params=b.actionName,xe(a))},iBa=function(a,b){b.forEach(function(c){var d=null;
c?d=c.apply(null,a.args):(c=Error("Missing handler for action"),c.params=a.actionName,we(c));a.returnValue.push(d)})};
Ua($U);function bV(a,b,c){b=new CustomEvent(b,{bubbles:!0,cancelable:!1,composed:!0,detail:c});a.dispatchEvent(b);return b}
function cV(a,b,c,d){return bV(a,"yt-action",new KU(b,!(void 0===d||!d),c)).detail.returnValue}
function dV(a,b,c,d){b.forEach(function(e){var g=VU(e,"action")||VU(e,"command")||VU(e,"endpoint");g&&(A("handle_service_request_actions")&&e.commandMetadata&&e.commandMetadata.webCommandMetadata&&e.commandMetadata.webCommandMetadata.sendPost?eV(a,[e]):(g=WU(g,"yt"),e.signalAction&&(g+="-"+e.signalAction.signal.toLowerCase().replace(/_/g,"-")),cV(a,g,[e,c,d],!0)))})}
function eV(a,b){var c=[a];b&&c.push.apply(c,b);b=cV(a,"yt-service-request",c);return 0<b.length&&(b=b[0],bV(a,"yt-service-request-sent",b),b&&b.ajaxPromise)?(b.ajaxPromise.then(function(d){bV(a,"yt-service-request-completed",d)},function(d){bV(a,"yt-service-request-error",{error:d,
params:c})},a),b.ajaxPromise):bw()}
;var fV=function(a){this.callback_=a;this.bezier_=new FM(0,0,.4,0,.2,1,1,1);this.delay_=new YK(this.next_,window,this)};
fV.prototype.start=function(a,b,c){this.from_=a;this.to_=b;this.duration_=c;this.startTime_=Hm();this.next_()};
fV.prototype.next_=function(){var a=Hm()-this.startTime_,b=this.bezier_;a=Ug(lta(b,nta(b,a/this.duration_)),0,1);this.callback_((this.to_-this.from_)*a+this.from_);1>a&&this.delay_.start()};var gV=function(a,b){var c={};b&&(c.v=b);a={name:a,locale:void 0,feature:void 0};for(var d in c)a[d]=c[d];c=Ai("/sharing_services",a);Zo(c)};var jBa=new Yn("yt.autonav");var hV=function(){this.autonavState_=hS(eS.getInstance(),140)?1:2};
hV.prototype.getState=function(){return this.autonavState_};
hV.prototype.pause=function(){2==this.autonavState_&&this.setState(3)};
hV.prototype.unpause=function(){3==this.autonavState_&&this.setState(2)};
hV.prototype.setState=function(a){if(this.autonavState_!=a){this.autonavState_=a;if(3!=a){a=2==a;var b=!hS(eS.getInstance(),140);a!=b&&(b=xi({state:a?"enabled":"disabled"}),Zo("/gen_204?a=autoplay"+(b?"&"+b:""),void 0),b=eS.getInstance(),a||iS(0,141,!0),iS(0,140,!a),b.save(),jBa.set("autonav_disabled",!a))}$U.getInstance().triggerOptionalAction("yt-autonav-state-changed-action",this.autonavState_)}};
Ua(hV);var iV=function(){this.playerPromiseResolver=fw();this.chunkProcessors=[];this.chunksProcessed=0};
iV.prototype.processChunk=function(a){if(a){for(var b=k(this.chunkProcessors),c=b.next();!c.done;c=b.next())c=c.value,c.validate(a)&&(c.handle(a),c.hasRun=!0);rq("np"+this.chunksProcessed);this.chunksProcessed++}};var jV=function(){this.hasRun=!1};var kV=function(a){this.hasRun=!1;this.chunkHandler_=a};
l(kV,jV);kV.prototype.validate=function(){return 0==this.chunkHandler_.chunksProcessed};
kV.prototype.handle=function(a){$U.getInstance().triggerAction("yt-stop-old-player",a.data,!0)};var kBa=["commandMetadata","webCommandMetadata","rootVe"],lV=function(){this.graftQueue=[];this.client=bo;this.pendingScreenCreation=!1;this.recurringGrafts=new Map},mV,nV=function(){mV||(mV=new lV);
return mV};
lV.prototype.setClient=function(a){this.client=a};
var pV=function(a,b){oV(a,go(b),void 0,void 0)};
lV.prototype.graftClientVe=function(a,b,c){if(!a.veType)return we(Error("Error: Trying to graft a client VE without a veType.")),null;a=ho(a.veType,a.visualElement,a.elementIndex,a.clientYouTubeData);oV(this,a,b,c);return a};
var oV=function(a,b,c,d){if(!a.pendingScreenCreation||c||d){var e=Wo(d);c=c||Vo(d);e&&c&&xo(a.client,e,c,[b],void 0)}else a.graftQueue.push(b)};
lV.prototype.installRecurringGrafting=function(a,b){this.recurringGrafts.set(a,b);oV(this,a,void 0,b)};
lV.prototype.uninstallRecurringGrafting=function(a){this.recurringGrafts.delete(a)};
var mBa=function(a,b){var c=u.getValueByKeys.apply(u,[b].concat(ka(kBa)));if(c){var d;b.clickTrackingParams&&(d=go(b.clickTrackingParams));lBa(a,c,d)}else a=Error("Error: Trying to create a new screen without a rootVeType"),a.params=b,we(a)},lBa=function(a,b,c){var d=Wo(void 0),e;
d&&c&&(e=a.getParentElement(d,c));a=wo(a.client,b,e,void 0);Xo(a,b,void 0);JS()};
lV.prototype.getParentElement=function(a,b){return{clientScreenNonce:a,visualElement:b}};var qV=function(){jV.apply(this,arguments)};
l(qV,jV);qV.prototype.validate=function(a){return!(!a.data||!a.data.response&&!a.data.playerResponse)};
qV.prototype.handle=function(a){var b=nV();a.data.response&&a.data.response.trackingParams&&pV(b,a.data.response.trackingParams);a.data.playerResponse&&a.data.playerResponse.trackingParams&&pV(b,a.data.playerResponse.trackingParams)};var rV=function(){jV.apply(this,arguments)};
l(rV,jV);rV.prototype.validate=function(a){return!(this.hasRun||!a.endpoint)};
rV.prototype.handle=function(a){mBa(nV(),a.endpoint);this.hasRun=!0};var nBa=function(){iV.call(this);this.chunkProcessors.push(new kV(this));A("kevlar_client_side_screens")&&(this.chunkProcessors.push(new rV),this.chunkProcessors.push(new qV))};
l(nBa,iV);var sV=function(){this.hasRun=this.hasRun=!1};
l(sV,jV);sV.prototype.validate=function(a){return!this.hasRun&&!(!a.data.csn||!a.data.rootVe)};
sV.prototype.handle=function(a){this.hasRun=!0;Xo(a.data.csn,a.data.rootVe,3)};var tV=function(){jV.apply(this,arguments)};
l(tV,jV);tV.prototype.validate=function(a){return!!a.data.preconnect};
tV.prototype.handle=function(a){rq("bc");a=k(a.data.preconnect);for(var b=a.next();!b.done;b=a.next())b=b.value,new Image().src=b};var uV=function(){};
f=uV.prototype;f.update=function(){};
f.updatePlayerComponents=function(){};
f.loadPlayer=function(){};
f.getPlayer=function(){};
f.getPlayerPromise=function(){};
f.preparePlayer=function(){};
f.updatePlayerStyles=function(){};
f.pause=function(){};
f.play=function(){};
f.stop=function(){};
f.resetForNewPlayback=function(){};var vV=function(){};
f=vV.prototype;f.updatePageData=function(){};
f.getCurrentPage=function(){};
f.getCurrentData=function(){};
f.preparePage=function(){};
f.getPlayerFromWatch=function(){};
f.isOnWatch=function(){};var wV=function(a,b,c,d){this.hasRun=!1;this.playerPromiseResolver_=a;this.playerProvider_=b;this.pageManager_=c;this.miniplayerActive_=void 0===d?!1:d};
l(wV,jV);wV.prototype.validate=function(a){return!(!a.data.player||"watch"!=a.data.page)};
wV.prototype.handle=function(a){a.data.filler||this.miniplayerActive_||(iq("cfg"),$U.getInstance().triggerAction("player-update-pre",a.data.page,a.data.player,a.data.playerResponse));var b=this.playerProvider_();if(A("kevlar_use_ytd_player"))var c=b;else if(A("kevlar_ytd_player_container")){var d=this.pageManager_.getCurrentPage();d&&d.getPlayer&&(c=d.getPlayer());c||xe(Error("Player data present, but no player found on page."))}try{b.update(a.data.player,c).then(this.playerPromiseResolver_.resolve)}catch(e){b?
we(e):we(Error("Player missing when attempting update from SwfConfigChunkProcessor. el="+(a.data&&a.data.player&&a.data.player.args&&a.data.player.args.el))),this.playerPromiseResolver_.resolve()}};var xV=function(){this.lockupActivation=this.playlistWatchPageActivation=this.userActivation=this.miniplayerButtonActivation=!1;this.navigationFinishPromise=bw();this.currentEndpoint=this.playerContainer=null},oBa=function(){var a=xV.getInstance(),b=a.playlistWatchPageActivation,c=A("kevlar_frontend_video_list_actions")&&a.lockupActivation;
return!a.miniplayerButtonActivation&&!b&&!c};
Ua(xV);var yV=function(a,b,c,d){d=void 0===d?[]:d;this.playlistNetworkManager=a;this.listId=b;this.updateCallback=c;this.videoIds=d;this.currentIndex=0;this.pendingSaveOperations=new Set};
yV.prototype.addVideos=function(a,b,c,d){void 0!==d?this.videoIds.splice.apply(this.videoIds,[d,0].concat(ka(a))):this.videoIds.push.apply(this.videoIds,ka(a));zV(this,b.onCreateListCommand?AV(this.playlistNetworkManager,b.onCreateListCommand,this.videoIds):cw("Missing create command"))};
var zV=function(a,b){a.pendingSaveOperations.add(b);a.pendingRefreshOperation&&a.pendingRefreshOperation.cancel("OBSOLETE");jw(iw(b,function(){a.pendingSaveOperations.delete(b)}).then(function(c){a.setListId(c.playlistId);
pBa(a)}),Ta)},qBa=function(a,b){0>b||(a.videoIds.splice(b,1),b<a.currentIndex&&--a.currentIndex,zV(a,AV(a.playlistNetworkManager,BV().onCreateListCommand,a.videoIds)))},pBa=function(a){0<a.pendingSaveOperations.size||(a.pendingRefreshOperation&&a.pendingRefreshOperation.cancel("OBSOLETE"),a.pendingRefreshOperation=CV(a.playlistNetworkManager,a.listId,a.currentIndex,a.videoIds[a.currentIndex]),a.pendingRefreshOperation.then(function(b){a.updateCallback(b.playlistId,b.playlistPanelRenderer,b.autoplayRenderer)}))};
yV.prototype.setCurrentIndex=function(a){this.currentIndex=a};
yV.prototype.setListId=function(a){this.listId=a};
yV.prototype.delete=function(){this.pendingSaveOperations.forEach(function(a){a.cancel("PROXY DELETED")});
this.pendingRefreshOperation&&this.pendingRefreshOperation.cancel("PROXY DELETED")};
yV.prototype.moveVideo=function(a,b){Kb(this.videoIds,a,b);a>this.currentIndex&&b<=this.currentIndex?this.setCurrentIndex(this.currentIndex+1):a===this.currentIndex?this.setCurrentIndex(b):a<this.currentIndex&&b>=this.currentIndex&&this.setCurrentIndex(this.currentIndex-1);zV(this,AV(this.playlistNetworkManager,BV().onCreateListCommand,this.videoIds))};var DV=function(a,b,c,d,e){d=void 0===d?[]:d;yV.call(this,a,b,c,d);this.playlistNetworkManager=a;this.listId=b;this.updateCallback=c;this.videoIds=d;this.storage=e};
l(DV,yV);var BV=function(){return{listType:"PLAYLIST_EDIT_LIST_TYPE_QUEUE",onCreateListCommand:{commandMetadata:{webCommandMetadata:{url:"/service_ajax",sendPost:!0}},createPlaylistServiceEndpoint:{videoIds:[],hack:!0,params:"CAQ%3D"}}}};
DV.prototype.setCurrentIndex=function(a){yV.prototype.setCurrentIndex.call(this,a);this.store()};
DV.prototype.setListId=function(a){yV.prototype.setListId.call(this,a);this.store()};
DV.prototype.store=function(){A("kevlar_frontend_queue_recover")&&this.storage&&this.listId&&void 0!==this.currentIndex&&this.storage.store(this.listId,this.currentIndex)};function rBa(a){return"SUCCESS"!==u.getValueByKeys(a,"code")?null:(a=u.getValueByKeys(a,"data","playlistId"))?{playlistId:a}:null}
;function sBa(a,b){return new Yv(function(c,d){a.then(function(e){if(e){if(e=b(e))return c(e);d()}},d)})}
;var EV=["response","contents","twoColumnWatchNextResults","autoplay","autoplay"],tBa=["playerResponse","videoDetails"],uBa=["response","currentVideoEndpoint","watchEndpoint","videoId"],vBa=["response","playerOverlays","playerOverlayRenderer","endScreen","watchNextEndScreenRenderer"],wBa=["playerResponse","responseContext","webResponseContextExtensionData","reloadWithoutPolymer"],FV=["response","contents","twoColumnWatchNextResults","playlist","playlist"],xBa=["response","webWatchNextResponseExtensionData",
"relatedVideoArgs"],yBa=["response","responseContext","webResponseContextExtensionData","reloadWithoutPolymer"],zBa=["response","contents","twoColumnWatchNextResults"];function ABa(a){var b=u.getValueByKeys.apply(u,[a].concat(ka(EV))),c=u.getValueByKeys.apply(u,[a].concat(ka(FV)));return b&&c&&c.playlistId?{rawResponse:a,autoplayRenderer:b,playlistPanelRenderer:c,playlistId:c.playlistId}:null}
;var BBa=function(a){this.networkManager=a},AV=function(a,b,c){if(!b.createPlaylistServiceEndpoint)return cw(Error("Endpoint supplied is invalid"));
b.createPlaylistServiceEndpoint.videoIds=c;return sBa(a.networkManager.requestDataForServiceEndpoint(b,{create_playlist_title:"CRQueue"}),rBa)},CV=function(a,b,c,d){return sBa(a.networkManager.requestDataForEndpoint({commandMetadata:{webCommandMetadata:{url:"/watch?v="+d+"&list="+b+"&index="+c,
webPageType:"WEB_PAGE_TYPE_WATCH"}}},{pbj:"refresh",frags:"wn"}),ABa)};var GV=function(a){this.storage=a},HV;
GV.prototype.store=function(a,b){b=void 0===b?0:b;if(this.storage&&a.startsWith("TLPP"))try{this.storage.set("TLPPplaylist",a),this.storage.set("TLPPindex",String(b)),this.storage.set("TLPPtimestamp",String(Date.now()))}catch(c){}};
GV.prototype.clear=function(){this.storage&&(this.storage.remove("TLPPtimestamp"),this.storage.remove("TLPPplaylist"),this.storage.remove("TLPPindex"))};
var IV=function(a){return a.storage?(a=a.getTimestamp())?864E5>Date.now()-a:!1:!1};
GV.prototype.getPlaylistId=function(){if(!this.storage)return null;var a=null;try{a=this.storage.get("TLPPplaylist")}catch(b){}return a};
GV.prototype.getIndex=function(){if(this.storage){try{var a=this.storage.get("TLPPindex")}catch(b){}a=Number(a);if(!isNaN(a))return a}};
GV.prototype.getTimestamp=function(){if(this.storage){try{var a=this.storage.get("TLPPtimestamp")}catch(b){}a=Number(a);if(!isNaN(a))return a}};var CBa=["navigationEndpoint","watchEndpoint","videoId"],DBa=["nextButtonVideo","watchEndpoint","videoId"];function JV(a){return{mode:"NORMAL",autoplayVideo:a.navigationEndpoint,nextButtonVideo:a.navigationEndpoint}}
function EBa(a,b){if(!b||!b.sets)return{sets:[JV(a)]};var c=b.sets.find(function(g){return"NORMAL"===g.mode}),d=u.unsafeClone(b);
if(!c)return d.sets.push(JV(a)),d;c=u.getValueByKeys.apply(u,[c].concat(ka(DBa)));var e=u.getValueByKeys.apply(u,[a].concat(ka(CBa)));if(c===e)return b;d.sets=d.sets.filter(function(g){return"NORMAL"!==g.mode});
d.sets.push(JV(a));return d}
function KV(a,b){return a.startsWith("TLPP")&&"CRQueue"===b.title}
function FBa(a){return!!a.playlistPanelVideoRenderer&&!a.playlistPanelVideoRenderer.unplayableText}
function GBa(a){return!!a.playlistPanelVideoRenderer&&!!a.playlistPanelVideoRenderer.title}
function HBa(a,b){if(b.contents)return(b=b.contents.find(function(c){return!!c.playlistPanelVideoRenderer&&c.playlistPanelVideoRenderer.videoId===a}))?b.playlistPanelVideoRenderer:void 0}
function IBa(a,b){return b.contents?b.contents.findIndex(function(c){return!!c.playlistPanelVideoRenderer&&c.playlistPanelVideoRenderer.videoId===a}):-1}
function LV(a,b){return b.contents?b.contents.findIndex(function(c){return!!c.playlistPanelVideoRenderer&&c.playlistPanelVideoRenderer.playlistSetVideoId===a}):-1}
function JBa(a,b){a.contents&&-1!==b&&1===a.contents.splice(b,1).length&&void 0!==a.totalVideos&&(--a.totalVideos,delete a.videoCountText)}
function MV(a){var b=[];if(!a||!a.contents)return b;a=k(a.contents);for(var c=a.next();!c.done;c=a.next())c=c.value,c.playlistPanelVideoRenderer&&c.playlistPanelVideoRenderer.videoId&&b.push(c.playlistPanelVideoRenderer.videoId);return b}
function KBa(a,b,c){if(void 0!==a&&void 0!==b&&void 0!==c)return{runs:[{text:a},{text:" \u2022 "},{text:b+1+" / "+c}]}}
function LBa(a){if(a&&a.contents)return(a=a.contents.find(function(b){return!!b.playlistPanelVideoRenderer&&!!b.playlistPanelVideoRenderer.selected})||a.contents[a.currentIndex])?a.playlistPanelVideoRenderer:void 0}
function MBa(a,b,c,d,e,g,h){e=void 0===e?!1:e;g=void 0===g?!1:g;h=void 0===h?!1:h;if(a.contents&&0!==a.contents.length){d&&(a.contents=a.contents.filter(d));d=a.contents.length;for(var m=0;m<d;m++){var n=a.contents[m].playlistPanelVideoRenderer;n&&(m===b?(g&&delete n.menu,n.indexText=UU("\u25B6")):e||a.isInfinite||void 0===n.indexText?delete n.indexText:n.indexText=UU((m+1+c).toString()))}a.currentIndex=b+c;h&&(delete a.videoCountText,a.totalVideos=d)}}
;var NV=se("MINIPLAYER_ENABLED");var OV=function(a,b,c){var d=$U.getInstance();if(!HV){var e=new Wk;var g="yt-queue"+z("ID_TOKEN"),h=void 0;e.isAvailable()&&(h=new bl(e,g));HV=new GV(h)}e=HV;g=ip.getInstance();this.actionRouter=d;this.pageManager=a;this.playlistManager=b;this.playlistNetworkManager=c;this.storage=e;this.signals=g;this.miniplayerEnabled=NV;this.recoveryPlaylistData=this.responsePlaylistData=this.response=this.index=this.listId=void 0;this.temporaryItems=[];this.queueProxy=void 0},PV,QV=function(){if(!PV){var a=NU("ytd-page-manager"),
b=NU("yt-playlist-manager"),c=NU("yt-network-manager");
PV=new OV(a,b,new BBa(c))}return PV},NBa=function(a,b,c){void 0===a.index&&(a.index=0);
a.temporaryItems.push.apply(a.temporaryItems,ka(b));if((c.videoId||c.videoIds)&&void 0!==a.index&&"PLAYLIST_EDIT_LIST_TYPE_QUEUE"===c.listType){if(!a.queueProxy){var d=[];a.response&&(a.response.playlistPanelRenderer&&a.response.playlistId&&!KV(a.response.playlistId,a.response.playlistPanelRenderer)?d=MV(a.response.playlistPanelRenderer):a.response.playingVideoId&&!c.openMiniplayer&&d.push(a.response.playingVideoId));a.queueProxy=new DV(a.playlistNetworkManager,"",a.setPlaylistData.bind(a),d,a.storage);
a.queueProxy.setCurrentIndex(a.index)}a.queueProxy.addVideos(c.videoIds||[c.videoId],c)}a.response&&RV(a,SV(a,a.response.autoplayRenderer));a.pageManager.isOnWatch()||a.activateMiniplayer(b[0],"PLAYLIST_EDIT_LIST_TYPE_QUEUE"===c.listType)},TV=function(a,b){if(a.responsePlaylistData){var c=IBa(b,a.responsePlaylistData);
a.responsePlaylistData=u.unsafeClone(a.responsePlaylistData);JBa(a.responsePlaylistData,c);a.queueProxy&&qBa(a.queueProxy,c)}c=a.temporaryItems.findIndex(function(d){return d.videoId===b});
-1<c&&a.temporaryItems.splice(c,1);RV(a,SV(a,a.response?a.response.autoplayRenderer:void 0))},OBa=function(a,b){a.responsePlaylistData&&(b=LV(b,a.responsePlaylistData),JBa(a.responsePlaylistData,b),a.queueProxy&&qBa(a.queueProxy,b));
RV(a,SV(a,a.response?a.response.autoplayRenderer:void 0))};
OV.prototype.clearQueue=function(){this.temporaryItems=[];this.storage.clear();this.recoveryPlaylistData&&(this.recoveryPlaylistData=void 0);this.queueProxy&&(this.queueProxy.delete(),this.responsePlaylistData=this.queueProxy=void 0);this.response&&RV(this,{autoplayRenderer:this.response.autoplayRenderer,playerData:{}})};
OV.prototype.getCurrentIndex=function(){return this.index};
OV.prototype.setCurrentIndex=function(a){this.listId===a&&(this.index=void 0)};
var PBa=function(){var a=QV();op(a.signals,"ytd-miniplayer",function(){var b=a.storage;if(b.storage){if(IV(b)){var c=b.getPlaylistId();b=b.getIndex();c=!!c&&void 0!==b}else b.clear(),c=!1;}else c=!1;if(c){c=a.pageManager.isOnWatch();a:{var d=a.storage;if(d.storage&&IV(d)&&(b=d.getPlaylistId(),d=d.getIndex(),b&&void 0!==d)){b={recoverPlaylistCommand:{listId:b,index:d,openMiniplayer:!c,openListPanel:c,listType:"PLAYLIST_EDIT_LIST_TYPE_QUEUE"}};break a}b=void 0}a:{var e=a.storage;if(e.storage&&IV(e)&&(
d=e.getPlaylistId(),e=e.getIndex(),d&&void 0!==e)){d={endPlaylistCommand:{listId:d,closeMiniplayer:!c,closeListPanel:c,listType:"PLAYLIST_EDIT_LIST_TYPE_QUEUE"}};break a}d=void 0}if(b&&d){e=yU("QUEUE_RECOVER_BUTTON",void 0,"Restore");var g=yU("CLEAR",void 0,"Clear");c=c?[{buttonRenderer:{style:"STYLE_BLUE_TEXT",size:"SIZE_DEFAULT",text:UU(g),serviceEndpoint:{signalServiceEndpoint:{signal:"CLIENT_SIGNAL",actions:[d]}}}}]:[{buttonRenderer:{style:"STYLE_BLUE_TEXT",size:"SIZE_DEFAULT",text:UU(e),serviceEndpoint:{signalServiceEndpoint:{signal:"CLIENT_SIGNAL",
actions:[b]}}}},{buttonRenderer:{size:"SIZE_DEFAULT",isDisabled:!1,icon:{iconType:"DISMISSAL"},serviceEndpoint:{signalServiceEndpoint:{signal:"CLIENT_SIGNAL",actions:[d]}}}}];a.pageManager.isOnWatch()?(a.recoveryPlaylistData={titleText:UU("Recover queue"),showRecoveryUi:!0,recoveryCommands:[b],topRowButtons:c},a.playlistManager.setPlaylistData(a.recoveryPlaylistData)):a.actionRouter.triggerOptionalAction("yt-miniplayer-show-recovery-ui-command",yU("QUEUE_RECOVER_MESSAGE",void 0,"Recover queue"),c)}}})};
OV.prototype.setPlaylistData=function(a,b,c){this.temporaryItems=[];this.listId=a;this.responsePlaylistData=b;RV(this,SV(this,c))};
var QBa=function(a,b){Fd(a,function d(){var e,g=this,h,m,n,p,x;return Aa(d,function(y){if(1==y.nextAddress){e=b.recoverPlaylistCommand;if(!e||!e.listId)return y.return();g.index=e.index||g.index||0;h=g.response&&g.response.playingVideoId||"0";return ta(y,CV(g.playlistNetworkManager,e.listId,g.index,h),2)}m=y.yieldResult;if(!m)return y.return();n=m.playlistId;p=m.playlistPanelRenderer;!g.queueProxy&&n&&p&&KV(n,p)&&(g.queueProxy=new DV(g.playlistNetworkManager,n,g.setPlaylistData.bind(g),MV(p),g.storage));
g.setPlaylistData(n,p,m.autoplayRenderer);e.openMiniplayer&&(x=LBa(p))&&g.activateMiniplayer(x,"PLAYLIST_EDIT_LIST_TYPE_QUEUE"===e.listType);ua(y)})})},RBa=function(a,b){Fd(a,function d(){var e,g=this,h,m,n;
return Aa(d,function(p){if(1==p.nextAddress){e=b.refreshPlaylistCommand;if(!(e&&e.listId&&g.response&&g.response.playingVideoId)||g.listId!==e.listId)return p.return();void 0===g.index&&(g.index=0);return ta(p,CV(g.playlistNetworkManager,e.listId,g.index,g.response.playingVideoId),2)}h=p.yieldResult;if(!h)return p.return();m=h.playlistId;n=h.playlistPanelRenderer;g.setPlaylistData(m,n,h.autoplayRenderer);ua(p)})})};
OV.prototype.closeMiniplayer=function(a){if(this.queueProxy){var b=this.responsePlaylistData;var c=this.temporaryItems.length+(b&&b.contents?b.contents.length:0);b={openPopupAction:{popupType:"TOAST",popup:{notificationActionRenderer:{responseText:{simpleText:CAa("QUEUE_CLEARED",c)}}}}};var d=yU("QUEUE_CLOSE_MINIPLAYER_CONFIRM_TITLE",void 0,"Close the queue");c=CAa("QUEUE_CLOSE_MINIPLAYER_CONFIRM_TEXT",c);var e=yU("MINIPLAYER_CLOSE",void 0,"Close"),g=yU("CANCEL",void 0,"Cancel");hBa(this.actionRouter,
[{openPopupAction:{popupType:"DIALOG",popup:{confirmDialogRenderer:{title:UU(d),dialogMessages:[UU(c)],confirmButton:{buttonRenderer:{style:"STYLE_BLUE_TEXT",size:"SIZE_DEFAULT",text:UU(e),serviceEndpoint:{signalServiceEndpoint:{signal:"CLIENT_SIGNAL",actions:[{endPlaylistCommand:{closeMiniplayer:!0,listType:"PLAYLIST_EDIT_LIST_TYPE_QUEUE"}},b]}}}},cancelButton:{buttonRenderer:{style:"STYLE_TEXT",size:"SIZE_DEFAULT",text:UU(g)}}}}}}],a)}else this.actionRouter.triggerOptionalAction("yt-close-miniplayer-action")};
var SV=function(a,b){var c={},d=a.response;c.autoplayRenderer=b;if(!a.responsePlaylistData&&!a.temporaryItems.length)return!d||!d.hasRelatedVideoData&&A("kevlar_prefetch_data_augments_network_data")||(c.playerData={rvs:d.relatedVideoArgs,endScreenRenderer:d.endScreenRenderer}),c;c.playerData={};if(void 0===a.index)return bn(Error("Rendering a list without a current index")),c;c.panel=a.responsePlaylistData?u.unsafeClone(a.responsePlaylistData):{titleText:UU(yU("QUEUE",void 0,"Queue")),currentIndex:0,
totalVideos:1,contents:[]};b=c.panel;if(b.contents)for(var e=k(a.temporaryItems),g=e.next();!g.done;g=e.next())b.contents.push({playlistPanelVideoRenderer:g.value});a.queueProxy&&d&&d.playingVideo&&d.playingVideoId&&!HBa(d.playingVideoId,c.panel)&&(b=c.panel,e=a.index,b.contents&&b.contents.splice(void 0===e?0:e,0,{playlistPanelVideoRenderer:d.playingVideo}));d&&d.playingVideoId&&(b=a.index,e=c.panel,b=!e.contents||b>=e.contents.length?void 0:e.contents[b].playlistPanelVideoRenderer,b&&b.videoId===
d.playingVideoId||(b=IBa(d.playingVideoId,c.panel),a.index=-1===b?0:b));a:{b=a.index+1;e=c.panel;if(e.contents&&!(b>=e.contents.length)&&(b=e.contents.slice(b).find(FBa))){b=b.playlistPanelVideoRenderer;break a}b=void 0}b?c.autoplayRenderer=EBa(b,c.autoplayRenderer):d&&d.relatedVideoArgs&&(c.playerData.rvs=d.relatedVideoArgs);d=d?d.playlistIndexOffset:0;a.queueProxy?MBa(c.panel,a.index,d,GBa,!0,!0,!0):MBa(c.panel,a.index,d);c.playerData.playlistPanelRenderer=c.panel;return c};
OV.prototype.activateMiniplayer=function(a,b){var c=this.actionRouter.triggerOptionalAction("yt-miniplayer-active");if(c&&c.length&&c[0])this.actionRouter.triggerOptionalAction("yt-miniplayer-toast-action",a,yU("ADDED_TO_QUEUE",void 0,"Added to queue"));else if(a&&a.navigationEndpoint){xV.getInstance().lockupActivation=!0;c=a.navigationEndpoint;var d=this.pageManager.getPlayerFromWatch();this.actionRouter.triggerOptionalAction("yt-activate-miniplayer-action",d);this.actionRouter.triggerOptionalAction("yt-miniplayer-update-header-action",
a.title,b?KBa(yU("QUEUE",void 0,"Queue"),0,1):a.longBylineText,a.navigationEndpoint);this.actionRouter.triggerOptionalAction("yt-miniplayer-load-endpoint",c,!0)}};
var RV=function(a,b){a.playlistManager.setAutoplayRenderer(b.autoplayRenderer||null);a.playlistManager.setPlaylistData(b.panel||a.recoveryPlaylistData||null);b.playerData&&a.playlistManager.setPlayerPlaybackControlData(b.playerData)};var UV=function(a,b,c){this.hasRun=!1;this.pageRequest_=b;this.playlistController_=c;this.playerPromiseResolver_=a};
l(UV,jV);UV.prototype.validate=function(a){return!!u.getValueByKeys.apply(u,[a.data].concat(ka(zBa)))};
UV.prototype.handle=function(a){var b=this;this.playerPromiseResolver_.promise.then(function(){var c=a.data;var d=u.getValueByKeys.apply(u,[c].concat(ka(EV))),e=u.getValueByKeys.apply(u,[c].concat(ka(FV))),g=u.getValueByKeys.apply(u,[c].concat(ka(uBa)));var h=(h=u.getValueByKeys.apply(u,[c].concat(ka(tBa))))?{videoId:h.videoId,thumbnail:h.thumbnail,title:h.title?UU(h.title):void 0,shortBylineText:h.author?UU(h.author):void 0}:void 0;var m=u.getValueByKeys.apply(u,[c].concat(ka(xBa))),n=u.getValueByKeys.apply(u,
[c].concat(ka(vBa))),p=!!m||!!n&&!!n.results&&0<n.results.length,x=0;e&&e.currentIndex&&e.localCurrentIndex&&(x=e.currentIndex-e.localCurrentIndex);c={rawResponse:c,autoplayRenderer:d,hasRelatedVideoData:p,playingVideo:h,playingVideoId:g,playlistPanelRenderer:e,playlistId:e&&e.playlistId,playlistIndex:e&&e.currentIndex,relatedVideoArgs:m,endScreenRenderer:n,playlistIndexOffset:x};a:{d=b.playlistController_;e=b.pageRequest_;d.response=c;if(c.playlistPanelRenderer&&c.playlistId&&c.autoplayRenderer)KV(c.playlistId,
c.playlistPanelRenderer)?d.queueProxy?d.listId===c.playlistId?(d.index=c.playlistIndex,d.responsePlaylistData=c.playlistPanelRenderer,d.queueProxy.setCurrentIndex(d.index)):c.playingVideoId&&void 0!==d.index&&e.clientParams.autoSaveToQueue&&(d.index+=1,d.queueProxy.setCurrentIndex(d.index),d.queueProxy.addVideos([c.playingVideoId],BV(),void 0,d.index)):(d.queueProxy=new DV(d.playlistNetworkManager,c.playlistId,d.setPlaylistData.bind(d),MV(c.playlistPanelRenderer),d.storage),d.responsePlaylistData=
c.playlistPanelRenderer,d.listId=c.playlistId,d.index=c.playlistIndex):(d.index=c.playlistIndex,d.listId!==c.playlistId&&d.clearQueue(),d.responsePlaylistData=c.playlistPanelRenderer,d.listId=c.playlistId);else if(!d.queueProxy)d.responsePlaylistData=void 0;else if(c.playingVideoId&&e.clientParams.autoSaveToQueue){if(void 0===d.index){bn(Error("A queue is playing but index is not available"));d.clearQueue();break a}d.queueProxy.videoIds.includes(c.playingVideoId)||(d.index+=1,d.queueProxy.setCurrentIndex(d.index),
d.queueProxy.addVideos([c.playingVideoId],BV(),void 0,d.index))}RV(d,SV(d,d.response.autoplayRenderer))}})};var VV=function(a,b,c,d){d=void 0===d?QV():d;iV.call(this);var e=!!c&&!!c.clientParams&&!!c.clientParams.miniplayer;A("persistent_miniplayer")&&e&&this.chunkProcessors.push(new sV);this.chunkProcessors.push(new UV(this.playerPromiseResolver,c,d));this.chunkProcessors.push(new tV);this.chunkProcessors.push(new wV(this.playerPromiseResolver,a,b,e));this.chunkProcessors.push(new kV(this));A("kevlar_client_side_screens")&&(this.chunkProcessors.push(new rV),this.chunkProcessors.push(new qV))};
l(VV,iV);var WV=function(a,b,c){c=void 0===c?QV():c;iV.call(this);this.chunkProcessors.push(new UV(this.playerPromiseResolver,{clientParams:{miniplayer:!1,autoSaveToQueue:!1}},c));this.chunkProcessors.push(new wV(this.playerPromiseResolver,a,b,!1))};
l(WV,iV);WV.prototype.processChunk=function(a){a&&void 0===a.data.player&&this.playerPromiseResolver.resolve();iV.prototype.processChunk.call(this,a)};var XV={},YV=(XV["subs-guide-item"]={bodyText:"SUBS_GUIDE_ITEM_EDU_TEXT",position:"OPEN_POPUP_POSITION_RIGHT"},XV["subs-filter-by-channel"]={bodyText:"SUBS_FILTER_EDU_TEXT",position:"OPEN_POPUP_POSITION_RIGHT",setKey:"subs-filter-by-channel-set"},XV["subs-filtered-by-channel"]={bodyText:"SUBS_FILTER_EDU_CHANNEL_TEXT",position:"OPEN_POPUP_POSITION_RIGHT",setKey:"subs-filter-by-channel-set"},XV["membership-join"]={titleText:"JOIN_MEMBERSHIP_EDU_TITLE",bodyText:"JOIN_MEMBERSHIP_EDU_TEXT",position:"OPEN_POPUP_POSITION_LEFT"},
XV["membership-freebie-join"]={titleText:"FREEBIE_JOIN_MEMBERSHIP_EDU_TITLE",bodyText:"FREEBIE_JOIN_MEMBERSHIP_EDU_TEXT",position:"OPEN_POPUP_POSITION_LEFT"},XV["membership-manage"]={bodyText:"MANAGE_MEMBERSHIP_EDU_TEXT",position:"OPEN_POPUP_POSITION_LEFT"},XV["library-guide-item"]={titleText:"LIBRARY_GUIDE_ITEM_EDU_TITLE",bodyText:"LIBRARY_GUIDE_ITEM_EDU_TEXT",position:"OPEN_POPUP_POSITION_RIGHT"},XV),ZV=new Yn("yt-edu"),$V=function(){this.eduDisplayedThisLoad_={}};
$V.prototype.dismissEdu=function(a){ZV.set(""+a+"-dismissed",!0)};
$V.prototype.getEduImpressionCount_=function(a){return parseInt(ZV.get(""+a+"-impression")||0,10)};
$V.prototype.recordEduImpression=function(a){this.eduDisplayedThisLoad_[YV[a].setKey||a]=!0;ZV.set(""+a+"-impression",this.getEduImpressionCount_(a)+1)};
var aW=function(a){var b=$V.getInstance();var c=Be("kevlar_tooltip_impression_cap");b=c&&b.getEduImpressionCount_(a)>=c||ZV.get(""+a+"-dismissed")?!1:(c=YV[a])&&!b.eduDisplayedThisLoad_[c.setKey||a]&&(c.titleText&&yU(c.titleText)||c.bodyText&&yU(c.bodyText))?!0:!1;if(!b)return null;b=YV[a];if(!b)return null;c=b.bodyText?yU(b.bodyText):void 0;var d=b.titleText?yU(b.titleText):void 0;return[{openPopupAction:{popupType:"HINT",position:b.position,popup:{bubbleHintRenderer:{text:d?UU(d):void 0,detailsText:c?
UU(c):void 0,style:"BUBBLE_HINT_STYLE_BLUE_TOOLTIP",confirmButton:{buttonRenderer:{style:"STYLE_BLUE_TEXT",size:"SIZE_DEFAULT",text:UU(yU("EDU_GOT_IT")),serviceEndpoint:{signalServiceEndpoint:{signal:"CLIENT_SIGNAL",actions:[{eduDismissAction:{key:a}}]}}}}}}}},{eduImpressionAction:{key:a}}]};
Ua($V);function SBa(a,b){b.updatedMetadataEndpoint&&!b.updatedMetadataEndpoint.unlistedVideoToken&&(a=px(window.location.href).queryData_.get("ut",""))&&(b.updatedMetadataEndpoint.unlistedVideoToken=a);return!1}
;for(var TBa="account-settings red playlist labs red-originals-home ypc-offers".split(" "),UBa=[],bW=6;1<=bW;bW--)UBa.push({columnCount:bW,query:1==bW?0:214*bW-4+32,className:"grid-"+bW+"-columns",width:214*bW+"px"});var cW=function(a){this.actionRouter_=a=void 0===a?$U.getInstance():a;this.documentWidth_=document.body.clientWidth;this.currentSnapState_=VBa(this);this.miniGuideVisible_=this.guidePersistentAndVisible_=!1};
cW.prototype.setWidth=function(a){this.documentWidth_=a;WBa(this)};
var VBa=function(a){var b=a.miniGuideVisible_?72:0,c=a.documentWidth_-(a.guidePersistentAndVisible_?240:b);return UBa.find(function(d){return c>d.query})},WBa=function(a){var b=VBa(a);
b!=a.currentSnapState_&&(a.currentSnapState_=b,a.actionRouter_.triggerOptionalAction("ytd-update-grid-state-action"))};
Ua(cW);var dW=new Yn("yt-mentions"),eW=function(){this.eduDisplayedThisLoad_=!1};
eW.prototype.dismissEdu=function(){dW.set("edu-dismissed",!0)};
eW.prototype.getEduImpressionCount_=function(){var a=parseInt(dW.get("edu-impressions"),10);return isFinite(a)?a:0};
eW.prototype.recordEduImpression=function(){dW.set("edu-impressions",this.getEduImpressionCount_()+1)};
eW.prototype.maybeGetEduPopup=function(){if(!dW.get("edu-dismissed")&&!this.eduDisplayedThisLoad_){var a=Be("user_mention_suggestions_edu_impression_cap");if(!(a&&this.getEduImpressionCount_()>=a)&&"MENTIONS_EDU_TEXT"in xU){a={openPopupAction:{popupType:"HINT",position:"OPEN_POPUP_POSITION_TOPRIGHT",popup:{bubbleHintRenderer:{detailsText:UU(yU("MENTIONS_EDU_TEXT")),style:"BUBBLE_HINT_STYLE_BLUE_TOOLTIP",confirmButton:{buttonRenderer:{style:"STYLE_BLUE_TEXT",size:"SIZE_DEFAULT",text:UU(yU("EDU_GOT_IT")),
serviceEndpoint:{signalServiceEndpoint:{signal:"CLIENT_SIGNAL",actions:[{signalAction:{signal:"CONFIRM_MENTIONS_EDU"}}]}}}}}}}};if("MENTIONS_EDU_TITLE"in xU&&z("MENTIONS_EDU_HELP_LINK")){var b=UU(yU("MENTIONS_EDU_TITLE"));b.runs[0].navigationEndpoint={urlEndpoint:{url:z("MENTIONS_EDU_HELP_LINK"),target:"TARGET_NEW_WINDOW"}};a.openPopupAction.popup.bubbleHintRenderer.text=b}return[a,{signalAction:{signal:"RECORD_MENTIONS_EDU_IMPRESSION"}}]}}};
Ua(eW);var XBa=new Yn("yt-menu"),YBa=function(){},$Ba=function(a,b,c){a="right-click"==b?c.rightClickMenuPopupHint:c.menuPopupHint;
if(!(10<ZBa(b)))return b=b||"default",XBa.set(""+b+"-impression",ZBa(b)+1),a},ZBa=function(a){return parseInt(XBa.get(""+(a||"default")+"-impression")||0,10)};
Ua(YBa);var fW=function(a){this.element_=a;this.animatedStyles_=["maxHeight","marginBottom","overflow"];this.savedStyles_=new Map;aCa(this)},aCa=function(a){a.animatedStyles_.forEach(function(b){a.savedStyles_.set(b,a.element_.style[b])})};
fW.prototype.restore=function(){var a=this;this.animatedStyles_.forEach(function(b){a.element_.style[b]=a.savedStyles_.get(b)||""})};
var gW=function(a,b){this.collapsingElement_=a;this.callback_=b;this.expandingElement_=null;this.animationJob_=0;this.expandingElementStyleSnapshot_=this.collapsingElementStyleSnapshot_=null;this.startTime_=0};
gW.prototype.start=function(a){0==this.startTime_&&(this.startTime_=new Date().getTime(),this.expandingElement_=a,this.collapsingElementStyleSnapshot_=new fW(this.collapsingElement_),this.expandingElementStyleSnapshot_=new fW(this.expandingElement_),this.expandingElement_.expansionTransition=this,this.collapsingElement_.expansionTransition=this,this.expandingElement_.style.overflow="hidden",this.collapsingElement_.style.overflow="hidden",this.animationJob_=q.requestAnimationFrame(this.iterate_.bind(this)))};
gW.prototype.iterate_=function(){var a=new Date().getTime()-this.startTime_;var b=Math.min(a/420,1);var c=(94*b).toFixed(2);b=(8*b).toFixed(2);420>a?(this.collapsingElement_.style.maxHeight=94-c+"px",this.collapsingElement_.style.marginBottom=8-b+"px",this.expandingElement_.style.maxHeight=c+"px",this.expandingElement_.style.marginBottom=b+"px",this.animationJob_=q.requestAnimationFrame(this.iterate_.bind(this))):(this.expandingElement_.expansion="expanded",this.collapsingElement_.expansion="collapsed",
this.callback_(),bCa(this))};
var bCa=function(a){cancelAnimationFrame(a.animationJob_);a.expandingElement_.expansionTransition=void 0;a.collapsingElementStyleSnapshot_&&(a.collapsingElementStyleSnapshot_.restore(),a.collapsingElementStyleSnapshot_=null);a.collapsingElement_.expansionTransition=void 0;a.expandingElementStyleSnapshot_&&(a.expandingElementStyleSnapshot_.restore(),a.expandingElementStyleSnapshot_=null)};var cCa=function(a,b,c){this.videoId=a;this.videoRenderer=b;this.rvs=c};function dCa(a,b,c,d){c=c?c.videoRenderer:void 0;return{queuedItems:a.map(function(e){return{compactVideoRenderer:e.videoRenderer}}),
dequeuedItems:b.map(function(e,g){e=Object.assign({},e.videoRenderer);d&&g<=d.animateUpTo&&(e.rendererAnimation=d.rendererAnimation);return{compactVideoRenderer:e}}),
nextSuggestion:c}}
function eCa(a){if(a=a.find(function(b){return b&&b.compactAutoplayRenderer&&b.compactAutoplayRenderer.contents&&0<b.compactAutoplayRenderer.contents.length&&b.compactAutoplayRenderer.contents[0]}))return a.compactAutoplayRenderer.contents[0].compactVideoRenderer}
;var hW=function(a){this.actionRouter_=a=void 0===a?$U.getInstance():a;this.queuedItems_=[];this.dequeuedItems_=[];this.nextSuggestion_=null};
hW.prototype.enqueue=function(a,b,c){b=void 0===b?-1:b;void 0===b&&(b=-1);var d=a.videoId;var e={id:a.videoId,session_data:"itct="+a.trackingParams,author:XU(a.shortBylineText),title:XU(a.title),endscreen_autoplay_session_data:km({autonav:"1",playnext:"1",itct:a.clickTrackingParams,feature:"queue"})};var g;a:{if((g=XU(a.lengthText))&&(g=g.split(":"))&&!(2>g.length)){var h=0,m=0;3==g.length&&(h+=3600*Number(g[m]),m+=1);h+=60*Number(g[m]);g=h+=Number(g[m+1]);break a}g=void 0}g&&(e.length_seconds=g);
e=km(e);a=new cCa(d,a,e);d=void 0;c&&(d={rendererAnimation:c,animateUpTo:fCa(this.dequeuedItems_,a.videoId)});iW(this.dequeuedItems_,a.videoId);A("kevlar_next_up_next_multi_video_queue")?(c=b,b=0<this.queuedItems_.length?this.queuedItems_[0]:null,iW(this.queuedItems_,a.videoId),-1==c?this.queuedItems_.push(a):this.queuedItems_.splice(c,0,a),jW(this),c=this.queuedItems_[0],b&&b.videoId==c.videoId||gCa(this,c.rvs)):hCa(this,a,d)};
var hCa=function(a,b,c){1==a.queuedItems_.length&&(a.dequeuedItems_.unshift(a.queuedItems_[0]),a.queuedItems_.length=0);a.queuedItems_.push(b);jW(a,c);gCa(a,b.rvs)};
hW.prototype.removeVideo=function(a){iW(this.queuedItems_,a)&&(0<this.dequeuedItems_.length&&!A("kevlar_next_up_next_multi_video_queue")&&hCa(this,this.dequeuedItems_.shift()),jW(this))};
hW.prototype.clear=function(){this.queuedItems_.length=0;this.dequeuedItems_.length=0;jW(this)};
var jW=function(a,b){a.actionRouter_.triggerOptionalAction("yt-next-up-next-updated-action",dCa(a.queuedItems_,a.dequeuedItems_,a.nextSuggestion_,b))},gCa=function(a,b){a.actionRouter_.triggerOptionalAction("yt-update-player-next-video",{rvs:b})},fCa=function(a,b){return a.findIndex(function(c){return c.videoId==b})},iW=function(a,b){b=fCa(a,b);
if(-1==b)return!1;a.splice(b,1);return!0};
hW.prototype.setNextSuggestion=function(a,b){a&&b&&(a=(b=eCa(b))?new cCa(b.videoId,b,a):void 0,a&&(this.nextSuggestion_=a,jW(this)))};
hW.prototype.getNextRvs=function(){var a=0<this.queuedItems_.length?this.queuedItems_[0]:this.nextSuggestion_;if(a)return a.rvs};
Ua(hW);var kW=new Yn("yt-nextupnext"),lW=function(){this.eduDisplayedThisLoad_=!1};
f=lW.prototype;f.markEduDisplayedThisLoad=function(){this.eduDisplayedThisLoad_=!0};
f.dismissEdu=function(){kW.set("yt-nextupnext-edu-dismissed",!0)};
f.getEduImpressionCount_=function(){return parseInt(kW.get("yt-nextupnext-edu-impression")||0,10)};
f.recordEduImpression=function(){kW.set("yt-nextupnext-edu-impression",this.getEduImpressionCount_()+1)};
f.maybeGetEduPopup=function(){if(A("kevlar_next_up_next_use_edu")){var a=Be("kevlar_tooltip_impression_cap");if(!(a&&this.getEduImpressionCount_()>=a||kW.get("yt-nextupnext-edu-dismissed")||this.eduDisplayedThisLoad_)&&(a=yU("NEXT_UP_NEXT_EDU_TEXT")))return a=a.split("\u22EE").map(function(b){return{text:b}}),a.splice(1,0,Ce("kevlar_next_up_next_edu_emoji")?{emoji:{image:{thumbnails:[{url:Ce("kevlar_next_up_next_edu_emoji"),
width:24,height:24}],accessibility:{accessibilityData:{label:"\u22EE"}}}}}:{bold:!0,text:"\u22EE"}),[{openPopupAction:{popupType:"HINT",position:"OPEN_POPUP_POSITION_TOPLEFT",popup:{bubbleHintRenderer:{text:UU(yU("NEXT_UP_NEXT_EDU_TITLE")),detailsText:{runs:a},style:"BUBBLE_HINT_STYLE_BLUE_TOOLTIP",confirmButton:{buttonRenderer:{style:"STYLE_BLUE_TEXT",size:"SIZE_DEFAULT",text:UU(yU("EDU_GOT_IT")),serviceEndpoint:{signalServiceEndpoint:{signal:"CLIENT_SIGNAL",actions:[{signalAction:{signal:"CONFIRM_NEXT_UP_NEXT_EDU"}}]}}}}}}}},
{signalAction:{signal:"EDU_FORCE_MENU_DISPLAY"}},{signalAction:{signal:"RECORD_NEXT_UP_NEXT_EDU_IMPRESSION"}}]}};
Ua(lW);var mW=function(){};
mW.prototype.markDirty=function(){};
mW.prototype.isNodeVisible=function(){};
mW.prototype.reset=function(){};var iCa=["browse-video-menu-button"],nW=function(a){this.actionRouter_=a=void 0===a?$U.getInstance():a;this.targetMap_=new Map;this.visibilityMonitor_=null;this.triggeredTargets_=new Set},jCa=function(a,b){a.visibilityMonitor_=b;
Hv(a.visibilityMonitor_,"yt-visibility-monitor-refreshed",a.handleVisibilityRefreshed_,!1,a)};
nW.prototype.dispose=function(){this.visibilityMonitor_&&Mv(this.visibilityMonitor_,"yt-visibility-monitor-refreshed",this.handleVisibilityRefreshed_,!1,this)};
nW.prototype.handleVisibilityRefreshed_=function(){var a=this;this.targetMap_.forEach(function(b,c){oW(a,c,b)})};
var oW=function(a,b,c){var d=c.action;(c=c.element)&&d&&(iCa.includes(b)||a.visibilityMonitor_&&a.visibilityMonitor_.isNodeVisible(c))&&(hBa(a.actionRouter_,[d],c),a.targetMap_.delete(b),a.triggeredTargets_.add(b))},kCa=function(a,b){a.targetMap_.get(b)||a.targetMap_.set(b,{});
return a.targetMap_.get(b)};
Ua(nW);var pW=function(){};
pW.prototype.enqueue=function(){if(this.isCounterfactual()){var a=this.getCounterfactualData();a&&this.sendImpressionEndpoints_(a)}else this.doEnqueue()};
pW.prototype.sendImpressionEndpoints_=function(a){$U.getInstance().triggerOptionalAction("yt-service-request",{},a[0])};function qW(a,b){b=void 0===b?!1:b;a=a.getInterface(vV);return a?(a=a.getCurrentPage())?rW(a,b):null:null}
function sW(a){(a=qW(a))||we(Error("Player is missing when requested."));return a}
function rW(a,b){b=void 0===b?!1:b;if(A("kevlar_use_ytd_player")){if(a&&a.getPlayer)return a.getPlayer()}else if(!b||a.requiresPlayer)return a.getInterface(uV);return null}
;var tW=function(a,b){this.renderer_=a;this.page_=b;this.resolver_=fw()};
l(tW,pW);tW.prototype.cancel=function(){this.resolver_.promise.cancel()};
tW.prototype.getCounterfactualData=function(){return this.renderer_.impressionEndpoints};
tW.prototype.isCounterfactual=function(){return!this.renderer_.isVisible};
tW.prototype.doEnqueue=function(){var a=this;this.resolver_.promise.then(function(){var c={popup:{mealbarPromoRenderer:a.renderer_},popupType:"MEALBAR"};$U.getInstance().triggerOptionalAction("yt-open-popup-action",{openPopupAction:c},{})});
switch(this.renderer_.triggerCondition){case"TRIGGER_CONDITION_POST_AD":var b=rW(this.page_);b&&lCa(this.resolver_,b);break;default:this.resolver_.resolve();}};
var lCa=function(a,b){var c=fw();b.getPlayerPromise().then(function(d){c.resolve(d)});
c.promise.then(function(d){d.addEventListener("onAdEnd",a.resolve);iw(a.promise,function(){d.removeEventListener("onAdEnd",a.resolve)})});
jw(a.promise,function(){c.promise.cancel()})};var uW=function(a,b){this.renderer_=a;this.page_=b};
l(uW,pW);uW.prototype.getCounterfactualData=function(){return this.renderer_.impressionEndpoints};
uW.prototype.isCounterfactual=function(){return!this.renderer_.isVisible};
uW.prototype.doEnqueue=function(){var a={popup:{upsellDialogRenderer:this.renderer_},popupType:"MODAL"};$U.getInstance().triggerOptionalAction("yt-open-popup-action",{openPopupAction:a},{});(a=rW(this.page_))&&a.stop()};var vW={},mCa=(vW.TOOLTIP_POSITION_TYPE_BELOW="OPEN_POPUP_POSITION_BOTTOM",vW.TOOLTIP_POSITION_TYPE_START="OPEN_POPUP_POSITION_LEFT",vW.TOOLTIP_POSITION_TYPE_END="OPEN_POPUP_POSITION_RIGHT",vW.TOOLTIP_POSITION_TYPE_BELOW_START="OPEN_POPUP_POSITION_BOTTOMLEFT",vW.TOOLTIP_POSITION_TYPE_BELOW_END="OPEN_POPUP_POSITION_BOTTOMRIGHT",vW.TOOLTIP_POSITION_TYPE_ABOVE_START="OPEN_POPUP_POSITION_TOPLEFT",vW.TOOLTIP_POSITION_TYPE_ABOVE_END="OPEN_POPUP_POSITION_TOPRIGHT",vW),wW=function(a,b){this.renderer_=a;this.nitrateTargetManager_=
b};
l(wW,pW);wW.prototype.getCounterfactualData=function(){if(this.isCounterfactual())return this.renderer_.promoConfig.impressionEndpoints};
wW.prototype.isCounterfactual=function(){return!(!this.renderer_.promoConfig||!this.renderer_.promoConfig.isCounterfactual)};
wW.prototype.doEnqueue=function(){if(this.renderer_.targetId){var a;this.renderer_.suggestedPosition&&this.renderer_.suggestedPosition.type&&(a=mCa[this.renderer_.suggestedPosition.type]);a||(a="OPEN_POPUP_POSITION_BOTTOM");a={openPopupAction:{popup:{tooltipRenderer:this.renderer_},popupType:"HINT",position:a}};var b=this.nitrateTargetManager_,c=this.renderer_.targetId;if(!b.triggeredTargets_.has(c)){var d=kCa(b,c);d.action=a;oW(b,c,d)}}};function nCa(a){if(a.playerResponse){if(a=a.playerResponse,a.messages&&0<a.messages.length&&(a=a.messages.find(function(b){return!(!b||!b.mealbarPromoRenderer)}))&&a.mealbarPromoRenderer)return a.mealbarPromoRenderer}else if(a.response&&(a=a.response)&&a.overlay&&a.overlay.mealbarPromoRenderer)return a.overlay.mealbarPromoRenderer}
function oCa(a){if(a.playerResponse){var b=a.playerResponse;if(b.messages&&0<b.messages.length&&(b=b.messages.find(function(c){return!(!c||!c.tooltipRenderer)}))&&b.tooltipRenderer)return b.tooltipRenderer}if(a.response&&(a=a.response)&&a.overlay&&a.overlay.tooltipRenderer)return a.overlay.tooltipRenderer}
;var pCa=function(){this.pendingMealbarPromo_=null};
Ua(pCa);var xW=function(){this.highPriorityNotifications_=[];this.highPriorityNotificationDisplayed_=!1},qCa=function(a,b){b={openPopupAction:{popupType:"NOTIFICATION",
popup:b}};$U.getInstance().triggerAction("yt-open-popup-action",b,a)};
Ua(xW);var rCa=0,yW=function(a,b,c){var d=this;this.completionCallback_=Ta;this.wrappedJob=function(){a();d.completionCallback_()};
this.priority=b;this.delay=c;this.jobId_=0;this.id=++rCa};
yW.prototype.enqueue=function(a){this.completionCallback_=a;this.jobId_=Dn.addJob(this.wrappedJob,this.priority,this.delay)};
yW.prototype.dequeue=function(){Dn.cancelJob(this.jobId_)};
var zW=function(){Cn.call(this);this.suspendedTasks_=new Set;this.scheduledTasks_=new Set;this.isActive_=!1;this.taskIdToTask_=new Map};
l(zW,Cn);zW.prototype.addJob=function(a,b,c){a=new yW(a,b,c);this.taskIdToTask_.set(a.id,a);this.isActive_?sCa(this,a):this.suspendedTasks_.add(a);return a.id};
var sCa=function(a,b){a.scheduledTasks_.add(b);b.enqueue(function(){a.scheduledTasks_.delete(b)})};
zW.prototype.cancelJob=function(a){(a=this.taskIdToTask_.get(a))&&(this.scheduledTasks_.delete(a)?a.dequeue():this.suspendedTasks_.delete(a))};
zW.prototype.pause=function(){var a=this;this.isActive_=!1;this.scheduledTasks_.forEach(function(b){b.dequeue();a.suspendedTasks_.add(b)});
this.scheduledTasks_.clear()};
zW.prototype.start=function(){var a=this;this.isActive_=!0;this.suspendedTasks_.forEach(function(b){sCa(a,b)});
this.suspendedTasks_.clear()};
zW.prototype.reset=function(){this.scheduledTasks_.forEach(function(a){a.dequeue()});
this.scheduledTasks_.clear();this.suspendedTasks_.clear();this.taskIdToTask_.clear()};var tCa=function(a,b,c,d){this.taskManager_=a;this.onFulfilled_=Za(b)?b:null;this.onRejected_=Za(c)?c:null;this.context_=d},uCa=function(a,b){a.onFulfilled_&&Gn(a.taskManager_,function(){a.onFulfilled_.call(a.context_,b)})},vCa=function(a,b){a.onRejected_&&Gn(a.taskManager_,function(){a.onRejected_.call(a.context_,b)})},AW=function(a){this.taskManager_=a;
this.callbacks_=[]};
AW.prototype.then=function(a,b,c){this.callbacks_.push(new tCa(this.taskManager_,a,b,c));return this};
AW.prototype.onSuccess=function(a){this.callbacks_.forEach(function(b){uCa(b,a)})};
AW.prototype.onFailure=function(a){this.callbacks_.forEach(function(b){vCa(b,a)})};
AW.prototype.cancel=function(){this.callbacks_.length=0};
Kk(AW);var BW=function(){};
f=BW.prototype;f.endpointToXhrUrl=function(){};
f.fetchData=function(){};
f.postData=function(){};
f.requestDataForEndpoint=function(){};
f.requestDataForServiceEndpoint=function(){};var CW=function(a,b){this.networkService_=a;this.pageRequestPromise=b};
CW.prototype.fetchData=function(a){DW(this,this.networkService_.fetchData(a))};
CW.prototype.postData=function(a,b){DW(this,this.networkService_.postData(a,b))};
CW.prototype.requestDataForServiceEndpoint=function(a,b){DW(this,this.networkService_.requestDataForServiceEndpoint(a,b))};
var DW=function(a,b){b.then(a.pageRequestPromise.onSuccess,a.pageRequestPromise.onFailure,a.pageRequestPromise)};
CW.prototype.cancel=function(){this.pageRequestPromise.cancel()};var EW=function(a){this.buildNetworkRequest_=a;this.pendingRequests_=new Set};
EW.prototype.reset=function(){this.pendingRequests_.forEach(function(a){a.cancel()});
this.pendingRequests_.clear()};
EW.prototype.fetchData=function(a){var b=FW(this);b.fetchData(a);return b.pageRequestPromise};
EW.prototype.postData=function(a,b){var c=FW(this);c.postData(a,b);return c.pageRequestPromise};
EW.prototype.requestDataForServiceEndpoint=function(a,b){var c=FW(this);c.requestDataForServiceEndpoint(a,b);return c.pageRequestPromise};
var FW=function(a){var b=a.buildNetworkRequest_();a.pendingRequests_.add(b);var c=function(){a.pendingRequests_.delete(b)};
b.pageRequestPromise.then(c,c);return b};var wCa=function(a){var b=new zW;this.networkService_=a;this.taskManager_=b;this.networkManager_=new EW(this.networkRequestFactory_.bind(this))};
f=wCa.prototype;f.networkRequestFactory_=function(){return new CW(this.networkService_,new AW(this.taskManager_))};
f.reset=function(){this.taskManager_.reset();this.networkManager_.reset()};
f.start=function(){this.taskManager_.start()};
f.pause=function(){this.taskManager_.pause()};
f.getTaskManager=function(){return this.taskManager_};
f.getNetworkManager=function(){return this.networkManager_};var xCa=function(){this.contexts_=new WeakMap;this.networkService_=this.activeContext_=null},yCa=function(a,b,c){var d=a.contexts_.get(b);
d||(d=new wCa(a.networkService_),a.contexts_.set(b,d));a.activeContext_=d;c&&a.activeContext_.reset();a.activeContext_.start();return a.activeContext_};var GW=null;function zCa(a,b){a&&(a.playerResponse?(a=a.playerResponse,a.messages&&0<a.messages.length&&(a=a.messages.find(function(c){return!(!c||!c.mealbarPromoRenderer)}))&&a.mealbarPromoRenderer&&ACa(a.mealbarPromoRenderer,b)):a.response&&(a=a.response)&&a.overlay&&a.overlay.mealbarPromoRenderer&&ACa(a.overlay.mealbarPromoRenderer,b))}
function ACa(a,b){GW&&GW.promise.cancel();if(a.isVisible)switch(GW=fw(),GW.promise.then(function(){var c={popup:{mealbarPromoRenderer:a},popupType:"MEALBAR"};$U.getInstance().triggerOptionalAction("yt-open-popup-action",{openPopupAction:c},{});GW=null}),a.triggerCondition){case"TRIGGER_CONDITION_POST_AD":(b=rW(b))&&BCa(b);
break;default:GW.resolve();}else CCa(a)}
function BCa(a){var b=GW,c=fw();a.getPlayerPromise().then(function(d){c.resolve(d)});
c.promise.then(function(d){d.addEventListener("onAdEnd",b.resolve);iw(b.promise,function(){d.removeEventListener("onAdEnd",b.resolve)})});
jw(b.promise,function(){c.promise.cancel()})}
function CCa(a){a.impressionEndpoints&&$U.getInstance().triggerOptionalAction("yt-service-request",{},a.impressionEndpoints[0])}
;var HW=null,IW=null,JW=[],KW=0,LW=0,MW=null;function DCa(a){a=void 0===a?null:a;JW.push(Cm(window,"resize",ECa));JW.push(Cm(window,"scroll",FCa));a&&Za(a.sendOptionalAction)&&(MW=a)}
function NW(a){if(!HW||a)HW=kh();return HW}
function ECa(){KW||(KW=Fn(Dn,GCa,200))}
function GCa(){KW=0;var a=[NW(!0)];MW&&MW.sendOptionalAction("yt-window-resized",a)}
function FCa(){LW||(LW=Fn(Dn,HCa,200))}
function HCa(){LW=0;IW=oh(document);var a=[IW];MW&&MW.sendOptionalAction("yt-window-scrolled",a)}
;var ICa=function(){this.count=1},OW,PW=function(){OW||(OW=new ICa);
return OW};function QW(a,b){a=a.watchEndpoint;return"v"+a.videoId+(a.playlistId?"-pl"+a.playlistId:"")+(b?"-an1":"")}
;var RW=function(a){this.networkManager_=a;this.partCallbacks_=[]},JCa=function(a,b,c){var d=a.getParams(c),e=PU(b,d);
c=a.getTempData(b,c);A("kevlar_client_side_screens")&&(c.endpoint=JSON.stringify(b));var g=a.getOptions_();cS(e,c);return new Yv(function(h,m){var n=a.getXhrParams(d);a.networkManager_.requestDataForEndpoint(b,n,a.onPartsCallback_.bind(a),g).then(function(p){p?h(p):m()},m)})};
f=RW.prototype;f.getCacheKeyForEndpoint=function(a){return QW(a,!1)};
f.addPartCallback=function(a){this.partCallbacks_.push(a)};
f.onPartsCallback_=function(a){this.partCallbacks_.forEach(function(b){a&&b(a)})};
f.getOptions_=function(){return{headers:{"X-YouTube-STS":18138}}};
f.onRequestCompletes_=function(){};var SW=function(){};
f=SW.prototype;f.onPlaylistNext=function(){};
f.onPlaylistPrevious=function(){};
f.updatePlaylistEventListeners=function(){};
f.setPlayer=function(){};
f.setPlaylistComponent=function(){};
f.setAutoplayRenderer=function(){};
f.setPlaylistData=function(){};
f.setPlayerPlaybackControlData=function(){};
f.skipVideo=function(){};
f.cancelVideoSkip=function(){};
f.getAutoplayEndpoint=function(){};
f.getPlaylistData=function(){};var TW=function(a,b,c,d){RW.call(this,a);this.player_=b;this.autoplayData_=c;this.playlistManager_=d};
l(TW,RW);TW.prototype.getCacheKeyForEndpoint=function(a){return QW(a,!!this.autoplayData_)};
TW.prototype.getTempData=function(a,b){b=b.timeBeforeNextVideo;a={itct:a.clickTrackingParams,lact:Rn(),pbis:b,prefetch_reason:"hc_pbis",vis:this.player_.getVisibilityState()};if(this.autoplayData_)if(a.autonav=1,b=this.autoplayData_.webAutoplayRendererData&&this.autoplayData_.webAutoplayRendererData.autoplayCount,A("decorate_autoplay_renderer")){if(a.playnext=PW().count,a.playnext!=b){var c=Error("AutoplayCount did not match decorator in prefetching");c.params="Client autoplayCount "+a.playnext+" did not match "+
b;xe(c)}}else b&&(a.playnext=b);return a};
TW.prototype.getXhrParams=function(a){return Object.assign({pbj:"prefetch"},a)};
TW.prototype.getParams=function(a){a={frags:a.fragmentsRequested.join(",")};A("kevlar_droppable_prefetchable_requests")&&(a.prefetch=1);return a};var UW=function(a,b,c){this.player=a;this.taskManager=b;this.prefetchDelay=c;this.completionResolver_=null;this.playerEvents_=[]};
UW.prototype.start=function(){var a=this;this.completionResolver_=fw();iw(this.completionResolver_.promise,function(){KCa(a);a.completionResolver_=null});
this.prepareTrigger(this.completionResolver_);return this.completionResolver_.promise};
var LCa=function(a,b,c){a.player.addEventListener(b,c);a.playerEvents_.push({eventName:b,callback:c})},KCa=function(a){a.playerEvents_.forEach(function(b){a.player.removeEventListener(b.eventName,b.callback)});
a.playerEvents_.length=0};var VW={watch:{pageFragments:["pl","wn"],prefetchedFragments:["pl"]}},MCa={pl:{requiredKeys:["player","playerResponse"],graftedKeys:["playerResponse"]},wn:{requiredKeys:["response"],graftedKeys:["response"]}},NCa={pl:{requiredKeys:["player","playerResponse"],graftedKeys:[]},wn:{requiredKeys:["response"],graftedKeys:[]}},OCa={fragmentsRequested:null,timeBeforeNextVideo:null};var WW=function(a){RW.call(this,a)};
l(WW,RW);WW.prototype.getParams=function(){return{}};
WW.prototype.getXhrParams=function(a){return a};
WW.prototype.getTempData=function(a){return{itct:a.clickTrackingParams,lact:Rn()}};var XW=function(){this.endpointCacheKey_=null;this.expireJobId_=0;(this.ENABLE_PBJ_PREFETCH_=A("web_enable_pbj_prefetch"))&&window.addEventListener("unload",this.onUnload_.bind(this))};
XW.prototype.resolve=function(){this.ENABLE_PBJ_PREFETCH_&&this.endpointCacheKey_&&(this.endpointCacheKey_&&(this.endpointCacheKey_=null),PCa(this))};
var PCa=function(a){a.expireJobId_&&(Dn.cancelJob(a.expireJobId_),a.expireJobId_=0)};
XW.prototype.getTriggerFromMouseEvent_=function(a){if(!a)return"";var b="";void 0!=a.button&&(b+="-btn"+a.button.toString());a.altKey&&(b+="-alt");a.ctrlKey&&(b+="-ctrl");a.metaKey&&(b+="-meta");a.shiftKey&&(b+="-shift");return b};
XW.prototype.onUnload_=function(){this.endpointCacheKey_&&(this.endpointCacheKey_=null);PCa(this)};
Ua(XW);var YW=function(a,b,c){UW.call(this,a,b,c);this.cueId_="playbackTrigger-"+Math.random()};
l(YW,UW);YW.prototype.prepareTrigger=function(a){var b=this,c=this.player.getDuration();var d=0<=this.prefetchDelay?this.prefetchDelay:c+this.prefetchDelay;this.player.addCueRange(this.cueId_,d,c);iw(a.promise,function(){b.player.removeCueRange(b.cueId_)});
LCa(this,"onCueRangeEnter",function(e){e==b.cueId_&&a.resolve(c-d)})};
YW.prototype.getTriggerName=function(){return"playbackTrigger"};var ZW=function(a,b,c,d,e,g){var h=this;this.pageFragments_=a;this.prefetchedFragments_=b;this.fragmentConfiguration_=c;this.prefetchedData_=d;this.networkPrefetchRequest_=e;this.completionPromise=g;this.validatedFragments_=[];this.missingFragments_=this.pageFragments_.slice();this.mergedPrefetchedData_=null;QCa(this);this.networkPrefetchRequest_&&this.addPartCallback(function(m){Object.assign(h.prefetchedData_,m);QCa(h)})};
ZW.prototype.addPartCallback=function(a){this.networkPrefetchRequest_.addPartCallback(a)};
var $W=function(a){if(0==a.validatedFragments_.length)return null;if(!a.mergedPrefetchedData_){for(var b=[],c=k(a.validatedFragments_),d=c.next();!d.done;d=c.next()){d=k(a.fragmentConfiguration_[d.value].graftedKeys);for(var e=d.next();!e.done;e=d.next())(e=a.prefetchedData_[e.value].trackingParams)&&b.push(e)}a.mergedPrefetchedData_={};Object.assign(a.mergedPrefetchedData_,a.prefetchedData_,{clientSideGrafts:b})}return a.mergedPrefetchedData_};
ZW.prototype.getValidFragments=function(){return this.validatedFragments_};
var QCa=function(a){a.prefetchedFragments_.forEach(function(b){RCa(a,b)})},RCa=function(a,b){a.fragmentConfiguration_[b].requiredKeys.every(function(c){return!!a.prefetchedData_[c]})&&(a.validatedFragments_.push(b),b=a.missingFragments_.indexOf(b),-1!==b&&a.missingFragments_.splice(b,1))};var SCa=function(){},aX=function(a){this.playlistManager_=a};
l(aX,SCa);aX.prototype.getPrefetchEndpoint=function(){return this.playlistManager_.getAutoplayEndpoint()};
aX.prototype.getProviderType=function(){return"playlist"};
var bX=function(a){this.autonavEndpoints_=a};
l(bX,SCa);bX.prototype.getPrefetchEndpoint=function(){return this.autonavEndpoints_.length?this.autonavEndpoints_[0]:void 0};
bX.prototype.getProviderType=function(){return"first_next"};var TCa=function(a,b,c,d){this.autonavEndpoints=a;this.foregroundTrigger=b;this.backgroundTrigger=c;this.pageType="watch";this.isInPlaylist=d},UCa=function(a,b){if(a.webPrefetchData&&a.webPrefetchData.navigationEndpoints&&a.webPrefetchData.navigationEndpoints.length){a=a.webPrefetchData.navigationEndpoints;
var c=a[0];if(c&&c.watchEndpoint&&c.watchEndpoint.watchEndpointSupportedPrefetchConfig&&c.watchEndpoint.watchEndpointSupportedPrefetchConfig.prefetchHintConfig){var d=c.watchEndpoint.watchEndpointSupportedPrefetchConfig.prefetchHintConfig;c=d.countdownUiRelativeSecondsPrefetchCondition;d=d.playbackRelativeSecondsPrefetchCondition;d=Ma(d)&&Math.abs(d)<b.videoDuration?d:Ma(c)&&b.inPlaylist&&0>c?c:void 0;c=Ma(c)&&!b.inPlaylist?c:void 0;if(Ma(c))return new TCa(a,b.makeUpNextTrigger(c),b.makePlaybackTrigger(c),
b.inPlaylist);if(Ma(d))return new TCa(a,b.makePlaybackTrigger(d),null,b.inPlaylist)}}};var cX=function(a,b,c,d){this.prefetchEndpointProvider_=a;this.prefetchRequestPromise_=this.triggerPromise_=null;this.storePrefetchedDataCallback_=b;this.prefetchJobConfig_=c;this.networkPrefetchRequest_=d;this.prefetchResponseCacheKey_=null};
cX.prototype.enqueue=function(){this.triggerPromise_||(VCa(this,WCa(this)),Hv(document,"visibilitychange",this.onVisibilityChange_,!1,this))};
var VCa=function(a,b){a.triggerPromise_=b.start();a.triggerPromise_.then(function(c){var d=a.prefetchEndpointProvider_.getPrefetchEndpoint();d&&(a.prefetchRequestPromise_=JCa(a.networkPrefetchRequest_,d,{fragmentsRequested:VW[a.prefetchJobConfig_.pageType].prefetchedFragments,timeBeforeNextVideo:c}),a.prefetchResponseCacheKey_=a.networkPrefetchRequest_.getCacheKeyForEndpoint(d),XCa(a),a.prefetchRequestPromise_.then(function(e){a.storePrefetchedDataCallback_(a.prefetchResponseCacheKey_,e)}))})};
cX.prototype.resolve=function(){this.cancel()};
cX.prototype.cancel=function(){this.triggerPromise_&&this.triggerPromise_.cancel();this.prefetchRequestPromise_&&this.prefetchRequestPromise_.cancel();XCa(this)};
cX.prototype.onVisibilityChange_=function(){this.triggerPromise_&&(this.triggerPromise_.cancel(),this.triggerPromise_=null);0!=Yp()&&VCa(this,WCa(this))};
var XCa=function(a){Mv(document,"visibilitychange",a.onVisibilityChange_,!1,a)},WCa=function(a){return a.prefetchJobConfig_.backgroundTrigger?0==Yp()?a.prefetchJobConfig_.backgroundTrigger:a.prefetchJobConfig_.foregroundTrigger:a.prefetchJobConfig_.foregroundTrigger};
cX.prototype.doesEndpointKeyMatchRequestKey_=function(a){return a?a==this.prefetchResponseCacheKey_:!1};var dX=function(a,b,c){UW.call(this,a,b,c)};
l(dX,UW);dX.prototype.prepareTrigger=function(a){var b=this;LCa(this,"onAutonavCoundownStarted",function(c){YCa(b,c,a)})};
var YCa=function(a,b,c){var d=1E3*a.prefetchDelay;if(Math.abs(d)>b)c.promise.cancel();else{var e=d,g=b-d;0>d&&(e=b+d,g=Math.abs(d));var h=a.taskManager.addJob(function(){c.resolve(g/1E3)},10,e);
jw(c.promise,function(){a.taskManager.cancelJob(h)})}};
dX.prototype.getTriggerName=function(){return"upNextTrigger"};var eX=function(){this.prefetchCache_=new Map;this.pendingPrefetchJob_=null},$Ca=function(a,b,c,d,e,g){var h=Dn,m=hV.getInstance();
ZCa(a);var n=!!c.getPlaylistId();if((n||2==m.getState())&&!c.getVideoData().isLive){m={inPlaylist:n,videoDuration:c.getDuration(),makeUpNextTrigger:function(x){return new dX(c,h,x)},
makePlaybackTrigger:function(x){return new YW(c,h,x)}};
var p=UCa(b,m);p&&(a.pendingPrefetchJob_=new cX(p.isInPlaylist?new aX(e):new bX(p.autonavEndpoints),function(x,y){y=new ZW(VW[p.pageType].pageFragments,VW[p.pageType].prefetchedFragments,MCa,y);return $W(y)?(a.prefetchCache_.set(x,y),!0):!1},p,new TW(d,c,g,e)),a.pendingPrefetchJob_.enqueue())}},aDa=function(a,b,c){if(b.watchEndpoint)return a.prefetchCache_.get(QW(b,c))},ZCa=function(a){a.pendingPrefetchJob_&&(a.pendingPrefetchJob_.cancel(),a.pendingPrefetchJob_=null)};
Ua(eX);function fX(a,b,c){c=void 0===c?!1:c;var d=Math.max(a.width,474);d=1E3<=a.width?d-474:d-48;d=Math.min(d,1280);var e=240;c&&(e=380);.5624>b||(630>a.height&&657<=a.width||630<=a.height&&1E3<=a.width&&1294>a.width?e=360:630<=a.height&&1294<=a.width&&(e=480));var g=Math.min(d*b,a.height-216);g=Math.max(g,e);1>b?d=g/b:1E3<=a.width&&(d=fX(a,.5625,c).width);return new Yg(Math.round(d),Math.round(g))}
;function bDa(a){var b="";a.shortBylineText&&(b=XU(a.shortBylineText));var c="";a.title?c=XU(a.title):a.unplayableText&&(c=XU(a.unplayableText));return{author:b,title:c,encrypted_id:a.videoId}}
function cDa(a,b){var c=[],d=a.currentIndex?a.currentIndex:0;if(a.contents)for(var e=0;e<a.contents.length;e++){var g=a.contents[e];g&&g.playlistPanelVideoRenderer&&(FBa(g)?c.push(bDa(g.playlistPanelVideoRenderer)):e<d&&--d)}return{index:d,list:a.playlistId?a.playlistId:"",loop:b,playlist_title:a.title,playlist_length:c.length,video:c,fetch:0,external_list:"1",title:a.title?a.title:"",playlist_author:a.ownerName?XU(a.ownerName):void 0}}
;var dDa=[{query:window.matchMedia("(max-width: 656px)"),size:new Yg(426,240)},{query:window.matchMedia("(max-width: 856px)"),size:new Yg(640,360)},{query:window.matchMedia("(max-width: 999px)"),size:new Yg(854,480)},{query:window.matchMedia("(min-width: 1720px) and (min-height: 980px)"),size:new Yg(1280,720)},{query:window.matchMedia("(min-width: 1294px) and (min-height: 630px)"),size:new Yg(854,480)},{query:window.matchMedia("(min-width: 1000px)"),size:new Yg(640,360)}];var eDa=function(a,b){return a.SHARED_RENDERERS_.hasOwnProperty(b)?"yt":a.prefix},gX={DIALOG:{component:"paper-dialog",
properties:{withBackdrop:!0},preventAutonav:!0},FULLSCREEN_OVERLAY:{component:null,properties:{withBackdrop:!0}},DROPDOWN:{component:"iron-dropdown",properties:{noOverlap:!0,horizontalAlign:"auto",verticalAlign:"top",dynamicAlign:!0,withBackdrop:!1},forceFocus:!0,slotName:"dropdown-content",preventAutonav:!0},HINT:{component:"iron-dropdown",properties:{allowOutsideScroll:!0,dynamicAlign:!1,horizontalAlign:"center",noOverlap:!0,scrollAction:"refit",verticalAlign:"bottom",verticalOffset:15,withBackdrop:!1},
positionalProperties:{OPEN_POPUP_POSITION_TOPLEFT:{horizontalAlign:"right",horizontalOffset:-12,shiftedHorizontalOffset:24,verticalAlign:"bottom",verticalOffset:15},OPEN_POPUP_POSITION_TOPRIGHT:{horizontalAlign:"left",horizontalOffset:-12,shiftedHorizontalOffset:24,verticalAlign:"bottom",verticalOffset:15},OPEN_POPUP_POSITION_LEFT:{horizontalAlign:"right",horizontalOffset:12,verticalAlign:"middle",verticalOffset:0},OPEN_POPUP_POSITION_RIGHT:{horizontalAlign:"left",horizontalOffset:12,verticalAlign:"middle",
verticalOffset:0},OPEN_POPUP_POSITION_BOTTOM:{horizontalAlign:"center",horizontalOffset:0,verticalAlign:"top",verticalOffset:12},OPEN_POPUP_POSITION_BOTTOMLEFT:{horizontalAlign:"right",horizontalOffset:12,shiftedHorizontalOffset:24,verticalAlign:"top",verticalOffset:12},OPEN_POPUP_POSITION_BOTTOMRIGHT:{horizontalAlign:"left",horizontalOffset:-12,verticalAlign:"top",verticalOffset:12}},forceCloseOnOutsideClick:!0,forceFocus:!0,slotName:"dropdown-content"}};
gX.MEALBAR={component:"paper-dialog",properties:{keepBelowPlayer:!A("kevlar_mealbar_above_player"),noAutoFocus:!0,noCancelOnOutsideClick:!0,withBackdrop:!1},styles:{position:"fixed",top:"auto",left:"0",right:"auto",bottom:"0",margin:"16px"},rtlStyles:{position:"fixed",top:"auto",right:"0",left:"auto",bottom:"0",margin:"16px"}};gX.MODAL={component:"paper-dialog",properties:{modal:!0},forceFocus:!0,preventAutonav:!0};
gX.MOLE={component:null,styles:{position:"fixed",top:"auto",left:"auto",right:"0",bottom:"0",zIndex:"var(--ytd-z-index-miniplayer)"},rtlStyles:{position:"fixed",top:"auto",left:"0",right:"auto",bottom:"0",zIndex:"var(--ytd-z-index-miniplayer)"}};
gX.NOTIFICATION={component:null,styles:{position:"fixed",top:"0",left:"auto",right:"0",bottom:"auto",marginTop:"60px",zIndex:"var(--ytd-z-index-notification)"},rtlStyles:{position:"fixed",top:"0",left:"0",right:"auto",bottom:"auto",marginTop:"60px",zIndex:"var(--ytd-z-index-notification)"},preventAutonav:!0};gX.OVERLAY_DROPDOWN={component:"iron-dropdown",properties:{noOverlap:!1,horizontalAlign:"auto",verticalAlign:"top",dynamicAlign:!0,withBackdrop:!1},forceFocus:!0,slotName:"dropdown-content",preventAutonav:!0};
gX.RESPONSIVE_DROPDOWN={component:"iron-dropdown",properties:{noOverlap:!0,horizontalAlign:"auto",verticalAlign:"top",dynamicAlign:!0,withBackdrop:!1},narrowProperties:{horizontalAlign:null,verticalAlign:null,dynamicAlign:!1,withBackdrop:!0},forceFocus:!0,slotName:"dropdown-content",preventAutonav:!0};
gX.SURVEY={component:"paper-dialog",properties:{withBackdrop:!1,noCancelOnOutsideClick:!0,noAutoFocus:!0},styles:{position:"fixed",top:"auto",left:"auto",right:"0",bottom:"0"},rtlStyles:{position:"fixed",top:"auto",left:"0",right:"auto",bottom:"0"},preventAutonav:A("web_survey_popup_prevent_autonav")};gX.TOAST={component:null,properties:{}};var hX=function(a){var b=a.openPopupAction,c=a.target,d=a.container,e=a.popupContainerConfig;a=a.getElement;this.popupContent=this.popup=void 0;this.openPopupAction=b;this.target=c;this.container_=d;this.popupContainerConfig_=e;this.naturalHeight_=void 0;this.getElement_=a;this.popupConfig_=this.popupContainerConfig_.popupConfig[this.openPopupAction.popupType];b=(b=fDa(this))?WU(b,eDa(this.popupContainerConfig_,b)):"";this.rendererName=b;b=this.popupConfig_.component;this.popupContent=this.getElement_(this.rendererName,
this.target);b?(this.popup=this.getElement_(b,this.target),this.popupConfig_.slotName&&(Polymer.Element?this.popupContent.setAttribute("slot",this.popupConfig_.slotName):this.popupContent.toggleClass(this.popupConfig_.slotName,!0)),Polymer.dom(this.popup).appendChild(this.popupContent),Polymer.Element?document.body.appendChild(this.popup):Polymer.dom.flush()):this.popup=this.popupContent;Polymer.dom(this.container_.root).appendChild(this.popup)},iDa=function(a,b){a.openPopupAction=b;
gDa(a);hDa(a)};
hX.prototype.refit=function(){this.popup.opened&&this.popup.refit()};
var jDa=function(a,b){iX(a,b&&a.popupConfig_.narrowProperties?a.popupConfig_.narrowProperties:a.popupConfig_.properties);a.isRtl_()&&iX(a,a.popupConfig_.rtlProperties);hDa(a)},gDa=function(a){a.popupContent.set("data",(0,u.unsafeClone)(a.openPopupAction.popup[fDa(a)]));
a.popupContent.duration=a.getPopupDurationMs_();a.popupContent.positionType=a.openPopupAction.position;var b=a.openPopupAction.properties;b&&Object.keys(b).forEach(function(c){a.popupContent[c]=b[c]})},iX=function(a,b){if(b)for(var c in b)a.popup[c]=b[c]},hDa=function(a){if(a.openPopupAction.position){var b=a.popupConfig_.positionalProperties&&a.popupConfig_.positionalProperties[a.openPopupAction.position],c=a.popupConfig_.rtlPositionalProperties&&a.popupConfig_.rtlPositionalProperties[a.openPopupAction.position];
b=a.isRtl_()&&c?c:b;b.shiftedHorizontalOffset&&(c=a.popup.style.display,a.popup.style.display="block",a.popupContent&&a.popup.positionTarget&&a.popupContent.clientWidth>a.popup.positionTarget.clientWidth&&(b.horizontalOffset=a.popup.positionTarget.clientWidth/2-b.shiftedHorizontalOffset),a.popup.style.display=c);iX(a,b)}},kDa=function(a,b){if(b)for(var c in b)a.popup.style[c]=b[c]},fDa=function(a){return VU(a.openPopupAction.popup,"renderer")||VU(a.openPopupAction.popup,"dialog")||void 0};
hX.prototype.getPopupDurationMs_=function(){var a=this.openPopupAction.durationHintMs;return 0===a?a:Math.max(4E3,a||4E3)};
hX.prototype.isRtl_=function(){return"rtl"==z("HTML_DIR")};var lDa=new Yn("ratelimit");function jX(){var a=Be("user_engagement_experiments_rate_limit_ms"),b=lDa.get("last-user-engagement-exp-trigger-timestamp");return!b||nn()>=b+a?(lDa.set("last-user-engagement-exp-trigger-timestamp",nn()),!0):!1}
;var mDa=function(a,b){this.playerProvider_=a;this.actionSenderElement_=b;this.pausePlaybackJob_=this.showWarningJob_=0;this.youThereData_=null;this.ignoreFullscreenExitUserActivity_=this.isUserPredictedAbsent_=!1};
mDa.prototype.reset=function(){nDa(this);this.isUserPredictedAbsent_=!1};
var nDa=function(a,b){!a.youThereData_||a.showWarningJob_||void 0!==b&&b||(OS("YOU_THERE_EVENT_TYPE_NAVIGATED_OUT",Wo()),eo());Dn.cancelJob(a.showWarningJob_);a.showWarningJob_=0;Dn.cancelJob(a.pausePlaybackJob_);a.pausePlaybackJob_=0;a.youThereData_=null},qDa=function(a,b){var c,d,e,g;
Ca(function(h){if(1==h.nextAddress){a.reset();a.youThereData_=b.configData.youThereData;if(a.youThereData_.reason&&"YOU_THERE_TRIGGER_REASON_3"==a.youThereData_.reason&&!jX())return OS("YOU_THERE_EVENT_TYPE_RATE_LIMITED"),h.return();c=parseInt(a.youThereData_.lactThresholdMs,10);return!A("disable_youthere_lact_threshold_check")&&Rn()+1E3*a.youThereData_.promptDelaySec<c?(OS("YOU_THERE_EVENT_TYPE_BELOW_LACT_THRESHOLD",Wo()),h.return()):0>=a.youThereData_.playbackPauseDelayMs?(oDa(a),h.return()):ta(h,
a.playerProvider_().getPlayerPromise(),2)}d=h.yieldResult;e=d.getCurrentTime();if(!a.youThereData_)return h.return();g=a.youThereData_.promptDelaySec;a.showWarningJob_=Fn(Dn,function(){return Ca(function(m){a.showWarningJob_=0;return ta(m,pDa(a),0)})},1E3*Math.max(g-e,0));
ua(h)})},pDa=function(a){var b,c,d;
return Ca(function(e){if(1==e.nextAddress)return ta(e,rDa(a),2);b=e.yieldResult;if(!b||!a.youThereData_)return e.return();!A("external_fullscreen")&&(c=uS())&&(a.ignoreFullscreenExitUserActivity_=!0,Fn(Dn,function(){a.ignoreFullscreenExitUserActivity_=!1},2E3),tS(c));
sDa(a,a.youThereData_.showWarningActions);OS("YOU_THERE_EVENT_TYPE_PROMPT_SHOWN",Wo());d=a.youThereData_.playbackPauseDelayMs;a.pausePlaybackJob_=Fn(Dn,function(){return Ca(function(g){a.pausePlaybackJob_=0;return ta(g,oDa(a),0)})},d);
ua(e)})},oDa=function(a){var b;
return Ca(function(c){if(1==c.nextAddress)return ta(c,rDa(a),2);b=c.yieldResult;if(!a.youThereData_)return c.return();b&&(OS("YOU_THERE_EVENT_TYPE_PLAYBACK_PAUSED",Wo()),sDa(a,a.youThereData_.showPausedActions));ua(c)})},rDa=function(a){var b,c;
return Ca(function(d){if(1==d.nextAddress)return ta(d,a.playerProvider_().getPlayerPromise(),2);b=d.yieldResult;c=b.getPlayerState();return d.return(-1==c||1==c||3==c)})},tDa=function(a,b){var c;
Ca(function(d){if(1==d.nextAddress){if(a.isUserPredictedAbsent_==b)return d.jumpTo(0);a.isUserPredictedAbsent_=b;return ta(d,a.playerProvider_().getPlayerPromise(),3)}c=d.yieldResult;c.setUserEngagement(b);b&&OS("YOU_THERE_EVENT_TYPE_ABR_TRIGGERED",Wo());ua(d)})},sDa=function(a,b){if(A("handle_service_request_actions")||A("kevlar_youthere_service_endpoint_actions_killswitch"))dV(a.actionSenderElement_,b,a.actionSenderElement_);else
{b=k(b);for(var c=b.next();!c.done;c=b.next())c=c.value,c.commandMetadata&&c.commandMetadata.webCommandMetadata&&c.commandMetadata.webCommandMetadata.sendPost?eV(a.actionSenderElement_,[c]):dV(a.actionSenderElement_,[c],a.actionSenderElement_)}};var uDa=[],vDa=["ytd-section-list-renderer","yt-horizontal-list-renderer","ytd-item-section-renderer","ytd-watch-next-secondary-results-renderer","ytd-video-primary-info-renderer"],xDa=function(a,b){this.usableComponents_=new Map;this.experimentMode_=Ce("polymer_task_manager_status");"disabled"!=this.experimentMode_&&wDa(this,a||uDa,b||vDa)},wDa=function(a,b,c){var d=De("polymer_task_manager_blacklisted_components")||[],e="experimental"==a.experimentMode_,g="production"==a.experimentMode_,h="counterfactual"==
a.experimentMode_;
e&&b.forEach(function(m){a.usableComponents_.set(m,!0)});
(g||e||h)&&c.forEach(function(m){a.usableComponents_.set(m,!0)});
d.forEach(function(m){a.usableComponents_.set(m,!1)})};
Ua(xDa);var kX=null;function lX(a,b){var c={};c.key=a;c.value=b;return mX().then(function(d){return new Promise(function(e,g){try{var h=d.transaction("swpushnotificationsstore","readwrite").objectStore("swpushnotificationsstore").put(c);h.onsuccess=function(){e()};
h.onerror=function(){g()}}catch(m){g(m)}})})}
function nX(a){return mX().then(function(b){return new Promise(function(c,d){var e=b.transaction("swpushnotificationsstore").objectStore("swpushnotificationsstore").get(a);e.onsuccess=function(){var g=e.result;c(g?g.value:null)};
e.onerror=function(){d("Unable to get key \""+a+"\" from object store.")}})},function(){return null})}
function mX(){return kX?Promise.resolve(kX):new Promise(function(a,b){var c=self.indexedDB.open("swpushnotificationsdb");c.onerror=b;c.onsuccess=function(){var d=c.result;if(d.objectStoreNames.contains("swpushnotificationsstore"))kX=d,a(kX);else return self.indexedDB.deleteDatabase("swpushnotificationsdb"),mX()};
c.onupgradeneeded=yDa})}
function yDa(a){a=a.target.result;a.objectStoreNames.contains("swpushnotificationsstore")&&a.deleteObjectStore("swpushnotificationsstore");a.createObjectStore("swpushnotificationsstore",{keyPath:"key"})}
;var zDa=ysa(function(a){var b=vh("DIV");a&&(b.className=a);b.style.cssText="overflow:auto;position:absolute;top:0;width:100px;height:100px";a=vh("DIV");mj(a,"200px","200px");b.appendChild(a);document.body.appendChild(b);a=b.offsetWidth-b.clientWidth;Dh(b);return a});var oX=window.performance&&window.performance.memory,ADa=!1,BDa={},pX={},qX={},DDa=function(){var a=9E4+2E3*Math.random();Rn()>a||CDa()},CDa=function(){var a={metric:{staticContext:pX,
dynamicContext:{viewportHeightPixels:Math.max(document.documentElement?document.documentElement.clientHeight||0:0,window.innerHeight||0),viewportWidthPixels:Math.max(document.documentElement?document.documentElement.clientWidth||0:0,window.innerWidth||0)},webMetric:BDa,webApiSupport:qX}};oX&&(a.metric.webMetric.currentHeapKbytes=Math.round(oX.usedJSHeapSize/1E3));co("systemHealthCaptured",a)};var rX=function(){},EDa=function(){var a=bq(void 0).vpl,b=bq(void 0).cpt;
if(a&&b){var c=oh(document);pq("vpst",c.y);rq("ol",Math.max(a,b))}};
rX.prototype.reset=function(){};
var FDa=function(a){rX.getInstance();gq("cpt")&&xe(Error("Ticking CPT when CPT already ticked"));q.requestAnimationFrame(function(){q.setTimeout(function(){rq("cpt");EDa()})});
try{a()}catch(b){we(b)}q.requestAnimationFrame(function(){rq("bcp")})};
Ua(rX);var GDa=!1,HDa=function(a){if(!GDa&&(a=a||z("ZWIEBACK_PING_URLS"))&&a.length){GDa=!0;for(var b=0;b<a.length;b++)Zo(a[b])}};var sX=function(a){a&=16777215;return ZK([(a&16711680)>>16,(a&65280)>>8,a&255])},tX=function(a){a=[(a&16711680)>>>16,
(a&65280)>>>8,a&255,(a&4278190080)>>>24];var b=sb(a,function(c){return c==(c&255)});
a[3]=(a[3]/255).toFixed(3);if(!b)throw Error("\"("+a.join(",")+"\") is not a valid RGBA color");return"rgba("+a.join(",")+")"};var uX=function(){if(this.constructor===uX)throw new TypeError("VisibilityObserver cannot be instantiated directly.")};
f=uX.prototype;f.dispose=function(){};
f.disconnect=function(){};
f.reconnect=function(){};
f.observe=function(){};
f.unobserveAll=function(){};
f.unobserveByKey=function(){};var vX=function(a,b){b=void 0===b?0:b;uX.call(this);this.observer_=new IntersectionObserver(this.handleObserveEvent_.bind(this),a?{root:a,rootMargin:"-0.1px"}:{rootMargin:"-0.1px"});b="-0.1px -0.1px "+b+"px -0.1px";this.prescanObserver_=new IntersectionObserver(this.handlePrescanEvent_.bind(this),a?{root:a,rootMargin:b}:{rootMargin:b});this.handlers_=new Map;this.isConnected_=!0};
l(vX,uX);f=vX.prototype;f.dispose=function(){this.isConnected_=!1;this.observer_.disconnect();this.prescanObserver_.disconnect();this.handlers_.clear()};
f.disconnect=function(){this.isConnected_=!1;this.observer_.disconnect();this.prescanObserver_.disconnect()};
f.reconnect=function(){if(!this.isConnected_){this.isConnected_=!0;for(var a=k(this.handlers_),b=a.next();!b.done;b=a.next()){var c=k(b.value);b=c.next().value;var d=c.next().value;c=!1;d=k(d.keys());for(var e=d.next();!e.done;e=d.next())if("prescan"==e.value.state){c=!0;break}c&&this.prescanObserver_.observe(b);this.observer_.observe(b)}}};
f.unobserveAll=function(){this.observer_.disconnect();this.prescanObserver_.disconnect();this.handlers_.clear()};
f.handleObserveEvent_=function(a){var b=this;a.forEach(function(c){var d=b.handlers_.get(c.target);if(d){var e=c.isIntersecting;d=k(d);for(var g=d.next();!g.done;g=d.next()){var h=k(g.value);g=h.next().value;h=h.next().value;if("visible"==g.state&&e||"hidden"==g.state&&!e)h(c.target,g.state),g.calledOnce&&b.unobserveByKey({element:c.target,option:g})}}})};
f.handlePrescanEvent_=function(a){var b=this;a.forEach(function(c){var d=b.handlers_.get(c.target);if(d&&c.isIntersecting){d=k(d);for(var e=d.next();!e.done;e=d.next()){var g=k(e.value);e=g.next().value;g=g.next().value;"prescan"==e.state&&(g(c.target,e.state),e.calledOnce&&b.unobserveByKey({element:c.target,option:e}))}}})};
f.observe=function(a,b,c){var d=(d=this.handlers_.get(a))&&d.has(c)?{element:a,option:c}:void 0;if(d)return d;d={element:a,option:c};this.handlers_.has(a)||this.handlers_.set(a,new Map);var e=this.handlers_.get(a);e.has(c)||e.set(c,b);"prescan"==c.state&&this.prescanObserver_.observe(a);this.observer_.observe(a);return d};
f.unobserveByKey=function(a){var b=this.handlers_.get(a.element);b&&b.has(a.option)&&(b.delete(a.option),"prescan"==a.option&&this.prescanObserver_.unobserve(a.element),0==b.size&&(this.handlers_.delete(a.element),this.observer_.unobserve(a.element)))};function IDa(a){if(window.IntersectionObserver)return new vX(a,400);throw new TypeError("Non-IntersectionObserver version of VisibilityObserver is not yet implemented")}
;var wX;var xX=function(a,b,c,d){lk.call(this);this.adElement_=a;this.ad_=b;this.onClose_=c;this.sendPings_=d;this.button_=rh("DIV",{"class":"ads-mute-button"});Rh(this.button_,String.fromCharCode(215));this.survey_=rh("DIV");Qaa(this.survey_,JDa(this));this.undo_=gh("ads-mute-undo",this.survey_);Cm(this.button_,"click",r(this.onMute_,this));this.adElement_.firstElementChild.appendChild(this.button_);a=u.getKeys(this.ad_.mute_survey);paa(a);mb(a,function(e){var g=rh("INPUT",{"class":"yt-uix-form-input-radio",
type:"radio"}),h=rh("SPAN",{"class":"yt-uix-form-input-radio-element"});g=rh("SPAN",{"class":"yt-uix-form-input-radio-container"},g,h);g=rh("LABEL","ads-mute-option",g,e);Cm(g,"click",r(this.onOption_,this,this.ad_.mute_survey[e]));this.survey_.firstChild.appendChild(g)},this);
Cm(this.survey_,"click",dda);Cm(this.undo_,"click",r(this.onUndo_,this));nda(this.dispose,this)};
t(xX,lk);var JDa=function(a){var b=a.ad_.mute_gone||bd,c=a.ad_.mute_question||bd;a=a.ad_.mute_undo||bd;return ad("div",{"class":"ads-mute-survey"},$c(ad("span",{"class":"ads-mute-check"}),ad("b",{},b)," ",c,ad("div",{"class":"ads-mute-undo"},a)))};
xX.prototype.disposeInternal=function(){mb(eh("ads-mute-option",this.survey_),function(a){Gm(a)});
Gm(this.button_);Dh(this.button_);Gm(this.survey_);Dh(this.survey_);Gm(this.undo_)};
xX.prototype.onMute_=function(a){a.stopPropagation();a.preventDefault();this.sendPings_&&Zo(this.ad_.mute_url);this.adElement_.firstElementChild.appendChild(this.survey_);rk(Jh(this.survey_),"contains-mute-survey")};
xX.prototype.onUndo_=function(a){a.stopPropagation();a.preventDefault();this.ad_.mute_undo_url&&this.sendPings_&&Zo(this.ad_.mute_undo_url);tk(Jh(this.survey_),"contains-mute-survey");Dh(this.survey_)};
xX.prototype.onOption_=function(a,b){b.stopPropagation();b.preventDefault();this.sendPings_&&Zo(a);Dh(this.adElement_);this.onClose_();this.dispose()};var yX=["server_prefetched_vast","vmap"],KDa=function(a){if("1"!==u.getValueByKeys(z("PLAYER_CONFIG",{}),"args","privembed")){a&&Xca();try{Iya().then(function(){},function(){}),Im(KDa,18E5)}catch(b){we(b)}}},LDa=function(a){if(null!=a){var b=[];
A("ima_prevent_mpu_queries_on_cached_playback")&&0>yX.indexOf("ad3_module")&&yX.push("ad3_module");yX.forEach(function(c){c in a&&(delete a[c],b.push(c))});
a.cached_load="1"}};var zX="",AX=[],MDa="",NDa=function(a,b){var c=a.media_template_data;(c=Wa(c)?ub(c,function(d){return!!d.imageUrl}):null)?(MDa=c.videoId,c={video_id:c.videoId,
ad_type:"watch_related",headline:pd(a.line1),image_url:c.imageUrl,description1:pd(a.line2),description2:pd(a.line3),channel_title:c.channelName,visible_url:pd(a.visible_url)},zX=pd(a.url),ox(new cx(zX),"adurl"),gc(xd(a.creative_view_url))||AX.push(BX(pd(a.creative_view_url))),gc(xd(a.p_creative_view_url))||AX.push(BX(pd(a.p_creative_view_url))),gc(xd(a.engaged_view_url))||BX(pd(a.engaged_view_url)),gc(xd(a.p_engaged_view_url))||BX(pd(a.p_engaged_view_url)),gc(xd(a.videoplaytime_25_url))||BX(pd(a.videoplaytime_25_url)),
gc(xd(a.p_videoplaytime_25_url))||BX(pd(a.p_videoplaytime_25_url)),gc(xd(a.videoplaytime_50_url))||BX(pd(a.videoplaytime_50_url)),gc(xd(a.p_videoplaytime_50_url))||BX(pd(a.p_videoplaytime_50_url)),gc(xd(a.videoplaytime_75_url))||BX(pd(a.videoplaytime_75_url)),gc(xd(a.p_videoplaytime_75_url))||BX(pd(a.p_videoplaytime_75_url)),gc(xd(a.videoplaytime_100_url))||BX(pd(a.videoplaytime_100_url)),gc(xd(a.p_videoplaytime_100_url))||BX(pd(a.p_videoplaytime_100_url)),Vm("/pyv?"+xi(c),{format:"XML",onSuccess:function(d,
e){b&&b(d,e)},
onError:function(){CX()},
convertToSafeHtml:!0})):CX()},PDa=function(a){rq("parc");
0==a.length?CX():NDa(a[0],function(b,c){b=c.html_content;if(c=bh(document,window.pyv_related_box_id||"watch-related")){var d=c.innerHTML;b&&0!=d.indexOf(Wc(b))&&c.insertBefore(wh(document,b),c.firstChild);if(b=bh(document,"pyv-watch-related-dest-url"))c=!z("PYV_DISABLE_MUTE")&&a[0].mute_url&&a[0].mute_survey,b.setAttribute("href",zX),c&&(b=Jh(b),rk(b,"contains-mute-button"),new xX(b,a[0],Ta,!0));rq("parn");ODa();mb(AX,function(e){Zo(e,void 0,XAa(e))})}})};
window.google_ad_request_done=function(a){PDa(a)};
var ODa=function(){var a=Sa("yt.www.watch.player.getClientPlaybackNonce")||raa();a={ad_id:"",ad_sys:"",ad_v:MDa,break_type:6,content_v:z("VIDEO_ID",void 0),cpn:a(),device:"1",devicever:"html5",ei:z("GET_PLAYER_EVENT_ID",void 0),el:"detailpage",event:2,format:"2_6",mt:"0",ns:1,slot_pos:"0",ver:"2.0",wt:new Date().getTime()};a=Ai("/api/stats/ads",a);Zo(a,void 0,XAa(a))},CX=function(){var a=z("TIMING_WAIT",[]);
zb(a,"parn")&&(re("TIMING_WAIT",a),dq())},BX=function(a){if("https:"==window.location.protocol){var b=new cx(a);
if("https"==b.getScheme())return a;b.setScheme("https");return b.toString()}return a};function DX(a){return{runs:[{text:a}]}}
function EX(){return{ignoreNavigation:!0}}
function QDa(a){return a?pb(a,function(b){return DX(b.top_level)}):[]}
function RDa(a,b){if(b=b.why_this_ad)b={menuRenderer:{items:[{menuNavigationItemRenderer:{text:DX(b.menu),navigationEndpoint:{adInfoDialogEndpoint:{dialog:{adInfoDialogRenderer:{title:DX(b.targeting_reason_header),dialogMessage:{runs:[{text:b.message_left},{text:b.message_hypertext,navigationEndpoint:{loggingUrls:[{baseUrl:b.ad_settings_tracking_url}],urlEndpoint:{url:"https://www.google.com/settings/ads",target:"TARGET_NEW_WINDOW"},commandMetadata:EX()}},{text:b.message_right}]},confirmLabel:DX(b.got_it),
confirmServiceEndpoint:{loggingUrls:[{baseUrl:b.confirm_tracking_url}],pingingEndoint:{hack:!0},commandMetadata:EX()},adReasons:QDa(b.targeting_reasons)}}},commandMetadata:EX()}}}]}},a.menu=b}
;var FX=function(){this.playerResolver_=fw();this.playerPromise_=this.playerResolver_.promise;this.playerVars_=null;this.playbackEndedCallback_=Ta;this.playbackDurationSeconds_=0},SDa=function(a){if(window.YT&&Za(window.YT.ready))return bw(window.YT);
var b=fw(),c=vh("SCRIPT");c.onload=c.onreadystatechange=function(){c.readyState&&"loaded"!=c.readyState&&"complete"!=c.readyState||(c.onload=Ta,c.onreadystatechange=Ta,c.onerror=Ta,window.YT&&Za(window.YT.ready)?b.resolve(window.YT):b.reject(Error("Failed to load the iframe player library")))};
c.onerror=function(){c.onload=Ta;c.onreadystatechange=Ta;c.onerror=Ta;b.reject(Error("Failed to load the iframe player library"))};
jd(c,dc(Sb("https://www.youtube.com/iframe_api")));a.insertBefore(c,a.firstChild);return b.promise},TDa=function(a,b,c){var d;
Ca(function(e){if(1==e.nextAddress)return a.playbackEndedCallback_=c,ta(e,SDa(Jh(b)),2);d=e.yieldResult;d.ready(function(){return new d.Player(b,{playerVars:{controls:0,enablejsapi:1,iv_load_policy:3,modestbranding:1,mute:1,rel:0,showinfo:0},events:{onReady:a.onPlayerReady_.bind(a),onStateChange:a.onPlayerStateChange_.bind(a),onCueRangeExit:a.onCueRangeExit_.bind(a)}})});
ua(e)})};
f=FX.prototype;f.getPlayerPromise=function(){return this.playerPromise_};
f.onPlayerReady_=function(a){this.playerResolver_.resolve(a.target)};
f.onPlayerStateChange_=function(a){if(a.data==YT.PlayerState.PLAYING){a=a.target;var b=a.getCurrentTime();a.addCueRange("playback",b,b+this.playbackDurationSeconds_)}};
f.onCueRangeExit_=function(a){"playback"==a.data&&(a.target.stopVideo(),this.playbackEndedCallback_())};
f.stopVideo=function(){this.playerPromise_.then(function(a){a.stopVideo()})};
f.playVideo=function(){var a=this;this.playerVars_&&this.playerPromise_.then(function(b){b.loadVideoByPlayerVars(a.playerVars_)})};
var UDa=function(a,b,c,d){b&&(Ia(c)||(c=0),Ia(d)||(d=0),a.playbackDurationSeconds_=d/1E3,a.playerVars_={adformat:"1_8",videoId:b,suggestedQuality:"hd720",startSeconds:c/1E3},a.playerPromise_.then(function(e){e.cueVideoByPlayerVars(a.playerVars_)}))};
FX.prototype.mute=function(){this.playerPromise_.then(function(a){a.mute()})};
FX.prototype.unMute=function(){this.playerPromise_.then(function(a){a.unMute()})};
function VDa(a){if(a.urlEndpoint){if(a=mm(a.urlEndpoint.url),a.adurl)return nd(a.adurl)}else if(a.watchEndpoint)return"//www.youtube.com/watch?v="+a.watchEndpoint.videoId;return null}
function WDa(a){if(!a||!a.reportingPings)return null;var b={};a.reportingPings.forEach(function(c){b[c.pingType]=c.url});
return{adpings:km(b)}}
;var XDa={FONT_FAMILY_YTSANS_MEDIUM:"YT Sans:300,500,700"},YDa=function(){this.deferedLoadFont_=new qp(3,"eocs")};
YDa.prototype.addFont_=function(a){var b=vh("LINK");b.type="text/css";b.setAttribute("name","www-webfont");for(var c=[],d=0;d<a.length;++d)c.push(XDa[a[d]]);a=cc(Sb("//fonts.googleapis.com/css?family=%{fonts}"),{fonts:c.join(",")});id(b,a,"stylesheet");document.head.appendChild(b)};var ZDa={PAUSE_CHAT:18};function $Da(){return"granted"!=Notification.permission?Promise.resolve():GX().then(function(a){return a?a.pushManager.getSubscription().then(function(b){return b?Promise.resolve():a.pushManager.subscribe({userVisibleOnly:!0}).then(function(){return Promise.resolve()},function(){return Promise.resolve()})}):Promise.resolve()}).catch(function(){})}
function aEa(){bEa({type:"notifications_register",data:z("ID_TOKEN")})}
function GX(){return navigator.serviceWorker.getRegistration(Ce("service_worker_scope"))}
function cEa(a){return!(!a||!a.pushManager)}
function bEa(a){GX().then(function(b){if(!b||!b.active)return Promise.reject();b.active.postMessage(a);return Promise.resolve()})}
;var dEa=!1;function eEa(){if(!se("LOGGED_IN"))return Promise.resolve(!1);var a=Ce("service_worker_push_force_notification_prompt_tag");return a?nX("PromptTags").then(function(b){if(!b)return!0;var c=[];try{c=JSON.parse(b)}catch(d){return!1}return c&&-1==c.indexOf(a)}):Promise.resolve(!1)}
function fEa(a){a=void 0===a?!1:a;return(navigator.serviceWorker&&navigator.serviceWorker.getRegistration&&window.Notification?GX().then(cEa):Promise.resolve(!1)).then(function(b){if(!b)return Promise.resolve();b=$Da().then(function(){bEa({type:"notifications_check_registration",data:z("ID_TOKEN")})});
return"default"!=Notification.permission?b:b.then(function(){return gEa(a)}).then(function(c){if(c)return hEa(),iEa().then(function(){})})})}
function gEa(a){return se("SERVICE_WORKER_PROMPT_NOTIFICATIONS")||se("LOGGED_IN")&&(void 0===a?0:a)?eEa().then(function(b){if(b)return!0;b=[jEa(),kEa()];se("LOGGED_IN")||b.push(lEa());return Promise.all(b).then(function(c){return c.every(function(d){return d})})}):Promise.resolve(!1)}
function lEa(){var a=Be("service_worker_push_logged_out_prompt_watches");return-1==a?Promise.resolve(!1):nX("WatchCount").then(function(b){return b>=a})}
function iEa(){var a=arguments;A("service_worker_push_prompt_modal_enable")&&mEa();return Notification.requestPermission().then(function(b){HX();var c=document.getElementById("ticker");c&&(c.className=c.classList.remove("show"));if("granted"==b)return $Da().then(function(){lX("NotificationsDisabled",!1);aEa();return Promise.resolve(!0)});
"denied"==b&&aEa();return Promise.resolve(!1)}).catch(function(){HX();
return Promise.reject.apply(Promise,ka(a))})}
function hEa(){nX("PromptCount").then(function(a){return lX("PromptCount",a+1)}).then(function(){return lX("PromptTime",fb())}).then(function(){var a=Ce("service_worker_push_force_notification_prompt_tag");
if(a)return nX("PromptTags").then(function(b){var c=[];if(b)try{c=JSON.parse(b)}catch(d){return!1}c||(c=[]);c.push(a);return lX("PromptTags",JSON.stringify(c))})})}
function jEa(){return-1==Be("service_worker_push_prompt_cap")?Promise.resolve(!0):nX("PromptCount").then(function(a){a||(a=0);return Promise.resolve(a<Be("service_worker_push_prompt_cap"))})}
function kEa(){var a=Be("service_worker_push_prompt_delay_microseconds");return a?nX("PromptTime").then(function(b){return Promise.resolve(fb()-a>(b||0))}):Promise.resolve(!0)}
function nEa(){dEa||HX()}
function oEa(a){a.style.zIndex=2147483648;a.style.pointerEvents="auto";a.style.backgroundColor="rgba(0, 0, 0, 0.6)";a.style.width="100%";a.style.height="100vh";a.style.position="absolute";a.style.top="0";a.style.left="0";a.style.border="none"}
function mEa(){var a=bh(document,"yt-push-prompt-modal-bg");dEa=A("service_worker_push_prompt_modal_ignore_click");a?oEa(a):(a=rh("div",{id:"yt-push-prompt-modal-bg"}),oEa(a),document.body.appendChild(a),Fm(document,"click",nEa))}
function HX(){var a=bh(document,"yt-push-prompt-modal-bg");a&&Dh(a)}
;function pEa(a){return cEa(a)?fEa():Promise.resolve()}
;function qEa(){-1!=Be("service_worker_push_logged_out_prompt_watches")&&nX("WatchCount").then(function(a){100<=a||lX("WatchCount",a+1)})}
;var rEa=function(a){var b=new PK(z("ONE_PICK_URL"));b.urlParamMap_.set("hostId",a);(a=z("GAPI_LOCALE"))&&b.setLocale(a);(a=z("SESSION_INDEX"))&&b.setAuthUser(a);(a=z("DELEGATED_SESSION_ID"))&&b.urlParamMap_.set("groupId",a);return b};var vEa=function(){if(!se("SERVICE_WORKER_KILLSWITCH")&&navigator.serviceWorker&&navigator.serviceWorker.getRegistrations&&"https:"==window.location.protocol)if(A("service_worker_enabled")){var a="/sw.js",b=z("SERVICE_WORKER_VFL",void 0);b&&(a+="?vfl="+b);a=sEa(a);A("service_worker_push_enabled")&&a.then(tEa).then(pEa)}else uEa()},uEa=function(){navigator.serviceWorker.getRegistrations().then(function(a){a.forEach(wEa)})},tEa=function(a){var b=a.installing||a.waiting;
return a.active||!b?Promise.resolve(a):new Promise(function(c){var d=function(e){if("activated"==e.target.state||"redundant"==e.target.state)b.removeEventListener("statechange",d),c(a)};
b.addEventListener("statechange",d)})},wEa=function(a){a&&sEa("/sw.js?0",a.scope)},sEa=function(a,b){return navigator.serviceWorker.register(a,{scope:b||Ce("service_worker_scope")||"/"})};var xEa=function(a){var b=["h","m","s"],c=Cb(b);c.reverse();var d={};a=a.toLowerCase().match(/\d+\s*[hms]?/g)||[];a=nb(a,function(h){var m=(h.match(/[hms]/)||[""])[0];return m?(d[m]=parseInt(h.match(/\d+/)[0],10),!1):!0});
for(a.reverse();a.length&&c.length;){var e=c.shift();e in d||(d[e]=parseInt(a.shift(),10))}if(a.length||59<d.s||59<d.m||9<d.h)return null;var g="";mb(b,function(h){d[h]&&(g+=d[h]+h)});
return g||null};var yEa=199/210,zEa=297/313,AEa=485/210,BEa=new FM(0,0,.4,0,.2,1,1,1);var IX=function(a,b,c,d){this.translateX=a;this.translateY=b;this.scaleX=c;this.scaleY=d},CEa=function(a){return"translateX("+a.translateX+"px) translateY("+(a.translateY+"px) scaleX(")+(a.scaleX+") scaleY(")+(a.scaleY+")")};var DEa=function(a,b){this.startTransform=a;this.endTransform=b;this.cubicBezier_=BEa;this.progress_=0},EEa=function(a){return new IX(JX(a,a.startTransform.translateX,a.endTransform.translateX,a.progress_),JX(a,a.startTransform.translateY,a.endTransform.translateY,a.progress_),JX(a,a.startTransform.scaleX,a.endTransform.scaleX,a.progress_),JX(a,a.startTransform.scaleY,a.endTransform.scaleY,a.progress_))},JX=function(a,b,c,d){return 0>=d?b:1<=d?c:GM(a.cubicBezier_,d)*(c-b)+b};var KX=function(a,b){this.component_=a;this.numItemPerLine_=0;this.isMultipleLine_=b;this.currentAnimateState_="steady-state";this.deferredAnimation_=new qp(2,"eocs");this.isAnimating_=!1;this.animationStartTime_=0;this.posterAnimationPath_=new WeakMap;this.hoveringIndex_=-1};
KX.prototype.resetSteadyState=function(a){this.deferredAnimation_&&this.deferredAnimation_.cancel();LX(this,a,"steady-state")};
var GEa=function(a,b,c,d){for(var e=0;e<c.length;++e)c[e].isPrevHovering=c[e].isHovering,c[e].isHovering=!1;if("hovering"==d&&(b&&(b.target.isHovering=!0),"steady-state"==a.currentAnimateState_)){b=0;0<c.length&&(e=c[0].parentElement,e.style.width=e.clientWidth+"px",e.style.height=e.clientHeight+"px");for(var g=e=0;g<c.length;++g){c[g].style.position="absolute";var h=new IX(b,e,1,1);c[g].updateTransform(h);a.posterAnimationPath_.set(c[g],new DEa(h,h));b+=214;a.isMultipleLine_&&MX(a,c,g)&&(e+=337,
b=0)}}b=-1;for(e=0;e<c.length;++e)if(c[e].isHovering){b=e;break}a.hoveringIndex_=b;for(b=0;b<c.length;++b)e=a.posterAnimationPath_.get(c[b]),e.startTransform=EEa(e),e.progress_=0;b=FEa(a,c,0);for(g=e=0;g<c.length;++g){h=b;var m=1,n=1;-1==a.hoveringIndex_||a.isMultipleLine_&&!NX(a,g,a.hoveringIndex_)||(g==a.hoveringIndex_?(h+=145.5,m=AEa,n=1):(m=yEa,n=zEa));a.posterAnimationPath_.get(c[g]).endTransform=new IX(h,e,m,n);b+=g==a.hoveringIndex_?501:214;a.isMultipleLine_&&MX(a,c,g)&&(e+=337,b=FEa(a,c,g+
1))}LX(a,c,d);a.deferredAnimation_&&a.deferredAnimation_.cancel();a.isAnimating_=!0;a.animationStartTime_=Hm();sp(a.deferredAnimation_,a.animateFrame_.bind(a,c))};
KX.prototype.animateFrame_=function(a){if(this.isAnimating_){for(var b=Hm()-this.animationStartTime_,c=Math.min(1,b/200),d=0;d<a.length;++d){var e=this.posterAnimationPath_.get(a[d]);e&&(e.progress_=c,a[d].updateTransform(EEa(e)))}this.isAnimating_=200>b;sp(this.deferredAnimation_,this.animateFrame_.bind(this,a))}else for("after-hover"==this.currentAnimateState_&&LX(this,a,"steady-state"),b=0;b<a.length;++b)a[b].isPrevHovering=!1};
var FEa=function(a,b,c){(c=-1==a.hoveringIndex_||a.isMultipleLine_&&!NX(a,c,a.hoveringIndex_))||(c=a.hoveringIndex_,c=a.component_.startIndex?c==a.component_.startIndex:0==c%a.numItemPerLine_);return c?0:MX(a,b,a.hoveringIndex_)?-275:-145.5},MX=function(a,b,c){return a.component_.endIndex?c==a.component_.endIndex:0==(c+1)%a.numItemPerLine_||b.length-1==c},LX=function(a,b,c){for(var d=0;d<b.length;++d)-1==a.hoveringIndex_||NX(a,d,a.hoveringIndex_)?b[d].set("state",c):b[d].set("state","after-hover"),
"steady-state"==c&&(b[d].style.position="",b[d].updateTransform(null));
0<b.length&&(d=b[0].parentElement,0<b.length&&"steady-state"==c?(d.style.width="",d.style.height="",d.classList.remove("hovering")):d.classList.add("hovering"));a.currentAnimateState_=c},NX=function(a,b,c){return-1!=b&&-1!=c&&b-b%a.numItemPerLine_==c-c%a.numItemPerLine_};function OX(a,b,c,d,e){var g={};b&&(g[b]=c);d?g.errorType=d:e&&(g.errorReason=e);co(a,g);eo()}
function PX(a,b,c,d){var e={};e.serializedTransactionFlowLoggingParams=b;c&&(e.errorType=c);d&&(e.errorMessage=d);co(a,e);eo()}
function QX(a,b,c,d,e){var g={};b&&(g.serializedYpcFamilyCreateLoggingParams=b);c&&(g.inviteStatus=c);d?g.createErrorType=d:e&&(g.inviteErrorType=e);co(a,g);eo()}
function HEa(a){a&&PX("transactionFlowStarted",a)}
function IEa(a){a&&PX("transactionFlowCancelled",a)}
function RX(a,b,c){b&&PX("transactionFlowFailed",b,a,c)}
function JEa(){OX("ypcRedeemFlowStarted")}
function SX(a){OX("ypcRedeemFlowFailed",void 0,void 0,void 0,a)}
function KEa(a){a&&OX("ypcCancelFlowFailed","serializedYpcCancelFlowLoggingParams",a,void 0,"YPC_ERROR_REASON_YPC_CANCEL_RECURRENCE_TRANSACTION_FAILURE")}
;var LEa=function(){var a={};u.extend(a,{label:"mb-api-loading",pageName:z("PAGE_NAME")});a=xi(a);Zo("/gen_204?a=ypc-checkout"+(a?"&"+a:""),void 0)};var TX=function(){this.megabloxUrl_=null};
Ua(TX);TX.prototype.load=function(a){LEa();this.megabloxUrl_=z("YPC_MB_URL",void 0);QR(this.megabloxUrl_,r(function(){a&&a()},this))};
var NEa=function(a,b,c,d,e,g,h,m,n){HEa(n);a.load(r(function(){MEa(this,b,c,d,e,g,h,m,n)},a))};
TX.prototype.openFixFlowDialog=function(a,b,c,d){this.load(r(function(){try{var e=Sa("payments.business.integration");OEa(this,e).forWidget().fixInstrument().withEncryptedParameters(a).withIntegratorCallback(b).load(c,d)}catch(g){throw we(g,void 0,void 0,void 0,!0),g}},this))};
var OEa=function(a,b,c,d,e){var g=b.mashupMode.popup("buyFlowDivId").usingDraggableDialog().usingPreferredWidth(600);A("enable_window_constrained_buy_flow_dialog")&&(g=g.usingPopupStyle(Sa("payments.business.integration").PopupStyle.WINDOW_CONSTRAINED));e&&(g=g.usingCloseCallback(e));b.bootstrap.fromPaymentsUrl(a.megabloxUrl_);a=b.bootstrap.asMashupMode(g);c=c?c:z("YPC_GB_LANGUAGE");a.usingGaiaIndex(d?d:z("SESSION_INDEX")).usingLocale(c).usingDefaultActivityStatusChangeHandler().usingStyle(":md;pc=#444;ac=#065fd4").usingBaseZIndex(2E9);
return a},MEa=function(a,b,c,d,e,g,h,m,n){try{var p=Sa("payments.business.integration"),x=p.standaloneContextAuthId.forUserId(),y=OEa(a,p,g,void 0,m);
h&&y.usingServerAnalyticsEventHandler(h);y.inStandaloneContext(x).buyFlow(function(B){!B||B.integratorData&&""!==B.integratorData&&!B.error||(null!=B.error?"-1"===String(B.error)?IEa(n):(RX("TRANSACTION_ERROR_TYPE_YPC_BUYFLOW_COMPLETE_FAILURE",n,B.debugCode),we(Error("PAYMENT_ERROR_MESSAGE::"+B.userVisibleErrorMessage+" PAYMENT_ERROR_DETAILS::"+B.internalErrorDetails),void 0,void 0,void 0,!0)):(RX("TRANSACTION_ERROR_TYPE_YPC_BUYFLOW_COMPLETE_EMPTY",n),we(Error("IntegratorData not present in BuyFlow Complete Callback"))));
c&&c(B)}).withEncryptedParameters(b).load(d,function(B){RX("TRANSACTION_ERROR_TYPE_LOAD_FAILURE",n,B?B.debugCode:void 0);
we(B,void 0,void 0,void 0,!0);e&&e(B)})}catch(B){throw we(B,void 0,void 0,void 0,!0),B;
}};var PEa=function(a,b){var c=z("SESSION_INDEX");this.actionToken_=a;this.commonToken_=b;this.sessionIndex_=c},QEa=function(a){var b=fw(),c=Sa("payments.business.integration.bootstrap"),d=Sa("payments.business.integration"),e=d.Style.create().withMaterialDesignStyle(),g=d.mashupMode.popup("instrument-manager");
c.asMashupMode(g).usingUserIndex(a.sessionIndex_).usingDefaultActivityStatusChangeHandler().usingStyle(e).inStandaloneContext(d.standaloneContextAuthId.forUserId()).instrumentManager(a.actionToken_,0<a.commonToken_.length?a.commonToken_:void 0,function(h){var m=h.instrumentId;m?b.resolve(m):(m=Sa("payments.business.integration.scenario.InstrumentManager"),b.reject(h.errorCode&&h.errorCode===m.FailureReason.CANCELLED?"instrumentManagerCancelled":"instrumentManagerCallbackError"))}).load(null,function(h){we(h);
b.reject("instrumentManagerLoadError")});
return b.promise};var REa=/^(?:https:)?\/\/[0-9a-z-.]+\.(google|youtube)\.com\//;var SEa=function(a){return a.filter(function(b){return"ypcGetCartEndpoint"in b})},TEa=function(a){return a.filter(function(b){return!("ypcGetCartEndpoint"in b)})};var UEa=function(a){if(!bh(document,"gtm")){window.dataLayer=window.dataLayer||[];window.dataLayer.push({"gtm.start":new Date().getTime(),event:"gtm.js"});var b=vh("SCRIPT");b.async=!0;jd(b,cc(Sb("//www.googletagmanager.com/gtm.js?id=%{id}"),{id:a}));b.id="gtm";a=document.getElementsByTagName("script");0==a.length?document.head.appendChild(b):(a=a[0],a.parentNode.insertBefore(b,a))}},UX=function(a){if(a=JSON.parse(a))window.dataLayer=window.dataLayer||[],window.dataLayer.push(a)};var VX=function(a,b){this.payloadName="transactionFlowFailed";this.payload={errorType:a,serializedTransactionFlowLoggingParams:b}};
Na("yt.ypc.shared.YpcTransactionFlowError",VX,void 0);var VEa=Sb("https://clients2.google.com/gr/gr_sync.js"),WEa=function(){this.logger_=null};
WEa.prototype.init=function(){if(WX()){var a=fw();a.resolve();return a.promise}return VJ(cc(VEa,{})).then(function(){if(!WX())throw Error("RiskService loaded but risk object does not exists")},function(){throw Error("RiskService loading is rejected, reason:");
})};
var WX=function(){return null!=window.google&&null!=window.google.gr};var XX={},YX={enableActiveViewMeasurement:function(a,b){this.isActiveViewEnabled_(a)&&this.registerAdForMonitoring_(a,b)},
isActiveViewEnabled_:function(a){return null!=a&&(this.hasAtLeastOneUrl_(a.viewableCommands)||this.hasAtLeastOneUrl_(a.endOfSessionCommands))},
hasAtLeastOneUrl_:function(a){return!!a&&0<a.length&&null!=a[0].loggingUrls&&0<a[0].loggingUrls.length},
appendClientVersion_:function(a){if(/&v=[^&]+/.test(a))return a;var b=z("INNERTUBE_CONTEXT_CLIENT_VERSION","");return""===b?a:a+"&v="+encodeURIComponent(b)},
setPingUrlAttribute_:function(a,b){var c=[];if(a){a=k(a);for(var d=a.next();!d.done;d=a.next())if(d=d.value,d.loggingUrls){d=k(d.loggingUrls);for(var e=d.next();!e.done;e=d.next())e=e.value,e.baseUrl&&(e=this.appendClientVersion_(e.baseUrl),c.push(e))}}return 0<c.length?(c=c.join("|"),this.setAttribute(b,c),!0):!1},
registerAdForMonitoring_:function(a,b){this.classList.add("GoogleActiveViewElement");this.setAttribute("id","YtKevlarVisibilityIdentifier");this.setAttribute("googleAvRs",b);var c="data-"+Dd("googleAvCxn");b="data-"+Dd("googleEOSAvCxn");c=a.viewableCommands&&this.setPingUrlAttribute_(a.viewableCommands,c);a=a.endOfSessionCommands&&this.setPingUrlAttribute_(a.endOfSessionCommands,b);if(c||a)UE.getInstance(),b=dE(fE,this),a=wE(uE,Ge,!1),a.r="ac",b?(uE.dbg.adBlocksRegistered=Ge.__google_lidar_,b.activeviewPingSent||
lja([b],a,void 0),mja([b],a),Mia(b)):(b=Ge.osdsir)&&b(Ge,a),wja(UE.getInstance(),this)}};var XEa={_noAccessors:!0,properties:{scrollRate:{type:Number,value:3},scrollTarget:Object,autoScrollEnabled:Boolean},observers:["observeAutoScrollEnabled_(autoScrollEnabled)"],created:function(){this.autoScrollAnimationStart_=0;this.autoScrollPaused_=!1;this.autoScrollRafId_=0;this.boundAutoScrollHandler_=this.autoScroll_.bind(this)},
detached:function(){this.unlisten(this,"mouseout","startAutoScroll_");this.unlisten(this,"click","endAutoScroll_");this.unlisten(this,"mouseover","endAutoScroll_");this.endAutoScroll_&&this.endAutoScroll_()},
observeAutoScrollEnabled_:function(a){a?(this.listen(this,"mouseout","startAutoScroll_"),this.listen(this,"click","endAutoScroll_"),this.listen(this,"mouseover","endAutoScroll_"),this.startAutoScroll_()):(this.unlisten(this,"mouseout","startAutoScroll_"),this.unlisten(this,"click","endAutoScroll_"),this.unlisten(this,"mouseover","endAutoScroll_"),this.endAutoScroll_())},
autoScroll_:function(a){this.autoScrollAnimationStart_||(this.autoScrollAnimationStart_=a);if(!this.autoScrollPaused_&&this.scrollTarget&&!this.hasScrolledToBottom_(this.scrollTarget)){var b=1E3/this.scrollRate;a-=this.autoScrollAnimationStart_;a>b&&(this.scrollTarget.scrollTop+=Math.ceil(a/b),this.autoScrollAnimationStart_=0);this.startAutoScroll_()}},
hasScrolledToBottom_:function(a){return a.scrollHeight-a.scrollTop==a.clientHeight},
startAutoScroll_:function(){this.autoScrollPaused_=!1;this.autoScrollRafId_=window.requestAnimationFrame(this.boundAutoScrollHandler_)},
endAutoScroll_:function(){this.autoScrollPaused_=!0;window.cancelAnimationFrame(this.autoScrollRafId_)}};var ZX={},T={YtActionSenderBehavior:{_noAccessors:!0,sendAction:function(a,b){return cV(this,a,b)},
sendOptionalAction:function(a,b){return cV(this,a,b,!0)},
sendSingletonAction:function(a,b){return cV(this,a,b)[0]},
sendInnerTubeActions:function(a,b,c){dV(this,a,b,c)},
sendServiceRequestAction:function(a){return eV(this,a)}}};var U={};U.YtActionHandlerBehavior=[T.YtActionSenderBehavior,{actionMap:{},attached:function(){this.registerActionMap(this.actionMap)},
detached:function(){this.unregisterActionMap(this.actionMap)},
registerActionMap:function(a){if(A("kevlar_batched_action_map"))for(var b=$U.getInstance(),c=k(Object.keys(a)),d=c.next();!d.done;d=c.next()){var e=d.value;d=a[e];if(this&&this[d]){var g=b.actionRoutingMap.get(e);g||(g=new Map,b.actionRoutingMap.set(e,g));g.set(this,ve(this[d].bind(this)))}else e=Error("Unable to register undefined function"),e.params=d,we(e)}else for(b=k(Object.keys(a)),c=b.next();!c.done;c=b.next())c=c.value,(c=this.createRegisterActionDetail_(c,a[c]))&&this.registerAction_(c)},
unregisterActionMap:function(a){if(A("kevlar_batched_action_map")){var b=$U.getInstance();a=k(Object.keys(a));for(var c=a.next();!c.done;c=a.next())(c=b.actionRoutingMap.get(c.value))&&c.delete(this)}else for(b=k(Object.keys(a)),a=b.next();!a.done;a=b.next())this.unregisterAction_(new ZAa(a.value,this))},
registerAction_:function(a){this.fire("yt-register-action",a)},
unregisterAction_:function(a){this.fire("yt-unregister-action",a,{node:document})},
createRegisterActionDetail_:function(a,b){var c=this[b];if(c)return new YAa(a,this,c);a=Error("Unable to register undefined function");a.params=b;we(a);return null}}];var $X={},YEa="accountDisconnectionEndpoint accountIntegrationEndpoint accountLinkCommand accountUnlinkCommand addToRemoteQueueEndpoint clearRemoteQueueEndpoint insertInRemoteQueueEndpoint pingingEndpoint removeFromRemoteQueueEndpoint".split(" "),ZEa=["updatedMetadataEndpoint"],$Ea=["GET_UNSEEN_CONVERSATION_COUNT","GET_UNSEEN_NOTIFICATION_COUNT","REGISTER_USER_TANGO_INVALIDATION"],aY=function(){},bY=function(a,b){this.data=a;
this.actions=b};
$X.YtEndpointHandlerBehavior=[U.YtActionHandlerBehavior,T.YtActionSenderBehavior,{_noAccessors:!0,created:function(){this.endpointHandlerActionMap_={"yt-service-request":"handleServiceRequest_"};this.serviceEndpointHandlers_=[]},
attached:function(){this.registerActionMap(this.endpointHandlerActionMap_)},
detached:function(){this.unregisterActionMap(this.endpointHandlerActionMap_)},
registerServiceEndpointHandler:function(a){this.serviceEndpointHandlers_.push(a)},
handleServiceRequest_:function(a,b,c){var d=new aY;d.endpoint=b;var e=fBa(b);e&&(this.sendInnerTubeActions(e,a,c),d.actions=e);!A("kevlar_logging_urls_killswitch")&&b.loggingUrls&&b.loggingUrls.forEach(function(h){h.baseUrl&&Zo(h.baseUrl)});
e=A("log_web_endpoint_to_layer")&&a.getScreenLayer?a.getScreenLayer():void 0;(e=Wo(e))&&b.clickTrackingParams&&!this.isPollingEndpoint_(b)&&!this.hasNavigationLogging_(a)&&Co(e,go(b.clickTrackingParams),void 0);e=!1;for(var g=0;g<this.serviceEndpointHandlers_.length;g++)if((0,this.serviceEndpointHandlers_[g])(a,b,c)){e=!0;break}!e&&this.shouldSendNetworkRequest_(b)&&(d.ajaxPromise=this.sendServiceAjax_(a,b,c));return d},
hasNavigationLogging_:function(a){return(a=a.data&&a.data.navigationEndpoint)&&!!a.clickTrackingParams},
isPollingEndpoint_:function(a){if(a.signalServiceEndpoint){var b=a.signalServiceEndpoint.signal;if(b&&0<=$Ea.indexOf(b))return!0}for(var c in a)if(0<=ZEa.indexOf(c))return!0;return!1},
shouldSendNetworkRequest_:function(a){if(a.signalServiceEndpoint&&"CLIENT_SIGNAL"==a.signalServiceEndpoint.signal)return!1;for(var b in a)if(0<=YEa.indexOf(b))return!1;a=Object.keys(a);return 1==a.length&&"loggingUrls"==a[0]?!1:!0},
getCancellableNetworkPromise_:function(a,b,c,d){var e=this,g=a.requestDataForServiceEndpoint(c,d),h=fw();jw(h.promise,function(){e.handleOnFailureAction_(c,b);g.cancel("Resolver promise rejected")});
g.then(function(m){if(m){if(m.data){m.data.trackingParams&&!A("kevlar_attach_service_response_killswitch")&&e.logServiceAjaxResponse_(b,m.data.trackingParams);var n=gBa(m.data);n&&e.sendInnerTubeActions(n,b);h.resolve(new bY(m.data,n))}m.error&&h.reject(Error(m.error))}else e.handleOnFailureAction_(c,b),h.reject(Error("Invalid service endpoint provided: "+JSON.stringify(c)))},function(m){h.reject(m)},this);
return h.promise},
sendServiceAjax_:function(a,b,c){var d;return(d=a.getNetworkManager&&a.getNetworkManager()?a.getNetworkManager():this.getInterface(BW))?this.getCancellableNetworkPromise_(d,a,b,c):cw("No network manager.")},
logServiceAjaxResponse_:function(a,b){var c=a.getScreenLayer?a.getScreenLayer():void 0;a=Wo(c);c=Vo(c);a&&c&&(b=go(b),CS(a,c,b),this.sendOptionalAction("yt-store-grafted-ve-action",[b]))},
handleOnFailureAction_:function(a,b){var c=VU(a,"action")||VU(a,"command")||VU(a,"endpoint");c&&a[c].hasOwnProperty("onFailureAction")&&this.sendInnerTubeActions([a[c].onFailureAction],b)}}];var cY={};cY.YtOpenPopupBehavior=[{properties:{popupPositionTarget:Object},listeners:{"yt-service-request-completed":"onOpenPopupServiceRequestCompleted_"},created:function(){this.openPopupConfig=null},
openPopup:function(a){this.sendAction("yt-open-popup-action",[a,this])},
getNavigationEndpointPopupAction:function(a){var b=VU(a,"endpoint"),c=VU(a,"action");if(b=c?c:b)if(b=this.openPopupConfig&&this.openPopupConfig.navigationEndpointPopupMap[b])if(a=this.get(b,a),(b=VU(a,"renderer"))&&this.openPopupConfig.supportedPopups.hasOwnProperty(b))return{openPopupAction:{popupType:this.openPopupConfig.popupTypeMap[b],popup:a}};return null},
onOpenPopupServiceRequestCompleted_:function(a,b){b=this.get("data.contents",b);b instanceof Array&&b.length&&(b=b[0]);if(b){var c=VU(b,"renderer");this.openPopupConfig.supportedPopups.hasOwnProperty(c)&&(a.stopPropagation(),this.openPopup({openPopupAction:{popupType:this.openPopupConfig.popupTypeMap[c],popup:b}}))}}},
T.YtActionSenderBehavior];var dY=[cY.YtOpenPopupBehavior,{_noAccessors:!0,created:function(){this.openPopupConfig=z("openPopupConfig")}}];var eY=[T.YtActionSenderBehavior,dY,{_noAccessors:!0,properties:{isDismissed:{type:Boolean,reflectToAttribute:!0,observer:"isDismissedChanged_"},dismissedRenderer:Object},listeners:{"yt-service-request-sent":"onYtServiceRequestSent_","yt-service-request-completed":"onYtServiceRequestCompleted_"},observers:["dismissableItemDataChanged_(data)"],created:function(){this.followUpDialogPromiseReject_=this.followUpDialogPromiseResolve_=this.followUpDialogPromise_=null},
isDismissedChanged_:function(a){A("kevlar_fluid_dismiss")&&(a?this.fire("yt-dismissable-item-dismissed"):this.fire("yt-dismissable-item-undismissed"))},
dismissableItemDataChanged_:function(){this.reset_()},
reset_:function(){this.isDismissed&&(this.isDismissed=!1);this.dismissedRenderer&&(this.dismissedRenderer=void 0);this.followUpDialogPromiseReject_&&(jw(this.followUpDialogPromise_,Ta),this.followUpDialogPromiseReject_());this.followUpDialogPromise_=new Yv(function(a,b){this.followUpDialogPromiseResolve_=a;this.followUpDialogPromiseReject_=b}.bind(this))},
onYtServiceRequestSent_:function(a,b){b.actions&&this.processActions_(a,b.actions)},
processActions_:function(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.commandExecutorCommand&&d.commandExecutorCommand.commands&&this.processActions_(a,d.commandExecutorCommand.commands);d.replaceEnclosingAction?(this.handleReplaceEnclosingAction_(d.replaceEnclosingAction),a.stopPropagation()):d.hideEnclosingAction?(this.handleHideEnclosingAction_(),a.stopPropagation()):d.undoFeedbackAction?(this.handleUndoFeedbackAction_(),a.stopPropagation()):d.signalServiceEndpoint?((d=d.signalServiceEndpoint.actions)&&
this.sendInnerTubeActions(d,this),a.stopPropagation()):d.signalAction&&"TELL_US_WHY"==d.signalAction.signal&&(this.handleTellUsWhySignalAction_(),a.stopPropagation())}},
onYtServiceRequestCompleted_:function(a,b){var c=this.get("feedbackResponses.0.followUpDialog",b.data);c?this.followUpDialogPromiseResolve_(c):b.actions&&!this.dismissedRenderer&&this.processActions_(a,b.actions)},
handleReplaceEnclosingAction_:function(a){this.dismissedRenderer=a.item;this.isDismissed=!0;var b;this.$&&(b=this.$.dismissed);b&&wm(b)},
handleHideEnclosingAction_:function(){this.isDismissed=!0},
handleUndoFeedbackAction_:function(){this.reset_()},
handleTellUsWhySignalAction_:function(){var a=this;this.followUpDialogPromise_.then(function(b){a.openPopup({openPopupAction:{popupType:"DIALOG",popup:b}})})}}];var aFa={_noAccessors:!0,properties:{data:{type:Object,observer:"dataChanged_"}},ready:function(){this.$.checkbox.addEventListener("change",this.onChange_.bind(this))},
dataChanged_:function(){this.$.checkbox.checked=!1},
onChange_:function(){this.fire("yt-dismissal-reason-"+(this.$.checkbox.checked?"selected":"deselected"),this.data.feedbackToken)}};var bFa={properties:{showInput:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"showInputChanged"}},listeners:{click:"stopPropagation_",keydown:"stopPropagation_"},detached:function(){this.showInput&&this.listen(window,"click","closeOnOutsideClick_")},
stopPropagation_:function(a){this.showInput&&a.stopPropagation()},
closeOnOutsideClick_:function(a){this.closeOnOutsideClickCondition(a)&&(this.showInput=!1,this.unlisten(window,"click","closeOnOutsideClick_"),this.closeOnOutsideClickHandler())},
closeOnOutsideClickCondition:function(){return!0},
closeOnOutsideClickHandler:function(){},
openOnClick_:function(){this.showInput=!0;this.listen(window,"click","closeOnOutsideClick_");this.openOnClickHandler()},
openOnClickHandler:function(){},
showInputChanged:function(){}};var fY=new Map;
function gY(a){if(fY.has(a))return fY.get(a);var b=a.toLowerCase();var c="yt-icons",d=b.replace(/_/g,"-");switch(a){case"MY_CHANNEL":b="account_circle";break;case"ACCOUNT_LINKED":case"ACCOUNT_UNLINKED":c="icons";b=d;break;case"ADD_TO_LIBRARY":b="add";break;case"ALERT_WARN_RED":b="warning";break;case"BLOCK_USER":b="block";break;case"CLOSED_CAPTION":c="av";b="closed-caption";break;case"COLLECTION":c="maps";b="layers";break;case"CONTACT":c="icons";b="business";break;case"CREATOR_STUDIO_ERROR_ON_LOAD":case"CREATOR_STUDIO_NO_COMMENTS":case"CREATOR_STUDIO_NO_HELD_COMMENTS":case"CREATOR_STUDIO_NO_SEARCH_MATCH":c="ytcp-icons";
b=d.split("creator-studio-")[1];break;case"DISMISSAL":b="close";break;case"DO_NOT_DISTURB":b="block";break;case"DOGFOOD":c="icons";b="pets";break;case"EMPTY_LIKE":b="like_outline";break;case"EXIT_APP":b="exit_to_app";break;case"GAMES":c="ytg";b="my-games";break;case"GO_TO_PAGE":b="arrow-forward";break;case"GROUP":c="social";break;case"HIDE":b="not_interested";break;case"INPUT_COMPONENT":c="icons";b="settings-input-component";break;case"KIDS_BLOCK":b="block";break;case"MEMBERSHIP_LIMITED_PRE_PURCHASE":case"MEMBERSHIP_OFFER":c=
"ytg";b="membership-pre-purchase";break;case"MEMBERSHIP_LIMITED_POST_PURCHASE":c="ytg";b="membership-post-purchase";break;case"MY_LOCATION":c="maps";b=d;break;case"NOTIFICATIONS_INBOX":b="NOTIFICATIONS";break;case"NEXT":b="chevron_right";break;case"OFFLINE":b="power-settings-new";break;case"PAUSE":c="miniplayer";break;case"PAYMENT":c="icons";break;case"PHONE_DOWNLOAD":b="phone_download";break;case"QUESTION_ANSWER":b="question_answer";break;case"REDEEM":c="icons";b="redeem";break;case"REMOVE":case"REMOVE_FROM_HISTORY":case"REMOVE_FROM_PLAYLIST":b=
"remove-circle-outline";break;case"SAVE_PLAYLIST":b="library_add";break;case"SETTINGS_LIGHT":b="settings_applications";break;case"SETTINGS_MATERIAL":b="settings";break;case"SEARCH_HISTORY":b="watch_history";break;case"SOCIAL":case"PEOPLE":c="yt-icons";b="people";break;case"STAFF_PICK":c="ytg";b="spotlight";break;case"START_DVR":b="add";break;case"STOP_DVR":c="av";b="stop";break;case"SUBSCRIPTIONS":c="av";break;case"TAB_LIKED":b="like";break;case"TERMS_OF_SERVICE":c="icons";b="description";
break;case"TRENDING_UP":c="icons";b=d;break;case"UNBLOCK_USER":b="remove";break;case"UNPLUGGED_DARK_THEME":c="image";b="brightness-3";break;case"UNPLUGGED_LIVE_GUIDE":case"LIVE":b="live";break;case"UNPLUGGED_SPORTS":c="ytu";b="visibility-off";break;case"VIDEOS":c="av";b="play-circle-filled";break;case"VOLUME_UP":c="miniplayer";b=d;break;case"YOUTUBE":c="yt-logos",b="lozenge";}b=""+c+":"+b;fY.set(a,b);return b}
;var hY={},iY={};iY.ComponentBehavior={_noAccessors:!0,ready:function(){this.provides&&aBa(this.provides,this)},
getInterface:function(a){return MU(a)},
getInterfaceForTs:function(a){return NU(a)},
asyncFrame:function(a,b){return setTimeout(function(){requestAnimationFrame(a)},b)},
getSimpleString:XU,getEndpointHandler_:YU,computeHref_:function(a,b){return a?(a=ZU(a,void 0===b?!1:b))?A("enable_polymer_resin")?Ac(a).getTypedStringValue():a:null:null},
computeNofollow_:function(a){return a?QU(a)?"nofollow":null:null},
computeIcon_:function(a){return a&&a.iconType?gY(a.iconType):""}};var jY={},cFa=function(){};
jY.YtdGridStateAwareBehavior=[iY.ComponentBehavior,{properties:{gridStateAwareSizingElementSelector:String,snapStateRefresh_:{type:Boolean,value:function(){return A("kevlar_snap_state_refresh")},
reflectToAttribute:!0}},created:function(){this.gridStateActionMap_={"ytd-update-grid-state-action":"handleUpdateGridStateAction_"};this.currentGridClass=""},
attached:function(){this.snapStateRefresh_&&(this.registerActionMap(this.gridStateActionMap_),Polymer.RenderStatus.afterNextRender(this,this.handleUpdateGridStateAction_))},
detached:function(){this.snapStateRefresh_&&this.unregisterActionMap(this.gridStateActionMap_)},
handleUpdateGridStateAction_:function(){var a=cW.getInstance();var b=this.pageSubtype;a=b&&TBa.includes(b)?null:a.currentSnapState_.className;b=this;this.gridStateAwareSizingElementSelector&&(b=this.$$(this.gridStateAwareSizingElementSelector));b&&a!=this.currentGridClass&&(a&&this.toggleClass(a,!0,b),this.currentGridClass&&this.toggleClass(this.currentGridClass,!1,b),this.currentGridClass=a)}},
U.YtActionHandlerBehavior];var kY=function(){};
kY.prototype.load=function(){};
kY.prototype.getGuidePersistentAndVisible=function(){};
kY.prototype.setGuideData=function(){return Ca(function(a){ua(a)})};var lY={};lY.YtdGuideStateAwareBehavior=[iY.ComponentBehavior,{properties:{guidePersistentAndVisible:{type:Boolean,reflectToAttribute:!0},miniGuideVisible:{type:Boolean,reflectToAttribute:!0},activeEndpoint:{type:Object,notify:!0},guideOpened:Boolean},created:function(){this.guideStateActionMap_={"ytd-update-guide-state-action":"handleGuideStateAction_","ytd-update-mini-guide-state-action":"handleMiniGuideStateAction_","ytd-update-guide-opened-action":"handleGuideOpenedAction_","ytd-update-active-endpoint-action":"handleActiveEndpointAction_"}},
attached:function(){this.registerActionMap(this.guideStateActionMap_);var a=this.getInterface(kY);a&&(this.guidePersistentAndVisible=a.getGuidePersistentAndVisible(),this.activeEndpoint=a.getActiveEndpoint(),this.guideOpened=a.getGuideOpened(),this.miniGuideVisible=a.miniGuideVisible)},
detached:function(){this.unregisterActionMap(this.guideStateActionMap_)},
handleGuideStateAction_:function(a){this.guidePersistentAndVisible=a},
handleMiniGuideStateAction_:function(a){this.miniGuideVisible=a},
handleGuideOpenedAction_:function(a){this.guideOpened=a},
handleActiveEndpointAction_:function(a){this.activeEndpoint=a}},
U.YtActionHandlerBehavior];var mY={},nY=null,oY={isVisibilityRoot:!1,observeVisibleOption:null,observeHiddenOption:null,observePrescanOption:null,properties:{viewroot:Object},created:function(){this.prescanHandlerKey_=this.hiddenHandlerKey_=this.visibleHandlerKey_=this.visibilityObserverForChild_=this.localVisibilityObserver_=null;this.visibilityOptionVisible_=this.observeVisibleOption?{calledOnce:"observe_once"==this.observeVisibleOption,state:"visible"}:null;this.visibilityOptionHidden_=this.observeHiddenOption?{calledOnce:"observe_once"==
this.observeHiddenOption,state:"hidden"}:null;this.visibilityOptionPrescan_=this.observePrescanOption?{calledOnce:"observe_once"==this.observePrescanOption,state:"prescan"}:null},
attached:function(){this.isVisibilityRoot&&(this.visibilityObserverForChild_=IDa(this.viewroot));this.async(this.initVisibilityObserver_)},
initVisibilityObserver_:function(){this.visibilityObserver&&this.configureVisibilityObserver_()},
configureVisibilityObserver_:function(){var a=this;this.visibilityOptionVisible_&&(this.visibleHandlerKey_=this.visibilityObserver.observe(this,function(){return a.onVisible()},this.visibilityOptionVisible_));
this.visibilityOptionHidden_&&(this.hiddenHandlerKey_=this.visibilityObserver.observe(this,function(){return a.onHidden()},this.visibilityOptionHidden_));
this.visibilityOptionPrescan_&&(this.prescanHandlerKey_=this.visibilityObserver.observe(this,function(){a.onPrescanVisible()},this.visibilityOptionPrescan_))},
detached:function(){this.visibleHandlerKey_&&(this.visibilityObserver.unobserveByKey(this.visibleHandlerKey_),this.visibleHandlerKey_=null);this.hiddenHandlerKey_&&(this.visibilityObserver.unobserveByKey(this.hiddenHandlerKey_),this.hiddenHandlerKey_=null);this.prescanHandlerKey_&&(this.visibilityObserver.unobserveByKey(this.prescanHandlerKey_),this.prescanHandlerKey_=null);this.visibilityObserverForChild_=this.localVisibilityObserver_=null},
markDirtyVisibilityObserver:function(){this.localVisibilityObserver_&&this.configureVisibilityObserver_()},
getVisibilityObserverForChild:function(){return this.visibilityObserverForChild_?this.visibilityObserverForChild_:this.localVisibilityObserver_},
get visibilityObserver(){if(this.localVisibilityObserver_)return this.localVisibilityObserver_;var a=ei(this.parentNode,function(b){return!!b.getVisibilityObserverForChild&&b.getVisibilityObserverForChild()},!0);
a?a=a.getVisibilityObserverForChild():(nY||(nY=IDa()),a=nY);return this.localVisibilityObserver_=a},onVisible:function(){},
onHidden:function(){},
onPrescanVisible:function(){}};
A("kevlar_import_vimio_behavior")||A("gaming_vimio_behavior_onshow")||(oY={});oY&&!A("kevlar_attach_vimio_behavior")&&(delete oY.attached,delete oY.detached);mY.YtVisibilityObserverBehavior=[oY];var dFa={};dFa.YtVisualElementBehavior=[mY.YtVisibilityObserverBehavior,{properties:{visualElement:Object},observeVisibleOption:"observe_multiple",observeHiddenOption:"observe_multiple",onVisible:function(){if(A("kevlar_enable_vimio_callback")&&this.onShow)this.onShow();var a=this.getVETracker();a&&LS(a,this)},
onHidden:function(){if(A("kevlar_enable_vimio_callback")&&this.onHide)this.onHide();var a=this.getVETracker();a&&MS(a,this)},
getVETracker:function(){return A("kevlar_enable_vimio_callback")&&A("kevlar_enable_vimio_logging")?IS.getInstance():null}}];var V={},pY=0;function eFa(a){var b=Polymer.Element?Polymer.Async.animationFrame.cancel.bind(Polymer.Async.animationFrame):Polymer.Async.cancel.bind(Polymer.Async),c=Polymer.Element?Polymer.Async.animationFrame.run.bind(Polymer.Async.animationFrame):Polymer.Async.run.bind(Polymer.Async);pY&&b(pY);pY=c(function(){a.fire("yt-visibility-refresh");pY=0})}
var qY={_noAccessors:!0,properties:{data:Object},observers:["ytRendererBehaviorDataObserver_(data)","ytRendererBehaviorTargetIdObserver_(data.targetId)"],dirtyTree:!1,childCache_:null,parentComponent:null,wasVisible:!1,wasPrescan:!1,lastHandledScroll_:0,isRenderer_:!0,screenLayer:null,created:function(){this.childCache_=new Set},
detached:function(){this.monitorScroll&&this.unlisten(this,"scroll","onScroll");this.parentComponent&&(this.parentComponent.childCache_.delete(this),this.parentComponent=null);this.markDirty()},
registerRenderer_:function(a){a.parentComponent=this;this.childCache_.add(a);this.markDirty()},
unregisterRenderer_:function(a){this.childCache_.delete(a);this.markDirty()},
attached:function(){var a=this.getParentRenderer_();a&&a.registerRenderer_(this);this.monitorScroll&&this.listen(this,"scroll","onScroll")},
getParentRenderer_:function(){for(var a=this.parentNode;a&&!a.isRenderer_;)a=a.parentNode||a.host;return a},
ytRendererBehaviorDataObserver_:function(){this.data&&(this.wasVisible=!1,A("kevlar_attach_vimio_behavior")&&this.markDirtyVisibilityObserver(),se("ADD_SCRAPER_ATTRIBUTES")&&this.data.trackingParams&&(this.dataset.ved=this.data.trackingParams))},
ytRendererBehaviorTargetIdObserver_:function(){if(this.data&&this.data.targetId){var a=this.data.targetId;if(A("kevlar_nitrate_driven_tooltips")){var b=nW.getInstance(),c=kCa(b,a);c.element=this;oW(b,a,c)}}},
onScroll:function(){var a=Date.now();50>a-this.lastHandledScroll_||(this.lastHandledScroll_=a,this.markDirty())},
markDirty:function(){A("kevlar_use_vimio_behavior")||eFa(this);A("kevlar_attach_vimio_behavior")&&this.markDirtyVisibilityObserver()},
getScreenLayer:function(){if(this.screenLayer)return this.screenLayer;var a=this.getParentRenderer_();if(a)return a.getScreenLayer()},
invalidate:function(a){this.markDirty();this.wasPrescan=this.wasVisible=!1;a&&(this.dirtyTree=!0)},
getNodes:function(){return this.childCache_?[].concat(ka(this.childCache_)):[]},
impressionLog:function(){if(this.data&&this.data.impressionEndpoints)for(var a=0;a<this.data.impressionEndpoints.length;a++){var b=this.data.impressionEndpoints[a];b.clickTrackingParams&&delete b.clickTrackingParams;this.sendServiceRequestAction([b])}},
logExplicitClick:function(a){var b=Wo();null!=b&&a.trackingParams&&Co(b,go(a.trackingParams),void 0)},
getEndpointHandler_:YU};A("kevlar_use_vimio_behavior")&&(delete qY.created,delete qY.attached,delete qY.detached,delete qY.getNodes,delete qY.registerRenderer_,delete qY.unregisterRenderer_);V.YtRendererBehavior=[iY.ComponentBehavior,T.YtActionSenderBehavior,dFa.YtVisualElementBehavior,qY];var fFa=[U.YtActionHandlerBehavior,V.YtRendererBehavior,{properties:{data:{Object:Object,observer:"ytdHatsSurveyBehaviorDataChanged_"}},actionMap:{"yt-open-popup-action":"startTimeout_","yt-close-popup-action":"cancelTimeout_"},created:function(){this.timeoutJobId_=0},
ytdHatsSurveyBehaviorDataChanged_:function(){this.cancelTimeout_()},
startTimeout_:function(){var a=this.data&&this.data.displayDurationSeconds;a&&!this.timeoutJobId_&&(this.timeoutJobId_=En(function(){this.sendAction("yt-close-popup-action",[this.is]);this.timeoutJobId_=0}.bind(this),1E3*a))},
cancelTimeout_:function(){Dn.cancelJob(this.timeoutJobId_);this.timeoutJobId_=0}}];var rY={hostAttributes:{lockup:!0},properties:{lockupIsHovered_:Boolean},listeners:{mouseenter:"lockupOnMouseEnter_",mouseleave:"lockupOnMouseLeave_",contextmenu:"lockupOnContextMenu_","yt-popup-closed":"lockupOnPopupClosed_","yt-service-request-sent":"lockupOnYtServiceRequestSent_","yt-lockup-requested":"lockupOnLockupRequested_"},created:function(){this.suppressRightClickMenu_=!1},
detached:function(){this.positioningTarget_&&Dh(this.positioningTarget_);this.suppressRightClickMenu_=!1},
lockupOnMouseEnter_:function(){this.lockupIsHovered_=!0},
lockupOnMouseLeave_:function(){this.suppressRightClickMenu_=this.lockupIsHovered_=!1},
lockupOnContextMenu_:function(a){var b=!1;A("kevlar_right_click_on_lockups")||(b=!0);this.data&&this.data.menu&&this.data.menu.menuRenderer&&this.data.menu.menuRenderer.allowRightClick&&a.target||(b=!0);if(a.shiftKey||a.ctrlKey)b=!0;this.isDismissed&&(b=!0);this.suppressRightClickMenu_&&(this.sendAction("yt-close-popup-action",["ytd-menu-popup-renderer"]),this.suppressRightClickMenu_=!1,b=!0);if(b||!a.target)return this.logNativeRightClickVe_(),!0;a.preventDefault();b=this.createRightClickVe_();b=
{openPopupAction:{popupType:"DROPDOWN",popup:{menuPopupRenderer:this.data.menu.menuRenderer},properties:{source:"right-click",veData:b}}};this.createPositioningTarget_(a.clientX+1,a.clientY+1,a.target);this.sendAction("yt-open-popup-action",[b,this.positioningTarget_]);this.suppressRightClickMenu_=!0;return!1},
lockupOnPopupClosed_:function(a,b){b&&b.popupRenderer&&"ytd-menu-popup-renderer"==b.popupRenderer.is&&(a=b.popupRenderer.veData,b=Wo(),a&&b&&ES(b,[a]))},
createRightClickVe_:function(){var a=this.data.trackingParams,b=Wo(),c=Vo();return a&&b&&c?(a=go(a),c=ho(63059),CS(b,a,c),c):null},
logNativeRightClickVe_:function(){if(A("kevlar_log_native_right_click_ve")){var a=this.data.trackingParams,b=Wo(),c=Vo();a&&b&&c&&(a=go(a),c=ho(65347),CS(b,a,c),DS(b,[c]),ES(b,[c]))}},
createPositioningTarget_:function(a,b,c){this.positioningTarget_&&Dh(this.positioningTarget_);this.positioningTarget_=document.createElement("ytd-positioning-target");this.positioningTarget_.setPosition(a,b,this);this.positioningTarget_.link=this.findLink_(c);document.body.appendChild(this.positioningTarget_)},
findLink_:function(a){for(;a;){if(a.hasAttribute("lockup"))return this.get("data.navigationEndpoint.commandMetadata.webCommandMetadata.url",a);if("A"==a.tagName)return a.href;a=a.parentElement}},
lockupOnLockupRequested_:function(a){var b=a.detail.videoIds[0];a.detail&&b==this.data.videoId&&(a.detail.returnValue=[this.data])},
lockupOnYtServiceRequestSent_:function(a,b){if(a=b.actions)for(var c=0;c<a.length;c++){var d=a[c];A("kevlar_frontend_video_list_actions")&&("ACTION_REMOVE_VIDEO_BY_VIDEO_ID"==d.action&&b.ajaxPromise?this.lockupHandleRemoveFromPlaylistByVideoIdCommand_(d.removedVideoId,b.ajaxPromise):"ACTION_REMOVE_VIDEO"==d.action&&b.ajaxPromise&&this.lockupHandleRemoveFromPlaylistBySetVideoIdCommand_(d.setVideoId,b.ajaxPromise))}},
lockupHandleRemoveFromPlaylistByVideoIdCommand_:function(a){TV(QV(),a)},
lockupHandleRemoveFromPlaylistBySetVideoIdCommand_:function(a){OBa(QV(),a)}};var gFa={_noAccessors:!0,properties:{data:Object,collapsed:{type:Boolean,reflectToAttribute:!0}},observers:["mastheadDataUpdate_(data)"],MASTHEAD_PREF_KEY_:"HIDDEN_MASTHEAD_ID",ready:function(){this.$["expand-ad"].addEventListener("click",this.onExpandAdClick_.bind(this))},
attached:function(){this.updateCollapsedState_()},
onExpandAdClick_:function(){var a=eS.getInstance();a.set(this.MASTHEAD_PREF_KEY_,!1);a.save();location.reload()},
collapseAd:function(){var a=this.get("data.encryptedId",this.data),b=eS.getInstance();b.set(this.MASTHEAD_PREF_KEY_,a);b.save();this.collapsed=!0},
mastheadDataUpdate_:function(a){this.get("data.adTag",a)&&pq("yt_ad",1);this.updateCollapsedState_()},
updateCollapsedState_:function(){var a=this.get("data.encryptedId",this.data);this.collapsed=a?eS.getInstance().get(this.MASTHEAD_PREF_KEY_)===a:!0},
generateCacheBuster_:function(){return Math.floor(1E16*Math.random())}};var sY={},hFa=["ytd-thumbnail-overlay-toggle-button-renderer","ytd-menu-renderer"];
sY.YtdMouseDownPrefetchableBehavior=[U.YtActionHandlerBehavior,{listeners:{mousedown:"onMousedown_"},onMousedown_:function(a){var b=this.localName,c=De("kevlar_mousedown_prefetchable_components");if(c&&b&&!(0<!c.length)&&c.includes(b)&&!this.miniplayerActive_()){if(A("kevlar_mousedown_prefetch_blacklist"))for(b=Polymer.dom(a).path,c=0;c<b.length;c++)if(hFa.includes(b[c].is))return;if(b=this.get("navigationEndpoint",this.data)){var d=this.getInterface(BW);c=eX.getInstance();if(!(!a||void 0!=a.button&&
0!=a.button||a.altKey||a.ctrlKey||a.metaKey||a.shiftKey)){ZCa(c);a=new WW(d);d=JCa(a,b,OCa);var e=VW.watch.pageFragments;d=new ZW(e,e,NCa,{},a,d);c.prefetchCache_.set(a.getCacheKeyForEndpoint(b),d)}}}},
miniplayerActive_:function(){if(!A("persistent_miniplayer"))return!1;var a=this.sendOptionalAction("yt-miniplayer-active");return a&&a.length&&a[0]}}];var iFa={};iFa.YtdPlaylistHandlerBehavior=[U.YtActionHandlerBehavior,{created:function(){this.playlistHandlerActionMap_={"yt-add-to-playlist-command":"handleAddToPlaylistCommand_","yt-end-playlist-command":"handleEndPlaylistCommand_","yt-recover-playlist-command":"handleRecoverPlaylistCommand_","yt-refresh-playlist-command":"handleRefreshPlaylistCommand_","yt-playlist-remove-videos-action":"handlePlaylistRemoveVideosAction_"}},
attached:function(){A("kevlar_frontend_video_list_actions")&&this.registerActionMap(this.playlistHandlerActionMap_);A("kevlar_frontend_queue_recover")&&PBa()},
detached:function(){A("kevlar_frontend_video_list_actions")&&this.unregisterActionMap(this.playlistHandlerActionMap_)},
handleAddToPlaylistCommand_:function(a,b){if(a.addToPlaylistCommand&&b&&b.fire){var c=a.addToPlaylistCommand.videoIds||[a.addToPlaylistCommand.videoId];b=b.fire("yt-lockup-requested",{videoIds:c}).detail.returnValue;var d;"PLAYLIST_EDIT_LIST_TYPE_QUEUE"===a.addToPlaylistCommand.listType?d=b?b:c.map(function(e){return{videoId:e}}):b&&(d=b);
d&&(c=d.map(function(e){return Object.assign({},e,{ownerBadges:void 0,topStandaloneBadge:void 0})}),NBa(QV(),c,a.addToPlaylistCommand))}},
handleEndPlaylistCommand_:function(a){var b=QV();if(a=a.endPlaylistCommand)"PLAYLIST_EDIT_LIST_TYPE_QUEUE"===a.listType&&b.clearQueue(),a.closeMiniplayer&&b.actionRouter.triggerOptionalAction("yt-close-miniplayer-action")},
handleRecoverPlaylistCommand_:function(a){QBa(QV(),a)},
handlePlaylistRemoveVideosAction_:function(a){a.playlistRemoveVideosAction&&a.playlistRemoveVideosAction.setVideoIds&&a.playlistRemoveVideosAction.setVideoIds.forEach(function(b){OBa(QV(),b)})},
handleRefreshPlaylistCommand_:function(a){RBa(QV(),a)}}];var tY={YtTaskEmitterBehavior:{created:function(){this.cachedProviderNode_=null},
detached:function(){this.cachedProviderNode_=null},
getTaskManager:function(){var a=this.getContext_();return a?a.getTaskManager():Dn},
getContext_:function(){if(this.shouldUseTaskManager()){if(!this.cachedProviderNode_){var a=this.fire("yt-get-context-provider");a.detail&&a.detail.contextProvider?this.cachedProviderNode_=a.detail.contextProvider:this.parentElement&&(this.cachedProviderNode_=this)}if(this.cachedProviderNode_&&this.cachedProviderNode_.getProvidedContext&&this.cachedProviderNode_.getProvidedContext())return this.cachedProviderNode_.getProvidedContext()}},
shouldUseTaskManager:function(){var a=xDa.getInstance();if("disabled"==a.experimentMode_)a=!1;else{var b=!!a.usableComponents_.get(this.localName);a="counterfactual"==a.experimentMode_?!1:b}return a},
getNetworkManager:function(){var a=this.getContext_();if(a)return a.getNetworkManager()}}};var jFa=[tY.YtTaskEmitterBehavior,U.YtActionHandlerBehavior,{_noAccessors:!0,properties:{queued:{type:Boolean,reflectToAttribute:!0},dequeued:Boolean,queueHideMenu:{type:Boolean,readOnly:!0,computed:"computeQueueHideMenu_(queued, data.menu.menuRenderer)",reflectToAttribute:!0},dragging:Boolean,expansion:{type:String,reflectToAttribute:!0},animation:{type:String,reflectToAttribute:!0},removeFromQueueButton:Object,eduForceMenuDisplay_:{type:Boolean,reflectToAttribute:!0},boundRemoveFromQueueTap_:{type:Function,
value:function(){return this.removeFromQueueTap_.bind(this)}},
animationTransition:Object},listeners:{"yt-service-request-sent":"onQueueableItemYtServiceRequestSent_","yt-popup-closed":"onPopupClosed_","yt-request-is-in-queued-item":"onQueueableItemRequestIsInQueuedItem_",animationend:"onAnimationEnd_"},observers:["updateAnimation_(data)","triggerHintActions_(data.hintActions)"],created:function(){this.TRANSLATE_UP_DELAY_=120;this.queueActionMap_={"yt-signal-action-edu-force-menu-display":"onYtSignalActionEduForceMenuDisplay_","yt-signal-action-record-next-up-next-edu-impression":"onYtSignalActionRecordNextUpNextImpression_"}},
attached:function(){this.registerActionMap(this.queueActionMap_)},
detached:function(){this.dragging||(this.resetQueueableProperties_(),this.dequeued=this.queued=!1,this.unregisterActionMap(this.queueActionMap_))},
onAnimationEnd_:function(){this.animation=void 0;this.markDirty()},
computeQueueHideMenu_:function(a,b){var c=this;return!!(a&&b&&b.items.every(function(d){d=Object.values(d)[0];return"VISIBILITY_CONDITION_TYPE_QUEUEABLE"==c.get("visibilityCondition.showIf",d)}))},
onQueueableItemYtServiceRequestSent_:function(a,b){if(a=b.actions){b=this.data;for(var c=0;c<a.length;c++){var d=a[c];d.nextUpNextAction?this.handleNextUpNextAction_(d,b):d.nextUpNextDequeueAction&&this.handleNextUpNextDequeueAction_(d)}}},
onQueueableItemRequestIsInQueuedItem_:function(a,b){b.queued=this.queued},
handleNextUpNextAction_:function(a,b){if(b){lW.getInstance().dismissEdu();this.animation="fade-out-slide-up";var c=hW.getInstance(),d={animation:"fade-in-slide-up"},e=Object.assign(b,{rendererAnimation:d}),g=void 0;this.dequeued?g={animation:"expanded-slide-down"}:(d.expandTransition=new gW(this,this.triggerPostEnqueueActions_.bind(this,b)),this.sendAction("yt-disable-watch-anchor-overflow-action"));setTimeout(function(){switch(a.nextUpNextAction.position){case"NEXT_UP_NEXT_POSITION_START":c.enqueue(e,
0,g);break;default:c.enqueue(e,void 0,g);}},this.TRANSLATE_UP_DELAY_)}},
handleNextUpNextDequeueAction_:function(a){a.nextUpNextDequeueAction&&a.nextUpNextDequeueAction.videoId&&(a=a.nextUpNextDequeueAction.videoId,hW.getInstance().removeVideo(a),this.data&&a==this.data.videoId&&(this.animation=void 0,this.expansion="expanded"))},
triggerPostEnqueueActions_:function(a){a.addedToUpNextActions&&this.sendInnerTubeActions(a.addedToUpNextActions,this)},
triggerHintActions_:function(a){var b=this;Fn(this.getTaskManager(),function(){var c=b.sendOptionalAction("yt-get-opened-popups-action");!(c&&1==c.length?c[0]:[]).some(function(d){d=d.openPopupAction.popupType;return"SURVEY"==d||"MEALBAR"==d})&&a&&(b.popupPositionTarget=b.querySelector("ytd-menu-renderer")||null,b.sendInnerTubeActions(a,b),b.data.hintActions=void 0)})},
onYtSignalActionEduForceMenuDisplay_:function(a,b){b==this&&(this.eduForceMenuDisplay_=!0)},
onYtSignalActionRecordNextUpNextImpression_:function(a,b){b==this&&lW.getInstance().recordEduImpression()},
onPopupClosed_:function(){this.eduForceMenuDisplay_=!1;this.popupPositionTarget=null;lW.getInstance().eduDisplayedThisLoad_=!0},
removeFromQueueTap_:function(){this.data&&this.data.videoId&&hW.getInstance().removeVideo(this.data.videoId)},
updateAnimation_:function(a){this.resetQueueableProperties_();if(a){var b=this.get("rendererAnimation",a);if(b&&b.expandTransition)b.expandTransition.start(this);else if(this.queued||this.dequeued)this.expansion="expanded";b&&b.animation&&(this.animation=b.animation);a.rendererAnimation=void 0}},
resetQueueableProperties_:function(){this.expansion=this.animation=void 0;this.animationTransition&&bCa(this.animationTransition)}}];function kFa(a){return{type:a.type,payload:a.payload}}
;var uY=function(){var a=lFa;var b=void 0===b?[]:b;var c=void 0===c?[]:c;b=Redux.compose.apply(null,[Redux.applyMiddleware.apply(Redux,ka(b))].concat(ka(c)));this.store=Redux.createStore(a,b)};
uY.prototype.getState=function(){return this.store.getState()};
uY.prototype.dispatch=function(a){this.store.dispatch(a)};
uY.prototype.subscribe=function(a){return this.store.subscribe(a)};
uY.prototype.replaceReducer=function(a){this.store.replaceReducer(a)};function mFa(a){return function(b,c){b=void 0===b?{}:b;switch(c.type){case"ENTITY_LOADED":return c.payload.reduce(function(d,e){if(!e.payload)return we(Error("Entity "+e.entityKey+" missing EntityMutationPayload.")),d;if(!e.entityKey)return we(Error("Missing entity key.")),d;var g=u.getAnyKey(e.payload);return g!==a?d:"ENTITY_MUTATION_TYPE_REPLACE"===e.type?nFa(d,e.entityKey,e.payload[g]):d},b);
case"REPLACE_ENTITY":return c.payload.entityType!==a?b:nFa(b,c.payload.key,c.payload.entityPayload);default:return b;}}}
function nFa(a,b,c){var d={};return Object.assign({},a,(d[b]=c,d))}
;var oFa=function(a){a=a.reduce(function(b,c){b[c]=mFa(c);return b},{});
return Redux.combineReducers(a)}(function(a){for(var b=[],c=0;c<arguments.length;++c)b[c-0]=arguments[c];
return b}("subscriptionStateEntity"));var lFa=Redux.combineReducers({entities:oFa}),pFa=new uY;var vY=function(){var a=jl.apply(this,arguments)||this;a.json=function(){};
return a};
l(vY,jl);vY.prototype.equals=function(a,b){return a===b};
vY.prototype.isEmpty=function(a){var b;(b=!a)||(b=Xa(a)&&0===a.length);return b};
vY.prototype.isDefined=function(a){return void 0!==a};
var qFa=vY,rFa=qFa=v([ml()],qFa);function wY(a){return function(b){if(!a.noInjection){var c=!!a.isInjectionRoot,d=a.providers;b.prototype.behaviors=b.prototype.behaviors||[];b.prototype.behaviors.unshift(yq.InjectBehavior);b.prototype.provide=d;b.prototype.isInjectionRoot=c}H(rFa.prototype)(b.prototype,"__templateHelpers");kl({is:a.is,notifyObserversOnUndefined:!1!==a.notifyObserversOnUndefined,fastInit:a.fastInit})(b)}}
function W(a){return function(b){H(rFa.prototype)(b.prototype,"__templateHelpers");kl({is:a.is,notifyObserversOnUndefined:!1})(b)}}
;var xY=function(){return jl.apply(this,arguments)||this};
l(xY,jl);var sFa=function(a){a.selectorProperties=a.properties?Object.keys(a.properties).filter(function(b){return a.properties[b].selector}):[]},tFa=function(a){var b=a.behaviors.find(function(d){return"store"in d}),c=a.selectorProperties.reduce(function(d,e){e=a.properties[e];
return e.selectorArgs?[].concat(ka(d),ka(e.selectorArgs)):d},[]);
0<c.length&&(b.observers=b.observers||[],b.observers.push("updateReduxProperties("+c.join(",")+")"))};
xY.prototype.beforeRegister=function(){sFa(this);tFa(this)};
xY.prototype.attached=function(){var a=this;if(this.activeStoreSubscription)throw Error("Element "+this.is+" has a leaked store subscription.");this.activeStoreSubscription=this.store.subscribe(function(){uFa(a)});
uFa(this)};
var uFa=function(a){for(var b=k(a.selectorProperties),c=b.next();!c.done;c=b.next()){c=c.value;var d=a.properties[c],e=[a.store.getState()];if(d.selectorArgs){d=k(d.selectorArgs);for(var g=d.next();!g.done;g=d.next())e.push(a.get(g.value))}a[c]=a.properties[c].selector.apply(a,e)}};
xY.prototype.detached=function(){this.activeStoreSubscription&&(this.activeStoreSubscription(),this.activeStoreSubscription=void 0)};
ea.Object.defineProperties(xY.prototype,{store:{configurable:!0,enumerable:!0,get:function(){throw Error("Do not use ReduxBehavior directly. Client should extend ReduxBehavior and override store getter to provide an actual store.")}}});
var vFa=xY,wFa=vFa=v([ml()],vFa);var yY=function(){return jl.apply(this,arguments)||this};
l(yY,jl);ea.Object.defineProperties(yY.prototype,{store:{configurable:!0,enumerable:!0,get:function(){return pFa}}});
var zY=yY;zY=v([ml()],zY);var AY={YtdReduxBehavior:[]};AY.YtdReduxBehavior.push.apply(AY.YtdReduxBehavior,[wFa.prototype,zY.prototype]);var BY=function(){return jl.apply(this,arguments)||this};
l(BY,jl);f=BY.prototype;f.onChange=function(){this.refreshGridLayout(!0)};
f.attached=function(){this.listen(document,"yt-guide-toggle","delayedRemoveExcessItems");this.listen(document,"yt-page-type-changed","delayedRemoveExcessItems")};
f.detached=function(){this.unlisten(document,"yt-guide-toggle","delayedRemoveExcessItems");this.unlisten(document,"yt-page-type-changed","delayedRemoveExcessItems")};
f.respondToLayoutRequest=function(a,b){b!==this.thumbLayoutStyle&&this.actionSenderBehavior.sendAction("ytd-change-rich-layout-style",[this.thumbLayoutStyle])};
f.delayedRemoveExcessItems=function(){var a=this;setTimeout(function(){a.refreshGridLayout()})};
f.refreshGridLayout=function(a){if(this.data&&this.data.contents&&this.clientWidth){var b=Math.min(Math.floor(this.clientWidth/336),6),c={1:"full",2:"half",3:"third",4:"quarter",5:"fifth",6:"sixth"}[b];(this.thumbLayoutStyle!==c||a)&&xFa(this,b);this.thumbLayoutStyle!==c&&(this.thumbLayoutStyle=c,this.actionSenderBehavior.sendAction("ytd-change-rich-layout-style",[c]))}};
var xFa=function(a,b){for(var c=a.data.contents.slice(),d=[],e=0;e<c.length;e++){var g=c[e];g.richItemRenderer||a.get("itemSectionRenderer.contents.0.shelfRenderer.content.expandedShelfContentsRenderer",g)||d.push(e)}var h=[];for(e=0;e<d.length;e++){g=d[e];0!==(g-e)%b&&(g=Math.ceil(g/b)*b+e);var m=h[h.length-1];m>g&&(g=m+1+b);h.push(g)}b=[];d.reverse();d=k(d);for(e=d.next();!e.done;e=d.next())e=c.splice(e.value,1)[0],b.unshift(e);b.forEach(function(n,p){h[p]>c.length?c.push(n):c.splice(h[p],0,n)});
a.set("reorderedContents",c)},CY=BY;
CY.prototype.refreshGridLayout=CY.prototype.refreshGridLayout;CY.prototype.respondToLayoutRequest=CY.prototype.respondToLayoutRequest;CY.prototype.onChange=CY.prototype.onChange;v([H(T.YtActionSenderBehavior),w("design:type",Object)],CY.prototype,"actionSenderBehavior",void 0);v([I({value:"third"}),w("design:type",String)],CY.prototype,"thumbLayoutStyle",void 0);v([I(),w("design:type",Object)],CY.prototype,"data",void 0);v([I({value:[]}),w("design:type",Array)],CY.prototype,"reorderedContents",void 0);
v([rl("data.contents.length"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],CY.prototype,"onChange",null);v([ql("yt-rich-grid-request-layout"),w("design:type",Function),w("design:paramtypes",[CustomEvent,String]),w("design:returntype",void 0)],CY.prototype,"respondToLayoutRequest",null);v([ql("iron-resize"),w("design:type",Function),w("design:paramtypes",[Boolean]),w("design:returntype",void 0)],CY.prototype,"refreshGridLayout",null);var yFa=CY=v([ml()],CY);var zFa=[U.YtActionHandlerBehavior,V.YtRendererBehavior,lY.YtdGuideStateAwareBehavior,{properties:{tabs:{type:Array,observer:"tabsChanged_"},selected:Number,active:{type:Boolean,observer:"activeChanged_"}},observers:["guideVisibleChanged_(guidePersistentAndVisible)"],activeChanged_:function(a){a?(this.$.header.fire("iron-resize"),this.listen(window,"scroll","onScroll_")):(this.unlisten(window,"scroll","onScroll_"),this.fire("yt-request-panel-mode-change",{mode:"seamed"}))},
guideVisibleChanged_:function(){this.$.header.fire("iron-resize")},
onScroll_:function(){this.debounce("onScroll_",function(){var a=1==this.$.header.getScrollState().progress?"standard":"seamed";this.fire("yt-request-panel-mode-change",{mode:a})},10)},
tabsChanged_:function(a){if(a){for(var b=null,c=0,d=a.length;c<d;++c){var e=a[c].tabRenderer;if(e&&e.selected){b=c;break}}this.selected=b}},
onTabsActivate_:function(a){this.fire("yt-navigate",{endpoint:this.tabs[a.detail.selected].tabRenderer.endpoint})}}];var AFa={_noAccessors:!0,properties:{data:{type:Object,observer:"dataObserver_"},height:Number,bottomSidePanel:Boolean,width:Number,disableNowPlaying:{type:Boolean,value:!1,observer:"checkMiniplayer_"},disableTooltips:{type:Boolean,value:!1},useHoveredProperty:{type:Boolean,value:!1},hovered:{type:Boolean,value:!1},isThumbnailHovered_:{type:Boolean,value:!1},finalHoveredState_:{type:Boolean,computed:"computeFinalHoveredState_(useHoveredProperty, hovered, isThumbnailHovered_)"},thumbnailOverlaySidePanelWidth_:{type:Number,
computed:"computeThumbnailOverlaySidePanelWidth_(width, height)"},addBackground:{type:Boolean,reflectToAttribute:!0,value:A("kevlar_thumbnail_bg")},hoverOverlays_:{type:Object,computed:"computeHoverOverlays_(finalHoveredState_, data.thumbnailOverlays)"},nowPlaying:{type:Boolean,reflectToAttribute:!0,value:!1}},listeners:{mouseenter:"onMouseEnter_",mouseleave:"onMouseLeave_"},computeThumbnailOverlaySidePanelWidth_:function(a,b){return a-b},
computeFinalHoveredState_:function(a,b,c){return A("persistent_miniplayer")&&this.nowPlaying?!1:A("kevlar_thumbnail_fluid")&&a?b:c},
computeHoverOverlays_:function(a,b){return a&&b?b:void 0},
onMouseEnter_:function(){this.isThumbnailHovered_=!0},
onMouseLeave_:function(){this.isThumbnailHovered_=!1},
dataObserver_:function(){this.checkMiniplayer_()},
checkMiniplayer_:function(){var a=xV.getInstance().currentEndpoint;this.nowPlaying=!this.disableNowPlaying&&a&&a.watchEndpoint&&this.data?this.data.playlistId?a.watchEndpoint.playlistId===this.data.playlistId:a.watchEndpoint.videoId===this.data.videoId:!1}};var DY={};DY.YtVideoPlayerRendererBehavior=[iY.ComponentBehavior,T.YtActionSenderBehavior,V.YtRendererBehavior,{properties:{data:{type:Object,observer:"dataChanged_"},useYtdPlayer_:{type:Boolean,value:function(){return A("kevlar_use_ytd_player")||A("kevlar_ytd_player_container")}}},
created:function(){this.currentPage_=null},
attached:function(){this.currentPage_=(this.getInterface(vV)||this.getInterfaceForTs("ytd-page-manager")).getCurrentPage();this.useYtdPlayer_?this.fire("yt-player-attached",this.$.player):this.firePlayerRequested_();A("kevlar_disable_fast_player_sizing_on_channel_page")&&sW(this).getPlayerPromise().then(function(a){a.setUseFastSizingOnWatch(!1)})},
detached:function(){this.currentPage_.fire("yt-player-detached",this.$.player);this.currentPage_=null},
dataChanged_:function(){this.useYtdPlayer_||this.firePlayerRequested_()},
firePlayerRequested_:function(){var a=this,b;return Ca(function(c){if(1==c.nextAddress)return a.data?(b=a.sendOptionalAction("yt-miniplayer-active"))&&b[0]?ta(c,a.sendOptionalAction("yt-deactivate-miniplayer-action"),3):c.jumpTo(3):c.jumpTo(0);a.fire("yt-player-requested",{container:a.$["player-container"],videoId:a.data.videoId,playlistId:a.data.playlistId});ua(c)})}}];var EY=function(){};
EY.prototype.getTimeSinceActive=function(){};
EY.prototype.ignoreNextScroll=function(){};hY.YtdAutonavPauseBehaviorImpl_={_noAccessors:!0,AUTONAV_IDLE_TIMEOUT_:144E5,listeners:{"iron-overlay-closed":"onIronOverlayClosed_","iron-overlay-opened":"onIronOverlayOpened_","yt-autonav-pause-blur":"onYtAutonavPauseBlur_","yt-autonav-pause-focus":"onYtAutonavPauseFocus_","yt-autonav-pause-guide-closed":"onYtAutonavPauseGuideClosed_","yt-autonav-pause-guide-opened":"onYtAutonavPauseGuideOpened_","yt-autonav-pause-player":"onYtAutonavPausePlayer_","yt-autonav-pause-player-ended":"onYtAutonavPausePlayerEnded_",
"yt-autonav-pause-scroll":"onYtAutonavPauseScroll_","yt-report-form-opened":"onYtReportFormOpened_","yt-report-form-closed":"onYtReportFormClosed_"},created:function(){this.autonavPauseReasons_={scroll:!1,inputBoxFocus:!1,overlayOpen:!1,guideOpen:!1,reportOpened:!1,backgroundAndMute:!1,requestedByPlayer_:!1,longIdle:!1,youthereLactExperiment:!1,userEngagement:!1};this.autonavPauseActionMap_={"ytd-log-youthere-nav":"onYtEndpointChanged_","yt-autonav-pause-user-engagement":"onYtAutonavPauseUserEngagement_",
"yt-user-activity":"onYtUserActivity_","yt-get-autonav-pause-debug-state":"onYtGetAutonavPauseDebugState_"};this.userEngagementCsn_=null},
attached:function(){this.listen(document,"visibilitychange","onYtAutonavVisibilityChanged_");this.registerActionMap(this.autonavPauseActionMap_)},
detached:function(){this.unlisten(document,"visibilitychange","onYtAutonavVisibilityChanged_");this.unregisterActionMap(this.autonavPauseActionMap_)},
isAutonavBlockingPopup_:function(a){return A("kevlar_autonav_popup_filtering")?(a=(a=Polymer.dom(a))&&a.rootTarget)?a.hasAttribute("prevent-autonav"):!0:!0},
onIronOverlayOpened_:function(a){this.isAutonavBlockingPopup_(a)&&(this.autonavPauseReasons_.overlayOpen=!0,this.updateAutoNavState_())},
onIronOverlayClosed_:function(a){this.isAutonavBlockingPopup_(a)&&(this.autonavPauseReasons_.overlayOpen=!1,this.updateAutoNavState_())},
onYtAutonavPauseFocus_:function(){this.autonavPauseReasons_.inputBoxFocus=!0;this.updateAutoNavState_()},
onYtAutonavPauseBlur_:function(){this.async(function(){this.isInBackground_()||(this.autonavPauseReasons_.inputBoxFocus=!1,this.updateAutoNavState_())},0)},
onYtAutonavPauseGuideOpened_:function(){this.autonavPauseReasons_.guideOpen=!0;this.updateAutoNavState_()},
onYtAutonavPauseGuideClosed_:function(){this.autonavPauseReasons_.guideOpen=!1;this.updateAutoNavState_()},
onYtReportFormOpened_:function(){this.autonavPauseReasons_.reportOpened=!0;this.updateAutoNavState_()},
onYtReportFormClosed_:function(){this.autonavPauseReasons_.reportOpened=!1;this.updateAutoNavState_()},
onYtAutonavPauseScroll_:function(){var a=this.getInterface(vV),b=a.getCurrentPage();b&&a.isOnWatch()&&(a=b.getPlayerContainer())&&(this.autonavPauseReasons_.scroll=-200>a.getBoundingClientRect().top,this.updateAutoNavState_())},
onYtAutonavPauseUserEngagement_:function(a){A("user_engagement_enable_autoplay_pause_feature")?isNaN(a.lowEngagementThresholdMs)||0>=a.lowEngagementThresholdMs||"LOW_USER_ENGAGEMENT_ACTION_PAUSE_AUTOPLAY"!=a.lowUserEngagementAction?OS("YOU_THERE_EVENT_TYPE_F_AUTONAV_INVALID_LACT_THRESHOLD"):this.getInterface(EY).getTimeSinceActive()<a.lowEngagementThresholdMs?En(function(){OS("YOU_THERE_EVENT_TYPE_F_AUTONAV_BELOW_LACT_THRESHOLD")}.bind(this)):jX()?(this.userEngagementCsn_=Wo(),En(function(){OS("YOU_THERE_EVENT_TYPE_F_AUTONAV_PAUSE_ENABLED",
this.userEngagementCsn_)}.bind(this)),this.autonavPauseReasons_.userEngagement=!0,this.updateAutoNavState_()):OS("YOU_THERE_EVENT_TYPE_F_AUTONAV_RATE_LIMITED"):cn(Error("Autonav pause feature: onYtAutonavPauseUserEngagement_ called but experiment not enabled. Event params: "+JSON.stringify(a)))},
onYtAutonavPausePlayer_:function(a){this.autonavPauseReasons_.requestedByPlayer_=a.detail;this.updateAutoNavState_()},
onYtAutonavVisibilityChanged_:function(){var a=this,b,c,d;return Ca(function(e){if(1==e.nextAddress)return(b=qW(a,!0))?ta(e,b.getPlayerPromise(),2):e.return();c=e.yieldResult;d=c.isMuted()||0==c.getVolume();a.autonavPauseReasons_.backgroundAndMute=a.isInBackground_()&&d;a.updateAutoNavState_();ua(e)})},
onYtAutonavPausePlayerEnded_:function(){var a=this.getInterface(EY),b=this.AUTONAV_IDLE_TIMEOUT_;A("user_engagement_enable_autoplay_pause_feature")||A("is_part_of_any_user_engagement_experiment")||!A("enable_watch_next_pause_autoplay_lact")||(b=1E3*Be("watch_next_pause_autoplay_lact_sec"));this.autonavPauseReasons_.longIdle=a.getTimeSinceActive()>b;this.updateYouThereState_();this.updateAutoNavState_()},
onYtUserActivity_:function(){this.autonavPauseReasons_.userEngagement&&(En(function(){OS("YOU_THERE_EVENT_TYPE_F_AUTONAV_PAUSE_DISABLED_BY_LACT_RESET",this.userEngagementCsn_)}.bind(this)),this.autonavPauseReasons_.userEngagement=!1,this.updateAutoNavState_());
this.autonavPauseReasons_.youthereLactExperiment&&(En(function(){OS("YOU_THERE_EVENT_TYPE_AUTOPLAY_RESUMED",this.userEngagementCsn_);eo()}.bind(this)),this.autonavPauseReasons_.youthereLactExperiment=!1,this.updateAutoNavState_());
this.autonavPauseReasons_.longIdle&&!A("disable_kevlar_resume_autonav_after_user_activity")&&(this.autonavPauseReasons_.longIdle=!1,this.updateAutoNavState_())},
isInBackground_:function(){var a=window.document.visibilityState;return!(!a||"visible"==a)},
updateAutoNavState_:function(){var a=!1,b;for(b in this.autonavPauseReasons_)a=a||this.autonavPauseReasons_[b];a?hV.getInstance().pause():hV.getInstance().unpause()},
updateYouThereState_:function(){var a=!1;if(A("enable_autoplay_pause_by_lact")){a=this.getInterface(EY);var b=1E3*Be("autoplay_pause_by_lact_sec"),c=Be("autoplay_pause_by_lact_sampling_fraction");(a=a.getTimeSinceActive()>=b&&Math.random()<c)&&!jX()&&(En(function(){OS("YOU_THERE_EVENT_TYPE_AUTOPLAY_RATE_LIMITED")}),a=!1)}a!=this.autonavPauseReasons_.youthereLactExperiment&&(this.autonavPauseReasons_.youthereLactExperiment=a)&&(this.userEngagementCsn_=Wo(),En(function(){OS("YOU_THERE_EVENT_TYPE_AUTOPLAY_PAUSED",
this.userEngagementCsn_)}.bind(this)),this.youthereWaitForLactReset_=!0);
this.autonavPauseReasons_.userEngagement&&En(function(){OS("YOU_THERE_EVENT_TYPE_F_AUTONAV_PAUSED",this.userEngagementCsn_)}.bind(this))},
onYtEndpointChanged_:function(){this.autonavPauseReasons_.youthereLactExperiment&&(OS("YOU_THERE_EVENT_TYPE_AUTOPLAY_NAVIGATED_OUT",this.userEngagementCsn_),eo(),this.autonavPauseReasons_.youthereLactExperiment=!1,this.updateAutoNavState_());this.autonavPauseReasons_.userEngagement&&(OS("YOU_THERE_EVENT_TYPE_F_AUTONAV_NAVIGATED_OUT",this.userEngagementCsn_),this.autonavPauseReasons_.userEngagement=!1,this.updateAutoNavState_())},
onYtGetAutonavPauseDebugState_:function(){return JSON.stringify(this.autonavPauseReasons_)}};
hY.YtdAutonavPauseBehavior=[U.YtActionHandlerBehavior,hY.YtdAutonavPauseBehaviorImpl_];var FY=[tY.YtTaskEmitterBehavior,{_noAccessors:!0,properties:{initialCount:{type:Number,value:4},targetFramerate:{type:Number,value:20},minChunkSize:{type:Number,value:1},autoFill:{type:Boolean,value:!1},shownItems:Array,shownCount:{type:Number,value:0},canShowMore:{type:Boolean,notify:!0,reflectToAttribute:!0,observer:"onCanShowMoreUpdated_"},renderDelay:Number,targetFrameTime_:{type:Number,computed:"computeFrameTime_(targetFramerate)"},canScheduleJobs:{type:Boolean,value:!0,observer:"canScheduleJobsChanged_"}},
itemsPath:"data.items",beforeRegister:function(){if(this.itemsPath){this.getItemsPath&&this.getItemsPath instanceof Function&&(this.itemsPath=this.getItemsPath());var a=(this.constructor.generatedFrom||this).observers;a||(a=[]);a.push("deepLazyListObserver_("+this.itemsPath+".*)");Polymer.Element?this.constructor.generatedFrom.observers=a:this.observers=a}},
created:function(){this.boundRenderChunk_=this.renderChunk_.bind(this);this.items_=null;this.lazyListRenderJobId_=this.chunkCount_=this.lastChunkTime_=this.length_=0;this.deferRenderingOutsideVisibleArea_=A("defer_rendering_outside_visible_area");this.nonDeferredItemCount=-1;this.renderElementsOutsideVisibleArea_=null;this.partiallyRenderedItems_=new WeakSet},
fillRemainingListItems:function(){this.fillRange_(this.shownCount,this.length_)},
renderDeferredElements:function(){var a=this.renderElementsOutsideVisibleArea_;a&&(tp(a,4),a.processSignal_())},
deepLazyListObserver_:function(a){var b=this;if(a){var c=a.value||[];if(this.itemsPath==a.path){var d=this.nonDeferredItemCount;a=0;A("enable_signals")&&this.deferRenderingOutsideVisibleArea_&&-1<d&&c.length>d&&(a=z("REMAINING_DOVA_DEFERRED_CHUNKS",-1));0<a?(0<d&&this.setInitialItemsOnDataChanged_(c.slice(0,d)),(d=this.renderElementsOutsideVisibleArea_)?d.cancel():(d=this.renderElementsOutsideVisibleArea_=new qp(2,"eocs"),Fm(window,"scroll",function(){return b.renderDeferredElements()})),sp(d,function(){b.setInitialItemsOnDataChanged_(c)}),
re("REMAINING_DOVA_DEFERRED_CHUNKS",a-1)):this.setInitialItemsOnDataChanged_(c)}else if(this.itemsPath+".splices"==a.path)this.onItemsUpdated_(c);else
this.notifyPath("shownItems"+a.path.substr(this.itemsPath.length),a.value)}else this.cancelPendingTasks_()},
onItemsUpdated_:function(a){a&&(this.items_=this.get(this.itemsPath))&&(this.updateChangeRecord_(a),this.length_=this.items_.length,this.canShowMore=this.shownCount<this.length_,this.autoFill?(this.lastChunkTime_=Date.now(),this.tryRenderChunk_()):this.fillRemainingListItems())},
updateChangeRecord_:function(a){a=a.indexSplices;for(var b=0,c=a.length;b<c;b++){var d=a[b];if(d.index<this.shownCount&&(d.removed&&this.splice("shownItems",d.index,d.removed.length),d.addedCount)){var e=["shownItems",d.index,0];e.push.apply(e,d.object.slice(d.index,d.index+d.addedCount));this.splice.apply(this,e)}}this.shownCount=this.shownItems.length},
setInitialItemsOnDataChanged_:function(a){this.cancelPendingTasks_();a||(a=[]);this.items_=a;this.length_=this.items_.length;this.shownItems=this.items_.slice(0,this.initialCount);this.shownCount=this.shownItems.length;this.canShowMore=this.shownCount<this.length_;this.autoFill&&(se("DISABLE_AUTOFILL")?this.fillRemainingListItems():(this.chunkCount_=this.initialCount,this.lastChunkTime_=Date.now(),this.canShowMore&&Polymer.RenderStatus.afterNextRender(this,this.tryRenderChunk_)))},
fillRange_:function(a,b){this.canShowMore&&this.items_&&(a=this.items_.slice(a,b),a.unshift("shownItems"),this.push.apply(this,a),this.shownCount=b,this.canShowMore=this.shownCount<this.length_)},
tryRenderChunk_:function(){var a=this;this.canShowMore&&this.debounce("renderChunk",function(){a.requestRenderChunk_()})},
requestRenderChunk_:function(){if(se("SCHEDULED_LAZY_LIST")||this.renderDelay)return this.shouldUseTaskManager()||this.canScheduleJobs?(this.cancelPendingTasks_(),this.lazyListRenderJobId_=Gn(this.getTaskManager(),this.boundRenderChunk_,this.renderDelay),!0):!1;requestAnimationFrame(this.boundRenderChunk_);return!0},
cancelPendingTasks_:function(){this.lazyListRenderJobId_&&this.getTaskManager().cancelJob(this.lazyListRenderJobId_);var a=this.renderElementsOutsideVisibleArea_;a&&(a.cancel(),this.renderElementsOutsideVisibleArea_=null)},
renderChunk_:function(){var a=Date.now();this.chunkCount_=Math.round(this.targetFrameTime_/(a-this.lastChunkTime_)*this.chunkCount_)||this.minChunkSize;this.lastChunkTime_=a;this.fillRange_(this.shownCount,Math.min(this.shownCount+this.chunkCount_,this.length_));this.lazyListRenderJobId_=0;this.tryRenderChunk_()},
computeFrameTime_:function(a){return Math.ceil(1E3/a)},
onCanShowMoreUpdated_:function(a){this.data&&(a?this.partiallyRenderedItems_.add(this.items_):this.partiallyRenderedItems_.delete(this.items_))},
canScheduleJobsChanged_:function(a){!this.shouldUseTaskManager()&&this.data&&(!a&&this.canShowMore?(this.cancelDebouncer("renderChunk"),this.lazyListRenderJobId_&&this.getTaskManager().cancelJob(this.lazyListRenderJobId_)):a&&this.partiallyRenderedItems_.has(this.items_)&&(A("kevlar_lazy_list_resume_for_autofill")?this.autoFill&&this.tryRenderChunk_():this.tryRenderChunk_()))}}];XX.YtdHorizontalListBehaviorImpl_={properties:{data:{type:Object},atStart:{type:Boolean,value:!0,reflectToAttribute:!0},atEnd:{type:Boolean,value:!0,reflectToAttribute:!0},startIndex:{type:Number,value:0},endIndex:{type:Number,value:0},initialCount:{type:Number,value:6},boundPrevClick:{type:Function,value:function(){return this.prevClick_.bind(this)}},
boundNextClick:{type:Function,value:function(){return this.nextClick_.bind(this)}},
useFloorScrolling:{type:Boolean,value:!1}},listeners:{"iron-resize":"onIronResize_",transitionend:"onItemsTransitionEnd_"},observers:["observeShownItems_(shownItems)","onIronResize_(guideOpened)"],created:function(){this.MAX_DOVA_ROW_COUNT_=6;this.minComponentWidth_=0;this.MIN_REMAINING_WIDTH_TO_SHOW_BUTTON_=20;this.setButtonsStateRequested_=!1;this.cachedViewportWidth_=z("initialInnerWidth",void 0)||window.innerWidth;this.cachedViewportHeight_=z("initialInnerHeight",void 0)||window.innerHeight;-1==
z("REMAINING_DOVA_DEFERRED_CHUNKS",-1)&&re("REMAINING_DOVA_DEFERRED_CHUNKS",this.MAX_DOVA_ROW_COUNT_)},
attached:function(){!Polymer.Element||window.ShadyDOM&&window.ShadyDOM.noPatch||this.shadowRoot.addEventListener("transitionend",this.onItemsTransitionEnd_.bind(this))},
detached:function(){!Polymer.Element||window.ShadyDOM&&window.ShadyDOM.noPatch||this.shadowRoot.removeEventListener("transitionend",this.onItemsTransitionEnd_.bind(this))},
get nonDeferredItemCount(){var a=z("NON_DEFERRED_HORIZONTAL_LIST_ROW_COUNT",-1);if(-1==a)a=this.cachedViewportHeight_,a=1320<a?5:1020<a?4:730<a?3:430<a?2:1;else if(0==a)return 0;re("NON_DEFERRED_HORIZONTAL_LIST_ROW_COUNT",a-1);a=z("NON_DEFERRED_HORIZONTAL_LIST_ITEM_COUNT",-1);if(-1<a)return a;a=this.cachedViewportWidth_;a=1600<a?6:1400<a?5:1300<a?4:1090<a?5:870<a?4:660<a?3:2;re("NON_DEFERRED_HORIZONTAL_LIST_ITEM_COUNT",a);return a},set nonDeferredItemCount(a){},offset_:0,reset:function(){this.offset_=
0;this.reposition_();this.minComponentWidth_=0},
reposition_:function(){this.transform("translateX("+("rtl"==z("HTML_DIR")?"":"-")+this.offset_+"px)",this.$.items);this.requestButtonsStateUpdate_()},
requestButtonsStateUpdate_:function(){this.setButtonsStateRequested_||(this.setButtonsStateRequested_=!0,Polymer.RenderStatus.afterNextRender(this,this.setButtonsState_))},
setButtonsState_:function(){this.setButtonsStateRequested_=!1;if(this.$.items.firstChild){if(!this.minComponentWidth_){var a=window.getComputedStyle(this.$.items.firstChild).marginRight;this.minComponentWidth_=this.$.items.firstChild.offsetWidth+parseInt(a,10)}a=this.$["scroll-container"].clientWidth;var b=this.$.items.clientWidth,c=this.get(this.itemsPath,this);if(c){var d=Math.round(a/this.minComponentWidth_)||1;this.startIndex=Math.round(this.offset_/this.minComponentWidth_);this.endIndex=Math.min(this.startIndex+
d,c.length)-1}this.canShowMore?b+this.minComponentWidth_>=this.offset_+a&&(this.atEnd=!1):this.atEnd=this.offset_+a>=b-this.MIN_REMAINING_WIDTH_TO_SHOW_BUTTON_?!0:!1;this.atStart=this.offset_<=this.MIN_REMAINING_WIDTH_TO_SHOW_BUTTON_}},
nextClick_:function(){this.fillRemainingListItems();Polymer.Element&&Polymer.dom.flush();var a=this.$["scroll-container"].clientWidth,b=this.$.items.clientWidth;this.offset_+=(this.useFloorScrolling?Math.floor(a/this.minComponentWidth_)||1:Math.round(a/this.minComponentWidth_)||1)*this.minComponentWidth_;this.offset_+a>=b&&(this.offset_=b-a);this.reposition_()},
prevClick_:function(){var a=this.$["scroll-container"].clientWidth;this.offset_-=(this.useFloorScrolling?Math.floor(a/this.minComponentWidth_)||1:Math.round(a/this.minComponentWidth_)||1)*this.minComponentWidth_;0>this.offset_&&(this.offset_=0);this.reposition_()},
onIronResize_:function(){this.requestButtonsStateUpdate_()},
onItemsTransitionEnd_:function(a){Polymer.dom(a).rootTarget==this.$.items&&this.markDirty()},
observeShownItems_:function(){this.reset()}};
XX.YtdHorizontalListBehavior=[Polymer.IronResizableBehavior,FY,lY.YtdGuideStateAwareBehavior,XX.YtdHorizontalListBehaviorImpl_];XX.YtdPosterHoverAnimationBehaviorImpl_={listeners:{"iron-resize":"onIronPosterResize_"},created:function(){this.initialized_=!1;this.hoverAnimationManager_=null},
attached:function(){var a="rtl"==z("HTML_DIR");A("enable_web_poster_hover_animation")&&!a&&(this.listen(this,"poster-renderer-hover","onPosterRenderHover_"),this.listen(this,"poster-renderer-leave","onPosterRendererLeave_"))},
detached:function(){this.unlisten(this,"poster-renderer-hover","onPosterRenderHover_");this.unlisten(this,"poster-renderer-leave","onPosterRendererLeave_")},
initialize_:function(){!this.initialized_&&this.data&&this.data.items&&0<this.data.items.length&&this.data.items[0].hasOwnProperty("posterRenderer")&&(this.hoverAnimationManager_||(this.hoverAnimationManager_=new KX(this,"ytd-grid-renderer"==this.is)),this.initialized_=!0,this.$["scroll-container"]&&(this.$["scroll-container"].style.height="313px"),this.updateNumberItemsPerLine_())},
updateNumberItemsPerLine_:function(){this.hoverAnimationManager_.numItemPerLine_=this.clientWidth/214},
onPosterRenderHover_:function(a){a.target.isHovering||(this.hoverAnimationManager_||this.initialize_(),GEa(this.hoverAnimationManager_,a,this.$.items.children,"hovering"))},
onPosterRendererLeave_:function(a){if(this.hoverAnimationManager_){var b=this.$.items.children;if(0!=b.length){var c=a.detail.mouseEvent;a=c.pageX;c=c.pageY;b=b[b.length-1].getBoundingClientRect();if(a>=b.right&&c>=b.top)this.onMouseLeavePosterHoverSection_(null)}}},
onMouseLeavePosterHoverSection_:function(a){if(this.hoverAnimationManager_){var b=this.hoverAnimationManager_;"steady-state"!=b.currentAnimateState_&&GEa(b,a,this.$.items.children,"after-hover")}},
resetSteadyState:function(){this.hoverAnimationManager_&&this.hoverAnimationManager_.resetSteadyState(this.$.items.children)},
onIronPosterResize_:function(){this.hoverAnimationManager_&&this.updateNumberItemsPerLine_()}};
XX.YtdPosterHoverAnimationBehavior=[Polymer.IronResizableBehavior,XX.YtdPosterHoverAnimationBehaviorImpl_];var BFa=function(){return F.apply(this,arguments)||this};
l(BFa,F);var CFa=BFa;CFa=v([W({is:"ytd-watch-items"})],CFa);var GY={};
GY.YtEndpointBehavior=[cY.YtOpenPopupBehavior,{properties:{openPopupConfig:Object,endpointHandlerTarget:Object},ready:function(){this.openPopupConfig=z("openPopupConfig");this.endpointHandlerTarget||(this.endpointHandlerTarget=this);this.listen(this.endpointHandlerTarget,"tap","onEndpointTap_");this.listen(this.endpointHandlerTarget,"touchstart","onEndpointTapStart_");this.listen(this.endpointHandlerTarget,"touchend","onEndpointTouchEnd_");this.listen(this.endpointHandlerTarget,"mousedown","onEndpointTapStart_")},
getEndpointFromEvent_:function(a){a=Polymer.dom(a).path;for(var b,c=0;c<a.length;c++){b=a[c];if("yt-endpoint"==b.is)break;if("A"==b.tagName&&b.classList.contains("yt-simple-endpoint")){if(!b.data)break;return b}}return null},
onEndpointTap_:function(a){var b=this.getEndpointFromEvent_(a);if(b){var c=0===Be("pbj_navigate_limit",-1),d=a.detail.sourceEvent,e=void 0!==d.button;d=0==d.button&&!(d.shiftKey||d.altKey||d.metaKey||d.ctrlKey);b.data&&(!e||e&&d)&&(this.setTempData_(b),e=this.getEndpointHandler_(),(d=this.getNavigationEndpointPopupAction(b.data))?(a.preventDefault(),a.stopPropagation(),this.openPopup(d)):(e=e.getNavigationEventDetails(b.data,a),c||(a.preventDefault(),a.stopPropagation(),this.fire("yt-navigate",e,
{node:b}))))}},
onEndpointTouchEnd_:function(a){this.getEndpointFromEvent_(a)&&a.preventDefault()},
onEndpointTapStart_:function(a){var b=this.getEndpointFromEvent_(a);b&&(A("sonic_disable_async_click_on_non_regular_clicks")&&this.maybeDisableAdsAsyncClickTracking_(a),this.setTempData_(b),A("polymer_endpoint_tap_start_stop_propagation")&&a.stopPropagation())},
setTempData_:function(a){if(a.href){var b={itct:a.data.clickTrackingParams};a.data&&a.data.watchEndpoint&&(b.watch_params=a.data.watchEndpoint.params);A("kevlar_client_side_screens")&&(b.endpoint=JSON.stringify(a.data));cS(a.href,b)}},
maybeDisableAdsAsyncClickTracking_:function(a){if((1!=a.which||a.shiftKey||a.altKey||a.metaKey||a.ctrlKey)&&(a=this.getEndpointFromEvent_(a))&&a.data&&a.data.loggingUrls){var b=tb(a.data.loggingUrls,function(d){return d.baseUrl&&"1"==Ei(d.baseUrl,"ae")});
if(-1!=b&&a instanceof HTMLAnchorElement){var c=a.data.loggingUrls[b].baseUrl;c=Fi(c,"ae");c=Fi(c,"act");c=Fi(c,"ri");fd(a,c);a.data.loggingUrls.splice(b)}}}}];Polymer({is:"yt-icon",properties:{icon:String,targetContainer:{type:String,value:""}},observers:["iconChanged_(icon, targetContainer, isAttached)"],meta_:new Polymer.IronMeta({type:"iconset"}),created:function(){this.iconName_="";this.iconsetName_="yt-icons";this.iconset_=null;this.missingIconSet_=!1},
iconChanged_:function(a,b,c){(a||this.iconName_)&&c&&(a?(!A("default_to_innertube_icon")||0<a.indexOf(":")||(a=gY(a)),a=(a||"").split(":"),1==a.length&&a.unshift("yt-icons"),a[1]=a[1].toLowerCase(),a.length&&(this.iconsetName_=a[0],this.iconName_=a[1])):this.iconName_=this.iconsetName_="",b?this.classList.add("external-container"):this.classList.remove("external-container"),this.updateIcon_(b))},
onIconsetAdded_:function(){this.updateIcon_(this.targetContainer)},
updateIcon_:function(a){var b=this;if(a){if(!this.domHost||!this.domHost.$)return;b=this.domHost.$[a]||this.domHost.$$("#"+a)}""==this.iconName_?this.iconset_&&this.iconset_.removeIcon(b):this.iconsetName_&&this.meta_&&((this.iconset_=this.meta_.byKey(this.iconsetName_))?(this.iconset_.applyIcon(b,this.iconName_),this.missingIconSet_&&(this.missingIconSet_=!1,this.unlisten(window,"iron-iconset-added","onIconsetAdded_"))):(this.missingIconSet_=!0,this.listen(window,"iron-iconset-added","onIconsetAdded_")))}});/*
'--yt-lightsource-section1-color',
'--yt-lightsource-section2-color',
'--yt-lightsource-section3-color',
'--yt-lightsource-navBarColor',
'--yt-lightsource-primary-title-color',
'--yt-lightsource-secondary-title-color',
'--yt-lightsource-body-text-color',
'--yt-lightsource-iron-activated-color',
'--yt-lightsource-iron-inactive-color',
'--yt-basic-background-color',
'--yt-basic-foreground-title-color',
'--yt-basic-foreground-body-color',
'--yt-basic-foreground-activated-color'
*/
var DFa="section1Color section2Color section3Color navBarColor primaryTitleColor secondaryTitleColor bodyTextColor ironActivatedColor ironInactiveColor".split(" "),EFa=["backgroundColor","foregroundTitleColor","foregroundBodyColor","foregroundActivatedColor"],HY=function(a,b){if(b){var c={};DFa.forEach(function(d){d=FFa(b,d,"--yt-lightsource-");Object.assign(c,d)});
EFa.forEach(function(d){d=FFa(b,d,"--yt-basic-");Object.assign(c,d)});
a.updateStyles(c)}},FFa=function(a,b,c){c+=Polymer.CaseMap.camelToDashCase(b);
var d={};a&&a[b]?(a=sX(a[b]),d[c]=a):d[c]="";return d};ZX.YtPlaintextBehavior_={properties:{plaintextOnly:{type:Boolean,value:!1}},detached:function(){this.plaintextOnly&&(this.removeEventListener("paste",this.onPaste_),this.removeOwnKeyBindings())},
ready:function(){this.plaintextOnly&&(this.addEventListener("paste",this.onPaste_),this.addOwnKeyBinding("ctrl+b meta+b ctrl+i meta+i","preventRichTextFormatting_"))},
onPaste_:function(a){a.preventDefault();a=a.clipboardData.getData("text/plain");document.execCommand("insertText",!1,a)},
preventRichTextFormatting_:function(a){df&&(a=a.detail.keyboardEvent,a.stopImmediatePropagation(),a.preventDefault())}};
ZX.YtPlaintextBehavior=[Polymer.IronA11yKeysBehavior,ZX.YtPlaintextBehavior_];var GFa=0,IY=new WeakMap,JY=0,KY=new Set;function LY(a,b,c,d){d||(d="width");if(!a||!a.length)return null;var e=GFa;e||(e=GFa=window.devicePixelRatio);1<e&&(b*=e);e=a.length;if(c)for(var g=0;g<e;g++)if(0<=a[g].url.indexOf(c))return a[g].url||null;for(c=0;c<e;c++)if(a[c][d]>=b)return a[c].url||null;for(b=e-1;0<b;b--)if(a[b][d])return a[b].url||null;return a[0].url||null}
function HFa(){KY.size?setTimeout(function(){Jn(IFa)},0):JY=0}
function IFa(){var a=Hm(),b=null;KY.forEach(function(c){c.loaded=!0;c.loadTime=a;c.pendingPaint=!1;var d=IY.get(c);d&&d.resolve(a);b=c});
b&&b.markDirty();KY.clear();JY=0}
function JFa(a){var b=IY.get(a);b||(b=fw(),IY.set(a,b));Infinity>a.loadTime&&0<a.loadTime&&b.resolve(a.loadTime);return b.promise}
;Polymer({is:"yt-formatted-string",properties:{text:{type:Object,observer:"textChanged_"},noEndpoints:Boolean,noStyles:Boolean,splitLines:{type:Boolean,reflectToAttribute:!0},forceDefaultStyle:{type:Boolean,reflectToAttribute:!0},ellipsisTruncate:{type:Boolean,reflectToAttribute:!0,observer:"ellipsisTruncateChanged_"},ariaLabel:{type:String,reflectToAttribute:!0,computed:"computeAriaLabel_(text.accessibility.accessibilityData.label)"},hasLinkOnly_:{type:String,reflectToAttribute:!0,computed:"computeHasLinkOnly_(text.runs)"},
emojiSize:{type:Number,value:24},target:{type:String},enableContentEditable:{type:Boolean,observer:"enableContentEditableChanged_"},overrideAriaLabel:{type:String,observer:"overrideAriaLabelChanged_"},respectHtmlDir:Boolean},behaviors:[iY.ComponentBehavior,ZX.YtPlaintextBehavior,T.YtActionSenderBehavior,V.YtRendererBehavior],created:function(){this.hasSetTitle_=this.hasChange_=!1},
ready:function(){Polymer.Settings.useShadow&&this.toggleClass("use-shadow",!0);"rtl"!=z("HTML_DIR",void 0)||this.respectHtmlDir||this.setAttribute("dir","auto");this.enableContentEditableChanged_()},
attached:function(){this.hasChange_&&this.textChanged_(this.text)},
clearContents_:function(){for(var a=this.getRoot(),b=a.lastChild;b&&"STYLE"!=b.tagName;){try{a.removeChild(b)}catch(c){break}"yt-endpoint"==b.is&&(Hq(b),b.innerHTML="");b=a.lastChild}},
textChanged_:function(a){if(void 0===this.isAttached)this.hasChange_=!0;else{this.hasChange_=!1;for(var b=this.firstChild;b&&"FONT"==b.nodeName;){var c=b;b=b.nextSibling;this.removeChild(c)}c=this.getRoot();if(a&&(a.runs||a.simpleText)){if(this.ellipsisTruncateChanged_(this.ellipsisTruncate),b=a.simpleText,!b&&1==a.runs.length&&this.isSimpleString_(a.runs[0])&&(b=a.runs[0].text),void 0===b||A("enable_mixed_direction_formatted_strings"))a=a.runs,void 0!==b&&(a=[{text:b}]),this.ellipsisTruncate?this.classList.add("complex-string"):
this.classList.remove("complex-string"),a&&this.updateText_(a);else{if(b!=c.textContent){a=Polymer.Settings.useShadow;if(!a)try{c.textContent=b}catch(d){a=!0}a&&(this.clearContents_(),a=document.createElement("span"),a.appendChild(document.createTextNode(b)),c.appendChild(a))}}}else this.clearContents_()}},
ellipsisTruncateChanged_:function(a){!a||this.hasAttribute("title")&&!this.hasSetTitle_?this.hasSetTitle_&&(this.removeAttribute("title"),this.hasSetTitle_=!1):(this.setAttribute("title",this.getRawText()),this.hasSetTitle_=!0)},
computeAriaLabel_:function(a){return a},
setNodeStyle_:function(a,b){A("enable_mixed_direction_formatted_strings")?b.setAttribute("dir","auto"):b.removeAttribute("dir");b.classList.remove("bold","deemphasize","italic","strikethrough");b.style.color="";this.noStyles||(a.bold&&b.classList.add("bold"),a.deemphasize&&b.classList.add("deemphasize"),a.italics&&b.classList.add("italic"),a.strikethrough&&b.classList.add("strikethrough"),a.textColor&&(b.style.color=sX(a.textColor)))},
setNodeTrackingParams_:function(a,b){b.data||(b.data={});if((a=a.loggingDirectives?a.loggingDirectives.trackingParams:null)||b.data.trackingParams)b.data.trackingParams=a},
computeHasLinkOnly_:function(a){return!(!a||1!=a.length||this.noEndpoints||!a[0].navigationEndpoint)},
getRoot:function(){var a=Polymer.dom(this.root);this.enableContentEditable&&Polymer.Element&&(a=Polymer.dom(a.firstChild));return a},
fixContenteditableScope:function(){this.getRoot().childNodes.forEach(function(a){1==a.nodeType&&(a.classList.add("style-scope"),a.classList.add("yt-formatted-string"))})},
updateText_:function(a){for(var b=a.length,c=this.getRoot(),d=c.firstChild;d&&"STYLE"==d.nodeName;)d=d.nextSibling;for(var e=0;e<b&&d;){var g=a[e];if(this.isSimpleString_(g)&&!Polymer.Settings.useShadow&&!A("enable_mixed_direction_formatted_strings"))if("#text"==d.nodeName){d.textContent!=g.text&&(d.textContent=g.text);e++;d=d.nextSibling;continue}else break;if(g.emoji)break;else if(!this.noEndpoints&&g.navigationEndpoint){if("A"!=d.nodeName)break;this.setDataOnAnchor_(d,g.navigationEndpoint)}else if("SPAN"!=
d.nodeName)break;this.setNodeStyle_(g,d);this.setNodeTrackingParams_(g,d);d.textContent!=g.text&&(d.textContent=g.text);e++;d=d.nextSibling}if(d)for(g=c.lastChild,d=e?d.previousSibling:null;g&&g!=d;){try{c.removeChild(g)}catch(h){}"yt-endpoint"==g.is&&(Hq(g),g.innerHTML="");g=c.lastChild}e!=b&&this.addTextNodes_(a,e)},
addTextNodes_:function(a,b){for(var c=document.createDocumentFragment(),d=a.length;b<d;b++){var e=a[b];if(!this.isSimpleString_(e)||Polymer.Settings.useShadow||A("enable_mixed_direction_formatted_strings")){if(e.emoji){if(e.emoji.image){var g=document.createElement("img");g.classList.add("emoji");g.src=LY(e.emoji.image.thumbnails,this.emojiSize);var h=this.get("image.accessibility.accessibilityData.label",e.emoji);g.alt=h?h:e.emoji.isCustomEmoji?e.emoji.shortcuts[0]:e.emoji.emojiId;c.appendChild(g)}}else!this.noEndpoints&&
e.navigationEndpoint?(g=document.createElement("a"),g.classList.add("yt-simple-endpoint"),g.setAttribute("spellcheck","false"),this.setDataOnAnchor_(g,e.navigationEndpoint)):g=document.createElement("span"),this.setNodeStyle_(e,g),this.setNodeTrackingParams_(e,g),g.appendChild(document.createTextNode(e.text)),c.appendChild(g);}else c.appendChild(document.createTextNode(e.text))}this.getRoot().appendChild(c)},
isSimpleString_:function(a){return(this.noEndpoints||!a.navigationEndpoint)&&!a.emoji&&(this.noStyles||!(a.bold||a.deemphasize||a.italics||a.strikethrough||a.textColor))&&!a.loggingDirectives},
getRawText:function(){return XU(this.text)},
getFirstRunText:function(){if(this.text&&this.text.runs[0])return this.text.runs[0].text},
setFirstRunText:function(a){this.text.runs[0]&&(this.text.runs[0].text=a,this.textChanged_(this.text))},
setDataOnAnchor_:function(a,b){if(!A("yf_formatted_string_service_endpoint_killswitch")&&this.isServiceEndpoint_(b))a.onclick=this.serviceEndpointHandler_(b),a.href="#";else{var c=this.target;c=void 0===c?"":c;if(b){a.data=b;var d=ZU(b);d?(fd(a,d),QU(b)||!pm(d)?a.rel="nofollow":a.removeAttribute("rel"),bBa(a,b,c)):(a.removeAttribute("href"),a.removeAttribute("rel"),a.removeAttribute("target"))}}},
isServiceEndpoint_:function(a){return null!=(a.commandMetadata&&a.commandMetadata.webCommandMetadata&&a.commandMetadata.webCommandMetadata.sendPost)},
serviceEndpointHandler_:function(a){var b=this;return function(c){b.sendServiceRequestAction([a]);c.preventDefault()}},
overrideAriaLabelChanged_:function(){if(Polymer.Element){var a=this.getRoot();this.enableContentEditable&&a&&a.setAttribute("aria-label",this.overrideAriaLabel)}else this.overrideAriaLabel&&this.setAttribute("aria-label",this.overrideAriaLabel)},
enableContentEditableChanged_:function(){var a=this;if(this.enableContentEditable){if(Polymer.Element){this.removeAttribute("dir");var b=Polymer.dom(this.root);if(!b.lastChild||b.lastChild&&"contenteditable-root"!=b.lastChild.id){var c=document.createElement("div");c.id="contenteditable-root";c.setAttribute("contenteditable",!0);c.setAttribute("dir","auto");c.onfocus=function(){a.dispatchEvent(new FocusEvent("focus",{bubbles:!1}))};
b.appendChild(c);this.overrideAriaLabel&&c.setAttribute("aria-label",this.overrideAriaLabel)}}else this.setAttribute("contenteditable",!0);}else b=Polymer.dom(this.root),b.firstChild&&"contenteditable-root"==b.firstChild.id&&b.removeChild(b.firstChild)},
getNodesForVisibilityLogging_:function(){return nb(this.getRoot().childNodes,function(a){return a.data&&a.data.trackingParams})},
getNodes:function(){return this.getNodesForVisibilityLogging_()},
onShow:function(){var a=this.getVETracker();a&&this.getNodesForVisibilityLogging_().forEach(function(b){return LS(a,b)})},
onHide:function(){var a=this.getVETracker();a&&this.getNodesForVisibilityLogging_().forEach(function(b){return MS(a,b)})}});Polymer({is:"yt-icon-button",behaviors:[Polymer.PaperRippleBehavior],properties:{label:String,disabled:{type:Boolean,reflectToAttribute:!0},pressed:Boolean,toggleable:Boolean,untabbable:Boolean},listeners:{down:"rippleDown_",up:"rippleUp_"},ready:function(){var a=this.$.button;a.addEventListener("focus",this.rippleDown_.bind(this));a.addEventListener("blur",this.rippleUp_.bind(this))},
computeTabIndex_:function(a){return a?-1:0},
computeButtonAriaPressed_:function(a){if(this.toggleable)return a?"true":"false"},
rippleDown_:function(){this.getRipple().downAction()},
rippleUp_:function(){this.getRipple().upAction()},
ensureRipple:function(a){var b=this._ripple;Polymer.PaperRippleBehavior.ensureRipple.apply(this,arguments);this._ripple&&this._ripple!==b&&(this._ripple.center=!0,this._ripple.classList.add("circle"))}});var MY={};
MY.YtRenderButtonBehaviorImpl_={properties:{alignByText:{type:Boolean,value:!1,reflectToAttribute:!0},startJustified:{type:Boolean,value:!1,reflectToAttribute:!0},forceIconButton:{type:Boolean,value:!1},forceIconOnly:{type:Boolean,value:!1},noink:{type:Boolean,value:!1},showTooltips:{type:Boolean,value:!1},buttonRaised:{type:Boolean,value:!1},disabled:{type:Boolean,observer:"disabledChanged_",reflectToAttribute:!0},sendServiceEndpointWhenDisabled:{type:Boolean,value:!1},ellipsisTruncate:Boolean,buttonTooltipPosition:{type:String,
value:"bottom"},buttonSize:{type:String,reflectToAttribute:!0},endpoint:{type:Object,readOnly:!0},serviceEndpoint:{type:Object,readOnly:!0},command:{type:Object,readOnly:!0},buttonIcon:{type:String,readOnly:!0,observer:"buttonIconChanged_"},buttonText:{type:Object,readOnly:!0},buttonAccessibility:{type:Object,readOnly:!0},buttonTooltip:{type:String,readOnly:!0},buttonClass:{type:String,readOnly:!0,observer:"buttonClassChanged_"},iconPositionType:{type:String,readOnly:!0,observer:"iconPositionTypeChanged_"},
stampType_:{type:String,computed:"computeStampType_(forceIconButton, buttonText, buttonIcon, endpoint)",observer:"stampTypeChanged_"},componentReady_:Boolean},listeners:{focus:"addTooltips_",mouseenter:"addTooltips_",tap:"onYtButtonTap_"},observers:["isDisabledChanged_(data.isDisabled)","observeBasicPalette_(data.colorData.basicColorPaletteData)","dataChanged_(data, componentReady_)"],created:function(){this.elements_={};this.hasChange_=!1},
attached:function(){this.hasChange_&&this.stampTypeChanged_(this.stampType_)},
get container(){return this.root},onYtButtonTapHandler:function(){},
ytButtonServiceEndpointHandler:function(){},
updateRenderedElements:function(){if(this.elements_.endpoint){this.elements_.endpoint.data=this.endpoint;var a=this.computeHref_(this.endpoint,!0);a?this.elements_.endpoint.setAttribute("href",a):this.elements_.endpoint.removeAttribute("href")}if(this.buttonClass){a=this.buttonClass.split(" ");a=k(a);for(var b=a.next();!b.done;b=a.next())b=b.value,this.toggleClass(b,!0),this.toggleClass(b,!0,this.elements_.button),this.toggleClass(b,!0,this.elements_.text)}this.elements_.icon&&(this.elements_.icon.icon=
this.buttonIcon);this.elements_.text&&(this.elements_.text.text=this.buttonText);this.elements_.button&&(a=null,this.buttonAccessibility&&(a=this.buttonAccessibility.label),"yt-icon-button"==this.elements_.button.is?this.elements_.button.label=a:a?this.elements_.button.setAttribute("aria-label",a):this.elements_.button.removeAttribute("aria-label"))},
dataChanged_:function(){this.updateRenderedElements()},
addTooltips_:function(){this.elements_.endpoint&&this.showTooltips&&this.buttonTooltip&&(this.elements_.tooltip||(this.elements_.tooltip=this.reuseEnabled_()?Gq("paper-tooltip"):document.createElement("paper-tooltip"),this.elements_.tooltip.position=this.buttonTooltipPosition,this.elements_.tooltip.offset=8,this.elements_.tooltip.fitToVisibleBounds=!0,Polymer.dom(this.elements_.endpoint).appendChild(this.elements_.tooltip)),Polymer.dom(this.elements_.tooltip).textContent=this.buttonTooltip)},
buttonClassChanged_:function(a,b){if(b)for(a=b.split(" "),a=k(a),b=a.next();!b.done;b=a.next())b=b.value,this.toggleClass(b,!1),this.toggleClass(b,!1,this.elements_.button),this.toggleClass(b,!1,this.elements_.text)},
buttonIconChanged_:function(a){this.elements_.icon?a?this.elements_.icon.icon=a:(this.elements_.button&&Polymer.dom(this.elements_.button).removeChild(this.elements_.icon),this.elements_.icon=null,this.toggleAttribute("is-paper-button-with-icon",!1)):a&&this.stampType_&&"paper_button"==this.stampType_&&this.addIconElementToPaperButton_()},
addIconElementToPaperButton_:function(){this.elements_.icon=this.getIcon_();this.elements_.button&&(this.iconPositionType&&"BUTTON_ICON_POSITION_TYPE_LEFT_OF_TEXT"!=this.iconPositionType?"BUTTON_ICON_POSITION_TYPE_RIGHT_OF_TEXT"==this.iconPositionType&&Polymer.dom(this.elements_.button).appendChild(this.elements_.icon):Polymer.dom(this.elements_.button).insertBefore(this.elements_.icon,this.elements_.text),this.toggleAttribute("is-paper-button-with-icon",!0))},
stampTypeChanged_:function(a){if(void 0===this.isAttached)this.hasChange_=!0;else if(this.hasChange_=!1,this.emptyContainer_(),this.elements_={},this.componentReady_=!1,a){var b=!1;this.elements_.endpoint=document.createElement("a");this.elements_.endpoint.classList.add("yt-simple-endpoint");this.elements_.endpoint.tabIndex=-1;switch(a){case"yt_icon_button_with_label":b=!0;this.toggleClass("force-icon-button",!0);this.elements_.button=this.getYtIconButton_();a=Polymer.dom(this.elements_.button).firstElementChild;
this.elements_.icon=a;this.elements_.text=this.getFormattedString_();this.elements_.text.id="text";this.elements_.text.ellipsisTruncate=this.ellipsisTruncate;Polymer.dom(this.elements_.endpoint).appendChild(this.elements_.button);Polymer.dom(this.elements_.endpoint).appendChild(this.elements_.text);break;case"paper_button":this.elements_.button=this.reuseEnabled_()?Gq("paper-button"):document.createElement("paper-button");this.elements_.text=this.getFormattedString_();this.elements_.text.id="text";
this.elements_.text.ellipsisTruncate=this.ellipsisTruncate;this.elements_.button.raised=this.buttonRaised;Polymer.dom(this.elements_.button).appendChild(this.elements_.text);Polymer.dom(this.elements_.endpoint).appendChild(this.elements_.button);this.buttonIcon&&this.addIconElementToPaperButton_();break;case"yt-icon-button":b=!0,this.elements_.button=this.getYtIconButton_(),a=Polymer.dom(this.elements_.button).firstElementChild,this.elements_.icon=a,Polymer.dom(this.elements_.endpoint).appendChild(this.elements_.button);}this.toggleAttribute("is-icon-button",
b);this.toggleAttribute("is-paper-button",!b);this.toggleAttribute("has-no-text",!this.elements_.text);this.elements_.button.id="button";this.elements_.button.noink=this.noink;this.elements_.button.disabled=this.disabled;Polymer.dom(this.container).appendChild(this.elements_.endpoint);this.componentReady_=!0}},
iconPositionTypeChanged_:function(){this.iconPositionType&&(this.elements_.button&&this.elements_.icon&&Polymer.dom(this.elements_.button).removeChild(this.elements_.icon),this.addIconElementToPaperButton_(),this.elements_.icon.icon=this.buttonIcon)},
isDisabledChanged_:function(a){if(void 0!=a||this.disabled)this.disabled=a,this.elements_.button&&(this.elements_.button.disabled=a)},
observeBasicPalette_:function(a){HY(this,a)},
disabledChanged_:function(a){this.data&&this.set("data.isDisabled",a)},
onYtButtonTap_:function(a){if(this.disabled)a.stopImmediatePropagation(),this.sendServiceEndpointWhenDisabled&&this.serviceEndpoint&&this.sendServiceRequestAction([this.serviceEndpoint]);else{if(this.serviceEndpoint)this.ytButtonServiceEndpointHandler(),A("handle_service_request_actions")||this.sendServiceRequestAction([this.serviceEndpoint]),this.fire("yt-execute-service-endpoint",{serviceEndpoint:this.serviceEndpoint});else this.onYtButtonTapHandler();A("handle_service_request_actions")?(a=[],this.serviceEndpoint&&
a.push(this.serviceEndpoint),this.data&&this.data.command&&this.data.command!=this.serviceEndpoint&&a.push(this.data.command),a.length&&this.sendInnerTubeActions(a,this)):this.data&&this.data.command&&(a=this.data.command,a.accountUnlinkCommand||a.accountLinkCommand||a.insertAdCommand||a.createLivestreamHighlightClipCommand||a.getVideoUploadFeedbackCommand?this.sendServiceRequestAction([a]):this.sendInnerTubeActions([a],this))}},
computeStampType_:function(a,b,c){return a&&b&&c?"yt_icon_button_with_label":b?"paper_button":c?"yt-icon-button":null},
emptyContainer_:function(){for(var a=Polymer.dom(this.container);a.lastChild&&"STYLE"!=a.lastChild.tagName;)a.removeChild(a.lastChild)},
getYtIconButton_:function(){var a=this.reuseEnabled_()?Gq("yt-icon-button"):document.createElement("yt-icon-button"),b=Polymer.dom(a).firstElementChild;if(b&&"yt-icon"!=b.is){for(b=Polymer.dom(a);b.lastChild;)b.removeChild(b.lastChild);b=null}b||(b=this.getIcon_(),Polymer.dom(a).appendChild(b));return a},
reuseEnabled_:function(){return A("enable_button_behavior_reuse")},
getIcon_:function(){return this.reuseEnabled_()?Gq("yt-icon"):document.createElement("yt-icon")},
getFormattedString_:function(){return this.reuseEnabled_()?Gq("yt-formatted-string"):document.createElement("yt-formatted-string")}};
MY.YtRenderButtonBehavior=[V.YtRendererBehavior,T.YtActionSenderBehavior,GY.YtEndpointBehavior,MY.YtRenderButtonBehaviorImpl_];MY.YtButtonBehaviorImpl_={properties:{data:Object},observers:["stateChanged_(data)","stateChanged_(data.isDisabled)","stateChanged_(data.style)","stateChanged_(forceIconOnly)"],stateChanged_:function(){var a=this.data;a&&(this._setEndpoint(this.computeEndpoint_(a)),this._setServiceEndpoint(this.computeServiceEndpoint_(a)),this._setCommand(this.computeCommand_(a)),this._setButtonIcon(this.computeButtonIcon_(a)),this._setButtonText(this.computeButtonText_(a,this.forceIconOnly)),this._setButtonAccessibility(this.computeAccessibility_(a)),
this._setButtonTooltip(this.computeTooltip_(a)),this._setButtonClass(this.computeButtonClass_(a)),this._setIconPositionType(this.computeIconPositionType_(a)),this.updateRenderedElements())},
computeIconPositionType_:function(a){return a&&a.iconPosition||null},
computeEndpoint_:function(a){var b=a&&a.navigationEndpoint,c=this.get("data.command.commandMetadata.webCommandMetadata.url"),d=this.get("data.command.commandMetadata.webCommandMetadata.sendPost");return b?b:c&&!d&&a.command?a.command:null},
computeServiceEndpoint_:function(a){var b=a&&a.serviceEndpoint,c=this.get("data.command.commandMetadata.webCommandMetadata.sendPost");return b?b:c&&a.command?a.command:null},
computeCommand_:function(a){return a&&a.command||null},
computeButtonIcon_:function(a){return a&&a.icon&&a.icon.iconType?gY(a.icon.iconType):null},
computeButtonText_:function(a,b){return!b&&a&&a.text||null},
computeAccessibility_:function(a){return this.get("accessibilityData.accessibilityData",a)||a&&a.accessibility||(a&&a.text?{label:this.getSimpleString(a.text)}:null)},
computeTooltip_:function(a){return a?a.isDisabled&&a.disabledTooltip||a.tooltip||null:null},
computeButtonClass_:function(a){var b=a&&a.style?a.style.toLowerCase().replace(/_/g,"-")+" ":"";b+=a&&a.size?a.size.toLowerCase().replace(/_/g,"-")+" ":"";return b.trim()}};
MY.YtButtonBehavior=[MY.YtRenderButtonBehavior,MY.YtButtonBehaviorImpl_];var NY={};function OY(a,b,c){NY[a]||(NY[a]={});NY[a][b]=c}
function PY(a){NY[a]||(NY[a]={});return NY[a]}
;OY("itemSectionRenderer","buttonRenderer","ytd-button-renderer");OY("sharingRendererButtons","buttonRenderer","ytd-button-renderer");Polymer({is:"ytd-button-renderer",behaviors:[MY.YtButtonBehavior,dY],hostAttributes:{"button-renderer":!0},listeners:{"yt-navigate":"onYtNavigate_","yt-service-request-sent":"onYtServiceRequestSent_","yt-service-request-completed":"onServiceRequestCompleted_"},observers:["onHintIdChanged_(data.hint.hintRenderer)"],created:function(){this.showTooltips=!0},
onHintIdChanged_:function(a){var b=this;if(a&&a.hintId){var c=this.sendOptionalAction("yt-get-opened-popups-action");c=0<(c&&1==c.length?c[0]:[]).length;var d=[];"sponsor-pre-purchase"!=a.hintId||c?a.hintId.startsWith("sponsor-post-purchase")&&!c?d=aW("membership-manage"):a.hintId.startsWith("sponsorships-premium-freebie-pre-purchase")&&!c&&(d=aW("membership-freebie-join")):d=aW("membership-join");d&&Fn(Dn,function(){b.sendInnerTubeActions(d,b)})}},
onYtNavigate_:function(a){var b=this.getNavigationEndpointPopupAction(a.detail.endpoint);b&&(a.stopPropagation(),this.openPopup(b))},
onYtServiceRequestSent_:function(a,b){this.handleServiceRequestActions_(b)},
onServiceRequestCompleted_:function(a,b){this.handleServiceRequestActions_(b)},
handleServiceRequestActions_:function(a){if(a=a.actions)for(var b=0;b<a.length;b++){var c=a[b];c.updateButtonAction&&c.updateButtonAction.updatedButton&&(this.data=c.updateButtonAction.updatedButton.buttonRenderer)}}});MY.YtToggleButtonBehaviorImpl_={_noAccessors:!0,properties:{data:Object},observers:["stateChanged_(data)","stateChanged_(data.isToggled)","stateChanged_(data.defaultText)","stateChanged_(data.toggledText)","stateChanged_(forceIconOnly)"],created:function(){this.toggleButtonActionMap_={"yt-update-toggle-button-text-action":"handleUpdateToggleButtonTextAction_","yt-update-account-link-button-command":"handleUpdateAccountLinkButtonCommand_","yt-update-toggle-button-state-command":"handleUpdateToggleButtonStateCommand_"}},
attached:function(){this.registerActionMap(this.toggleButtonActionMap_)},
detached:function(){this.unregisterActionMap(this.toggleButtonActionMap_)},
onYtToggleButtonTapHandler:function(){},
onYtButtonTapHandler:function(){this.onYtToggleButtonTapHandler();if(!this.isModal_()){var a=this.data.isToggled;if(!this.data.preventAutoToggle){this.toggle();var b={toggled:this.data.isToggled,actions:{}};b.actions[this.buttonIcon]=this.data.isToggled;this.fire("yt-toggle-button",b)}b=this.data.defaultServiceEndpoint||null;var c=this.data.toggledServiceEndpoint||null;if(b&&c||b&&this.data.preventAutoToggle)a=a?c:b,this.sendServiceRequestAction([a]),this.fire("yt-execute-service-endpoint",{serviceEndpoint:a})}},
stateChanged_:function(){var a=this.data;if(a){var b=a.isToggled;this._setEndpoint(this.computeEndpoint_(a));this._setServiceEndpoint(this.computeServiceEndpoint_(a));this._setButtonIcon(this.computeButtonIcon_(a,b));this._setButtonText(this.computeButtonText_(a,b));this._setButtonAccessibility(this.computeAccessibility_(a,b));this._setButtonTooltip(this.computeTooltip_(a,b));this._setButtonClass(this.computeButtonClass_(a,b));this._setIconPositionType(this.computeIconPositionType_(a));this.updateRenderedElements();
this.elements_.button&&this.elements_.button.setAttribute("aria-pressed",this.data.isToggled)}},
toggle:function(a){this.set("data.isToggled",void 0!==a?a:!this.data.isToggled)},
isModal_:function(){return!!this.endpoint&&(!!this.endpoint.modalEndpoint||!!this.endpoint.shareEndpoint||!!this.endpoint.shareEntityEndpoint)},
computeEndpoint_:function(a){return a&&a.defaultNavigationEndpoint||null},
computeButtonIcon_:function(a,b){var c=a&&a.defaultIcon?a.defaultIcon.iconType.toLowerCase():null;a=a&&a.toggledIcon?a.toggledIcon.iconType.toLowerCase():c;return b?a:c},
handleUpdateToggleButtonStateCommand_:function(a){a=a.updateToggleButtonStateCommand;this.get("toggleButtonSupportedData.toggleButtonIdData.id",this.data)==a.buttonId&&this.toggle(a.toggled)},
computeButtonText_:function(a,b){return a?b&&a.toggledText||a.defaultText||null:null},
computeAccessibility_:function(a,b){return a?(b?this.get("toggledAccessibilityData.accessibilityData",a):this.get("accessibilityData.accessibilityData",a))||a.accessibility||null:null},
computeTooltip_:function(a,b){return a?b&&a.toggledTooltip||a.defaultTooltip||null:null},
computeButtonClass_:function(a,b){if(!a)return"";var c="",d=a.toggledStyle||a.style;if(b=b?d:a.style)b.styleType&&(b=b.styleType),c+=b.toLowerCase().replace(/_/g,"-")+" ";if(a=a.size)a.sizeType&&(a=a.sizeType),c+=a.toLowerCase().replace(/_/g,"-")+" ";return c.trim()},
computeIconPositionType_:function(a){return a&&a.iconPosition||null},
computeServiceEndpoint_:function(a){var b=a&&a.serviceEndpoint,c=this.get("data.command.commandMetadata.webCommandMetadata.sendPost");return b?b:c&&a.command?a.command:null},
handleUpdateToggleButtonTextAction_:function(a){a=a.updateToggleButtonTextAction;this.get("toggleButtonSupportedData.toggleButtonIdData.id",this.data)==a.buttonId&&(this.set("data.defaultText",a.defaultText),this.set("data.toggledText",a.toggledText))},
handleUpdateAccountLinkButtonCommand_:function(a){if((a=this.get("updateAccountLinkButtonCommand.toggleButtonRenderer.toggleButtonRenderer",a))&&"TOGGLE_BUTTON_ID_TYPE_ACCOUNT_LINKING"==this.get("toggleButtonSupportedData.toggleButtonIdData.id",this.data)){for(var b in a)this.data[b]=a[b];this.data=a}}};
MY.YtToggleButtonBehavior=[U.YtActionHandlerBehavior,MY.YtRenderButtonBehavior,MY.YtToggleButtonBehaviorImpl_];OY("sharingToggleButtonAndDefaultButton","toggleButtonRenderer",{component:"ytd-toggle-button-renderer",params:{noink:!0}});Polymer({is:"ytd-toggle-button-renderer",behaviors:[U.YtActionHandlerBehavior,T.YtActionSenderBehavior,MY.YtToggleButtonBehavior,dY],actionMap:{"yt-signal-action-show-account-link-dialog":"handleShowAccountLinkDialog_"},hostAttributes:{"button-renderer":!0},listeners:{"yt-navigate":"onYtNavigate_"},created:function(){this.showTooltips=!0},
onYtButtonTapHandler:function(){if(!this.isModal_()){var a=this.data.isToggled;if(!this.data.preventAutoToggle){this.toggle();var b={toggled:this.data.isToggled,actions:{}};b.actions[this.buttonIcon]=this.data.isToggled;this.fire("yt-toggle-button",b)}if(a=a?this.data.toggledServiceEndpoint:this.data.defaultServiceEndpoint){b=this.get("commandMetadata.webCommandMetadata.url",a);var c=this.get("commandMetadata.webCommandMetadata.sendPost",a);b&&c?this.sendServiceRequestAction([a]):this.sendInnerTubeActions([a],
this)}}},
onYtNavigate_:function(a){var b=this.getNavigationEndpointPopupAction(a.detail.endpoint);b&&(a.stopPropagation(),this.openPopup(b))},
handleShowAccountLinkDialog_:function(){if("TOGGLE_BUTTON_ID_TYPE_ACCOUNT_LINKING"==this.get("data.toggleButtonSupportedData.toggleButtonIdData.id")){var a=this.get("data.defaultServiceEndpoint");a&&(this.get("data.defaultServiceEndpoint.signalServiceEndpoint.actions.0.openPopupAction.popup.gamingAccountLinkConfirmDialogRenderer")||this.sendServiceRequestAction([a]))}}});var QY=new WeakMap,RY=function(a,b){for(var c in a)if(a.hasOwnProperty(c)&&b[c])return c;return null},KFa=function(a){var b=a.match(/\[\[([\w\.]+)\]\]/);
if(b&&1<b.length)return b[1];we(Error("Failed to parse binding: "+a));return null},LFa=function(a){return void 0===a?se("REUSE_COMPONENTS",!1):a||!1},MFa=function(a,b,c){c&&(b.is?Hq(b):b.__proto__==HTMLElement.prototype&&(c=Error("Rendererstamper removed a non custom element"),c.params="Stamper: "+a+" element: "+(b&&b.nodeName),xe(c)))},SY=function(a,b,c,d){var e=b.node?b.node:b;
Polymer.dom(c).parentNode==e&&(b.removeChild(c),MFa(a,c,d));if(a=QY.get(c))QY.delete(c),Dn.cancelJob(a);c.hidden=!1},NFa=function(a,b,c,d){var e=b.children[c];
if(e)if(se("DEFERRED_DETACH"))for(c=e;c&&!QY.has(c);){var g=a,h=b;e=c;var m=d;e.hidden=!0;g=En(SY.bind(null,g,h,e,m),0);QY.set(e,g);c=c.nextElementSibling}else for(;(c=b.lastElementChild)&&(b.removeChild(c),MFa(a,c,d),c!=e););};var X=[tY.YtTaskEmitterBehavior,{mappings:null,stampDom:null,rendererStamperLogger_:null,beforeRegister:function(){this.configureRendererStamper&&"function"===typeof this.configureRendererStamper&&(this.stampDom=this.configureRendererStamper());this.stampDom&&this.addStampDomObservers_()},
created:function(){this.deferredBindingTasks_=[];this.renderJobsMap_=Object.create(null);this.hasDataPath_=Object.create(null);this.stampDom&&this.addStampDomObserverFns_();this.telemetry_={};this.resetTelemetry_()},
resetTelemetry_:function(){this.telemetry_.create=0;this.telemetry_.reuse=0},
addStampDomObservers_:function(){var a=(this.constructor.generatedFrom||this).observers;a||(a=[]);for(var b in this.stampDom){var c="stamp"+this.stampDom[b].id.replace("-","_")+"_";a.push(c+"("+b+".*)")}Polymer.Element?this.constructor.generatedFrom.observers=a:this.observers=a},
addStampDomObserverFns_:function(){for(var a in this.stampDom){var b=this.stampDom[a];b.id?(this["stamp"+b.id.replace("-","_")+"_"]=this.rendererStamperObserver_.bind(this,a,b.id),this.hasDataPath_[a]=!1):we(Error("Bad rendererstamper config "+this.is+":"+a))}},
rendererStamperObserver_:function(a,b,c){if(c.path==a){if(void 0===c.value&&!this.hasDataPath_[a])return;this.hasDataPath_[a]=void 0!==c.value}this.rendererStamperApplyChangeRecord_(a,b,c)},
rendererStamperApplyChangeRecord_:function(a,b,c){var d=this.renderJobsMap_[b],e=null;a==c.path?(c=c.value,Xa(c)||(c=void 0===c||null===c?[]:[c]),a=this.stampDom[a],a.mapping&&(e=this.stampDomArray_.bind(this,c,b,a.mapping,a.reuseComponents,a.events,a.stamperStableList)),d&&d.cancel(),c=a.usePageScheduler?this.getTaskManager():void 0,d||void 0==a.initialRenderPriority)?void 0==a.renderPriority||d||(d=new qp(a.renderPriority,a.waitForSignal,c),this.renderJobsMap_[b]=d):(d=new qp(a.initialRenderPriority,
a.waitForSignal,c),this.renderJobsMap_[b]=d,e=function(g,h){g();tp(h,10)}.bind(this,e,d)):e=a+".splices"==c.path?this.stampDomArraySplices_.bind(this,a,b,c.value):this.forwardRendererStamperChanges_.bind(this,a,b,c);
d?sp(d,e):e()},
forwardRendererStamperChanges_:function(a,b,c){var d=c.path.slice(a.length+1),e=this.getStampContainer_(b),g=d.indexOf("."),h=d.substring(0,g),m=!1,n=0,p=parseInt(h,0);"#"==h[0]?(m=parseInt(h.substring(1),0),n=this.get(a),p=this.get([a,h]),n=n[m]==p?m:n.indexOf(p),m=!0):isNaN(p)||(n=p,m=!0);m&&(d=d.substring(h.length+1),g=d.indexOf("."));if(e=Polymer.dom(e).children[n])d="data"+d.slice(g),A("kevlar_js_fixes")&&"function"!=typeof e.notifyPath?(c=Error("notifyPath missing"),c.params=this.is+": "+a+
", "+b,xe(c)):c.value?e.notifyPath(d,c.value):e.notifyPath(d)},
stampDomArraySplices_:function(a,b,c){if(c&&c.indexSplices){var d=this.getStampContainer_(b);if(d){b=Polymer.dom(d);for(var e=LFa(this.stampDom[a].reuseComponents),g=c.indexSplices.length,h=0;h<g;h++){for(var m=c.indexSplices[h],n=b.children[m.index],p=m.removed.length;0<p;p--)n&&n.parentElement&&(Polymer.dom(n.parentElement).removeChild(n),e&&Hq(n),n=b.children[m.index]);p=this.stampDom[a].mapping;for(var x=m.index+m.addedCount,y=document.createDocumentFragment(),B=e,G=m.index;G<x;G++){var P=m.object[G],
S=RY(p,P);if(S){var ca=p[S];P=P[S];S=this.getComponentName_(ca,P);var Ja=n?QY.has(n):!1;B&&n&&n.is==S&&Ja?(S=n,this.telemetry_.reuse++,n=n.nextElementSibling):B&&n&&Ja?(S=this.createComponent_(ca,P,e),Ja=Polymer.dom(n).nextElementSibling,b.insertBefore(S,Ja),SY(this.is,b,n,e),n=Ja):(B=!1,S=this.createComponent_(ca,P,e),y.appendChild(S));this.deferRenderStamperBinding_(S,ca,P)}else ca=Error("Unimplemented type"),ca.params=Object.keys(P)[0],we(ca)}b.insertBefore(y,n)}this.flushRenderStamperComponentBindings_();
this.stampDom[a].events&&this.fire("yt-rendererstamper-finished",{container:d})}else a=Error("Container object not found"),a.params=b,we(a)}},
stampDomArray_:function(a,b,c,d,e,g){var h=this.getStampContainer_(b);if(h){if(b=Polymer.dom(h),d=LFa(d),a){var m=0,n=0,p;if(g=void 0===g?se("STAMPER_STABLE_LIST",!1):g||!1)for(p=b.firstElementChild;p&&!QY.has(p)&&a.length>n;){g=a[n];var x=RY(c,g);if(x){if(this.getComponentName_(c[x],g[x])!=p.is){var y=this.createComponent_(c[x],g[x],d),B=Polymer.dom(p).nextElementSibling;B?b.insertBefore(y,B):b.appendChild(y);SY(this.is,b,p,d);p=y}else this.telemetry_.reuse++;this.deferRenderStamperBinding_(p,c[x],
g[x]);m++;n++;p=Polymer.dom(p).nextElementSibling}else n++}NFa(this.is,b,m,d);m=p;if(a.length>n){g=document.createDocumentFragment();for(x=a.length;n<x;n++)if(y=a[n],B=RY(c,y))p=this.createComponent_(c[B],y[B],d),this.deferRenderStamperBinding_(p,c[B],y[B]),g.appendChild(p);m&&Polymer.dom(m).parentNode&&p&&!QY.has(p)?b.insertBefore(g,m):b.appendChild(g)}this.flushRenderStamperComponentBindings_();this.markDirty&&this.markDirty();e&&this.fire("yt-rendererstamper-finished",{container:h})}else NFa(this.is,
b,0,d);}else a=Error("Container object not found"),a.params=b,we(a)},
getStampContainer_:function(a){return this.$[a]||this.$$("#"+a)},
getComponentName_:function(a,b){return"string"===typeof a?a:a.matcher?a.matcher.call(this,b):a.component},
createComponent_:function(a,b,c){b=this.getComponentName_(a,b);if(c){var d=this.isInjectionEnabled_(a)?this:void 0;d=Gq(b,d);d.updateStyles?d.updateStyles():(a=Error("Unregistered element"),a.params=b,xe(a))}else try{d=a&&this.isInjectionEnabled_(a)?Bq(b,this):document.createElement(b)}catch(e){throw b="YtRendererStamperBehavior failed to create "+b+".",e.message&&(b+=" Original description: "+e.message),e.params=b,e.message="YtRendererStamperBehavior failed to create element",e}this.telemetry_.create++;
return d},
deferRenderStamperBinding_:function(a,b,c){this.deferredBindingTasks_.push({component:a,typeOrConfig:b,data:c})},
flushRenderStamperComponentBindings_:function(){for(var a=0,b=this.deferredBindingTasks_.length;a<b;a++){var c=this.deferredBindingTasks_[a],d=void 0,e=void 0,g=c.component,h=c.typeOrConfig;c=c.data;if("string"!==typeof h){for(e in h.attributes)!0===h.attributes[e]?g.setAttribute(e,""):!1===h.attributes[e]?g.removeAttribute(e):g.setAttribute(e,h.attributes[e]);for(d in h.params)g[d]=h.params[d];for(d in h.properties)(e=h.properties[d])?(e=KFa(e),g[d]=this.get(e),"on-tap"==d&&g.listen(g,"tap","on-tap")):
we(Error("Undefined property binding for "+d));if(h.classListBinding&&(e=KFa(h.classListBinding),d=this[e]))for(h=0;h<d.length;h++)g.toggleClass(d[h],!0)}g.data=c;if(c=QY.get(g))g.hidden=!1,QY.delete(g),Dn.cancelJob(c)}this.deferredBindingTasks_.length=0},
isInjectionEnabled_:function(a,b){return!Cq(this)||a.noInjection?!1:!b||Cq(b)}}];OY("menuRenderer","menuRenderer","ytd-menu-renderer");
Polymer({is:"ytd-menu-renderer",behaviors:[dY,V.YtRendererBehavior,T.YtActionSenderBehavior,X],properties:{data:Object,icon:{type:String,value:"yt-icons:more_vert"},menuActive:{type:Boolean,reflectToAttribute:!0,computed:"computeMenuActive_(menuFocused_, overlayOpen_)"},menuFocused_:Boolean,buttonTooltipPosition:{type:String,value:"bottom"},noInkOnDropdownButton:Boolean,overlayOpen_:Boolean},stampDom:{"data.topLevelButtons":{id:"top-level-buttons",mapping:{buttonRenderer:{component:"ytd-button-renderer",
params:{forceIconButton:!0},properties:{buttonTooltipPosition:"[[buttonTooltipPosition]]"}},toggleButtonRenderer:{component:"ytd-toggle-button-renderer",params:{forceIconButton:!0},properties:{buttonTooltipPosition:"[[buttonTooltipPosition]]"}}}}},listeners:{"yt-popup-opened":"onPopupOpened_","yt-popup-closed":"onPopupClosed_","yt-popup-canceled":"onPopupCanceled_"},ready:function(){var a=this.$.button;a.addEventListener("focus",this.onMenuFocus_.bind(this));a.addEventListener("blur",this.onMenuBlur_.bind(this));
this.popupPositionTarget=a},
detached:function(){this.icon="yt-icons:more_vert"},
computeMenuActive_:function(a,b){return a||b},
onPopupOpened_:function(){this.overlayOpen_=!0;this.fire("yt-menu-overlay-changed",this.overlayOpen_);null==this.menuFocused_&&(this.menuFocused_=!1)},
onPopupClosed_:function(){this.overlayOpen_=!1;this.fire("yt-menu-overlay-changed",this.overlayOpen_)},
onPopupCanceled_:function(){this.overlayOpen_=!1;this.fire("yt-menu-overlay-changed",this.overlayOpen_)},
onMenuFocus_:function(){this.menuFocused_=!0;null==this.overlayOpen_&&(this.overlayOpen_=!1)},
onMenuBlur_:function(){this.menuFocused_=!1},
computeAccessibilityLabel_:function(a){return this.get("accessibility.accessibilityData.label",a)},
isHidden_:function(a){return null!=a?null!=a.fetchMenuCommand?!1:null==a.items:!0},
onOverflowTap_:function(){if(this.data.fetchMenuCommand)this.sendServiceRequestAction([this.data.fetchMenuCommand]);else{var a=this.createMenuRendererVe_();this.openPopup({openPopupAction:{popupType:"DROPDOWN",popup:{menuPopupRenderer:this.data},veData:a}})}},
createMenuRendererVe_:function(){if(!A("kevlar_menu_logging"))return null;var a=this.data.trackingParams,b=Wo(),c=Vo();return a&&b&&c?(a=go(a),c=ho(7591),CS(b,a,c),c):null}});var TY=function(){return F.apply(this,arguments)||this};
l(TY,F);TY.prototype.basicPaletteChanged=function(){this.data&&this.data.colorData&&this.data.colorData.basicColorPaletteData&&HY(this,this.data.colorData.basicColorPaletteData)};
TY.prototype.colorChanged=function(){if(this.data&&this.data.color){var a=this.get("basicColorPaletteData.backgroundColor",this.data.color),b=this.get("basicColorPaletteData.foregroundTitleColor",this.data.color),c={};a?(a=sX(a),this.toggleClass("creator",!0),c["--ytd-author-comment-badge-background-color"]=a):(this.toggleClass("creator",!1),c["--ytd-author-comment-badge-icon-background-color"]="transparent",c["--ytd-author-comment-badge-background-color"]="transparent");b?(b=sX(b),c["--ytd-author-comment-badge-name-color"]=
b,c["--ytd-author-comment-badge-icon-color"]=b):c["--ytd-author-comment-badge-name-color"]="var(--yt-primary-text-color)";0<Object.keys(c).length&&this.updateStyles(c)}};
ea.Object.defineProperties(TY.prototype,{iconType:{configurable:!0,enumerable:!0,get:function(){if(this.data&&this.data.icon&&this.data.iconType)return this.data.iconType}}});
var UY=TY;UY.prototype.colorChanged=UY.prototype.colorChanged;UY.prototype.basicPaletteChanged=UY.prototype.basicPaletteChanged;v([H(V.YtRendererBehavior),w("design:type",Object)],UY.prototype,"ytRendererBehavior",void 0);v([I(),w("design:type",Object)],UY.prototype,"data",void 0);v([I({reflectToAttribute:!0}),sl("data.icon.iconType"),w("design:type",Object),w("design:paramtypes",[])],UY.prototype,"iconType",null);
v([rl("data.colorData.basicColorPaletteData"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],UY.prototype,"basicPaletteChanged",null);v([rl("data.color"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],UY.prototype,"colorChanged",null);UY=v([W({is:"ytd-author-comment-badge-renderer"})],UY);var VY=function(){var a=F.apply(this,arguments)||this;a.boundCaptureFocus=a.onCaptureFocus.bind(a);return a};
l(VY,F);VY.prototype.attached=function(){document.addEventListener("focus",this.boundCaptureFocus,!0)};
VY.prototype.detached=function(){document.removeEventListener("focus",this.boundCaptureFocus)};
VY.prototype.onCaptureFocus=function(a){-1!==Polymer.dom(a).path.indexOf(this)&&this.item.focus()};
VY.prototype.getIconType=function(a){return a?"yt-icons:"+a.toLowerCase():null};
ea.Object.defineProperties(VY.prototype,{label:{configurable:!0,enumerable:!0,get:function(){return this.data?XU(this.data.label):""}},
value:{configurable:!0,enumerable:!0,get:function(){return this.data?"string"===typeof this.data.stringValue?this.data.stringValue:"number"===typeof this.data.int32Value?this.data.int32Value:null:null}}});
var WY=VY;v([H(V.YtRendererBehavior),w("design:type",Object)],WY.prototype,"ytRendererBehavior",void 0);v([I(),w("design:type",Object)],WY.prototype,"data",void 0);v([tl("#item"),w("design:type",HTMLElement)],WY.prototype,"item",void 0);v([sl("data.label"),w("design:type",String),w("design:paramtypes",[])],WY.prototype,"label",null);v([sl("data"),w("design:type",Object),w("design:paramtypes",[])],WY.prototype,"value",null);WY=v([W({is:"ytd-privacy-dropdown-item-renderer"})],WY);Polymer({is:"ytd-flat-dropdown-renderer",behaviors:[V.YtRendererBehavior,X],properties:{data:{type:Object,observer:"dataChanged_"},value:{type:String,notify:!0,observer:"valueChanged_"},label:String,disabled:{type:Boolean,value:!1,reflectToAttribute:!0},polymer2:{type:Boolean,reflectToAttribute:!0,value:function(){return!!Polymer.Element}}},
stampDom:{"data.entries":{id:"entries",mapping:{dropdownItemRenderer:"ytd-dropdown-item-renderer",privacyDropdownItemRenderer:{component:"ytd-privacy-dropdown-item-renderer",registration:["defer-on-home"]},navigationDropdownItemRenderer:{component:"ytd-navigation-dropdown-item-renderer",registration:["defer-on-all"]}}}},reset:function(){this.$.entries.selected=-1;this.$.entries.forceSynchronousItemUpdate();this.$.entries.select(this.getInitiallySelectedItem_(this.data));this.label=this.computeInitialLabel_(this.data)},
dataChanged_:function(){this.reset()},
valueChanged_:function(){if(this.value&&this.data.entries)for(var a=k(this.data.entries),b=a.next();!b.done;b=a.next()){b=b.value;for(var c in b){var d=b[c];if(this.getItemValue_(d)===this.value){this.label=this.getSimpleString(d.label);return}}}},
computeInitialLabel_:function(a){if(!a||!a.entries)return null;for(var b=k(a.entries),c=b.next();!c.done;c=b.next()){c=c.value;for(var d in c)if(c[d].isSelected)return this.getSimpleString(c[d].label)}return a.label?a.label:null},
getInitiallySelectedItem_:function(a){if(!a||!a.entries)return null;a=k(a.entries);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c in b)if(b[c].isSelected)return this.getItemValue_(b[c])}return null},
getItemValue_:function(a){return a.stringValue||a.int32Value||null}});var XY,YY=function(){return F.apply(this,arguments)||this};
l(YY,F);YY.prototype.computeThumbnailWidth=function(a){if("BACKSTAGE_SURFACE_TYPE_STREAM"===a)return XY.communityTabWidth};
var ZY=XY=YY;ZY.communityTabWidth=638;v([H(V.YtRendererBehavior),w("design:type",Object)],ZY.prototype,"ytRendererBehavior",void 0);v([I(),w("design:type",Object)],ZY.prototype,"data",void 0);v([I({reflectToAttribute:!0}),w("design:type",String)],ZY.prototype,"surface",void 0);ZY=XY=v([W({is:"ytd-backstage-image-renderer"})],ZY);var $Y={_noAccessors:!0,properties:{disablePrescanVisibility:Boolean},onShow:function(){if(this.onShow_)this.onShow_()}};var OFa=z("DORMANT_IMAGE_TIMEOUT",1E3),aZ=function(){this.loadTimeResolver_=PFa(this);this.sessionResolved_=!1;this.collectionJobId_=0;this.visibleSet_=new Set;this.elementLoadPromises_=new Map;this.collectionPromise_=null;this.dormantJobId_=0};
aZ.prototype.onDormantLoad_=function(){this.collectionPromise_&&this.loadTimeResolver_.reject()};
var bZ=function(a){Dn.cancelJob(a.dormantJobId_);a:{var b=k(a.visibleSet_);for(var c=b.next();!c.done;c=b.next())if(c=c.value,!c.loadTime||Infinity==c.loadTime){b=!1;break a}b=!0}b||(a.dormantJobId_=En(a.onDormantLoad_.bind(a),OFa))},RFa=function(a,b){if(a.sessionResolved_)return!1;
a.collectionJobId_&&QFa(a);return"loadTime"in b&&!b.excludeFromVpl?!0:!1};
aZ.prototype.hidden=function(a){RFa(this,a)&&(this.visibleSet_.delete(a),this.elementLoadPromises_.delete(a),bZ(this))};
var SFa=function(a,b){var c=JFa(b).then(function(){if(!a.visibleSet_.has(b))return null;bZ(a);return b},function(){});
a.elementLoadPromises_.set(b,c)},TFa=function(a,b){RFa(a,b)&&(a.visibleSet_.add(b),bZ(a),SFa(a,b))},cZ=function(a){Dn.cancelJob(a.collectionJobId_);
a.collectionJobId_=0;a.collectionPromise_&&(a.collectionPromise_.cancel(),a.collectionPromise_=null)},QFa=function(a){cZ(a);
var b=Be("viewport_load_collection_wait_time",0);a.collectionJobId_=En(a.collectLoadTime_.bind(a),b)};
aZ.prototype.collectLoadTime_=function(){var a=this;cZ(this);bZ(this);var b=Infinity;this.collectionPromise_=ew([].concat(ka(this.elementLoadPromises_.values())));this.collectionPromise_.then(function(c){var d=c.filter(function(h){return!!h&&!!h.parentNode&&a.visibleSet_.has(h)});
pq("d_vpni",c.length);pq("d_vpnfi",d.length);pq("d_vpct",Hm());c=null;for(var e=0;e<d.length;e++){var g=d[e];if(!c||c.loadTime<g.loadTime)c=g}b=c?c.loadTime:-1;Dn.cancelJob(a.dormantJobId_);a.loadTimeResolver_.resolve(b)},function(){pq("vpr",1)})};
var PFa=function(a){var b=fw(),c=function(){a.sessionResolved_=!0};
b.promise.then(c,c);return b};
aZ.prototype.reset=function(){var a=this;cZ(this);Dn.cancelJob(this.dormantJobId_);this.elementLoadPromises_.clear();this.loadTimeResolver_.reject();this.sessionResolved_=!1;iw(this.loadTimeResolver_.promise,function(){a.sessionResolved_=!1});
this.loadTimeResolver_=PFa(this);this.visibleSet_.clear()};
Ua(aZ);Polymer({is:"yt-img-shadow",behaviors:[$Y,V.YtRendererBehavior],properties:{delayedSrc:{type:String,observer:"delayedSrcChanged_"},thumbnail:{type:Object,observer:"thumbnailChanged_"},loaded:{type:Boolean,value:!1,reflectToAttribute:!0},notifyOnLoaded:Boolean,height:Number,width:Number,dimension:{type:{WIDTH:"width",HEIGHT:"height"},value:function(){return"width"}},
fit:{type:Boolean,reflectToAttribute:!0},objectFit:{type:String,reflectToAttribute:!0},objectPosition:{type:String,reflectToAttribute:!0},preferredThumbnail:String,alt_:{type:String,value:"",computed:"computeAlt_(thumbnail.accessibility.accessibilityData.label, loaded)"},sharedTooltipText:{type:String,reflectToAttribute:!0}},observeHiddenOption:null,observePrescanOption:"observe_once",observers:["observePlaceholderColor_(thumbnail.placeholderColor)"],EMPTY_GIF:se("NO_EMPTY_DATA_IMG")?"":"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",
created:function(){this.empty_=!0;this.loadTime=Infinity;this.hasChange_=this.pendingPaint=this.excludeFromVpl=!1;this.oldThumbnail_=null;this.oldDelayedSrc_=""},
attached:function(){this.hasChange_&&this.thumbnailChanged_()},
ready:function(){var a=this.shouldShowPlaceholder_();(a||se("DISABLE_YT_IMG_DELAY_LOADING",!1)||!se("ENABLE_IMG_TRANSITION",!1))&&this.toggleClass("no-transition",!0);a&&this.classList.add("with-placeholder")},
isPreloaded:function(){return this.isThumbPreloaded_(this.thumbnail)},
isThumbPreloaded_:function(a){return!!this.get("webThumbnailDetailsExtensionData.isPreloaded",a)},
computeSrc_:function(){return this.delayedSrc||this.computeThumbnailSrc_(this.thumbnail)||this.EMPTY_GIF},
computeThumbnailSrc_:function(a){return a&&a.thumbnails?LY(a.thumbnails,"width"==this.dimension?this.width:this.height,this.preferredThumbnail,this.dimension):null},
computeAlt_:function(){var a=this.thumbnail&&this.thumbnail.accessibility&&this.thumbnail.accessibility.accessibilityData&&this.thumbnail.accessibility.accessibilityData.label;return this.loaded&&a||""},
thumbnailChanged_:function(){var a=k([this.thumbnail,this.oldThumbnail_]),b=a.next().value;a=a.next().value;this.oldThumbnail_=b;if(void 0===this.isAttached)this.hasChange_=!0;else{this.hasChange_=!1;if(this.loaded&&(a=this.computeThumbnailSrc_(a),this.computeThumbnailSrc_(b)==a))return;A("kevlar_attach_vimio_behavior")&&this.markDirtyVisibilityObserver();this.excludeFromVpl=!!this.get("webThumbnailDetailsExtensionData.excludeFromVpl",b);this.isThumbPreloaded_(b)?(this.loadTime=Infinity,this.setSrc_(this.thumbnail.thumbnails[0].url),
this.empty_=!1):b&&se("DISABLE_YT_IMG_DELAY_LOADING",!1)?this.loaded&&!this.empty_?Polymer.RenderStatus.afterNextRender(this,this.onReload_):Polymer.RenderStatus.afterNextRender(this,this.onShow_):this.resetImage_()}},
delayedSrcChanged_:function(){var a=this.oldDelayedSrc_;this.oldDelayedSrc_=this.delayedSrc;this.loaded&&this.delayedSrc==a||this.resetImage_()},
setSrc_:function(a){a?(this.$.img.src||this.classList.remove("empty"),this.$.img.src=a):(this.$.img.removeAttribute("src"),this.classList.add("empty"))},
resetImage_:function(){this.loaded=!1;this.loadTime=Infinity;var a=IY.get(this);a&&(a.reject(),IY.delete(this));this.pendingPaint&&(KY.delete(this),this.pendingPaint=!1);this.empty_=!0;this.setSrc_(this.EMPTY_GIF);this.invalidate(!1)},
observePlaceholderColor_:function(){var a=this.thumbnail&&this.thumbnail.placeholderColor;a?this.style.backgroundColor=sX(a):this.shouldShowPlaceholder_()||(this.style.backgroundColor="transparent")},
onLoad_:function(){this.$.img.src&&this.$.img.src!=this.EMPTY_GIF&&(KY.add(this),this.pendingPaint=!0,JY||(JY=In(HFa)),this.notifyOnLoaded&&this.fire("yt-img-shadow-loaded"))},
onError_:function(){this.onLoad_()},
onPrescanVisible:function(){this.onShow_()},
onVisible:function(){TFa(aZ.getInstance(),this)},
onShow_:function(){if(!this.loaded||this.empty_){this.empty_=!1;var a=this.computeSrc_();a!=this.$.img.src&&(this.loaded=!1,this.setSrc_(a))}},
onReload_:function(){this.empty_=!1;var a=this.computeSrc_();a!=this.$.img.src&&(this.loaded=!1,this.setSrc_(a))},
shouldShowPlaceholder_:function(){return A("kevlar_thumbnail_bg")}});var dZ=function(){var a=F.apply(this,arguments)||this;a.errorMessage="";a.hasPreview=!1;a.isBackstagePost=!1;a.usePreviewPicker=!1;return a};
l(dZ,F);f=dZ.prototype;f.attached=function(){this.usePreviewPicker=A("use_preview_selection_tool")};
f.configureRendererStamper=function(){return{selectionCancel:{id:"selection-cancel-button",mapping:{buttonRenderer:"ytd-button-renderer"}},previewCancel:{id:"preview-cancel-button",mapping:{buttonRenderer:"ytd-button-renderer"}},"data.selectButton":{id:"select",mapping:{buttonRenderer:"ytd-button-renderer"}}}};
f.detached=function(){this.removeOverlay();this.usePreviewPicker=!1};
f.setPreview=function(a){if(this.usePreviewPicker)Polymer.dom(this.root).querySelector("#preview-picker").imageData=a;else{var b=Polymer.dom(this.root).querySelector("#preview");gd(b,a)}this.hasPreview=!0;this.fire("yt-backstage-image-select-preview")};
f.cancel=function(){this.errorMessage="";this.overlay&&this.overlay.cancel();Polymer.dom(this.root).querySelector("#preview").removeAttribute("src");this.hasPreview=!1;var a=Polymer.dom(this.root).querySelector("#dropzone");a.classList.remove("dragover");a.classList.remove("error");this.fire("yt-backstage-image-select-cancel")};
f.setupOverlay=function(a){this.removeOverlay();if(a&&a.imageValidationInfo){var b=Polymer.dom(this.root).querySelector("#dropzone"),c=Polymer.dom(this.root).querySelector("#select");this.overlay=new qS(a.uploadUrl,a.channelId,a.imageValidationInfo.maxFileSizeMb,this.usePreviewPicker?a.imageValidationInfo.allowedMaxAspectRatio:a.imageValidationInfo.maxAspectRatio,b,c,this.usePreviewPicker);Hv(this.overlay,"yt.comments.ImageUploadOverlay.CHANGE_EVENT",this.onPreview,!1,this);Hv(this.overlay,"yt.comments.ImageUploadOverlay.FILE_TOO_LARGE_EVENT",
this.onImageError,!1,this);Hv(this.overlay,"yt.comments.ImageUploadOverlay.HOVER_EVENT",this.onDragOver,!1,this);Hv(this.overlay,"yt.comments.ImageUploadOverlay.INVALID_EVENT",this.onImageError,!1,this);Hv(this.overlay,"yt.comments.ImageUploadOverlay.FILE_INVALID_ASPECT_RATIO_EVENT",this.onImageAlert,!1,this)}};
f.removeOverlay=function(){this.overlay&&(Mv(this.overlay,"yt.comments.ImageUploadOverlay.INVALID_EVENT",this.onImageError,!1,this),Mv(this.overlay,"yt.comments.ImageUploadOverlay.HOVER_EVENT",this.onDragOver,!1,this),Mv(this.overlay,"yt.comments.ImageUploadOverlay.FILE_TOO_LARGE_EVENT",this.onImageError,!1,this),Mv(this.overlay,"yt.comments.ImageUploadOverlay.FILE_INVALID_ASPECT_RATIO_EVENT",this.onImageAlert,!1,this),Mv(this.overlay,"yt.comments.ImageUploadOverlay.CHANGE_EVENT",this.onPreview,!1,
this),this.overlay.dispose(),this.overlay=void 0)};
f.onDragOver=function(a){var b=Polymer.dom(this.root).querySelector("#dropzone");this.toggleClass("dragover",a.value,b)};
f.onPreview=function(a){this.setPreview(a.value)};
f.onImageError=function(a){if("yt.comments.ImageUploadOverlay.FILE_TOO_LARGE_EVENT"===a.type)a=this.data&&this.data.fileSizeError;else if("yt.comments.ImageUploadOverlay.INVALID_EVENT"===a.type)a=this.data&&this.data.invalidError;else if("yt.comments.ImageUploadOverlay.FILE_INVALID_ASPECT_RATIO_EVENT"===a.type)a=this.data&&this.data.invalidAspectRatioError;else return;this.errorMessage=XU(a);Polymer.dom(this.root).querySelector("#dropzone").classList.add("error")};
f.onImageAlert=function(a){if(this.usePreviewPicker)this.onImageError(a);else"yt.comments.ImageUploadOverlay.FILE_INVALID_ASPECT_RATIO_EVENT"===a.type&&this.fire("yt-backstage-image-select-alert",{alertMessage:this.data&&this.data.croppedMessage})};
f.uploadPromise=function(){var a=this,b=this.overlay&&this.overlay.uploadPromise();if(b)return b.catch(function(){throw Error(a.data?XU(a.data.uploadFailureError):"")}.bind(this))};
ea.Object.defineProperties(dZ.prototype,{selectionCancel:{configurable:!0,enumerable:!0,get:function(){return this.data&&this.data.cancelButton?this.data.cancelButton:void 0}},
previewCancel:{configurable:!0,enumerable:!0,get:function(){return this.data&&this.data.cancelButton?this.data.cancelButton:void 0}},
icon:{configurable:!0,enumerable:!0,get:function(){if(this.data&&this.data.icon&&this.data.icon.iconType)return gY(this.data.icon.iconType)}}});
var eZ=dZ;v([H(X),w("design:type",Object)],eZ.prototype,"rendererStamperBehavior",void 0);v([H(V.YtRendererBehavior),w("design:type",Object)],eZ.prototype,"ytRendererBehavior",void 0);v([I(),w("design:type",Object)],eZ.prototype,"data",void 0);v([I({observer:"setupOverlay"}),w("design:type",Object)],eZ.prototype,"imageUploadEndpoint",void 0);v([I(),w("design:type",Object)],eZ.prototype,"errorMessage",void 0);v([I(),w("design:type",qS)],eZ.prototype,"overlay",void 0);
v([I({reflectToAttribute:!0}),w("design:type",Object)],eZ.prototype,"hasPreview",void 0);v([I({reflectToAttribute:!0}),w("design:type",Object)],eZ.prototype,"isBackstagePost",void 0);v([I({reflectToAttribute:!0}),w("design:type",Object)],eZ.prototype,"usePreviewPicker",void 0);v([sl("data"),w("design:type",Object),w("design:paramtypes",[])],eZ.prototype,"selectionCancel",null);v([sl("data"),w("design:type",Object),w("design:paramtypes",[])],eZ.prototype,"previewCancel",null);
v([sl("data.icon.iconType"),w("design:type",Object),w("design:paramtypes",[])],eZ.prototype,"icon",null);eZ=v([W({is:"ytd-backstage-image-select-renderer"})],eZ);OY("sharingToggleButtonAndDefaultButton","buttonRenderer","yt-button-renderer");Polymer({is:"yt-button-renderer",behaviors:[cY.YtOpenPopupBehavior,MY.YtButtonBehavior],listeners:{"yt-navigate":"onYtNavigate_"},created:function(){this.openPopupConfig=z("openPopupConfig");this.showTooltips=!0},
onYtNavigate_:function(a){var b=this.getNavigationEndpointPopupAction(a.detail.endpoint);b&&(this.openPopup(b),a.stopPropagation(),a.preventDefault())}});var UFa={imageHorizontalPosition:"IMAGE_HORIZONTAL_POSITION_LABEL",imageVerticalPosition:"IMAGE_VERTICAL_POSITION_LABEL",horizontalRepositionInstruction:"REPOSITION_IMAGE_HORIZONTALLY_LABEL",verticalRepositionInstruction:"REPOSITION_IMAGE_VERTICALLY_LABEL",reachTopOfImage:"REACH_TOP_OF_IMAGE_TEXT",reachBottomOfImage:"REACH_BOTTOM_OF_IMAGE_TEXT",reachLeftOfImage:"REACH_LEFT_OF_IMAGE_TEXT",reachRightOfImage:"REACH_RIGHT_OF_IMAGE_TEXT"};function fZ(a,b){return Math.round(a/1E-5)===Math.round(b/1E-5)}
var gZ=function(){var a=F.apply(this,arguments)||this;a.a11yConfig=UFa;a.imageDisplayOffsetTop=0;a.imageDisplayOffsetLeft=0;a.pickerDisplayOffsetTop=0;a.pickerDisplayOffsetLeft=0;a.cropCoordinatesSaved=!1;a.previewSize=0;a.startPicker=!1;return a};
l(gZ,F);f=gZ.prototype;f.created=function(){Polymer.IronA11yAnnouncer.requestAvailability()};
f.ready=function(){this.keyboardInterfaceTarget=this.imageInBackground};
f.onArrowKeysDown=function(a){if(!this.cropCoordinatesSaved&&this.pickerSize&&this.imageHeight&&this.imageWidth&&this.displayScale){a.detail.keyboardEvent.preventDefault();var b=0,c=0,d="";switch(a.detail.keyboardEvent.key){case"ArrowUp":fZ(this.imageDisplayOffsetTop+this.imageHeight,this.pickerDisplayOffsetTop+this.pickerSize)?d=this.a11yConfig.reachBottomOfImage:b=-.05*this.imageHeight;break;case"ArrowDown":fZ(this.pickerDisplayOffsetTop,this.imageDisplayOffsetTop)?d=this.a11yConfig.reachTopOfImage:
b=.05*this.imageHeight;break;case"ArrowLeft":fZ(this.pickerDisplayOffsetLeft+this.pickerSize,this.imageDisplayOffsetLeft+this.imageWidth)?d=this.a11yConfig.reachRightOfImage:c=-.05*this.imageWidth;break;case"ArrowRight":fZ(this.pickerDisplayOffsetLeft,this.imageDisplayOffsetLeft)?d=this.a11yConfig.reachLeftOfImage:c=.05*this.imageWidth;}d&&yU(d)&&this.fire("iron-announce",{text:yU(d)});if(c||b)this.imageHeight>this.imageWidth?(this.imageDisplayOffsetTop=Math.min(this.pickerDisplayOffsetTop,Math.max(this.pickerDisplayOffsetTop+
this.pickerSize-this.imageHeight,this.imageDisplayOffsetTop+b)),a=this.getPreviewPosition(this.pickerDisplayOffsetTop,this.pickerSize,this.imageDisplayOffsetTop,this.imageHeight),a=yU(this.a11yConfig.imageVerticalPosition,{x_percent:""+a,y_percent:""+(100-a)})):(this.imageDisplayOffsetLeft=Math.min(this.pickerDisplayOffsetLeft,Math.max(this.pickerDisplayOffsetLeft+this.pickerSize-this.imageWidth,this.imageDisplayOffsetLeft+c)),a=this.getPreviewPosition(this.pickerDisplayOffsetLeft,this.pickerSize,
this.imageDisplayOffsetLeft,this.imageWidth),a=yU(this.a11yConfig.imageHorizontalPosition,{x_percent:""+a,y_percent:""+(100-a)})),a&&this.fire("iron-announce",{text:a})}};
f.getPreviewPosition=function(a,b,c,d){return Math.round(100*(a+.5*b-c)/d)};
f.displayImage=function(){var a=this.pickerContainer.getBoundingClientRect().width,b=this.pickerContainer.getBoundingClientRect().height,c=Math.min(this.picker.getBoundingClientRect().height,this.picker.getBoundingClientRect().width),d=this.imageInBackground.naturalWidth,e=this.imageInBackground.naturalHeight;this.displayScale=Math.max(c/d,c/e);this.imageWidth=d*this.displayScale;this.imageHeight=e*this.displayScale;this.pickerDisplayOffsetLeft=(a-c)/2;this.pickerDisplayOffsetTop=(b-c)/2;this.imageDisplayOffsetLeft=
e>d?this.pickerDisplayOffsetLeft:(a-this.imageWidth)/2;this.imageDisplayOffsetTop=d>e?this.pickerDisplayOffsetTop:(b-this.imageHeight)/2};
f.onImageDataChange=function(){this.imageData&&(this.pickerDisplayOffsetLeft=this.pickerDisplayOffsetTop=0,this.cropCoordinatesSaved=!1,gd(this.imageInBackground,this.imageData),gd(this.imageInPicker,this.imageData),gd(this.imageInPreviewClipper,this.imageData),gd(this.imageAsPreview,this.imageData))};
f.getSignedPosition=function(a,b,c){return"X"===b&&"rtl"===z("HTML_DIR")?"-"===c?a+"px":-1*a+"px":"-"===c?-1*a+"px":a+"px"};
f.pickerMove=function(a){if(this.startPicker&&!this.cropCoordinatesSaved&&this.pickerSize&&void 0!==this.pickerOffsetX&&void 0!==this.pickerOffsetY&&this.imageHeight&&this.imageWidth&&this.displayScale){var b=this.pickerOffsetX-a.clientX,c=this.pickerOffsetY-a.clientY;this.pickerOffsetX=a.clientX;this.pickerOffsetY=a.clientY;this.imageHeight>this.imageWidth?this.imageDisplayOffsetTop=Math.min(this.pickerDisplayOffsetTop,Math.max(this.pickerDisplayOffsetTop+this.pickerSize-this.imageHeight,this.imageDisplayOffsetTop-
c)):this.imageDisplayOffsetLeft=Math.min(this.pickerDisplayOffsetLeft,Math.max(this.pickerDisplayOffsetLeft+this.pickerSize-this.imageWidth,this.imageDisplayOffsetLeft-b))}};
f.pickerMoveStart=function(a){this.startPicker=!0;this.pickerOffsetX=a.clientX;this.pickerOffsetY=a.clientY};
f.pickerMoveComplete=function(){this.startPicker=!1;this.pickerOffsetY=this.pickerOffsetX=void 0};
f.saveCropCoordinates=function(){this.cropCoordinatesSaved?(this.cropCoordinatesSaved=!1,this.previewSize=0,this.fire("yt-img-crop-reposition")):(this.startPicker=!1,this.generateCropPreview())};
f.getPreviewOffset=function(a,b,c,d){return b&&a&&c?("X"===d&&"rtl"===z("HTML_DIR")?c/b*a:c/b*a*-1)+"px":"0px"};
f.getSimpleText=function(a){return a?XU(a):""};
f.generateCropPreview=function(){if(this.imageWidth&&this.imageHeight&&this.pickerSize){this.cropCoordinatesSaved=!0;var a=this.cropOffsetTop/this.imageHeight,b=(this.cropOffsetLeft+this.pickerSize)/this.imageWidth,c=(this.cropOffsetTop+this.pickerSize)/this.imageHeight,d=this.cropOffsetLeft/this.imageWidth;this.previewSize=Polymer.dom(this.root).querySelector("#preview-clipper").getBoundingClientRect().width;this.fire("yt-img-crop-coordinates-update",{top:a,right:b,bottom:c,left:d})}};
ea.Object.defineProperties(gZ.prototype,{altLabelForImage:{configurable:!0,enumerable:!0,get:function(){if(!this.imageWidth||!this.imageHeight||!this.pickerSize)return"";if(this.imageHeight>this.imageWidth){var a=this.getPreviewPosition(this.pickerDisplayOffsetTop,this.pickerSize,this.imageDisplayOffsetTop,this.imageHeight);return yU(this.a11yConfig.imageVerticalPosition,{x_percent:""+a,y_percent:""+(100-a)})+"\n"+yU(this.a11yConfig.verticalRepositionInstruction)}a=this.getPreviewPosition(this.pickerDisplayOffsetLeft,
this.pickerSize,this.imageDisplayOffsetLeft,this.imageWidth);return yU(this.a11yConfig.imageHorizontalPosition,{x_percent:""+a,y_percent:""+(100-a)})+"\n"+yU(this.a11yConfig.horizontalRepositionInstruction)}},
pickerSize:{configurable:!0,enumerable:!0,get:function(){return this.imageHeight&&this.imageWidth?this.imageHeight>this.imageWidth?this.imageWidth:this.imageHeight:0}},
imageOrientationStyle:{configurable:!0,enumerable:!0,get:function(){if(this.imageHeight&&this.imageWidth)return this.imageHeight===this.imageWidth?"SQUARE":this.imageHeight>this.imageWidth?"PORTRAIT":"LANDSCAPE"}},
editButton:{configurable:!0,enumerable:!0,get:function(){if(this.instruction&&this.instruction.previewInstruction&&this.instruction.previewInstruction.editButtonLabel)return{size:"SIZE_SMALL",style:"STYLE_SUGGESTIVE",text:this.instruction.previewInstruction.editButtonLabel,accessibilityData:{accessibilityData:{label:this.getSimpleText(this.instruction.previewInstruction.editButtonLabel)}}}}},
saveButton:{configurable:!0,enumerable:!0,get:function(){if(this.instruction&&this.instruction.editInstruction&&this.instruction.editInstruction.saveButtonLabel)return{style:"STYLE_PRIMARY",size:"SIZE_SMALL",text:this.instruction.editInstruction.saveButtonLabel,accessibilityData:{accessibilityData:{label:this.getSimpleText(this.instruction.editInstruction.saveButtonLabel)}}}}},
cropOffsetTop:{configurable:!0,enumerable:!0,get:function(){return void 0===this.imageDisplayOffsetTop||void 0===this.pickerDisplayOffsetTop?0:this.pickerDisplayOffsetTop-this.imageDisplayOffsetTop}},
cropOffsetLeft:{configurable:!0,enumerable:!0,get:function(){return void 0===this.imageDisplayOffsetLeft||void 0===this.pickerDisplayOffsetLeft?0:this.pickerDisplayOffsetLeft-this.imageDisplayOffsetLeft}},
pickerModeStyle:{configurable:!0,enumerable:!0,get:function(){return this.cropCoordinatesSaved?"preview":"edit"}},
learnMore:{configurable:!0,enumerable:!0,get:function(){if(this.instruction&&this.instruction.editInstruction)return this.instruction.editInstruction.learnMore}},
learnMoreUrl:{configurable:!0,enumerable:!0,get:function(){if(this.learnMore&&this.learnMore.runs&&this.learnMore.runs[0]&&this.learnMore.runs[0].navigationEndpoint&&this.learnMore.runs[0].navigationEndpoint.urlEndpoint)return this.learnMore.runs[0].navigationEndpoint.urlEndpoint.url}}});
var hZ=gZ;hZ.prototype.onImageDataChange=hZ.prototype.onImageDataChange;v([I(),w("design:type",Object)],hZ.prototype,"imageData",void 0);v([I(),w("design:type",Object)],hZ.prototype,"instruction",void 0);v([I(),w("design:type",Object)],hZ.prototype,"a11yConfig",void 0);v([I(),w("design:type",Number)],hZ.prototype,"imageWidth",void 0);v([I(),w("design:type",Number)],hZ.prototype,"imageHeight",void 0);v([I(),w("design:type",Number)],hZ.prototype,"displayScale",void 0);
v([I(),w("design:type",Object)],hZ.prototype,"imageDisplayOffsetTop",void 0);v([I(),w("design:type",Object)],hZ.prototype,"imageDisplayOffsetLeft",void 0);v([I(),w("design:type",Object)],hZ.prototype,"pickerDisplayOffsetTop",void 0);v([I(),w("design:type",Object)],hZ.prototype,"pickerDisplayOffsetLeft",void 0);v([I(),w("design:type",Object)],hZ.prototype,"cropCoordinatesSaved",void 0);v([I(),w("design:type",Object)],hZ.prototype,"previewSize",void 0);
v([I(),w("design:type",Object)],hZ.prototype,"startPicker",void 0);v([I(),w("design:type",Number)],hZ.prototype,"pickerOffsetX",void 0);v([I(),w("design:type",Number)],hZ.prototype,"pickerOffsetY",void 0);v([tl("#picker-container"),w("design:type",HTMLElement)],hZ.prototype,"pickerContainer",void 0);v([tl("#picker"),w("design:type",HTMLElement)],hZ.prototype,"picker",void 0);v([tl("#image-in-picker-background"),w("design:type",HTMLImageElement)],hZ.prototype,"imageInBackground",void 0);
v([tl("#image-in-picker"),w("design:type",HTMLImageElement)],hZ.prototype,"imageInPicker",void 0);v([tl("#image-in-preview-clipper"),w("design:type",HTMLImageElement)],hZ.prototype,"imageInPreviewClipper",void 0);v([tl("#full-image-as-preview"),w("design:type",HTMLImageElement)],hZ.prototype,"imageAsPreview",void 0);v([sl("pickerSize","imageWidth","imageHeight","pickerDisplayOffsetTop","imageDisplayOffsetTop"),w("design:type",String),w("design:paramtypes",[])],hZ.prototype,"altLabelForImage",null);
v([sl("imageHeight","imageWidth"),w("design:type",Number),w("design:paramtypes",[])],hZ.prototype,"pickerSize",null);v([sl("imageHeight","imageWidth"),w("design:type",Object),w("design:paramtypes",[])],hZ.prototype,"imageOrientationStyle",null);v([sl("instruction.previewInstruction.editButtonLabel"),w("design:type",Object),w("design:paramtypes",[])],hZ.prototype,"editButton",null);
v([sl("instruction.editInstruction.saveButtonLabel"),w("design:type",Object),w("design:paramtypes",[])],hZ.prototype,"saveButton",null);v([sl("imageDisplayOffsetTop","pickerDisplayOffsetTop"),w("design:type",Number),w("design:paramtypes",[])],hZ.prototype,"cropOffsetTop",null);v([sl("imageDisplayOffsetLeft","pickerDisplayOffsetLeft"),w("design:type",Number),w("design:paramtypes",[])],hZ.prototype,"cropOffsetLeft",null);
v([rl("imageData"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],hZ.prototype,"onImageDataChange",null);v([sl("cropCoordinatesSaved"),w("design:type",String),w("design:paramtypes",[])],hZ.prototype,"pickerModeStyle",null);v([sl("instruction.editInstruction.learnMore"),w("design:type",Object),w("design:paramtypes",[])],hZ.prototype,"learnMore",null);v([sl("learnMore"),w("design:type",Object),w("design:paramtypes",[])],hZ.prototype,"learnMoreUrl",null);
hZ=v([wY({is:"yt-img-crop-picker",noInjection:!0})],hZ);var VFa=function(){return F.apply(this,arguments)||this};
l(VFa,F);var iZ=VFa;v([H(iY.ComponentBehavior),w("design:type",Object)],iZ.prototype,"componentBehavior",void 0);v([I(),w("design:type",Object)],iZ.prototype,"data",void 0);iZ=v([W({is:"ytd-child-video-renderer"})],iZ);OY("itemSectionRenderer","playlistRenderer","ytd-playlist-renderer");var jZ=function(){var a=F.apply(this,arguments)||this;a.displayItemCount=2;a.isBackstagePlaylist=!1;a.isPostCompactPlaylist=!1;return a};
l(jZ,F);jZ.prototype.computeFirstVideos=function(a,b){return void 0===a||void 0===b?[]:a.slice(0,b)};
jZ.prototype.dataChanged=function(a){a&&a.thumbnailRenderer&&(a=a.thumbnailRenderer,a.playlistVideoThumbnailRenderer&&this.set("data.thumbnail",a.playlistVideoThumbnailRenderer.thumbnail),a.playlistCustomThumbnailRenderer&&this.set("data.thumbnail",a.playlistCustomThumbnailRenderer.thumbnail))};
jZ.prototype.computeThumbnailHeight=function(a,b){return b?72:a?118:138};
jZ.prototype.computeThumbnailWidth=function(a,b){return b?128:a?210:246};
var kZ=jZ;kZ.prototype.dataChanged=kZ.prototype.dataChanged;v([H(V.YtRendererBehavior),w("design:type",Object)],kZ.prototype,"ytRendererBehavior",void 0);v([H(rY),w("design:type",Object)],kZ.prototype,"ytdLockupBehavior",void 0);v([I(),w("design:type",Object)],kZ.prototype,"data",void 0);v([I(),w("design:type",Object)],kZ.prototype,"displayItemCount",void 0);v([I({reflectToAttribute:!0}),w("design:type",Object)],kZ.prototype,"isBackstagePlaylist",void 0);
v([I({reflectToAttribute:!0}),w("design:type",Object)],kZ.prototype,"isPostCompactPlaylist",void 0);v([rl("data"),w("design:type",Function),w("design:paramtypes",[Object]),w("design:returntype",void 0)],kZ.prototype,"dataChanged",null);kZ=v([W({is:"ytd-playlist-renderer"})],kZ);var lZ=function(){return F.apply(this,arguments)||this};
l(lZ,F);f=lZ.prototype;f.addTooltips=function(){for(var a=Polymer.dom(this.root).querySelectorAll(".badge"),b=0,c;c=a[b++];){var d=this.repeatElement.itemForElement(c);c=Polymer.dom(c);c.lastChild&&"paper-tooltip"===c.lastChild.is&&c.removeChild(c.lastChild);if(d=d.metadataBadgeRenderer&&d.metadataBadgeRenderer.tooltip){var e=Gq("paper-tooltip");Polymer.dom(e).textContent=d;c.appendChild(e)}}};
f.badgesChanged=function(a){var b=this.addTooltips.bind(this);ip.getInstance().parkOrScheduleJob(b,0,"eocs",16);this.updateComputedBadges(a,this.topStandaloneBadge)};
f.standaloneBadgeChanged=function(a){this.updateComputedBadges(this.badges,a)};
f.computeStyle=function(a){return a?a.toLowerCase().replace(/_/g,"-"):""};
f.updateComputedBadges=function(a,b){this.computedBadges=b?[b]:a};
var mZ=lZ;v([I({observer:"badgesChanged"}),w("design:type",Array)],mZ.prototype,"badges",void 0);v([I({observer:"standaloneBadgeChanged"}),w("design:type",Object)],mZ.prototype,"topStandaloneBadge",void 0);v([I({observer:"standaloneBadgeChanged"}),w("design:type",Array)],mZ.prototype,"bottomStandaloneBadge",void 0);v([I(),w("design:type",Object)],mZ.prototype,"computedBadges",void 0);v([tl("#repeat"),w("design:type",Object)],mZ.prototype,"repeatElement",void 0);
mZ=v([W({is:"ytd-badge-supported-renderer"})],mZ);var WFa=function(){return F.apply(this,arguments)||this};
l(WFa,F);var nZ=WFa;v([H(V.YtRendererBehavior),w("design:type",Object)],nZ.prototype,"ytRendererBehavior",void 0);v([I(),w("design:type",Object)],nZ.prototype,"data",void 0);v([I(),w("design:type",Number)],nZ.prototype,"size",void 0);nZ=v([W({is:"ytd-playlist-custom-thumbnail-renderer"})],nZ);var XFa=function(){return F.apply(this,arguments)||this};
l(XFa,F);var oZ=XFa;v([H(V.YtRendererBehavior),w("design:type",Object)],oZ.prototype,"ytRendererBehavior",void 0);v([I(),w("design:type",Object)],oZ.prototype,"data",void 0);v([I(),w("design:type",Number)],oZ.prototype,"width",void 0);oZ=v([W({is:"ytd-playlist-video-thumbnail-renderer"})],oZ);Polymer({is:"ytd-show-custom-thumbnail-renderer",behaviors:[V.YtRendererBehavior],properties:{data:Object,width:Number}});var YFa=function(){return F.apply(this,arguments)||this};
l(YFa,F);var pZ=YFa;v([H(V.YtRendererBehavior),w("design:type",Object)],pZ.prototype,"ytRendererBehavior",void 0);v([I(),w("design:type",Object)],pZ.prototype,"data",void 0);pZ=v([W({is:"ytd-thumbnail-overlay-bottom-panel-renderer"})],pZ);var qZ=function(){return F.apply(this,arguments)||this};
l(qZ,F);ea.Object.defineProperties(qZ.prototype,{text:{configurable:!0,enumerable:!0,get:function(){if(this.data)return this.ytRendererBehavior.getSimpleString(this.data.text)}}});
var rZ=qZ;v([H(V.YtRendererBehavior),w("design:type",Object)],rZ.prototype,"ytRendererBehavior",void 0);v([I(),w("design:type",Object)],rZ.prototype,"data",void 0);v([sl("data.text"),w("design:type",Object),w("design:paramtypes",[])],rZ.prototype,"text",null);rZ=v([W({is:"ytd-thumbnail-overlay-hover-text-renderer"})],rZ);var ZFa=function(){return F.apply(this,arguments)||this};
l(ZFa,F);var sZ=ZFa;v([H(V.YtRendererBehavior),w("design:type",Object)],sZ.prototype,"ytRendererBehavior",void 0);v([I(),w("design:type",Object)],sZ.prototype,"data",void 0);sZ=v([W({is:"ytd-thumbnail-overlay-now-playing-renderer"})],sZ);var $Fa=function(){return F.apply(this,arguments)||this};
l($Fa,F);var tZ=$Fa;v([H(V.YtRendererBehavior),w("design:type",Object)],tZ.prototype,"ytRendererBehavior",void 0);v([I(),w("design:type",Object)],tZ.prototype,"data",void 0);tZ=v([W({is:"ytd-thumbnail-overlay-playback-status-renderer"})],tZ);var uZ=function(){return F.apply(this,arguments)||this};
l(uZ,F);uZ.prototype.onDurationChanged=function(a){this.$.progress.style.width=a+"%"};
var vZ=uZ;vZ.prototype.onDurationChanged=vZ.prototype.onDurationChanged;v([H(iY.ComponentBehavior),w("design:type",Object)],vZ.prototype,"componentBehavior",void 0);v([I(),w("design:type",Object)],vZ.prototype,"data",void 0);v([rl("data.percentDurationWatched"),w("design:type",Function),w("design:paramtypes",[Number]),w("design:returntype",void 0)],vZ.prototype,"onDurationChanged",null);vZ=v([W({is:"ytd-thumbnail-overlay-resume-playback-renderer"})],vZ);var wZ=function(){var a=F.apply(this,arguments)||this;a.bottomPanel=!1;a.richGridOverlay=!1;return a};
l(wZ,F);wZ.prototype.widthChanged=function(){this.richGridOverlay||(this.style.width=this.width+"px")};
var xZ=wZ;xZ.prototype.widthChanged=xZ.prototype.widthChanged;v([H(V.YtRendererBehavior),w("design:type",Object)],xZ.prototype,"ytRendererBehavior",void 0);v([I(),w("design:type",Object)],xZ.prototype,"data",void 0);v([I(),w("design:type",Number)],xZ.prototype,"width",void 0);v([I({reflectToAttribute:!0}),w("design:type",Object)],xZ.prototype,"bottomPanel",void 0);v([I({reflectToAttribute:!0}),w("design:type",Object)],xZ.prototype,"richGridOverlay",void 0);
v([rl("width"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],xZ.prototype,"widthChanged",null);xZ=v([W({is:"ytd-thumbnail-overlay-side-panel-renderer"})],xZ);var yZ=function(){return F.apply(this,arguments)||this};
l(yZ,F);ea.Object.defineProperties(yZ.prototype,{overlayStyle:{configurable:!0,enumerable:!0,get:function(){if(this.data&&this.data.style)return this.data.style}},
overlayType:{configurable:!0,enumerable:!0,get:function(){if(this.data&&this.data.type)return this.data.type.replace("THUMBNAIL_OVERLAY_TIME_STATUS_TYPE_","")}}});
var zZ=yZ;v([H(iY.ComponentBehavior),w("design:type",Object)],zZ.prototype,"componentBehavior",void 0);v([I(),w("design:type",Object)],zZ.prototype,"data",void 0);v([I({reflectToAttribute:!0}),sl("data.style"),w("design:type",Object),w("design:paramtypes",[])],zZ.prototype,"overlayStyle",null);v([I({reflectToAttribute:!0}),sl("data.type"),w("design:type",Object),w("design:paramtypes",[])],zZ.prototype,"overlayType",null);zZ=v([W({is:"ytd-thumbnail-overlay-time-status-renderer"})],zZ);var AZ=function(){var a=F.apply(this,arguments)||this;a.actionMap={"yt-miniplayer-endpoint-changed":"checkMiniplayer_"};return a};
l(AZ,F);AZ.prototype.attached=function(){this.ytActionHandlerBehavior.actionMap=this.actionMap};
AZ.prototype.configureRendererStamper=function(){return{"data.thumbnailOverlays":{id:"overlays",mapping:{thumbnailOverlayBottomPanelRenderer:"ytd-thumbnail-overlay-bottom-panel-renderer",thumbnailOverlayPlaybackStatusRenderer:"ytd-thumbnail-overlay-playback-status-renderer",thumbnailOverlayResumePlaybackRenderer:"ytd-thumbnail-overlay-resume-playback-renderer",thumbnailOverlaySidePanelRenderer:{component:"ytd-thumbnail-overlay-side-panel-renderer",properties:{width:"[[thumbnailOverlaySidePanelWidth_]]",
bottomPanel:"[[bottomSidePanel]]"}},thumbnailOverlayTimeStatusRenderer:"ytd-thumbnail-overlay-time-status-renderer",thumbnailOverlayNowPlayingRenderer:"ytd-thumbnail-overlay-now-playing-renderer"}},hoverOverlays_:{id:"hover-overlays",mapping:{thumbnailOverlayHoverTextRenderer:"ytd-thumbnail-overlay-hover-text-renderer"}},"data.thumbnailRenderer":{id:"playlist-thumbnails",mapping:{playlistVideoThumbnailRenderer:{component:"ytd-playlist-video-thumbnail-renderer",properties:{width:"[[width]]"}},playlistCustomThumbnailRenderer:{component:"ytd-playlist-custom-thumbnail-renderer",
properties:{size:"[[customThumbnailSize]]"}},showCustomThumbnailRenderer:{component:"ytd-show-custom-thumbnail-renderer",properties:{width:"[[width]]"}}}}}};
var BZ=AZ;v([H(U.YtActionHandlerBehavior),w("design:type",Object)],BZ.prototype,"ytActionHandlerBehavior",void 0);v([H(X),w("design:type",Object)],BZ.prototype,"ytRendererstamperBehavior",void 0);v([H(AFa),w("design:type",Object)],BZ.prototype,"ytdThumbnailBehavior",void 0);v([H(iY.ComponentBehavior),w("design:type",Object)],BZ.prototype,"componentBehavior",void 0);v([I(),w("design:type",Number)],BZ.prototype,"customThumbnailSize",void 0);v([I(),w("design:type",Object)],BZ.prototype,"data",void 0);
BZ=v([W({is:"ytd-playlist-thumbnail"})],BZ);var CZ=function(){var a=F.apply(this,arguments)||this;a.badges=null;a.noEndpoints=!1;a.wrapText=!1;a.height=0;a.lineHeight=0;return a};
l(CZ,F);f=CZ.prototype;f.created=function(){this.ytActionHandlerBehavior.actionMap={"yt-window-resized":"handleWindowResized"}};
f.attached=function(){var a=this;this.observer=new MutationObserver(function(b,c){a.handleResized();c.disconnect()});
this.observer.observe(this.textEl,{childList:!0})};
f.detached=function(){this.observer&&this.observer.disconnect()};
f.handleWindowResized=function(){this.handleResized()};
f.onChannelNameChanged=function(){this.verified?this.handleResized():(this.textEl.style.removeProperty("width"),this.textContainerEl.style.removeProperty("padding"),this.textContainerEl.style.removeProperty("margin-right"),this.textContainerEl.style.removeProperty("margin-left"))};
f.onHeightChanged=function(){if(this.verified){var a=Math.ceil(this.height*Math.tan(30*Math.PI/180))+"px";"rtl"===z("HTML_DIR")?this.textContainerEl.style.marginLeft=a:this.textContainerEl.style.marginRight=a}};
f.onLineHeightChanged=function(){this.verified&&24<=this.lineHeight&&(this.textContainerEl.style.padding="rtl"===z("HTML_DIR")?"0 6px 0 2px":"0 2px 0 6px")};
f.handleResized=function(){var a=this;this.verified&&Fn(Dn,function(){a.fitBackgroundToText();var b=getComputedStyle(a).lineHeight;b&&(b=b.match(/\d+/))&&b.length&&(a.lineHeight=Number(b[0]));a.height=a.lineHeight&&!a.wrapText?a.lineHeight:a.textEl.offsetHeight})};
f.fitBackgroundToText=function(){if(this.verified&&this.wrapText){this.textEl.style.width="unset";var a=document.createRange(),b=Polymer.dom(this.textEl.root).children;0<b.length?a.selectNodeContents(b[0]):a.selectNodeContents(this.textEl);this.textEl.style.width=Math.ceil(a.getBoundingClientRect().width)+"px"}};
ea.Object.defineProperties(CZ.prototype,{verified:{configurable:!0,enumerable:!0,get:function(){return"BADGE_STYLE_TYPE_UNIFIED_VERIFIED"===this.get("badges.0.metadataBadgeRenderer.style")}},
formattedName:{configurable:!0,enumerable:!0,get:function(){return"string"===typeof this.channelName?UU(this.channelName):this.channelName}}});
var DZ=CZ;DZ.prototype.onLineHeightChanged=DZ.prototype.onLineHeightChanged;DZ.prototype.onHeightChanged=DZ.prototype.onHeightChanged;DZ.prototype.onChannelNameChanged=DZ.prototype.onChannelNameChanged;v([H(U.YtActionHandlerBehavior),w("design:type",Object)],DZ.prototype,"ytActionHandlerBehavior",void 0);v([I(),w("design:type",Object)],DZ.prototype,"badges",void 0);v([I(),w("design:type",Object)],DZ.prototype,"channelName",void 0);v([I(),w("design:type",Object)],DZ.prototype,"noEndpoints",void 0);
v([I(),w("design:type",Boolean)],DZ.prototype,"wrapText",void 0);v([tl("#text-container"),w("design:type",HTMLElement)],DZ.prototype,"textContainerEl",void 0);v([tl("#text"),w("design:type",F)],DZ.prototype,"textEl",void 0);v([I(),w("design:type",Number)],DZ.prototype,"height",void 0);v([I(),w("design:type",Number)],DZ.prototype,"lineHeight",void 0);v([I({reflectToAttribute:!0}),sl("badges"),w("design:type",Boolean),w("design:paramtypes",[])],DZ.prototype,"verified",null);
v([sl("channelName"),w("design:type",Object),w("design:paramtypes",[])],DZ.prototype,"formattedName",null);v([rl("channelName"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],DZ.prototype,"onChannelNameChanged",null);v([rl("height"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],DZ.prototype,"onHeightChanged",null);
v([rl("lineHeight"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],DZ.prototype,"onLineHeightChanged",null);DZ=v([W({is:"ytd-channel-name"})],DZ);var EZ=function(){var a=F.apply(this,arguments)||this;a.noEndpoints=!1;return a};
l(EZ,F);f=EZ.prototype;f.getMetadata=function(a){var b=[],c=a.shortViewCountText||a.viewCountText;c&&b.push(XU(c));a.publishedTimeText&&b.push(XU(a.publishedTimeText));a.upcomingEventData&&a.upcomingEventData.upcomingEventText&&b.push(sS(XU(a.upcomingEventData.upcomingEventText),Number(a.upcomingEventData.startTime)));return b};
f.observeDataForBylineSeparator=function(){this.data&&this.toggleClass("byline-separated",0<this.getMetadata(this.data).length&&!this.data.ownerBadges)};
f.getSimpleString=function(a){return XU(a)};
f.isBylineHidden=function(a,b){return!a||(b?!a.longBylineText:!a.shortBylineText)};
f.isLongByline=function(a,b){return!(!a||!b||!a.longBylineText)};
ea.Object.defineProperties(EZ.prototype,{longBylineClass:{configurable:!0,enumerable:!0,get:function(){return this.longByline?"long-byline":""}},
bylineText:{configurable:!0,enumerable:!0,get:function(){if(this.data)return this.longByline?this.data.longBylineText:this.data.shortBylineText}}});
var FZ=EZ;FZ.prototype.observeDataForBylineSeparator=FZ.prototype.observeDataForBylineSeparator;v([I(),w("design:type",Object)],FZ.prototype,"data",void 0);v([I(),w("design:type",Object)],FZ.prototype,"noEndpoints",void 0);v([I({value:!1}),w("design:type",Boolean)],FZ.prototype,"radioMeta",void 0);v([I({computed:"isBylineHidden(data, radioMeta)"}),w("design:type",Boolean)],FZ.prototype,"noByline",void 0);
v([I({computed:"isLongByline(data, radioMeta)"}),w("design:type",Boolean)],FZ.prototype,"longByline",void 0);v([rl("data"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],FZ.prototype,"observeDataForBylineSeparator",null);v([sl("longByline"),w("design:type",String),w("design:paramtypes",[])],FZ.prototype,"longBylineClass",null);v([sl("data","longByline"),w("design:type",Object),w("design:paramtypes",[])],FZ.prototype,"bylineText",null);
FZ=v([W({is:"ytd-video-meta-block"})],FZ);function GZ(a,b,c){a=k(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;if(d==b)break;for(var e=k(c),g=e.next();!g.done;g=e.next())if(d.tagName==g.value)return!0}return!1}
;OY("itemSectionRenderer","videoRenderer","ytd-video-renderer");var HZ=function(){return F.apply(this,arguments)||this};
l(HZ,F);f=HZ.prototype;
f.configureRendererStamper=function(){return{"data.menu":{id:"menu",mapping:{menuRenderer:"ytd-menu-renderer"},initialRenderPriority:A("polymer_video_renderer_defer_menu")?0:void 0},"data.buttons":{id:"buttons",mapping:{toggleButtonRenderer:"ytd-toggle-button-renderer"}},dismissedRenderer:{id:"dismissed",mapping:{notificationTextRenderer:{component:"ytd-notification-text-renderer",registration:["defer-on-home"]},notificationMultiActionRenderer:{component:"ytd-notification-multi-action-renderer",registration:["defer-on-home"]}}}}};
f.attached=function(){this.toggleClass("blue-links",A("kevlar_video_blue_links"))};
f.dataChanged=function(){this.isHistory=-1!==window.location.pathname.indexOf("/feed/history");this.$["description-text"].toggleAttribute("ellipsis-truncate",!!this.data.topStandaloneBadge)};
f.onTextWrapperTap=function(a){var b=this.data&&this.data.navigationEndpoint;b&&!GZ(Polymer.dom(a).path||[],this,["A".toString(),"BUTTON".toString()])&&this.fire("yt-navigate",{endpoint:b})};
f.computeThumbnailWidth=function(a,b){return b?128:a?210:246};
var IZ=HZ;v([H(V.YtRendererBehavior),w("design:type",Object)],IZ.prototype,"ytRendererBehavior",void 0);v([H(X),w("design:type",Object)],IZ.prototype,"ytRendererstamperBehavior",void 0);v([H(eY),w("design:type",Object)],IZ.prototype,"ytdDismissableItemBehavior",void 0);v([H(rY),w("design:type",Object)],IZ.prototype,"ytdLockupBehavior",void 0);v([H(sY.YtdMouseDownPrefetchableBehavior),w("design:type",Object)],IZ.prototype,"ytdMouseDownPrefetchableBehavior",void 0);
v([I({observer:"dataChanged"}),w("design:type",Object)],IZ.prototype,"data",void 0);v([I({reflectToAttribute:!0,value:!1}),w("design:type",Boolean)],IZ.prototype,"isBackstageVideo",void 0);v([I({reflectToAttribute:!0,value:!1}),w("design:type",Boolean)],IZ.prototype,"isPostCompactVideo",void 0);v([I({reflectToAttribute:!0}),w("design:type",Boolean)],IZ.prototype,"isHistory",void 0);IZ=v([W({is:"ytd-video-renderer"})],IZ);var JZ=function(){return F.apply(this,arguments)||this};
l(JZ,F);JZ.prototype.configureRendererStamper=function(){return{"data.buttons":{id:"buttons",mapping:{buttonRenderer:{component:"ytd-button-renderer",params:{ellipsisTruncate:!0}}}}}};
ea.Object.defineProperties(JZ.prototype,{text:{configurable:!0,enumerable:!0,get:function(){if(this.data)return this.ytRendererBehavior.getSimpleString(this.data.responseText)}}});
var KZ=JZ;v([H(X),w("design:type",Object)],KZ.prototype,"ytRendererstamperBehavior",void 0);v([H(V.YtRendererBehavior),w("design:type",Object)],KZ.prototype,"ytRendererBehavior",void 0);v([I(),w("design:type",Object)],KZ.prototype,"data",void 0);v([sl("data.responseText"),w("design:type",Object),w("design:paramtypes",[])],KZ.prototype,"text",null);KZ=v([W({is:"ytd-notification-multi-action-renderer"})],KZ);var E_=function(){return F.apply(this,arguments)||this};
l(E_,F);E_.prototype.ready=function(){this.$.undo.addEventListener("tap",this.onUndoTap_.bind(this))};
E_.prototype.onUndoTap_=function(){this.actionSenderBehavior.sendServiceRequestAction([this.data.undoEndpoint])};
var F_=E_;v([H(V.YtRendererBehavior),w("design:type",Object)],F_.prototype,"ytRendererBehavior",void 0);v([H(T.YtActionSenderBehavior),w("design:type",Object)],F_.prototype,"actionSenderBehavior",void 0);v([I(),w("design:type",Object)],F_.prototype,"data",void 0);F_=v([W({is:"ytd-notification-text-renderer"})],F_);Polymer({is:"ytd-moving-thumbnail-renderer",behaviors:[V.YtRendererBehavior],properties:{data:{type:Object,observer:"dataChanged_"},csn:String,trackingParams:String,videoId:String,isAttachedAndDataSet_:Boolean},listeners:{click:"onTap_"},created:function(){this.fadeInImageDelayJobId_=this.hideImageDelayJobId_=this.mouseOverDelayJobId_=0;this.loadingEndTimeMs_=this.loadingStartTimeMs_=this.startTimeMs_=-1;this.api_=null;this.hasVideoPreview_=!1},
MOUSEOVER_TIMEOUT_:2500,TRANSITION_TIME_MS_:500,MOUSEOVER_DELAY_TIME_MS_:150,FADE_IN_DELAY_TIME_MS_:50,attached:function(){this.data&&(this.isAttachedAndDataSet_=!0,this.showThumbnail_())},
detached:function(){this.isAttachedAndDataSet_=!1;this.hideThumbnail_();this.data=void 0;this.csn=null},
dataChanged_:function(a){a&&this.isAttached&&!this.isAttachedAndDataSet_&&(this.isAttachedAndDataSet_=!0,this.showThumbnail_())},
showThumbnail_:function(){this.csn=Wo();iq("fmth");Dn.cancelJob(this.mouseOverDelayJobId_);this.data&&this.data.movingThumbnailDetails&&this.data.movingThumbnailDetails.thumbnails?this.mouseOverDelayJobId_=In(function(){this.loadingStartTimeMs_=Hm();if(A("enable_live_video_preview"))this.startPlayback_();else{var a=this.$.thumbnail;a.complete?this.displayMouseOverImage_():this.listen(a,"load","displayMouseOverImage_")}}.bind(this),this.MOUSEOVER_DELAY_TIME_MS_):this.toggleClass("show",!0,this.$.play)},
hideThumbnail_:function(){this.data&&this.data.enableHoveredLogging&&!A("enable_live_video_preview")&&this.logEvent_("INTERACTION_LOGGING_GESTURE_TYPE_HOVER");this.removeVideoPreview_()},
onTap_:function(){this.removeVideoPreview_()},
startPlayback_:function(){Dn.cancelJob(this.hideImageDelayJobId_);this.fadeInImageDelayJobId_=In(function(){this.toggleClass("loading",!0,this.$["player-container"]);this.acquireApi_(this.$["player-container"]).then(function(a){a.addEventListener("onStateChange",this.onPlayerStateChange_.bind(this))},null,this)}.bind(this),this.FADE_IN_DELAY_TIME_MS_)},
acquireApi_:function(a){this.releaseApi_();var b=fw(),c=this.getPlayerConfig_();c.args.jsapicallback=function(d){b.resolve(d)};
this.getInterface(uV).loadPlayer().then(function(){this.api_=QAa(a,c)},null,this);
return b.promise},
onPlayerStateChange_:function(a){var b=this.$["player-container"],c=this.$.play;1==a&&(this.loadingEndTimeMs_=Hm(),this.startTimeMs_=Hm(),this.hasVideoPreview_=!0,this.toggleClass("loading",!1,b),this.toggleClass("playing",!0,b),this.hideImageDelayJobId_=In(function(){this.toggleClass("playing",!1,b);this.toggleClass("fade-in",!0,c);this.releaseApi_()}.bind(this),this.MOUSEOVER_TIMEOUT_))},
releaseApi_:function(){this.api_&&(this.api_.stopVideo&&this.api_.stopVideo(),this.api_.destroy&&this.api_.destroy(),this.api_=null)},
getPlayerConfig_:function(){var a=z("FILLER_DATA").player;a.attrs.id="video-preview";a.args.el="videopreview";a.args.mute="1";a.args.autoplay="1";a.args.controls="0";a.args.showinfo="0";a.args.enablecastapi="0";a.args.modestbranding="1";a.args.iv_load_policy="3";a.args.rel="0";a.args.player_wide="1";a.args.video_id=this.videoId;a.args.ss="1";a.args.showwatchlater="0";a.args.enablesizebutton="0";a.args.ps="desktop-polymer";a.args.vq="tiny";a.args.player_response=void 0;return a},
logEvent_:function(a){if(!(0>=this.loadingStartTimeMs_)){var b={isMovingThumbnail:this.hasVideoPreview_};if(this.hasVideoPreview_&&0<this.startTimeMs_){var c=this.loadingEndTimeMs_-this.loadingStartTimeMs_;0<c&&(b.movingThumbnailLoadingDurationMs=Math.round(c));b.durationHoveredMs=Math.round(Hm()-this.startTimeMs_)}this.videoId&&(b.videoId=this.videoId);this.csn&&this.trackingParams&&Do(this.csn,go(this.trackingParams),a,{thumbnailHoveredData:b});this.startTimeMs_=this.loadingEndTimeMs_=this.loadingStartTimeMs_=
-1;this.hasVideoPreview_=!1}},
removeVideoPreview_:function(){Dn.cancelJob(this.mouseOverDelayJobId_);Dn.cancelJob(this.hideImageDelayJobId_);Dn.cancelJob(this.fadeInImageDelayJobId_);if(A("enable_live_video_preview")){var a=this.$["player-container"];this.toggleClass("playing",!1,a);this.toggleClass("loading",!1,a);this.releaseApi_()}else a=this.$.thumbnail,this.toggleClass("fade-in",!1,a),this.unlisten(a,"load","displayMouseOverImage_");a=this.$.play;this.toggleClass("fade-in",!1,a);this.toggleClass("show",!1,a)},
displayMouseOverImage_:function(){var a=this.$.thumbnail,b=this.$.play;Dn.cancelJob(this.hideImageDelayJobId_);this.isImageAvailable_(a)?(this.hasVideoPreview_=!0,this.loadingEndTimeMs_=Hm(),this.startTimeMs_=Hm(),this.fadeInImageDelayJobId_=In(function(){this.toggleClass("fade-in",!0,a)}.bind(this),this.FADE_IN_DELAY_TIME_MS_),this.hideImageDelayJobId_=In(function(){this.toggleClass("fade-in",!1,a);
this.toggleClass("fade-in",!0,b)}.bind(this),this.computeDuration_(a.src))):this.toggleClass("fade-in",!0,b)},
computeThumbnail_:function(a,b){return A("enable_live_video_preview")?"":a&&a.movingThumbnailDetails&&a.movingThumbnailDetails.thumbnails&&b?LY(a.movingThumbnailDetails.thumbnails,this.width):b?"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7":""},
isImageAvailable_:function(a){return a.src&&"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"!=a.src&&120!=a.naturalWidth},
computeDuration_:function(a){a=mm(a);return a.du?Be("preview_play_duration")<Number(a.du)?Be("preview_play_duration")-this.TRANSITION_TIME_MS_:Number(a.du)-this.TRANSITION_TIME_MS_:this.MOUSEOVER_TIMEOUT_}});var G_={YtEventForwardingBehavior:{created:function(){this.eventSink_=null;this.eventList_=[]},
forwardEvent_:function(a,b){var c=this.eventSink_.isConnected;void 0===c&&(c=document.body.contains(this.eventSink_));c&&(a.stopPropagation(),this.eventSink_.fire(a.type,b))},
startForwardingEvents:function(a,b){this.eventSink_&&this.stopForwardingEvents();for(var c=0;c<a.length;c++)this.listen(this,a[c],"forwardEvent_");this.eventSink_=b;this.eventList_=a},
stopForwardingEvents:function(){for(var a=0;a<this.eventList_.length;a++)this.unlisten(this,this.eventList_[a],"forwardEvent_");this.eventSink_=null;this.eventList_=[]}}};var H_=function(){return F.apply(this,arguments)||this};
l(H_,F);f=H_.prototype;f.attached=function(){this.hasAttribute("role")||this.setAttribute("role","button");this.hasAttribute("top-right-overlay")||this.setAttribute("top-right-overlay","true");this.tooltip.position="rtl"===z("HTML_DIR")?"right":"left"};
f.dataChanged=function(){this.popupOpen=!1};
f.computeAriaLabel=function(a){return a.accessibilityData.label};
f.onTap=function(a){a.stopPropagation();a.preventDefault();this.ytActionSenderBehavior.sendServiceRequestAction([this.data.command])};
f.onPopupOpened=function(){this.popupOpen=!0;this.eventForwardingBehavior.startForwardingEvents(["yt-navigate"],this.eventSink)};
f.onPopupClosed=function(){this.popupOpen=!1;this.eventForwardingBehavior.stopForwardingEvents()};
var I_=H_;I_.prototype.onPopupClosed=I_.prototype.onPopupClosed;I_.prototype.onPopupOpened=I_.prototype.onPopupOpened;I_.prototype.onTap=I_.prototype.onTap;v([H(G_.YtEventForwardingBehavior),w("design:type",Object)],I_.prototype,"eventForwardingBehavior",void 0);v([H(T.YtActionSenderBehavior),w("design:type",Object)],I_.prototype,"ytActionSenderBehavior",void 0);v([H(Polymer.IronButtonState),w("design:type",Object)],I_.prototype,"ironButtonState",void 0);
v([H(iY.ComponentBehavior),w("design:type",Object)],I_.prototype,"componentBehavior",void 0);v([I({observer:"dataChanged"}),w("design:type",Object)],I_.prototype,"data",void 0);v([I({reflectToAttribute:!0,value:-1}),w("design:type",Number)],I_.prototype,"tabindex",void 0);v([I({reflectToAttribute:!0,computed:"computeAriaLabel(data.accessibility)"}),w("design:type",String)],I_.prototype,"ariaLabel",void 0);v([I({value:!1}),w("design:type",Boolean)],I_.prototype,"disableTooltips",void 0);
v([I({reflectToAttribute:!0}),w("design:type",Boolean)],I_.prototype,"popupOpen",void 0);v([I(),w("design:type",Element)],I_.prototype,"eventSink",void 0);v([tl("#tooltip"),w("design:type",Object)],I_.prototype,"tooltip",void 0);v([ql("tap"),w("design:type",Function),w("design:paramtypes",[CustomEvent]),w("design:returntype",void 0)],I_.prototype,"onTap",null);v([ql("yt-popup-opened"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],I_.prototype,"onPopupOpened",null);
v([ql("yt-popup-closed"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],I_.prototype,"onPopupClosed",null);I_=v([W({is:"ytd-thumbnail-overlay-button-renderer"})],I_);Polymer({is:"ytd-thumbnail-overlay-toggle-button-renderer",hostAttributes:{role:"button",tabindex:-1,"top-right-overlay":!0},behaviors:[Polymer.IronButtonState,iY.ComponentBehavior,G_.YtEventForwardingBehavior,T.YtActionSenderBehavior],properties:{data:{type:Object,observer:"dataChanged_"},ariaLabel:{type:String,reflectToAttribute:!0,computed:"computeAriaLabel_(data.untoggledAccessibility, data.toggledAccessibility, data.isToggled)"},disableTooltips:{type:Boolean,value:!1},popupOpen:{type:Boolean,
reflectToAttribute:!0},isLoading_:{type:Boolean,value:!1},eventSink:{type:Object}},listeners:{tap:"onTap_","yt-service-request-completed":"onServiceRequestCompleted_","yt-popup-opened":"onPopupOpened_","yt-popup-closed":"onPopupClosed_"},attached:function(){this.$.tooltip.position="rtl"==z("HTML_DIR")?"right":"left"},
dataChanged_:function(){this.popupOpen=this.isLoading_=!1},
computeIcon_:function(a,b,c){return(c?b:a).iconType},
computeAriaLabel_:function(a,b,c){return(c?b:a).accessibilityData.label},
computeTooltip_:function(a,b,c){return c?b:a},
onTap_:function(a){a.stopPropagation();a.preventDefault();this.isLoading_||(a=this.data.isToggled?this.data.toggledServiceEndpoint:this.data.untoggledServiceEndpoint,this.isLoading_=!0,this.set("data.isToggled",!this.data.isToggled),this.sendServiceRequestAction([a]))},
onPopupOpened_:function(){this.popupOpen=!0;this.startForwardingEvents(["yt-navigate"],this.eventSink)},
onPopupClosed_:function(){this.popupOpen=!1;this.stopForwardingEvents()},
onServiceRequestCompleted_:function(a,b){this.isLoading_=!1;this.serviceRequestWasSuccessful_(b)||this.set("data.isToggled",!this.data.isToggled)},
serviceRequestWasSuccessful_:function(a){return(this.data.isToggled?this.data.toggledServiceEndpoint:this.data.untoggledServiceEndpoint).playlistEditEndpoint?"STATUS_SUCCEEDED"==a.data.status:!0}});var J_=function(){var a=F.apply(this,arguments)||this;a.eventSink=function(){return a};
a.actionMap={"yt-miniplayer-endpoint-changed":"checkMiniplayer_"};return a};
l(J_,F);
J_.prototype.configureRendererStamper=function(){return{"data.thumbnailOverlays":{id:"overlays",mapping:{thumbnailOverlayBottomPanelRenderer:"ytd-thumbnail-overlay-bottom-panel-renderer",thumbnailOverlayPlaybackStatusRenderer:"ytd-thumbnail-overlay-playback-status-renderer",thumbnailOverlayResumePlaybackRenderer:"ytd-thumbnail-overlay-resume-playback-renderer",thumbnailOverlaySidePanelRenderer:{component:"ytd-thumbnail-overlay-side-panel-renderer",properties:{width:"[[thumbnailOverlaySidePanelWidth_]]",bottomPanel:"[[bottomSidePanel]]",
richGridOverlay:"[[richGridThumbnail]]"}},thumbnailOverlayTimeStatusRenderer:"ytd-thumbnail-overlay-time-status-renderer",thumbnailOverlayNowPlayingRenderer:"ytd-thumbnail-overlay-now-playing-renderer"},initialRenderPriority:A("defer_overlays")?0:void 0,waitForSignal:"eocs"},hoverOverlays_:{id:"hover-overlays",mapping:{thumbnailOverlayHoverTextRenderer:"ytd-thumbnail-overlay-hover-text-renderer",thumbnailOverlayToggleButtonRenderer:{component:"ytd-thumbnail-overlay-toggle-button-renderer",properties:{disableTooltips:"[[disableTooltips]]",
eventSink:"[[eventSink]]"}},thumbnailOverlayButtonRenderer:{component:"ytd-thumbnail-overlay-button-renderer",properties:{disableTooltips:"[[disableTooltips]]",eventSink:"[[eventSink]]"}}}},richThumbnail:{id:"mouseover-overlay",mapping:{movingThumbnailRenderer:{component:"ytd-moving-thumbnail-renderer",properties:{trackingParams:"[[data.trackingParams]]",videoId:"[[data.videoId]]"}}},renderPriority:2,waitForSignal:"eocs"}}};
J_.prototype.attached=function(){this.ytActionHandlerBehavior.actionMap=this.actionMap};
J_.prototype.computeRichThumbnail=function(a,b){if(a&&b&&!A("disable_moving_thumbs_handling"))return b};
var K_=J_;v([H(U.YtActionHandlerBehavior),w("design:type",Object)],K_.prototype,"ytActionHandlerBehavior",void 0);v([H(X),w("design:type",Object)],K_.prototype,"ytRendererstamperBehavior",void 0);v([H(AFa),w("design:type",Object)],K_.prototype,"ytdThumbnailBehavior",void 0);v([H(iY.ComponentBehavior),w("design:type",Object)],K_.prototype,"componentBehavior",void 0);v([I(),w("design:type",Object)],K_.prototype,"data",void 0);v([I({value:!1}),w("design:type",Boolean)],K_.prototype,"circular",void 0);
v([I({computed:"computeRichThumbnail(finalHoveredState_,data.richThumbnail)"}),w("design:type",Object)],K_.prototype,"richThumbnail",void 0);v([I(),w("design:type",Object)],K_.prototype,"eventSink",void 0);v([I({reflectToAttribute:!0}),w("design:type",Boolean)],K_.prototype,"queued",void 0);v([I({value:!1}),w("design:type",Boolean)],K_.prototype,"richGridThumbnail",void 0);K_=v([W({is:"ytd-thumbnail"})],K_);var L_=function(){var a=F.apply(this,arguments)||this;a.boundOnTapDismissButton=function(){a.dismissTapHandler()};
return a};
l(L_,F);L_.prototype.configureRendererStamper=function(){return{attachmentPreview:{id:"attachment-preview",mapping:{backstageImageRenderer:"ytd-backstage-image-renderer",videoRenderer:{component:"ytd-video-renderer",params:{isBackstageVideo:!0}}}},dismissButton:{id:"dismiss-button",mapping:{buttonRenderer:{component:"ytd-button-renderer",properties:{"on-tap":"[[boundOnTapDismissButton]]"}}}}}};
L_.prototype.dismissTapHandler=function(){this.fire("yt-backstage-attachment-dismissed")};
L_.prototype.computeAttachmentType=function(a){return a?a.backstageImageRenderer?"image":a.videoRenderer?"video":"none":"none"};
var M_=L_;v([H(V.YtRendererBehavior),w("design:type",Object)],M_.prototype,"ytRendererBehavior",void 0);v([H(X),w("design:type",Object)],M_.prototype,"ytRendererstamperBehavior",void 0);v([I(),w("design:type",Object)],M_.prototype,"attachmentPreview",void 0);v([I(),w("design:type",Object)],M_.prototype,"dismissButton",void 0);v([I(),w("design:type",Object)],M_.prototype,"boundOnTapDismissButton",void 0);
v([I({reflectToAttribute:!0,readOnly:!0,computed:"computeAttachmentType(attachmentPreview)"}),w("design:type",String)],M_.prototype,"attachmentType",void 0);M_=v([W({is:"ytd-backstage-dismissable-attachment"})],M_);Polymer({is:"ytd-backstage-video-link-attachment",behaviors:[X,U.YtActionHandlerBehavior,V.YtRendererBehavior],properties:{videoPreview:Object,cancelButton:Object},stampDom:{videoPreview:{id:"video-preview",mapping:{videoRenderer:{component:"ytd-video-renderer",params:{isBackstageVideo:!0}}}},cancelButton:{id:"cancel-button",mapping:{buttonRenderer:"ytd-button-renderer"}}},created:function(){this.picker_=null;this.selectedVideoId_=void 0},
onLaunchVideoPicker:function(a){var b=XU(this.get("addVideoLinkAction.title",a));if(a=this.get("addVideoLinkAction.onePickHostId",a))this.picker_||(this.picker_=rEa(a).setTitle(b).addView(new LJ().setSite("youtube.com")).addView(new KJ().setType("video").setSite("youtube.com")).addView("youtube").setCallback(r(this.onPickVideo_,this)).build()),this.picker_.setVisible(!0)},
onPickVideo_:function(a){if(a)if("cancel"==a.action)this.fire("yt-video-link-button-cancel");else if("picked"===a.action){a=a.docs;if(!a||0===a.length)this.onGetVideoPreviewError_("No valid docs in response");this.selectedVideoId_=a[0].id;this.setVideoPreview_()}},
setVideoPreview_:function(){this.getInterface(BW).postData("/comment_service_ajax?action_get_video_preview=1",{video_id:this.selectedVideoId_}).then(this.onGetVideoPreviewSuccess_.bind(this),this.onGetVideoPreviewError_.bind(this))},
onGetVideoPreviewSuccess_:function(a){if(a&&a.videoPreview&&a.cancelButton)this.videoPreview=a.videoPreview,this.cancelButton=a.cancelButton,this.fire("yt-video-link-selected",{videoId:this.selectedVideoId_});else this.onGetVideoPreviewError_("Empty data from ajax")},
onGetVideoPreviewError_:function(){this.cancel()},
cancel:function(){this.videoPreview=this.cancelButton=this.selectedVideoId_=void 0;this.fire("yt-video-link-cancel")},
isValid:function(){return!(!this.videoPreview||!this.selectedVideoId_)}});var N_=function(){return F.apply(this,arguments)||this};
l(N_,F);N_.prototype.dataChanged=function(){this.active=!1};
N_.prototype.onTap=function(){this.fire("yt-select-emoji-suggestion",this.data)};
N_.prototype.identity=function(a){return a};
var O_=N_;O_.prototype.dataChanged=O_.prototype.dataChanged;v([I(),w("design:type",Object)],O_.prototype,"data",void 0);v([I({reflectToAttribute:!0}),w("design:type",Boolean)],O_.prototype,"active",void 0);v([rl("data"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],O_.prototype,"dataChanged",null);O_=v([W({is:"ytd-emoji-suggestion"})],O_);Polymer({SPLIT_REGEX:/.*([:@#].*?)$/,NBSP_REGEX:/\u00a0/g,NBSP:String.fromCharCode(160),MAX_SUGGESTIONS:64,is:"ytd-emoji-input",properties:{suggestions:{type:Array,value:[]},emojiManager:Object,verticalSuggestionsOffset:Number},behaviors:[X],listeners:{keypress:"onKeyPress_",keydown:"onKeyDown_",keyup:"onKeyUp_"},stampDom:{suggestions:{id:"dropdown-content",mapping:{suggestion:"ytd-emoji-suggestion"},reuseComponents:!0}},created:function(){this.suggestionIndex_=-1;this.lastSuggestionRange_=null},
getSuggestions_:function(a){var b=[],c=aGa(this.emojiManager,a.substr(0,3));if(c)for(var d in c)if(0==d.toLocaleLowerCase().indexOf(a)){var e=c[d];if(e&&e.emojiId&&(e=P_(this.emojiManager,e.emojiId),b.push({suggestion:{image:e.image,alt:e.isCustomEmoji?e.shortcuts[0]:e.emojiId,text:d}}),b.length>=this.MAX_SUGGESTIONS))break}return b?b.sort(function(g,h){return h.suggestion.text<g.suggestion.text?-1:h.suggestion.text==g.suggestion.text?0:1}):null},
insertSuggestion:function(a){this.fire("yt-insert-suggestion",{range:this.lastSuggestionRange_,text:a.alt});this.$.dropdown.opened=!1},
updateSuggestionsAtCaret_:function(a){this.updateSuggestions(a,this.retrieveTextBeforeRange(a))},
offsetStartOfRangeBy:function(a,b){a.startOffset>=b&&a.setStart(a.startContainer,a.startOffset-b)},
updateSuggestions:function(a,b){this.lastSuggestionRange_&&(this.lastSuggestionRange_.detach(),this.lastSuggestionRange_=null);if((b=this.SPLIT_REGEX.exec(b))&&b.length&&(b=b[b.length-1].toLocaleLowerCase(),2<b.length&&(this.offsetStartOfRangeBy(a,b.length),this.lastSuggestionRange_=a,(a=this.getSuggestions_(b))&&a.length))){this.suggestions=a;Polymer.RenderStatus.afterNextRender(this,function(){this.$["dropdown-content"].scrollTop=Math.pow(2,24)});
this.$.dropdown.opened?this.$.dropdown.notifyResize():this.$.dropdown.opened=!0;this.suggestionIndex_=-1;this.changeSuggestionIndex_(a.length-1);return}this.$.dropdown.opened=!1},
maybeCompleteEmoji:function(a,b,c){b=b.replace(this.NBSP_REGEX," ");var d=b.replace(/[\s\xa0]+$/,"");b=b.length-d.length;d=d.split(" ");d=d[d.length-1].trim().toLocaleLowerCase();var e=d.lastIndexOf(":");if(!c||b||e==d.length-1)-1!=e&&(c=d.lastIndexOf(":",e-1),-1!=c&&(d=d.substring(c))),(c=this.emojiManager.emojiShortcutMap[d.toLocaleLowerCase()]||null)&&c.emojiId&&(c=P_(this.emojiManager,c.emojiId),this.offsetStartOfRangeBy(a,d.length+b),c=(c.isCustomEmoji?c.shortcuts[0]:c.emojiId)||"",b&&(c+=this.NBSP),
this.fire("yt-insert-suggestion",{range:a,text:c}),this.$.dropdown.opened=!1)},
onKeyDown_:function(a){if(this.$.dropdown.opened)switch(a.keyCode){case 27:this.$.dropdown.opened=!1;a.stopPropagation();break;case 9:this.insertSuggestion(this.suggestions[this.suggestionIndex_].suggestion);a.preventDefault();break;case 38:this.changeSuggestionIndex_(this.suggestionIndex_-1);a.preventDefault();break;case 40:this.changeSuggestionIndex_(this.suggestionIndex_+1),a.preventDefault();}},
onKeyUp_:function(a,b){switch(a.keyCode){case 37:case 39:this.updateSuggestionsAtCaret_(b);break;case 38:case 40:this.$.dropdown.opened||this.updateSuggestionsAtCaret_(b);}},
onKeyPress_:function(a){13==a.keyCode&&this.$.dropdown.opened&&(this.insertSuggestion(this.suggestions[this.suggestionIndex_].suggestion),a.preventDefault())},
changeSuggestionIndex_:function(a){if(this.$.dropdown.opened){var b=this.$["dropdown-content"];0<=this.suggestionIndex_&&this.suggestionIndex_<b.children.length&&(b.children[this.suggestionIndex_].active=!1);this.suggestionIndex_=(a+this.suggestions.length)%this.suggestions.length;a=b.children[this.suggestionIndex_];a.active=!0;b.scrollTop=a.offsetTop}},
retrieveTextBeforeRange:function(a){var b=a.startContainer;return b&&b.nodeType==Node.TEXT_NODE?b.textContent.substr(0,a.startOffset):""}});MY.YtPolymer2AwareBehavior={properties:{polymer2:{type:Boolean,reflectToAttribute:!0,value:function(){return!!Polymer.Element}}}};Polymer({is:"ytd-poll-attachment",behaviors:[X,MY.YtPolymer2AwareBehavior],properties:{data:{type:Object,observer:"dataChanged_"},pollOptions_:{type:Array},hasMaxOptions:{type:Boolean,value:!1,reflectToAttribute:!0},enableCreationBox:{type:Boolean,reflectToAttribute:!0}},stampDom:{"data.addOptionButton":{id:"add-option",mapping:{buttonRenderer:"ytd-button-renderer"}}},attached:function(){this.enableCreationBox=A("kevlar_comments_creation_box")},
dataChanged_:function(a){this.pollOptions_=this.setPollOptions_(a)},
setPrefilledChoices:function(a){var b=this;this.set("pollOptions_",[]);var c;for(c=0;c<Math.min(a.length,this.data.maxPollOptions);c++)this.push("pollOptions_",a[c].substring(0,this.data.maxPollOptionChars));for(;c<this.data.minPollOptions;c++)this.push("pollOptions_","");this.hasMaxOptions=c>=this.data.maxPollOptions;Polymer.RenderStatus.afterNextRender(this,function(){var d=b.pollOptions_;Polymer.dom(b.root).querySelectorAll(".poll-option-input").forEach(function(e,g){e.value=d[g]})})},
focusChanged_:function(){this.updateStyles()},
onInput_:function(){this.debounce("onInput_",function(){this.isValid()?this.fire("yt-commentbox-post-enable"):this.fire("yt-commentbox-post-disable")},300)},
setPollOptions_:function(a){return this.get("minPollOptions",a)?Array(this.get("minPollOptions",a)):[]},
addPollOption_:function(){this.fire("yt-commentbox-post-disable");this.push("pollOptions_","");this.data.maxPollOptions&&this.pollOptions_.length==this.data.maxPollOptions&&(this.hasMaxOptions=!0);Fn(Dn,function(){this.$$(".poll-option:last-of-type > .poll-option-input").focus()}.bind(this))},
onRemovePollOption_:function(a){this.setPollOptionsFromInputs_();this.data.minPollOptions&&this.pollOptions_.length==this.data.minPollOptions?(this.clearPollOptions(),this.fire("yt-poll-attachment-dismiss")):(a=this.$.repeat.indexForElement(a.target.parentNode),this.splice("pollOptions_",a,1),this.hasMaxOptions=!1);this.areAllOptionsValid_()&&this.fire("yt-commentbox-post-enable")},
isValid:function(){this.setPollOptionsFromInputs_();return this.areAllOptionsValid_()},
areAllOptionsValid_:function(){if(this.data.minPollOptionChars)for(var a=0,b=this.pollOptions_.length;a<b;a++)if(this.pollOptions_[a].length<Number(this.data.minPollOptionChars))return!1;return!0},
getPollOptions:function(){return this.pollOptions_},
setPollOptionsFromInputs_:function(){for(var a=Polymer.dom(this.root).querySelectorAll(".poll-option-input"),b=0;b<a.length;b++)this.pollOptions_[b]=a[b].value.trim()},
clearPollOptions:function(){this.pollOptions_=this.setPollOptions_(this.data);Polymer.dom(this.root).querySelectorAll(".poll-option-input").forEach(function(a){a.value=""});
this.hasMaxOptions=!1},
getSimpleString:XU});var bGa=0,cGa=/tone[1-5]/,dGa=" \uD83C\uDFFB \uD83C\uDFFC \uD83C\uDFFD \uD83C\uDFFE \uD83C\uDFFF".split(" "),Q_=function(){this.skinTone=0;this.emojiSize=24;this.emojis=[];this.emojiMap={};this.emojiRegex=/$./;this.emojiShortcutMap={};this.emojiShortcutCharMap={};this.hasInitializedShortcutCharMap=!1};
Q_.prototype.load=function(a,b){if(b)if(a.length)a=a.concat(b.emojis);else{this.emojis=b.emojis;this.emojiMap=b.emojiMap;this.emojiShortcutMap=b.emojiShortcutMap;this.emojiShortcutCharMap=b.emojiShortcutCharMap;this.hasInitializedShortcutCharMap=!0;this.emojiRegex=b.emojiRegex;return}this.emojis=a;this.hasInitializedShortcutCharMap=!1;b=Array(a.length);for(var c=0;c<a.length;c++){var d=a[c];if(d.emojiId){this.emojiMap[d.emojiId]=d;for(var e=0;d.shortcuts&&e<d.shortcuts.length;e++)this.emojiShortcutMap[d.shortcuts[e].toLocaleLowerCase()]=
d;b[c]=d.isCustomEmoji&&d.shortcuts?d.shortcuts[0]:d.emojiId}}b.sort(function(g,h){return h.length-g.length});
this.emojiRegex=b.length?new RegExp(b.join("|"),"gi"):/$./};
var P_=function(a,b){var c=a.emojiMap[b];c&&c.supportsSkinTone&&0!==a.skinTone&&(a=a.emojiMap[b+dGa[a.skinTone]])&&(c=a);return c},aGa=function(a,b){if(!a.hasInitializedShortcutCharMap){a.hasInitializedShortcutCharMap=!0;
for(var c=0;c<a.emojis.length;c++)for(var d=a.emojis[c],e=0;d.shortcuts&&e<d.shortcuts.length;e++){var g=d.shortcuts[e];if(!(3>g.length||!d.isCustomEmoji&&cGa.test(g))){var h=g.substr(0,3).toLocaleLowerCase();null==a.emojiShortcutCharMap[h]&&(a.emojiShortcutCharMap[h]=Object.create(null));a.emojiShortcutCharMap[h][g]=d}}}return a.emojiShortcutCharMap[b]||{}};
Q_.prototype.createEmoji=function(a,b){b=void 0===b?!0:b;var c=document.createElement("img");c.classList.add("emoji");c.src=a.image?LY(a.image.thumbnails,this.emojiSize)||"":"";var d=void 0;a.image&&a.image.accessibility&&a.image.accessibility.accessibilityData&&(d=a.image.accessibility.accessibilityData.label);c.alt=d?d:(a.isCustomEmoji&&a.shortcuts?a.shortcuts[0]:a.emojiId)||"";a.isCustomEmoji&&(c.dataset.emojiId=a.emojiId);Ne&&(c.setAttribute("contenteditable","false"),c.setAttribute("unselectable",
"on"));b&&(a.shortcuts&&a.shortcuts.length&&c.setAttribute("shared-tooltip-text",a.shortcuts[0]),c.id="emoji-"+bGa++);return c};
Q_.prototype.createDocumentFragment=function(a,b,c){b=void 0===b?!1:b;c=void 0===c?!0:c;for(var d=document.createDocumentFragment(),e=0,g;null!=(g=this.emojiRegex.exec(a));){var h=this.emojiMap[g[0]]||this.emojiShortcutMap[g[0].toLocaleLowerCase()]||null;!h||h.isCustomEmoji&&!b||(h=this.createEmoji(h,c),e!==g.index&&d.appendChild(document.createTextNode(a.substring(e,g.index))),d.appendChild(h),e=g.index+g[0].length)}d.appendChild(document.createTextNode(a.substr(e)));return d};var R_=function(){var a=F.apply(this,arguments)||this;a.focusedSuggestionIndex=-1;return a};
l(R_,F);f=R_.prototype;f.created=function(){this.ytRendererBehavior.monitorScroll=!0};
f.clearFocusedSuggestion=function(){this.focusedSuggestionIndex=-1;this._setFocusedSuggestionId(void 0)};
f.setFocusedSuggestionIndex=function(a){!this.data||!this.data.suggestions||0>a||a>=this.data.suggestions.length||(this.focusedSuggestionIndex=a,a=this.getSuggestionId(a),this._setFocusedSuggestionId(a))};
f.advanceSuggestion=function(a){-1===this.focusedSuggestionIndex||-1!==a&&1!==a||(this.setFocusedSuggestionIndex(this.focusedSuggestionIndex+a),this.ensureSuggestionVisible(this.focusedSuggestionIndex))};
f.ensureSuggestionVisible=function(a){a=this.getSuggestionId(a);a=this.$$("[id="+a+"]");null!=a&&(a.offsetTop<this.scrollTop?a.scrollIntoView(!0):a.offsetTop+a.clientHeight>this.scrollTop+this.clientHeight&&a.scrollIntoView(!1))};
f.getSuggestionId=function(a){return"user-mention-suggestion-"+a};
f.onSuggestionTap=function(a){var b=a.model.item.userMentionSuggestionRenderer;this.ytRendererBehavior.logExplicitClick(b);this.fire("yt-user-mention-suggestion-selected",{data:b,index:a.model.index})};
f.onSuggestionMouseMove=function(a){a.model.index!==this.focusedSuggestionIndex&&this.setFocusedSuggestionIndex(a.model.index)};
f.isSuggestionFocused=function(a,b){return a===b};
f.onDomChange=function(){this.ytRendererBehavior.markDirty()};
var S_=R_;S_.prototype.onDomChange=S_.prototype.onDomChange;v([H(V.YtRendererBehavior),w("design:type",Object)],S_.prototype,"ytRendererBehavior",void 0);v([I(),w("design:type",Object)],S_.prototype,"data",void 0);v([I(),w("design:type",Object)],S_.prototype,"focusedSuggestionIndex",void 0);v([I({readOnly:!0,notify:!0}),w("design:type",String)],S_.prototype,"focusedSuggestionId",void 0);
v([ql("dom-change"),w("design:type",Function),w("design:paramtypes",[CustomEvent]),w("design:returntype",void 0)],S_.prototype,"onDomChange",null);var eGa=S_=v([W({is:"yt-user-mention-suggestions-dropdown"})],S_);var T_=function(){var a=F.apply(this,arguments)||this;a.suggestionsResponse=null;a.activeMention=null;a.selectionChangeListener=a.onSelectionChange.bind(a);a.pendingQuery=null;a.flowNonce=null;return a};
l(T_,F);f=T_.prototype;f.beforeRegister=function(){this.ironA11yKeysBehavior.keyBindings={up:"focusPreviousSuggestion",down:"focusNextSuggestion","tab enter":"selectFocusedSuggestion",esc:"cancelActiveMention"}};
f.attached=function(){document.addEventListener("selectionchange",this.selectionChangeListener)};
f.detached=function(){document.removeEventListener("selectionchange",this.selectionChangeListener)};
f.hasSuggestions=function(a){return!!(a&&a.suggestions&&0<a.suggestions.length)};
f.onInput=function(){var a=this;if(this.suggestionsEndpoint)if(this.activeMention){this.updateActiveMention();var b=null!=this.suggestionsResponse&&!this.hasSuggestions(this.suggestionsResponse),c=" "===this.activeMention.getText().slice(-1),d=" "===this.activeMention.getText().slice(-2,-1);if(this.activeMention.isCollapsed()||(b||d)&&c)this.cancelActiveMention();else{var e=this.activeMention.getText().substring(1).trim();this.logGELEvent("USER_MENTION_AUTO_COMPLETE_BOX_EVENT_TYPE_INPUT_TEXT_UPDATED");
this.debounce("requestSuggestions",function(){a.requestSuggestions(e)},100)}}else this.maybeStartSuggest()};
f.onServiceRequestSent=function(a){a.stopPropagation()};
f.onServiceRequestCompleted=function(a){a.stopPropagation();a=a.detail.data;if(!a.query||this.pendingQuery&&this.pendingQuery===a.query)this.pendingQuery=null,this.suggestionsResponse=a,this.hasSuggestions(a)&&this.dropdown.setFocusedSuggestionIndex(0)};
f.onServiceRequestError=function(a){a.stopPropagation()};
f.onUserMentionSuggestionSelected=function(a){this.selectSuggestion(a.detail.data,a.detail.index)};
f.onSelectionChange=function(){if(this.activeMention){var a=OL(),b=this.activeMention.containsRange(a);a=a&&this.containsHelper(this.dropdown,a.getContainer());b||a||this.cancelActiveMention()}};
f.containsHelper=function(a,b){if(!Polymer.Element||window.ShadyDOM&&window.ShadyDOM.noPatch)return a.contains(b);for(;b;){if(b===a)return!0;b=b instanceof ShadowRoot?b.host:b.parentNode}return!1};
f.maybeStartSuggest=function(){var a=OL();if(a&&a.isCollapsed()){var b=a.getStartNode(),c=a.getStartOffset();if(b instanceof Text&&!(1>c)){var d=b.textContent;!(d=d&&d.charAt(c-1))||0>"@\uFE6B\uFF20+\uFE62\uFF0B".indexOf(d)||(this.activeMention=nM(b,c-1,a.getEndNode(),a.getEndOffset()),this.flowNonce=Ko(),this.logGELEvent("USER_MENTION_AUTO_COMPLETE_BOX_EVENT_TYPE_MENTION_FLOW_STARTED"))}}};
f.updateActiveMention=function(){if(this.activeMention){var a=OL();a&&a.isCollapsed()&&(this.activeMention=nM(this.activeMention.getStartNode(),this.activeMention.getStartOffset(),a.getEndNode(),a.getEndOffset()))}};
f.requestSuggestions=function(a){if(this.activeMention){var b={suggestions_query:a};this.pendingQuery=a;this.ytActionSenderBehavior.sendServiceRequestAction([this.suggestionsEndpoint,b])}};
f.cancelActiveMention=function(){this.activeMention&&this.logGELEvent("USER_MENTION_AUTO_COMPLETE_BOX_EVENT_TYPE_MENTION_FLOW_STOPPED");this.suggestionsResponse=this.pendingQuery=this.activeMention=null;this.dropdown.clearFocusedSuggestion()};
f.focusPreviousSuggestion=function(a){this.hasSuggestions(this.suggestionsResponse)&&(this.dropdown.advanceSuggestion(-1),a.preventDefault())};
f.focusNextSuggestion=function(a){this.hasSuggestions(this.suggestionsResponse)&&(this.dropdown.advanceSuggestion(1),a.preventDefault())};
f.selectFocusedSuggestion=function(a){if(this.hasSuggestions(this.suggestionsResponse)){var b=this.suggestionsResponse.suggestions[this.dropdown.focusedSuggestionIndex];b.userMentionSuggestionRenderer&&(this.selectSuggestion(b.userMentionSuggestionRenderer,this.dropdown.focusedSuggestionIndex),a.preventDefault())}};
f.selectSuggestion=function(a,b){if(a){var c=this.activeMention;if(c){var d=document.createElement("a");Rh(d,"\xA0@"+a.displayName+"\xA0");fd(d,"/channel/"+a.channelId);d.classList.add("yt-formatted-string","yt-simple-endpoint");d.setAttribute("spellcheck","false");c.replaceContentsWithNode(d);a=document.createTextNode(" ");d.parentNode.insertBefore(a,d.nextSibling);window.getSelection().collapse(a,1);this.logGELEvent("USER_MENTION_AUTO_COMPLETE_BOX_EVENT_TYPE_SUGGESTION_SELECTED",{suggestionSelected:{suggestionIndex:b}});
this.cancelActiveMention()}}};
f.getPositionTarget=function(a){return a&&a.getBrowserRangeObject()};
f.onDomChange=function(){this.ironDropdown.refit();this.logGELEvent("USER_MENTION_AUTO_COMPLETE_BOX_EVENT_TYPE_CONTENT_UPDATED")};
f.onFocusedSuggestionIdChanged=function(a){var b=this.getContentChildren("")[0];b&&(a.detail.value?b.setAttribute("aria-activedescendant",a.detail.value):b.removeAttribute("aria-activedescendant"))};
f.onDropdownOpened=function(){this.logGELEvent("USER_MENTION_AUTO_COMPLETE_BOX_EVENT_TYPE_BOX_OPENED")};
f.logGELEvent=function(a,b){a={eventType:a,flowNonce:this.flowNonce,source:"USER_MENTION_AUTO_COMPLETE_SOURCE_BACKSTAGE_POST"};b&&(a=Object.assign(a,b));co("userMentionAutoCompleteBoxEvent",a)};
var U_=T_;U_.prototype.onDomChange=U_.prototype.onDomChange;U_.prototype.onUserMentionSuggestionSelected=U_.prototype.onUserMentionSuggestionSelected;U_.prototype.onServiceRequestError=U_.prototype.onServiceRequestError;U_.prototype.onServiceRequestCompleted=U_.prototype.onServiceRequestCompleted;U_.prototype.onServiceRequestSent=U_.prototype.onServiceRequestSent;U_.prototype.onInput=U_.prototype.onInput;
v([H(T.YtActionSenderBehavior),w("design:type",Object)],U_.prototype,"ytActionSenderBehavior",void 0);v([H(Polymer.IronA11yKeysBehavior),w("design:type",Object)],U_.prototype,"ironA11yKeysBehavior",void 0);v([I(),w("design:type",Object)],U_.prototype,"suggestionsEndpoint",void 0);v([I(),w("design:type",Object)],U_.prototype,"suggestionsResponse",void 0);v([I(),w("design:type",Object)],U_.prototype,"activeMention",void 0);v([tl("#dropdown"),w("design:type",eGa)],U_.prototype,"dropdown",void 0);
v([tl("#iron-dropdown"),w("design:type",Object)],U_.prototype,"ironDropdown",void 0);v([ql("input"),w("design:type",Function),w("design:paramtypes",[Event]),w("design:returntype",void 0)],U_.prototype,"onInput",null);v([ql("yt-service-request-sent"),w("design:type",Function),w("design:paramtypes",[CustomEvent]),w("design:returntype",void 0)],U_.prototype,"onServiceRequestSent",null);
v([ql("yt-service-request-completed"),w("design:type",Function),w("design:paramtypes",[CustomEvent]),w("design:returntype",void 0)],U_.prototype,"onServiceRequestCompleted",null);v([ql("yt-service-request-error"),w("design:type",Function),w("design:paramtypes",[CustomEvent]),w("design:returntype",void 0)],U_.prototype,"onServiceRequestError",null);
v([ql("yt-user-mention-suggestion-selected"),w("design:type",Function),w("design:paramtypes",[CustomEvent]),w("design:returntype",void 0)],U_.prototype,"onUserMentionSuggestionSelected",null);v([ql("dom-change"),w("design:type",Function),w("design:paramtypes",[CustomEvent]),w("design:returntype",void 0)],U_.prototype,"onDomChange",null);U_=v([W({is:"yt-user-mention-autosuggest-input"})],U_);var fGa=function(){return F.apply(this,arguments)||this};
l(fGa,F);var V_=fGa;v([H(V.YtRendererBehavior),w("design:type",Object)],V_.prototype,"rendererBehaviors",void 0);v([I(),w("design:type",Object)],V_.prototype,"data",void 0);v([I({reflectToAttribute:!0}),w("design:type",Boolean)],V_.prototype,"focused",void 0);V_=v([W({is:"yt-user-mention-suggestion-renderer"})],V_);Polymer({is:"yt-emoji-picker-category-button-renderer",properties:{data:{type:Object,observer:"dataChanged_"},id:{type:String,computed:"computeId_(data.categoryId)",reflectToAttribute:!0},active:{type:Boolean,value:!1,notify:!0,reflectToAttribute:!0},icon:{type:String,readOnly:!0,computed:"computeIcon_(data.icon.iconType)"}},created:function(){this.tooltip_=null},
dataChanged_:function(a){a.tooltip&&(this.tooltip_||(this.tooltip_=document.createElement("paper-tooltip"),this.$.button.appendChild(this.tooltip_)),Polymer.dom(this.tooltip_).textContent=a.tooltip)},
computeId_:function(a){return a},
computeIcon_:function(a){return gY(a)},
onTap_:function(){this.active=!this.active;this.fire("yt-emoji-picker-select-category",{categoryId:this.id})}});Polymer({is:"yt-emoji-picker-category-renderer",properties:{data:Object,id:{type:String,computed:"computeId_(data)"},emoji:{type:Array,computed:"computeEmoji_(data)",observer:"emojiChanged_"},skinTone:Number,emojiManager:{type:Object,observer:"emojiManagerChanged_"},focusedIndex:{type:Number,value:0},showFocus:{type:Boolean,value:!1},ariaLabel:{type:String,value:null,reflectToAttribute:!0,computed:"computeAriaLabel_(data.title)"},ariaActivedescendant:{type:String,value:null,reflectToAttribute:!0,
computed:"computeAriaActivedescendant_(emoji, focusedIndex)"}},behaviors:[U.YtActionHandlerBehavior],hostAttributes:{"aria-live":"polite",role:"listbox",tabindex:0},listeners:{focus:"onFocus_",blur:"onBlur_",mousedown:"onMouseDown_",keydown:"onKeyDown_"},actionMap:{"yt-live-chat-emoji-skin-tone-changed":"emojiSkinToneChanged_"},created:function(){this.ignoreNextFocus_=!1},
emojiChanged_:function(){this.changeFocus_(0,!1)},
emojiManagerChanged_:function(a){this.skinTone=a.skinTone},
emojiSkinToneChanged_:function(a){this.skinTone=a},
emojiUrl:function(a){return LY(P_(this.emojiManager,a).image.thumbnails,24)||""},
emojiAlt:function(a){var b=this.get("image.accessibility.accessibilityData.label",a);return b?b:a.isCustomEmoji?a.shortcuts[0]:a.emojiId},
emojiAriaLabel:function(a){return a.shortcuts[0]},
emojiAriaSelected:function(a,b,c){return a&&c==b?"true":"false"},
computeId_:function(a){return a.categoryId||""},
computeEmoji_:function(a){if(!this.emojiManager)return[];var b=this.emojiManager.emojiMap;return a.emojiIds.map(function(c){return b[c]})},
computeAriaLabel_:function(a){return XU(a)},
computeAriaActivedescendant_:function(a,b){return a&&a[b]?a[b].emojiId||"":""},
onMouseDown_:function(){this.ignoreNextFocus_=!0},
onFocus_:function(){this.ignoreNextFocus_||(this.showFocus=!0,this.changeFocus_(0,!0));this.ignoreNextFocus_=!1},
onBlur_:function(){this.showFocus=!1},
onTap_:function(a){a.target instanceof HTMLImageElement&&(a=a.target.id,this.changeFocus_(0,!1),this.fire("yt-emoji-select",P_(this.emojiManager,a)))},
onEmojiMouseOver:function(a){this.fire("yt-emoji-hover",a.model.item)},
changeFocus_:function(a,b){this.focusedIndex=(this.focusedIndex+a+this.emoji.length)%this.emoji.length;this.focusedIndex<this.emoji.length&&(a=this.emoji[this.focusedIndex],b&&(this.$.emoji.children[this.focusedIndex].scrollIntoView(!1),this.fire("yt-emoji-hover",a)))},
onKeyDown_:function(a){switch(a.keyCode){case 13:if(this.focusedIndex<this.emoji.length){var b=this.emoji[this.focusedIndex];b&&b.emojiId&&(this.fire("yt-emoji-select",P_(this.emojiManager,b.emojiId)),a.preventDefault(),this.focus())}break;case 40:this.changeFocus_(1,!0);a.preventDefault();break;case 38:this.changeFocus_(-1,!0),a.preventDefault();}}});Polymer({is:"yt-emoji-picker-upsell-category-renderer",properties:{data:Object,id:{type:String,computed:"computeId_(data)"},titleOffset:{type:Number,value:0,observer:"titleOffsetChanged_"},ariaLabel:{type:String,value:null,reflectToAttribute:!0,computed:"getFormattedStringRawText(data.upsell)"},ariaActivedescendant:{type:String,value:null,reflectToAttribute:!0,computed:"computeAriaActivedescendant_(focusedIndex)"},showFocus:{type:Boolean,value:!1},focusedIndex:{type:Number,value:0}},listeners:{focus:"onFocus_",
blur:"onBlur_",keydown:"onKeyDown_"},behaviors:[iY.ComponentBehavior],hostAttributes:{"aria-live":"polite",role:"listbox",tabindex:0},emojiUrl:function(a){return LY(a.thumbnails,24)||""},
emojiId:function(a){return"emoji"+a},
computeId_:function(a){return a.categoryId||""},
computeAriaActivedescendant_:function(a){return this.data&&a<this.data.emojis.length?this.emojiId(a):""},
titleOffsetChanged_:function(a){var b=this.getBoundingClientRect(),c=this.$.title.getBoundingClientRect();a=Math.max(0,Math.min(a,b.height-c.height));this.$.title.style.top=a+"px"},
onEmojiMouseOver_:function(a){this.fire("yt-emoji-hover",a.model.item)},
onEmojiTap_:function(a){this.data.command&&(a=this.getEndpointHandler_().getNavigationEventDetails(this.data.command,a),this.fire("yt-navigate",a,{node:this}))},
emojiAriaLabel:function(a){return a.shortcuts[0]},
emojiAriaSelected:function(a,b,c){return a&&c==b?"true":"false"},
changeFocus_:function(a,b){var c=this.data.emojis.length;this.focusedIndex=(this.focusedIndex+a+c)%c;a=this.data.emojis[this.focusedIndex];b&&(this.$$("#"+this.emojiId(this.focusedIndex)).scrollIntoView(!1),this.fire("yt-emoji-hover",a))},
onFocus_:function(){this.showFocus=!0;this.changeFocus_(0,!0)},
onBlur_:function(){this.showFocus=!1},
onKeyDown_:function(a){switch(a.keyCode){case 13:this.onEmojiTap_(a);this.focus();break;case 40:this.changeFocus_(1,!0);a.preventDefault();break;case 38:this.changeFocus_(-1,!0),a.preventDefault();}},
getFormattedStringRawText:XU});Polymer({ANIMATION_TIME:200,COLON_REGEX:/:/g,is:"yt-emoji-picker-renderer",properties:{data:Object,categories:{type:Array,value:function(){return[]}},
categoryButtons:{type:Array,value:function(){return[]}},
id:{type:String,computed:"computeId_(data)",reflectToAttribute:!0},selected:{type:Boolean,value:!1},placeholder:String,search:{type:String,value:"",observer:"searchChanged_"},searching:{type:Boolean,computed:"computeSearching_(search)",reflectToAttribute:!0},searchCategory:{type:Object,computed:"computeSearchCategory_(search)"},searchEmptyMessage:{type:String,computed:"computeSearchEmptyMessage_(searching, searchCategory)"},skinTone:{type:Number,computed:"identity(emojiManager.skinTone)",observer:"skinToneChanged_"},
skinToneOpened:{type:Boolean,value:!1},emojiManager:Object},behaviors:[T.YtActionSenderBehavior,V.YtRendererBehavior,X],listeners:{"yt-emoji-picker-select-category":"onSelectCategory_","yt-emoji-hover":"onEmojiHover_"},stampDom:{categories:{id:"categories",mapping:{emojiPickerCategoryRenderer:{component:"yt-emoji-picker-category-renderer",properties:{emojiManager:"[[emojiManager]]"}},emojiPickerUpsellCategoryRenderer:{component:"yt-emoji-picker-upsell-category-renderer"}}},categoryButtons:{id:"category-buttons",
mapping:{emojiPickerCategoryButtonRenderer:"yt-emoji-picker-category-button-renderer"}}},observers:["updateCategoriesAndPlaceholder_(data, selected)"],identity:Lb,created:function(){this.lastAnimationTime_=0;this.animationEnd_=this.animationStart_=null},
attached:function(){Ne&&(this.style.height=this.clientHeight+150+"px")},
updateCategoriesAndPlaceholder_:function(a,b){a&&b&&(this.categories=a.categories||[],this.categoryButtons=a.categoryButtons||[],this.resetPlaceholder(),this.search="",this.async(this.updateButtons_))},
computeId_:function(a){return a.id||""},
onScroll_:function(){null==this.animationEnd_&&window.requestAnimationFrame(this.updateButtons_.bind(this))},
onSelectCategory_:function(a){var b=""!=this.search;this.search="";for(var c=this.$.categories.children,d=0;d<c.length;d++){var e=c[d];if(e.id==a.detail.categoryId){b?(this.$.categories.scrollTop=e.offsetTop,this.updateButtons_()):(this.animationStart_=this.$.categories.scrollTop,this.animationEnd_=e.offsetTop,this.lastAnimationTime_=0,this.animateScroll_(this.lastAnimationTime_));break}}},
onEmojiHover_:function(a){this.placeholder=a.detail.shortcuts[0]},
onSearchBoxFocused_:function(){this.resetPlaceholder()},
onSearchBoxBlur_:function(){this.resetPlaceholder()},
resetPlaceholder:function(){this.skinToneOpened||(this.placeholder=this.getSimpleString(this.data.searchPlaceholderText))},
computeSearchCategory_:function(a){a=a.replace(this.COLON_REGEX,"").toLowerCase().trim();if(!this.searching)return this.searchCategory;this.updateButtons_();a=a.split(" ");for(var b=[],c=this.emojiManager.emojis,d=0;d<c.length;d++){var e=c[d];if(e.searchTerms)for(var g=0;g<e.searchTerms.length;g++){for(var h=e.searchTerms[g].toLocaleLowerCase(),m=!1,n=0;n<a.length;n++)if(-1!=h.indexOf(a[n])){m=!0;break}if(m){b.push(e.emojiId);break}}}return{categoryId:-1,emojiIds:b}},
computeSearchEmptyMessage_:function(a,b){return a&&b&&b.emojiIds&&0==b.emojiIds.length?this.data.searchNoResultsText||null:null},
computeSearching_:function(a){return this.emojiManager&&1<a.replace(this.COLON_REGEX,"").length},
openSkinToneSelector:function(){this.skinToneOpened=!0},
showSkinTonePlaceholder:function(){this.placeholder=this.getSimpleString(this.data.pickSkinToneText)},
clearSearch:function(){this.resetPlaceholder();this.search=""},
selectSkinTone_:function(a){a=Number(a.target.getAttribute("tone"));this.set("emojiManager.skinTone",a);this.sendAction("yt-live-chat-emoji-skin-tone-changed",[a]);this.skinToneOpened=!1;this.resetPlaceholder()},
skinToneChanged_:function(a){this.$["skin-tone"].setAttribute("tone",a);for(var b=this.$["dropdown-content"].children,c=0;c<b.length;c++)c==a?b[c].setAttribute("selected",""):b[c].removeAttribute("selected")},
animateScroll_:function(a){this.lastAnimationTime_||(this.lastAnimationTime_=a);a-=this.lastAnimationTime_;a<this.ANIMATION_TIME?(this.$.categories.scrollTop=this.animationStart_+(this.animationEnd_-this.animationStart_)*a/this.ANIMATION_TIME,window.requestAnimationFrame(this.animateScroll_.bind(this))):(null!=this.animationEnd_&&(this.$.categories.scrollTop=this.animationEnd_),this.animationEnd_=this.animationStart_=null,this.lastAnimationTime_=0);this.updateButtons_()},
searchChanged_:function(){this.updateButtons_()},
updateButtons_:function(){var a=null;if(!this.search)for(var b=this.$.categories.scrollTop,c=this.$.categories.children,d=0;d<c.length;d++){var e=c[d];e.offsetTop<=b&&(a=e.id)}b=this.$["category-buttons"].children;for(d=0;d<b.length;d++)c=b[d],c.active=c.id==a}});var W_=function(a){if(!a)return!1;if(Polymer.Element){if(a.host&&"YT-FORMATTED-STRING"==a.host.tagName&&"contenteditable-textarea"==a.host.id||a.nodeType==Node.ELEMENT_NODE&&"YTD-COMMENTBOX"==a.tagName)return!0}else if(a.nodeType==Node.ELEMENT_NODE&&"YTD-COMMENTBOX"==a.tagName)return!0;return W_(a.parentNode)},X_=function(a){return a?"A"==a.tagName&&a.href&&a.classList.contains("yt-simple-endpoint"):!1},gGa=function(a){return a?"IMG"==a.tagName&&a.classList.contains("emoji"):!1},Y_=null,hGa=function(a,
b){if(!a)return null;
if(X_(a))return b=a.pathname.substring(a.pathname.indexOf("/channel/")+9),document.createTextNode("@"+b);if(gGa(a))return a=a.alt,b&&(b=b.emojiShortcutMap[a.toLocaleLowerCase()]||null)&&b.isCustomEmoji&&(a="<URehb0Lc5mi4S0dpuLG8:"+b.emojiId+">"),document.createTextNode(a);for(var c=a.cloneNode(!1),d=0;d<a.childNodes.length;++d){var e=hGa(a.childNodes[d],b);e&&c.appendChild(e)}return c},Z_=function(a){return a?X_(a)?a:Z_(a.lastChild):null},$_=function(a){return a?X_(a)?a:$_(a.firstChild):null},iGa=
function(a){if(!a)return null;
for(var b=a.previousSibling;b;)if(b.nodeType==Node.ELEMENT_NODE&&"BR"==b.nodeName)b=b.previousSibling;else if(b.nodeType==Node.TEXT_NODE&&/\s+/.test(b.textContent))b=b.previousSibling;else break;a=(b=Z_(b))?b:(a=a.parentNode)?Z_(a.previousElementSibling):null;return a},a0=function(a){if(!a)return null;
for(var b=a.nextSibling;b;)if(b.nodeType==Node.ELEMENT_NODE&&"BR"==b.nodeName)b=b.nextSibling;else if(b.nodeType==Node.TEXT_NODE&&/\s+/.test(b.textContent))b=b.nextSibling;else break;return(b=$_(b))?b:a0(a.parentNode)},jGa=function(a){var b=OL(),c=b.getStartNode();
if(!W_(c.parentNode))return null;b=b.getStartOffset();if(c.nodeType==Node.TEXT_NODE){var d=ei(c,X_);if(d){if(a&&0==b||!a&&b==c.length)return d}else{if(a&&b==c.length)return!c||"BR"==c.nodeName||c.nextElementSibling&&"block"==bj(c.nextElementSibling,"display")?null:$_(c.nextElementSibling);if(!a&&0==b)return c?Z_(c.previousElementSibling):null}}if(c.nodeType==Node.ELEMENT_NODE)if(a){if(0<=b&&b<c.childNodes.length)return $_(c.childNodes[b])}else if(0<b&&b<=c.childNodes.length)return Z_(c.childNodes[b-
1]);return null},b0=function(a,b,c){if(!a)return null;
if(a.nodeType==Node.TEXT_NODE)if(c){var d=iGa(a);if(d&&!/^\s+\S/.test(a.wholeText.substr(0,b)))return d}else if((d=a0(a))&&!/\S\s+/.test(a.wholeText.substr(b,a.wholeText.length)))return d;return a.nodeType==Node.ELEMENT_NODE?c?iGa(a.childNodes[b]):a0(a.childNodes[b]):b0(a.parentNode,b,c)};
Polymer({is:"ytd-commentbox",behaviors:[Polymer.IronA11yKeysBehavior,X,U.YtActionHandlerBehavior,T.YtActionSenderBehavior,MY.YtPolymer2AwareBehavior],keyBindings:{left:"leftKeyPressed_",right:"rightKeyPressed_",end:"endKeyPressed_",backspace:"maybeBackspaceChip_","delete":"maybeDeleteChip_","ctrl+enter meta+enter":"submitIfNotBackstagePost_","ctrl+backspace alt+backspace":"maybeBackspaceChipWordMode_","ctrl+delete alt+delete":"maybeDeleteChipWordMode_"},properties:{data:{type:Object,observer:"dataChanged_"},
receivedFocusPreviously_:{type:Boolean,value:!1},isReply:{type:Boolean,value:!1},isBackstageComment:{type:Boolean,computed:"computeIsBackstageComment_(data.avatarSize)",reflectToAttribute:!0},isBackstagePost:{type:Boolean,value:!1,reflectToAttribute:!0},serviceEndpoint:{type:Object,readOnly:!0,computed:"computeServiceEndpoint_(data)"},submitButtonDisabled:Boolean,attachment:Object,isLoading:{type:Boolean,observer:"isLoadingChanged_"},errorMessage_:{type:Object,value:null},alertMessage_:{type:Object,
value:null},imageUploadEndpoint_:{type:Object,computed:"computeImageUploadEndpoint_(data)"},addedAttachment:{type:String,value:"none",reflectToAttribute:!0},prefilledAttachment_:{type:String,value:"none",reflectToAttribute:!0},editableText_:{type:String,computed:"computeEditableText_(data.editableText)"},previousText_:String,zeroStepFooterText:Object,enableCreationBox:{type:Boolean,reflectToAttribute:!0},isInputFocus_:{type:Boolean,observer:"onIsInputFocusChanged_"},hasImage_:{type:Boolean,computed:"computeHasImage_(addedAttachment)"},
hasVideo_:{type:Boolean,computed:"computeHasVideo_(addedAttachment)"},hasPoll_:{type:Boolean,computed:"computeHasPoll_(addedAttachment)"},prefilledContent_:{type:Object,readOnly:!0,computed:"computePrefilledContent_(data)"},editAttachment_:{type:Object,readOnly:!0,computed:"computeEditAttachment_(data)"},isCreationBox:{type:Boolean,reflectToAttribute:!0,value:!1},isPopupBox:{type:Boolean,reflectToAttribute:!0,value:!1},emojiManager:{type:Object,readOnly:!0,value:function(){return new Q_}},
isEmojiButtonDisplayed:{type:Boolean,computed:"computeIsEmojiButtonDisplayed_(data)",value:!1},isEmojiPickerDisplayed:{type:Boolean,value:!1,reflectToAttribute:!0},emojiInput:Object,verticalSuggestionsOffset:{type:Number,value:30},isPostCreationDialogV2:{type:Boolean,reflectToAttribute:!0,value:!1},accessRestriction:{type:String},charCount_:{type:Number,value:0},charLimit_:{type:Number,computed:"computeCharLimit_(data)"},aboveCharLimit_:{type:Boolean,reflectToAttribute:!0,value:!1},inputEventSupported_:{type:Boolean,
value:!1}},observers:["observePrefilledImage_(data.purpose, data.prefilledImageData, data.backstageAttachment)","observePrefilledVideo_(data.purpose, data.backstageAttachment)","observePrefilledPoll_(data.prefilledAttachment)"],listeners:{"yt-service-request-completed":"onYtServiceRequestCompleted_","yt-service-request-error":"onYtServiceRequestError_","yt-service-request-sent":"onYtServiceRequestSent_","yt-backstage-image-select-cancel":"onImageCancel_","yt-backstage-image-select-alert":"onImageAlert_",
"yt-backstage-image-select-preview":"onImageSelected_","yt-img-crop-coordinates-update":"onImagePreviewCoordinatesUpdated_","yt-img-crop-reposition":"onImagePreviewReposition_","yt-poll-attachment-dismiss":"onPollAttachmentDismiss_","yt-navigate":"onYtNavigate_","yt-video-link-selected":"onVideoLinkSelected_","yt-video-link-cancel":"onVideoLinkCanceled_","yt-video-link-button-cancel":"onVideoLinkButtonCancel_","yt-commentbox-post-enable":"onSubmitButtonEnable_","yt-commentbox-post-disable":"onSubmitButtonDisable_",
"yt-backstage-attachment-dismissed":"onPrefilledContentDismissed_","yt-emoji-select":"onEmojiSelect_","yt-insert-suggestion":"onSuggestionInsert_","yt-select-emoji-suggestion":"onEmojiSuggestionClick_"},stampDom:{"data.videoLinkButton":{id:"video-link-button",mapping:{buttonRenderer:"ytd-button-renderer"}},"data.imageButton":{id:"image-button",mapping:{buttonRenderer:{component:"ytd-button-renderer"}}},"data.pollButton":{id:"poll-button",mapping:{buttonRenderer:"ytd-button-renderer"}},editAttachment_:{id:"attachment-preview",
mapping:{backstageImageRenderer:"ytd-backstage-image-renderer",videoRenderer:{component:"ytd-video-renderer",properties:{isBackstageVideo:"[[isBackstagePost]]"}},playlistRenderer:{component:"ytd-playlist-renderer",properties:{isBackstagePlaylist:"[[isBackstagePost]]"}}}},"data.accessRestrictionsSelector":{id:"access-restrictions-selector",mapping:{dropdownRenderer:"ytd-flat-dropdown-renderer"}},"imageUploadEndpoint_.imageEditor":{id:"image-select",mapping:{backstageImageSelectRenderer:{component:"ytd-backstage-image-select-renderer",
properties:{imageUploadEndpoint:"[[imageUploadEndpoint_]]",isBackstagePost:"[[isBackstagePost]]"}}}},"data.emojiButton":{id:"emoji-button",mapping:{buttonRenderer:"ytd-button-renderer"}},"data.emojiPicker":{id:"emoji-picker",mapping:{emojiPickerRenderer:{component:"yt-emoji-picker-renderer",properties:{emojiManager:"[[emojiManager]]"}}}}},ready:function(){this.listen(document,"tap","onTap_");this.emojiInput=this.$.emoji},
isLoadingChanged_:function(a){this.fire(a?"yt-commentbox-loading-start":"yt-commentbox-loading-end")},
dataChanged_:function(a){this.set("submitButtonDisabled",void 0);this.clear();a&&this.computeIsEmojiButtonDisplayed_(a)&&this.fetchEmojis(a.emojis,a.emojiPicker.emojiPickerRenderer,a.unicodeEmojisUrl)},
observePrefilledImage_:function(a,b,c){this.isValidPrefilledImage_(a,b,c)&&(this.prefilledAttachment_="image",this.prefilledImageData_=b,this.submitButtonDisabled=!1)},
observePrefilledVideo_:function(a,b){this.isValidPrefilledVideo_(a,b)&&(this.prefilledAttachment_="video")},
observePrefilledPoll_:function(a){a&&a.pollData&&a.pollData.choices&&(this.addedAttachment="poll",this.$["poll-attachment"].setPrefilledChoices(a.pollData.choices))},
attached:function(){this.enableCreationBox=A("kevlar_comments_creation_box");Polymer.Element&&(this.$["input-container"].getElementsByClassName("underline")[0].style.height=0);Polymer.Element&&Polymer.dom.flush();this.focus()},
detached:function(){this.unlisten(document,"tap","onTap_")},
created:function(){this.EMOJI_SUGGESTION_OFFSET_=5;this.prefilledImageData_=this.imagePreviewCoordinates_=this.selectedVideoId_=void 0;this.maybeInitializeBotguard_();document.addEventListener("selectionchange",this.onSelectionChange_)},
onEmojiButtonTap_:function(){this.isEmojiPickerDisplayed=!this.isEmojiPickerDisplayed;this.$$("#emoji-picker > #emoji").selected=!this.$$("#emoji-picker > #emoji").selected},
onEmojiSelect_:function(a){a=a.detail;a=a.isCustomEmoji?a.shortcuts[0]:a.emojiId;var b=this.getInputRange_().cloneRange();this.insertTextWithEmojis_(b,a);this.maybeUpdateTextDirection_()},
getInputRange_:function(){var a=OL();if(a){a=a.getBrowserRangeObject();for(var b=a.commonAncestorContainer;b;){if(b==this.getEditableTextArea_())return a;b=b.parentNode}}a=this.getEditableTextArea_();a=mM(a,a.childNodes.length);a.select();return a.getBrowserRangeObject()},
insertTextWithEmojis_:function(a,b){b=this.emojiManager.createDocumentFragment(b,!0,!1);if(0!=b.childNodes.length)if(Polymer.Element){a.collapsed||a.deleteContents();var c=b.lastChild;a.insertNode(b);ZL(c).select();this.getInputRange_().collapse(!1);this.getEditableTextArea_().normalize();this.submitButtonDisabled=!1;this.getEditableFormattedString_().fixContenteditableScope()}else{var d=document.createElement("div");try{d.style.display="none";Polymer.dom(this.root).appendChild(d);c=document.createDocumentFragment();
for(var e=b.childNodes.length,g=0;g<e;g++)Polymer.dom(d).appendChild(b.childNodes[0]),c.appendChild(d.childNodes[0]);a.collapsed||a.deleteContents();var h=c.lastChild;a.insertNode(c);ZL(h).select();this.getInputRange_().collapse(!1);this.getEditableTextArea_().normalize();this.submitButtonDisabled=!1}finally{Dh(d)}}},
onSelectionChange_:function(){var a=OL();if(a){var b=a.getStartNode(),c=a.getEndNode();if(W_(b)&&W_(c)){var d=a.getStartOffset(),e,g;if(g=cf&&b.nodeType==Node.ELEMENT_NODE)g=e=fh(document,"yt-formatted-string","paper-input-input",b);if(g)mM(e,0).select();else{e=X_(b)?b:ei(b,X_);g=X_(c)?c:ei(c,X_);if(e||g)if(a.isCollapsed()){if(b.nodeType==Node.TEXT_NODE){a=!0;d==b.length&&(a=!1);if("end"==Y_||"right"==Y_)a=!1;b=b.parentNode;c=a;a=b.parentNode;b=lb(a.childNodes,b)+(c?0:1);mM(a,b).select()}}else e?
e.previousSibling&&0<e.previousSibling.length?nM(c,a.getEndOffset(),e.previousSibling,e.previousSibling.length-1).select():(d=document.createTextNode("\u200B"),e.parentNode.insertBefore(d,e),nM(c,a.getEndOffset(),d,0).select()):g&&(g.nextSibling&&0<g.nextSibling.length?nM(b,a.getStartOffset(),g.nextSibling,1).select():(d=document.createTextNode("\u200B"),g.parentNode.insertBefore(d,g.nextSibling),nM(b,a.getStartOffset(),d,d.length).select()));Y_=null}}else Y_=null}else Y_=null},
leftKeyPressed_:function(){Y_="left"},
rightKeyPressed_:function(){Y_="right"},
endKeyPressed_:function(){Y_="end"},
maybeDeleteChip_:function(){var a=jGa(!0);if(a){var b=OL(),c=b.getStartNode();b=b.getStartOffset();dL(c,b,a,a.childNodes.length).select()}},
maybeBackspaceChip_:function(){var a=jGa(!1);if(a){var b=OL(),c=b.getStartNode();b=b.getStartOffset();dL(c,b,a,0).select()}},
maybeBackspaceChipWordMode_:function(a){var b=OL();if(b.isCollapsed()){var c=b.getStartNode();b=b.getStartOffset();var d=b0(c,b,!0);d&&(dL(c,b,d,0).select(),document.execCommand("delete"),a.preventDefault(),a.stopImmediatePropagation())}},
maybeDeleteChipWordMode_:function(a){var b=OL();if(b.isCollapsed()){var c=b.getStartNode();b=b.getStartOffset();var d=b0(c,b,!1);d&&(dL(c,b,d,d.childNodes.length).select(),document.execCommand("delete"),a.preventDefault(),a.stopImmediatePropagation())}},
onTap_:function(a){if(!a.defaultPrevented&&("YTD-COMMENTBOX"==a.currentTarget.tagName&&X_(a.target)&&a.preventDefault(),this.isEmojiPickerDisplayed)){var b=this.$$("#emojis"),c=this.$$("#emoji-button"),d=this.getEditableTextArea_();if(Polymer.Element?a.target instanceof Node&&-1==a.path.indexOf(d)&&-1==a.path.indexOf(c)&&!b.contains(a.target):a.target instanceof Node&&!d.contains(a.target)&&!c.contains(a.target)&&!b.contains(a.target))this.onEmojiButtonTap_()}},
isValidPrefilledImage_:function(a,b,c){return"BACKSTAGE_POST_DIALOG_PURPOSE_CREATE"==a&&void 0!==b&&null!==b.encryptedBlobId&&null!==b.sourceExternalVideoId&&void 0!==c&&null!==c.backstageImageRenderer},
isValidPrefilledVideo_:function(a,b){return"BACKSTAGE_POST_DIALOG_PURPOSE_CREATE"==a&&!!b&&!!b.videoRenderer&&!!b.videoRenderer.videoId},
isValidPrefilledAttachment_:function(a,b,c){return this.isValidPrefilledImage_(a,b,c)||this.isValidPrefilledVideo_(a,c)},
dismissPrefilledContent_:function(){this.prefilledImageData_=void 0;this.prefilledAttachment_="none"},
clear:function(){this.errorMessage_=this.alertMessage_=null;var a=this.$$("ytd-backstage-image-select-renderer");a&&this.hasImage_&&a.cancel();(a=this.$["poll-attachment"])&&this.hasPoll_&&a.clearPollOptions();(a=this.$["video-link-attachment"])&&this.hasVideo_&&a.cancel();(a=this.$["access-restrictions-selector"].firstElementChild)&&a.reset();"none"!=this.prefilledAttachment_&&this.dismissPrefilledContent_();this.addedAttachment="none";this.prefilledImageData_=this.imagePreviewCoordinates_=this.selectedVideoId_=
void 0;this.submitButtonDisabled=!0;this.setTextAreaValue(this.data.editableText);this.previousText_=this.getTextAreaValue().trim();this.isEmojiPickerDisplayed=this.receivedFocusPreviously_=!1},
getEditableTextArea_:function(){return Polymer.Element?Polymer.dom(this.root).querySelector("#contenteditable-textarea").getRoot().node:this.querySelector("#contenteditable-textarea")},
getEditableFormattedString_:function(){return Polymer.dom(this.root).querySelector("#contenteditable-textarea")},
getTextAreaValue:function(){return this.convertHrefToAtMentionAndImgToEmoji_(this.getEditableTextArea_())},
convertHrefToAtMentionAndImgToEmoji_:function(a){var b=hGa(a,this.emojiManager);b.style.opacity=0;b.style.position="absolute";Polymer.dom(a).parentNode.appendChild(b);var c=b.innerText;Polymer.dom(a).parentNode.removeChild(b);return c},
setTextAreaValue:function(a){a||(a="");var b=this.getEditableFormattedString_();b.text="";Polymer.Element?this.getEditableTextArea_().innerText="":b.innerText="";"string"===typeof a&&(a={runs:[{text:a}]});b.text=a},
focus:function(){this.$["author-thumbnail"].markDirty();this.getEditableTextArea_().focus();this.maybeSetCursorAtEnd_();this.maybeUpdateTextDirection_();Y_=null},
maybeSetCursorAtEnd_:function(){if(!this.receivedFocusPreviously_){var a=this.getEditableTextArea_();a&&(mM(a,a.childNodes.length).select(),this.receivedFocusPreviously_=!0)}},
maybeInitializeBotguard_:function(){var a=z("COMMENTS_BG_P",void 0);a&&!WR.isInitialized()&&WR.initialize(z("COMMENTS_BG_I",void 0),z("COMMENTS_BG_IU",void 0),a)},
maybeUpdateTextDirection_:function(){if("rtl"==z("HTML_DIR",void 0)){var a=this.getEditableTextArea_(),b=""!=this.getTextAreaValue()?"auto":"rtl";a.setAttribute("dir",b)}},
handleInputEvent_:function(){var a=null;if(this.isEmojiButtonDisplayed){var b=this.getInputRange_();b&&(a=this.emojiInput.retrieveTextBeforeRange(b))}this.insertText_(a);this.updateCharCount_();this.setSubmitButton_()},
onInput_:function(){this.inputEventSupported_=!0;this.handleInputEvent_()},
onKeyUp_:function(){this.inputEventSupported_||this.handleInputEvent_()},
updateCharCount_:function(){this.charCount_=this.getTextAreaValue().length;this.aboveCharLimit_=!!this.charLimit_&&this.charCount_>this.charLimit_},
onPaste_:function(a){this.isEmojiButtonDisplayed&&(a.preventDefault(),a.stopImmediatePropagation(),a=a.clipboardData.getData("text/plain"),this.insertText_(a))},
insertText_:function(a){this.maybeUpdateTextDirection_();if(this.isEmojiButtonDisplayed&&a){var b=this.getInputRange_().cloneRange();this.emojiManager&&b&&(this.emojiInput.offsetStartOfRangeBy(b,a.length),this.insertTextWithEmojis_(b,a),gGa(this.getEditableTextArea_().lastChild)||(b=this.getInputRange_().cloneRange())&&this.emojiInput.maybeCompleteEmoji(b,a,!0),b&&(this.emojiInput.updateSuggestions(b,a),this.updateSuggestionOffset_(b)))}},
setSubmitButton_:function(){if(this.data.editableText){var a=this.getTextAreaValue().trim();this.submitButtonDisabled=a===this.previousText_||!a||this.aboveCharLimit_}else this.submitButtonDisabled=!this.isValidInput_()},
onSubmitButtonEnable_:function(){this.setSubmitButton_()},
onSubmitButtonDisable_:function(){this.submitButtonDisabled=!0},
getSimpleString:XU,computeCreationBoxClass_:function(a){return a?"focused":"not-focused"},
computeFooterMessageClass_:function(a,b){return b?"footer-error-message":"footer-alert-message"},
computeFooterMessage_:function(a,b){return b?b:a},
computeFooterMessageHidden_:function(a,b){return!b&&!a},
computePlaceholderText_:function(a,b,c){if("video"!=c&&"image"!=c||!a.prefilledPlaceholderText){if("poll"==b)return this.getSimpleString(a.pollPostPlaceholderText);if("image"==b)return this.getSimpleString(a.imagePostPlaceholderText)}else return this.getSimpleString(a.prefilledPlaceholderText);return void 0===a?"":this.getSimpleString(a.placeholderText)},
computeHideAttachmentButtons_:function(a,b,c){return void 0===a?!1:"none"!=b||"none"!=c||!a.videoLinkButton&&!a.pollButton&&!a.imageButton},
computeHideDismissableAttachment_:function(a){return"image"!=a&&"video"!=a},
computeHasVideo_:function(a){return"video"==a},
computeHasImage_:function(a){return"image"==a},
computeHasPoll_:function(a){return"poll"==a},
computePrefilledContent_:function(a){if(this.isValidPrefilledAttachment_(a.purpose,a.prefilledImageData,a.backstageAttachment))return a.backstageAttachment},
computeEditAttachment_:function(a){if(void 0===this.computePrefilledContent_(a))return a.backstageAttachment},
computeAuthorThumbnailDimension_:function(a,b){return a&&!b?24:40},
computeImageUploadEndpoint_:function(a){return this.get("imageButton.buttonRenderer.navigationEndpoint.backstageImageUploadEndpoint",a)},
computeEditableText_:function(a){return this.getSimpleString(a)},
computeIsBackstageComment_:function(a){return a&&"COMMENT_DIALOG_AVATAR_SIZE_TYPE_BACKSTAGE_COMMENT"==a?!0:!1},
computeServiceEndpoint_:function(a){return this.get("submitButton.buttonRenderer.serviceEndpoint",a)||this.get("replyButton.buttonRenderer.serviceEndpoint",a)||this.get("postButton.buttonRenderer.serviceEndpoint",a)},
computeSubmitButton_:function(a){if(a=this.get("submitButton.buttonRenderer",a)||this.get("replyButton.buttonRenderer",a)||this.get("postButton.buttonRenderer",a))a=Polymer.Base.mixin({},a),a.serviceEndpoint=void 0;return a},
computeIsEmojiButtonDisplayed_:function(a){return!!a.emojiButton&&(!!a.emojis||!!a.unicodeEmojisUrl)},
computeCharLimit_:function(a){return a.charLimit?a.charLimit:null},
getSharedPostId_:function(){return this.data.backstageAttachment&&this.data.backstageAttachment.postRenderer&&this.data.backstageAttachment.postRenderer.postId?this.data.backstageAttachment.postRenderer.postId:void 0},
onYtNavigate_:function(a){a.stopPropagation();this.get("detail.endpoint.backstageImageUploadEndpoint",a)&&(this.addedAttachment="image",this.submitButtonDisabled=!0)},
onVideoLinkSelected_:function(a){this.addedAttachment="video";this.selectedVideoId_=a.detail.videoId},
onYtServiceRequestSent_:function(a,b){for(a=0;a<b.actions.length;a++)b.actions[a].createPollAction&&(this.submitButtonDisabled=!0)},
onYtServiceRequestCompleted_:function(a){a.stopPropagation();this.isLoading=!1;var b=this.get("detail.actions.0.showErrorAction.errorMessage.messageRenderer.text",a);b?this.errorMessage_=b:(this.clear(),a=this.get("detail.data",a),this.fire("yt-commentbox-dismiss",a))},
onYtServiceRequestError_:function(a){a.stopPropagation();this.isLoading=!1;(a=this.get("detail.error.message",a))?this.errorMessage_=this.data.errorMessage||UU(a):(this.clear(),this.fire("yt-commentbox-dismiss"))},
submitIfNotBackstagePost_:function(a){if(!this.isBackstagePost)this.onSubmit_(a)},
onSubmit_:function(a){a.stopPropagation();if(this.serviceEndpoint&&this.isValidInput_()){a=(a=this.$$("ytd-backstage-image-select-renderer"))&&a.uploadPromise();var b=this.getSharedPostId_();a?a.then(this.submitForm_.bind(this)).catch(function(c){this.isLoading=!1;this.errorMessage_=UU(c.message)}.bind(this)):this.selectedVideoId_?this.submitForm_(void 0,this.selectedVideoId_):"image"==this.prefilledAttachment_?this.submitForm_(this.prefilledImageData_.encryptedBlobId,void 0,void 0,this.prefilledImageData_.sourceExternalVideoId):
"video"==this.prefilledAttachment_?this.submitForm_(void 0,this.data.backstageAttachment.videoRenderer.videoId):b?this.submitForm_(void 0,void 0,b):this.submitForm_()}},
onCancel_:function(a){a.stopPropagation();this.clear();this.fire("yt-commentbox-dismiss")},
onImageCancel_:function(a){a.stopPropagation();this.addedAttachment="none";this.errorMessage_=this.alertMessage_=null;this.imagePreviewCoordinates_=void 0;this.setSubmitButton_();this.getEditableTextArea_().focus()},
onPrefilledContentDismissed_:function(a){a.stopPropagation();this.dismissPrefilledContent_();this.setSubmitButton_();this.getEditableTextArea_().focus()},
onImageAlert_:function(a){a.stopPropagation();a.detail.alertMessage&&(this.alertMessage_=a.detail.alertMessage)},
onImageSelected_:function(a){a.stopPropagation();A("use_preview_selection_tool")||(this.submitButtonDisabled=!1)},
onImagePreviewCoordinatesUpdated_:function(a){a.stopPropagation();this.imagePreviewCoordinates_=JSON.stringify(a.detail);this.submitButtonDisabled=!1},
onImagePreviewReposition_:function(a){a.stopPropagation();this.imagePreviewCoordinates_=void 0;this.submitButtonDisabled=!0},
onVideoLinkCanceled_:function(a){a.stopPropagation();this.addedAttachment="none";this.setSubmitButton_();this.errorMessage_=null;this.selectedVideoId_=void 0;this.getEditableTextArea_().focus()},
onVideoLinkButtonCancel_:function(){this.getEditableTextArea_().focus()},
onAddVideoLink:function(a){var b=this.$["video-link-attachment"];b&&b.onLaunchVideoPicker(a)},
onPollAttachmentDismiss_:function(){this.addedAttachment="none";this.setSubmitButton_();this.getEditableTextArea_().focus()},
isValidInput_:function(){if("image"==this.prefilledAttachment_)return!!this.prefilledImageData_;if("video"==this.prefilledAttachment_&&!this.data.backstageAttachment.videoRenderer.videoId)return!1;if("image"==this.addedAttachment){var a=A("use_preview_selection_tool")?!!this.imagePreviewCoordinates_:!0;return this.$$("ytd-backstage-image-select-renderer")&&this.$$("ytd-backstage-image-select-renderer").hasPreview&&a}return"poll"==this.addedAttachment&&this.$["poll-attachment"]&&!this.$["poll-attachment"].isValid()||
"video"==this.addedAttachment&&this.$["video-link-attachment"]&&!this.$["video-link-attachment"].isValid()||this.aboveCharLimit_?!1:!!this.getTextAreaValue().trim()},
submitForm_:function(a,b,c,d){var e={comment_text:this.getTextAreaValue().trim()};this.isLoading=!0;A("use_player_botguard_vm")?zya()&&(e.botguard_response=Aya()):WR.isInitialized()&&(e.botguard_response=WR.invoke());a?(e.image_blob_id=a,this.imagePreviewCoordinates_&&(e.image_preview_coordinates=this.imagePreviewCoordinates_)):b?e.attached_video_id=b:c&&(e.shared_post_id=c);d&&(e.source_video_id=d);this.data.accessRestrictionsSelector&&this.data.accessRestrictionsSelector.dropdownRenderer&&(e.access_restrictions=
this.accessRestriction?this.accessRestriction:this.$["access-restrictions-selector"].firstElementChild.value);"poll"==this.addedAttachment&&(e.poll_options=this.$["poll-attachment"].getPollOptions());this.sendServiceRequestAction([this.serviceEndpoint,e])},
onIsInputFocusChanged_:function(){this.isInputFocus_?this.fire("yt-autonav-pause-focus"):this.fire("yt-autonav-pause-blur")},
plaintextDrop_:function(a){mb(a.dataTransfer.items,function(b){"string"==b.kind&&b.type.match("^text/plain")&&b.getAsString(function(c){Polymer.Element?a.target.getRoot().appendChild(document.createTextNode(c)):a.target.appendChild(document.createTextNode(c))})});
a.preventDefault()},
preventDefault_:function(a){a.preventDefault()},
onSuggestionInsert_:function(a){this.insertTextWithEmojis_(a.detail.range,a.detail.text)},
onEmojiSuggestionClick_:function(a){this.emojiInput.insertSuggestion(a.detail)},
updateSuggestionOffset_:function(a){var b=this.getEditableTextArea_().getBoundingClientRect().bottom,c=a.getBoundingClientRect().top;this.verticalSuggestionsOffset=Math.ceil(b-c)+this.EMOJI_SUGGESTION_OFFSET_;b=this.getEditableTextArea_().getBoundingClientRect().left;a=a.getBoundingClientRect().left-b;this.emojiInput.$.dropdown.style.marginLeft=a+"px"},
fetchEmojis:function(a,b,c){var d=this,e;return Ca(function(g){e=a;c||(c="");return ta(g,fetch(c).then(function(h){return h.json()}).then(function(h){e=h.concat(a)}).catch(function(){b&&(b.categoryButtons.splice(1),b.categories.splice(1))}).finally(function(){e&&d.emojiManager.load(e);
d.$$("#emoji-picker > #emoji").updateCategoriesAndPlaceholder_(b,!0)}),0)})}});Polymer({is:"ytd-backstage-post-dialog-renderer",behaviors:[X,V.YtRendererBehavior,U.YtActionHandlerBehavior,T.YtActionSenderBehavior],properties:{data:Object,isOpen_:{type:Boolean,value:!1,reflectToAttribute:!0},creationDisabled_:{type:Boolean,computed:"computeCreationDisabled_(data.postCreationDisabledText)"},enableCreationBox:{type:Boolean,reflectToAttribute:!0},isCreationDialog:{type:Boolean,reflectToAttribute:!0,computed:"computeIsCreationDialog_(data.purpose)"},inPopupContainer:{type:Boolean,
reflectToAttribute:!0,value:!1},isCreationDialogWithHeader_:{type:Boolean,reflectToAttribute:!0,computed:"computeIsCreationDialogWithHeader_(data)"},accessRestriction_:{type:String},dropdownRendererClasses_:{type:Array,computed:"computeDropdownRendererClasses_(isCreationDialogWithHeader_)"},isCommentboxLoading_:{type:Boolean,value:!1}},listeners:{"yt-commentbox-dismiss":"onYtCommentboxDismiss_","yt-commentbox-loading-start":"onYtCommentboxLoadingStart_","yt-commentbox-loading-end":"onYtCommentboxLoadingEnd_",
"yt-navigate":"onYtNavigate_","yt-popup-closed":"onPopupClosed_","yt-service-request-sent":"onYtServiceRequestSent_","yt-video-link-button-cancel":"onYtVideoLinkButtonCancel_","yt-video-link-selected":"onYtVideoLinkSelected_","iron-select":"onIronSelect_"},actionMap:{"yt-create-comment-action":"onCreateCommentAction_"},stampDom:{"data.accessRestrictionsSelector":{id:"access-restrictions-selector",mapping:{dropdownRenderer:{component:"ytd-flat-dropdown-renderer",classListBinding:"[[dropdownRendererClasses_]]"}}},
"data.videoLinkButton":{id:"video-link-button",mapping:{buttonRenderer:"ytd-button-renderer"}},"data.pollButton":{id:"poll-button",mapping:{buttonRenderer:"ytd-button-renderer"}},"data.imageButton":{id:"image-button",mapping:{buttonRenderer:"ytd-button-renderer"}}},created:function(){this.triggerHintJobId_=0},
ready:function(){var a=this.$["placeholder-area"],b=this.onOpen_.bind(this);a.addEventListener("tap",b);a.addEventListener("keypress",b)},
attached:function(){this.enableCreationBox=A("kevlar_comments_creation_box")},
onYtServiceRequestSent_:function(a,b){for(var c=0;c<b.actions.length;c++){var d=b.actions[c];if(d.createPollAction)this.$.commentbox.addedAttachment="poll",this.onOpen_(a);else if(d.addVideoLinkAction)this.$.commentbox.onAddVideoLink(d)}},
onCreateCommentAction_:function(a){this.get("createCommentAction.contents",a)&&(this.$.commentbox.clear(),this.closeDialog_())},
onOpen_:function(a){if("keypress"!=a.type||13==a.keyCode||32==a.keyCode)this.data.prepareAccountEndpoint?this.fire("yt-navigate",{endpoint:this.data.prepareAccountEndpoint}):this.openDialog()},
onYtCommentboxDismiss_:function(){this.closeDialog_()},
onYtCommentboxLoadingStart_:function(a){a.stopPropagation();this.isCommentboxLoading_=!0},
onYtCommentboxLoadingEnd_:function(a){a.stopPropagation();this.isCommentboxLoading_=!1},
onYtVideoLinkButtonCancel_:function(a){a.stopPropagation();this.onOpen_(a)},
onYtVideoLinkSelected_:function(a){a.stopPropagation();this.onOpen_(a)},
onIronSelect_:function(a){a.stopPropagation();this.accessRestriction_!=a.detail.item.value&&(this.accessRestriction_?(this.accessRestriction_=a.detail.item.value,this.onOpen_(a)):this.accessRestriction_=a.detail.item.value)},
onYtNavigate_:function(a){this.get("detail.endpoint.backstageImageUploadEndpoint",a)&&(this.$.commentbox.addedAttachment="image",this.$.commentbox.submitButtonDisabled=!0,this.onOpen_(a))},
openDialog:function(){this.$.commentbox.accessRestriction=this.accessRestriction_;this.isOpen_=!0;this.$.commentbox.focus();if(!this.creationDisabled_){var a=eW.getInstance().maybeGetEduPopup();a&&this.triggerHintActions_(a)}},
onPopupClosed_:function(){eW.getInstance().eduDisplayedThisLoad_=!0},
computeCreationDisabled_:function(a){return!!a},
computeIsCreationDialog_:function(a){return!!a&&"BACKSTAGE_POST_DIALOG_PURPOSE_CREATE"==a},
computeDisabledPostButton_:function(a){if(!a)return null;a.isDisabled=!0;return a},
computeIsCreationDialogWithHeader_:function(a){return!this.inPopupContainer&&!!a&&!!a.authorText&&"BACKSTAGE_POST_DIALOG_PURPOSE_EDIT"!=a.purpose},
computeIsHeaderHidden_:function(a,b){return!a||b},
computeDropdownRendererClasses_:function(a){return a?["text-secondary-style"]:[]},
triggerHintActions_:function(a){var b=this;this.triggerHintJobId_||(this.triggerHintJobId_=Fn(Dn,function(){a&&b.sendInnerTubeActions(a,b);b.triggerHintJobId_=0}))},
closeDialog_:function(){this.isCommentboxLoading_=this.isOpen_=!1;var a=this.$["access-restrictions-selector"].firstElementChild;a&&a.reset()}});var c0=function(){var a=F.apply(this,arguments)||this;a.isOpen=!1;return a};
l(c0,F);f=c0.prototype;f.dataChanged=function(){this.isOpen=!1};
f.onTap=function(){this.data&&(this.data.navigationEndpoint?this.fire("yt-navigate",{endpoint:this.data.navigationEndpoint}):this.openDialog())};
f.focus=function(){this.commentbox.focus()};
f.onYtCommentboxDismiss=function(){this.isOpen=!1};
f.openDialog=function(){this.isOpen=!0;this.commentbox.focus()};
var d0=c0;d0.prototype.onYtCommentboxDismiss=d0.prototype.onYtCommentboxDismiss;d0.prototype.dataChanged=d0.prototype.dataChanged;v([H(V.YtRendererBehavior),w("design:type",Object)],d0.prototype,"ytRendererBehavior",void 0);v([I(),w("design:type",Object)],d0.prototype,"data",void 0);v([I(),w("design:type",Object)],d0.prototype,"isOpen",void 0);v([tl("#commentbox"),w("design:type",Object)],d0.prototype,"commentbox",void 0);
v([rl("data"),w("design:type",Function),w("design:paramtypes",[Object]),w("design:returntype",void 0)],d0.prototype,"dataChanged",null);v([ql("yt-commentbox-dismiss"),w("design:type",Function),w("design:paramtypes",[CustomEvent]),w("design:returntype",void 0)],d0.prototype,"onYtCommentboxDismiss",null);d0=v([W({is:"ytd-comment-reply-dialog-renderer"})],d0);var e0=function(){return F.apply(this,arguments)||this};
l(e0,F);e0.prototype.onYtButtonTap=function(){if(this.data.isEnabled){var a=this.data.isHearted;this.toggle();this.ytRendererBehavior.markDirty();(a=this.getEndpoint(a))&&this.actionSenderBehavior.sendServiceRequestAction([a])}};
e0.prototype.toggle=function(a){this.set("data.isHearted",void 0!==a?a:!this.data.isHearted)};
e0.prototype.getEndpoint=function(a){var b=this.data.heartEndpoint||null,c=this.data.unheartEndpoint||null;return b&&c?a?c:b:null};
e0.prototype.computeButtonAccessibility=function(a,b){var c=this.get("heartedAccessibility.accessibilityData.label",a);a=this.get("unheartedAccessibility.accessibilityData.label",a);return b?c:a};
ea.Object.defineProperties(e0.prototype,{showTooltip:{configurable:!0,enumerable:!0,get:function(){return!this.data.isEnabled&&this.data.isHearted}}});
var f0=e0;f0.prototype.onYtButtonTap=f0.prototype.onYtButtonTap;v([H(V.YtRendererBehavior),w("design:type",Object)],f0.prototype,"ytRendererBehavior",void 0);v([H(T.YtActionSenderBehavior),w("design:type",Object)],f0.prototype,"actionSenderBehavior",void 0);v([I(),w("design:type",Object)],f0.prototype,"data",void 0);v([I({readOnly:!0}),sl("data.isEnabled","data.isHearted"),w("design:type",Object),w("design:paramtypes",[])],f0.prototype,"showTooltip",null);
v([I({computed:"computeButtonAccessibility(data,data.isHearted)"}),w("design:type",String)],f0.prototype,"buttonAccessibility",void 0);v([ql("tap"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],f0.prototype,"onYtButtonTap",null);f0=v([W({is:"ytd-creator-heart-renderer"})],f0);Polymer({is:"ytd-comment-action-buttons-renderer",behaviors:[V.YtRendererBehavior,X],properties:{data:{type:Object,observer:"dataChanged_"},voteCount:Object,replyThumbnail:Object,hasCreatorReply:{type:Boolean,value:!1},enableCreationBox:{type:Boolean,reflectToAttribute:!0},actionButtonsStyle:{type:String,computed:"computeActionButtonStyle_(data)",reflectToAttribute:!0},replyButtonBeginning_:{type:Object,computed:"computeReplyButtonBeginning_(data)"},replyButtonEnd_:{type:Object,computed:"computeReplyButtonEnd_(data)"},
useCommentIcon:{type:Boolean,reflectToAttribute:!0},buttonTooltipPosition:{type:String,value:"bottom",observer:"onButtonTooltipPositionChanged_"}},listeners:{"yt-service-request-sent":"onYtServiceRequestSent_","yt-commentbox-dismiss":"onYtCommentboxDismiss_","yt-navigate":"onYtNavigate_"},stampDom:{"data.creatorHeart":{id:"creator-heart",mapping:{creatorHeartRenderer:{component:"ytd-creator-heart-renderer"}}},replyButtonBeginning_:{id:"reply-button",mapping:{buttonRenderer:{component:"ytd-button-renderer",
params:{alignByText:!0}}}},replyButtonEnd_:{id:"reply-button-end",mapping:{buttonRenderer:{component:"ytd-button-renderer",params:{forceIconButton:!0}}}},"data.shareButton":{id:"share-button",mapping:{buttonRenderer:{component:"ytd-button-renderer"}}}},attached:function(){this.enableCreationBox=A("kevlar_comments_creation_box")},
created:function(){this.replyDialog_=null},
dataChanged_:function(){this.replyDialog_&&Polymer.dom(this.$["reply-dialog"]).removeChild(this.replyDialog_);this.replyDialog_=null},
computeShowVoteCountBeginning_:function(a,b){return void 0===a||void 0===b?!0:"COMMENT_ACTION_BUTTON_STYLE_TYPE_DESKTOP_TOOLBAR"!=a.style&&!!b&&"0"!=this.getSimpleString(b)},
computeShowVoteCountEnd_:function(a,b){return void 0===a||void 0===b?!0:"COMMENT_ACTION_BUTTON_STYLE_TYPE_DESKTOP_TOOLBAR"==a.style&&!!b&&"0"!=this.getSimpleString(b)},
hideReplyDialog:function(){this.$["reply-dialog"].hidden=!0},
reply:function(){this.$["reply-button"].firstElementChild?this.$["reply-button"].firstElementChild.firstElementChild.click():this.$["reply-button-end"].firstElementChild&&this.$["reply-button-end"].firstElementChild.firstElementChild.click()},
showReplyDialog_:function(a){a&&(this.replyDialog_||(this.replyDialog_=document.createElement("ytd-comment-reply-dialog-renderer"),this.replyDialog_.id="replybox"),this.replyDialog_.isAttached||Polymer.dom(this.$["reply-dialog"]).appendChild(this.replyDialog_),this.replyDialog_.data=a,this.$["reply-dialog"].hidden=!1,this.replyDialog_.openDialog())},
onYtCommentboxDismiss_:function(){this.hideReplyDialog()},
onYtNavigate_:function(a){(a=this.get("createCommentReplyDialogEndpoint.dialog.commentReplyDialogRenderer",a.detail.endpoint))&&this.showReplyDialog_(a)},
onYtServiceRequestSent_:function(a,b){a.stopPropagation();for(a=0;a<b.actions.length;a++){var c=b.actions[a];c.updateCommentVoteAction&&this.handleUpdateCommentVoteAction_(c.updateCommentVoteAction)}},
handleUpdateCommentVoteAction_:function(a){this.voteCount=a.voteCount||UU("0");"LIKE"==a.voteStatus?this.$["dislike-button"].toggle(!1):"DISLIKE"==a.voteStatus?this.$["like-button"].toggle(!1):(this.$["like-button"].toggle(!1),this.$["dislike-button"].toggle(!1))},
computeReplyButtonHidden_:function(a){return a},
computeReplyButtonBeginning_:function(a){return a&&a.replyButton&&"COMMENT_ACTION_BUTTON_STYLE_TYPE_DESKTOP_TOOLBAR"!=a.style?a.replyButton:void 0},
computeReplyButtonEnd_:function(a){return a&&a.replyButton&&"COMMENT_ACTION_BUTTON_STYLE_TYPE_DESKTOP_TOOLBAR"==a.style?a.replyButton:void 0},
computeActionButtonStyle_:function(a){return a&&a.style?a.style.split("TYPE_")[1].replace(/_/g,"-").toLowerCase():"unknown"},
onButtonTooltipPositionChanged_:function(){var a=this.$$("ytd-button-renderer");a&&(a.buttonTooltipPosition=this.buttonTooltipPosition)}});Polymer({is:"ytd-comment-author-reputation-badge-renderer",behaviors:[V.YtRendererBehavior],properties:{data:Object}});var g0=function(){return F.apply(this,arguments)||this};
l(g0,F);g0.prototype.focus=function(){this.$.commentbox.focus()};
var h0=g0;v([H(V.YtRendererBehavior),w("design:type",Object)],h0.prototype,"ytRendererBehavior",void 0);v([I(),w("design:type",Object)],h0.prototype,"data",void 0);v([I(),w("design:type",Object)],h0.prototype,"zeroStepFooterText",void 0);h0=v([W({is:"ytd-comment-dialog-renderer"})],h0);var i0=function(){return F.apply(this,arguments)||this};
l(i0,F);
i0.prototype.configureRendererStamper=function(){return{"data.approveButton":{id:"approve-button",mapping:{buttonRenderer:{component:"ytd-button-renderer",noInjection:!0}}},"data.removeButton":{id:"remove-button",mapping:{buttonRenderer:{component:"ytd-button-renderer",noInjection:!0}}},"data.reportButton":{id:"report-button",mapping:{buttonRenderer:{component:"ytd-button-renderer",noInjection:!0}}},"data.banButton":{id:"ban-button",mapping:{buttonRenderer:{component:"ytd-button-renderer",noInjection:!0}}}}};
var j0=i0;v([H(V.YtRendererBehavior),w("design:type",Object)],j0.prototype,"ytRendererBehavior",void 0);v([H(X),w("design:type",Object)],j0.prototype,"ytRendererstamperBehavior",void 0);v([I(),w("design:type",Object)],j0.prototype,"data",void 0);j0=v([W({is:"ytd-comment-moderation-buttons-renderer"})],j0);var k0=function(){return F.apply(this,arguments)||this};
l(k0,F);ea.Object.defineProperties(k0.prototype,{icon:{configurable:!0,enumerable:!0,get:function(){return this.data&&this.data.icon&&this.data.icon.iconType?"yt-icons:"+this.data.icon.iconType.toLowerCase():null}}});
var l0=k0;v([H(V.YtRendererBehavior),w("design:type",Object)],l0.prototype,"ytRendererBehavior",void 0);v([I(),w("design:type",Object)],l0.prototype,"data",void 0);v([I(),sl("data.icon"),w("design:type",Object),w("design:paramtypes",[])],l0.prototype,"icon",null);l0=v([W({is:"ytd-pinned-comment-badge-renderer"})],l0);var kGa={input:!0,meta:!0,br:!0,link:!0,img:!0},m0=null,lGa={properties:{sharedTooltipPosition:{type:String,value:"bottom"},sharedTooltipAnimationDelay:{type:Number,value:500}},attached:function(){this.addEventListener("mouseover",this.onMouseOver_,!0)},
detached:function(){this.removeEventListener("mouseover",this.onMouseOver_,!0)},
createTooltipIfRequired_:function(){null==m0&&(m0=document.createElement("paper-tooltip"),m0.offset=8,m0.fitToVisibleBounds=!0)},
onMouseOver_:function(a){if(a=ei(a.target,function(e){return e==this||e.getAttribute&&e.getAttribute("shared-tooltip-text")}.bind(this),!0)){var b=a.getAttribute("shared-tooltip-text");
if(b){var c=this,d=null;a!=this&&(c=a.tagName.toLowerCase()in kGa?a.parentElement:a,a.id&&(d=a.id));this.createTooltipIfRequired_();if(m0.parentElement!=c||m0.for!=d)Polymer.dom(m0).textContent=b,c.root?Polymer.dom(c.root).appendChild(m0):Polymer.dom(c).appendChild(m0),m0.for=d,m0.animationDelay=this.sharedTooltipAnimationDelay,m0.position=this.sharedTooltipPosition}}}};var n0=function(){var a=F.apply(this,arguments)||this;a.hostAttributes={role:"img",tabindex:"-1"};return a};
l(n0,F);n0.prototype.configureRendererStamper=function(){return{"data.icon":{id:"icon",mapping:{iconType:{component:"yt-icon",properties:{icon:"[[data.icon.iconType]]",sharedTooltipText:"[[data.tooltip]]"}}}},data:{id:"custom-badge",mapping:{customBadge:{component:"yt-img-shadow",properties:{thumbnail:"[[data.customBadge]]",sharedTooltipText:"[[data.tooltip]]"}}}}}};
n0.prototype.attached=function(){this.hasAttribute("role")||this.setAttribute("role","img");this.hasAttribute("tabindex")||this.setAttribute("tabindex","-1")};
n0.prototype.colorChanged=function(a){a=this.get("basicColorPaletteData.foregroundBodyColor",a);null!=a&&(this.rgbBadgeColor=sX(a));this.$.icon.style.color=this.rgbBadgeColor};
n0.prototype.tooltipChanged=function(a){null!=a?this.setAttribute("aria-label",a):this.removeAttribute("aria-label")};
var o0=n0;o0.prototype.tooltipChanged=o0.prototype.tooltipChanged;o0.prototype.colorChanged=o0.prototype.colorChanged;v([H(V.YtRendererBehavior),w("design:type",Object)],o0.prototype,"ytRendererBehavior",void 0);v([H(X),w("design:type",Object)],o0.prototype,"ytRendererstamperBehavior",void 0);v([H(lGa),w("design:type",Object)],o0.prototype,"ytSharedTooltipBehavior",void 0);v([I(),w("design:type",Object)],o0.prototype,"data",void 0);
v([I({value:"#4285F4"}),w("design:type",String)],o0.prototype,"rgbBadgeColor",void 0);v([rl("data.color"),w("design:type",Function),w("design:paramtypes",[Object]),w("design:returntype",void 0)],o0.prototype,"colorChanged",null);v([rl("data.tooltip"),w("design:type",Function),w("design:paramtypes",[Object]),w("design:returntype",void 0)],o0.prototype,"tooltipChanged",null);o0=v([W({is:"ytd-sponsor-comment-badge-renderer"})],o0);var p0=function(){return F.apply(this,arguments)||this};
l(p0,F);p0.prototype.iconColorChanged=function(){var a=this.get("basicColorPaletteData.foregroundBodyColor",this.data.iconColor);null!=a&&(this.rgbIconColor=sX(a));this.$.icon.style.color=this.rgbIconColor};
var q0=p0;q0.prototype.iconColorChanged=q0.prototype.iconColorChanged;v([H(V.YtRendererBehavior),w("design:type",Object)],q0.prototype,"ytRendererBehavior",void 0);v([I(),w("design:type",Object)],q0.prototype,"data",void 0);v([I({value:"#4285F4"}),w("design:type",String)],q0.prototype,"rgbIconColor",void 0);v([rl("data.iconColor"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],q0.prototype,"iconColorChanged",null);
q0=v([W({is:"ytd-sponsors-only-badge-renderer"})],q0);Polymer({is:"ytd-expander",properties:{alignAuto:{type:Boolean,value:!1,reflectToAttribute:!0},collapsed:{type:Boolean,value:!0,notify:!0,reflectToAttribute:!0},canCollapse:{type:Boolean,notify:!0,value:!0},collapsedHeight:{type:Number,value:80,observer:"collapsedHeightChanged_"},disableExpand:{type:Boolean,value:!1},alwaysCollapsible:{type:Boolean,value:!1,observer:"alwaysCollapsibleChanged_"},reversed:{type:Boolean,value:!1,observer:"reversedChanged_"}},alwaysCollapsibleChanged_:function(a){a&&(
this.canCollapse=!0)},
reversedChanged_:function(a,b){if(a&&!b||b&&!a){a=Polymer.dom(this.root);b=a.childNodes;for(var c=document.createDocumentFragment(),d=a.childNodes.length-1;0<=d;d--)Polymer.dom(c).appendChild(b[d]);a.appendChild(c)}},
ready:function(){this.async(this.initChildrenObserver_.bind(this),1)},
created:function(){this.canCollapseJobId_=0},
detached:function(){this.detachObserver_()},
toggle:function(a,b){this.canCollapse&&(this.collapsed=b,a&&a.stopPropagation())},
reset:function(){this.childrenChanged_()},
computeIsMoreVisible_:function(a,b){return a&&b},
computeIsLessVisible_:function(a,b){return a&&!b},
collapsedHeightChanged_:function(a){this.updateStyles({"--ytd-expander-collapsed-height":a+"px"})},
handleMoreTap_:function(a){this.disableExpand||(this.fire("yt-expander-more-tapped"),this.toggle(a,!1))},
handleLessTap_:function(a){this.fire("yt-expander-less-tapped");this.toggle(a,!0)},
initChildrenObserver_:function(){this.observer_=new MutationObserver(this.childrenChanged_.bind(this));this.observer_.observe(this.$.content,{subtree:!0,childList:!0,attributes:!0});this.childrenChanged_()},
childrenChanged_:function(){this.alwaysCollapsible?this.canCollapse=this.alwaysCollapsible:this.canCollapseJobId_||(this.canCollapseJobId_=window.requestAnimationFrame(function(){Jn(function(){this.canCollapseJobId_=0;this.calculateCanCollapse_()}.bind(this))}.bind(this)))},
calculateCanCollapse_:function(){this.canCollapse=this.alwaysCollapsible||this.$.content.scrollHeight>this.collapsedHeight},
detachObserver_:function(){this.observer_&&this.observer_.disconnect()}});Polymer({is:"ytd-comment-renderer",behaviors:[X,V.YtRendererBehavior,$Y,Polymer.IronResizableBehavior],properties:{data:{type:Object,observer:"dataChanged_"},commentStyle:{type:String,computed:"computeCommentStyle_(data)",reflectToAttribute:!0},isReply:{type:Boolean,value:!1,reflectToAttribute:!0},isCreatorReply:{type:Boolean,value:!1,reflectToAttribute:!0},voteCount_:{type:Object,computed:"computeVoteCount_(data)"},replyThumbnail_:{type:Object,computed:"computeReplyThumbnail_(data)"},editDialog_:{type:Object,
value:null},hasCreatorReply_:{type:Boolean,computed:"computeHasCreatorReply_(data, data.containsCreatorReply)"},isLoading_:{type:Boolean,value:!1,observer:"isLoadingChanged_"},hideInappropriate_:{type:Boolean,computed:"computeShouldFilter_(data)"},noActions:{type:Boolean,reflectToAttribute:!0}},observers:["linkedCommentBadgeChanged_(data.linkedCommentBadge)","contentTextChanged_(data.contentText)","updateNestingLevel_(data.threadNestingLevel)"],listeners:{"iron-resize":"onWindowResize_","yt-commentbox-dismiss":"onYtCommentboxDismiss_",
"yt-navigate":"onYtNavigate_","yt-service-request-sent":"onYtServiceRequestSent_","yt-service-request-completed":"onYtServiceRequestCompleted_","yt-expander-more-tapped":"onYtExpanderMoreTapped_"},stampDom:{"data.actionMenu":{id:"action-menu",mapping:{menuRenderer:"ytd-menu-renderer"}},"data.authorCommentBadge":{id:"author-comment-badge",mapping:{authorCommentBadgeRenderer:"ytd-author-comment-badge-renderer"}},"data.pinnedCommentBadge":{id:"pinned-comment-badge",mapping:{pinnedCommentBadgeRenderer:"ytd-pinned-comment-badge-renderer"}},
"data.sponsorCommentBadge":{id:"sponsor-comment-badge",mapping:{sponsorCommentBadgeRenderer:"ytd-sponsor-comment-badge-renderer"}},"data.sponsorsOnlyBadge":{id:"sponsors-only-badge",mapping:{sponsorsOnlyBadgeRenderer:"ytd-sponsors-only-badge-renderer"}},editDialog_:{id:"edit-dialog",mapping:{backstagePostDialogRenderer:"ytd-backstage-post-dialog-renderer",commentDialogRenderer:"ytd-comment-dialog-renderer",commentReplyDialogRenderer:"ytd-comment-reply-dialog-renderer"}},"data.moderationButtons":{id:"moderation-buttons",
mapping:{commentModerationButtonsRenderer:{component:"ytd-comment-moderation-buttons-renderer"}}},"data.authorReputation":{id:"author-reputation",mapping:{commentAuthorReputationBadgeRenderer:{component:"ytd-comment-author-reputation-badge-renderer"}}}},created:function(){this.ELEMENT_MARGIN_TOP_=20;this.MASTHEAD_HEIGHT_=56;this.THREAD_MARGIN_INCREMENT_=40;this.MIN_RENDERER_WIDTH_=428;this.linkedBadgeEl_=this.spinnerEl_=null;this.attachedResolver_=fw();this.isDecorationExperiment_=A("enable_read_more_format_decoration")},
contentTextChanged_:function(){this.$.expander.reset()},
attached:function(){this.attachedResolver_.resolve()},
detached:function(){this.isCreatorReply=!1},
dataChanged_:function(a){var b=this;this.asyncFrame(function(){return b.markDirty()},0);
this.isLoading_=!1;this.editDialog_=null;this.linkedBadgeEl_&&(this.$["linked-comment-badge"].removeChild(this.linkedBadgeEl_),this.linkedBadgeEl_=null);for(var c=0,d=a.actions&&a.actions.length;c<d;c++)this.openEditDialog_(a.actions[c].openUpdateCommentDialogAction)},
isLoadingChanged_:function(a){!a||this.editDialog_||this.spinnerEl_||(this.spinnerEl_=document.createElement("paper-spinner-lite"),Polymer.dom(this.root).appendChild(this.spinnerEl_));this.spinnerEl_&&(this.spinnerEl_.active=a)},
linkedCommentBadgeChanged_:function(a){var b=this;if(a){this.linkedBadgeEl_||(this.linkedBadgeEl_=document.createElement("ytd-badge-supported-renderer"));this.linkedBadgeEl_.topStandaloneBadge=a;this.$["linked-comment-badge"].appendChild(this.linkedBadgeEl_);try{var c=qW(this);c&&c.pause()}catch(d){}this.attachedResolver_.promise.then(function(){var d=b.offsetTop+b.offsetHeight;b.getInterface(vV).getCurrentPage().setScrollTop(d-document.documentElement.clientHeight+32)})}},
onShow_:function(){iq("cmv",void 0,"wn_comments")},
onYtNavigate_:function(a){a=a.detail.endpoint;a=this.get("updateCommentDialogEndpoint",a)||this.get("updateCommentReplyDialogEndpoint",a);this.openEditDialog_(a)},
onYtCommentboxDismiss_:function(){this.editDialog_=null},
onYtServiceRequestSent_:function(a,b){a.stopPropagation();b.endpoint&&(b.endpoint.updateCommentEndpoint||b.endpoint.updateCommentReplyEndpoint||b.endpoint.performCommentActionEndpoint&&!b.endpoint.performCommentActionEndpoint.clientActions||b.endpoint.hideReportedCommentAction)&&(this.isLoading_=!0)},
onYtServiceRequestCompleted_:function(){this.isLoading_=!1},
openEditDialog_:function(a){a&&a.dialog&&(!a.isCreatorReply||this.isCreatorReply||this.data.isCreatorReply)&&(this.editDialog_=a.dialog,(a=this.$["edit-dialog"].firstElementChild)&&(a.openDialog?a.openDialog():a.focus()))},
computeAuthorTextClass_:function(a){return a.authorIsChannelOwner?"channel-owner":""},
computeIsBodyHidden_:function(a,b,c){return!!a||b||c},
computeVoteCount_:function(a){return a.voteCount||UU("0")},
computeReplyThumbnail_:function(a){return a.currentUserReplyThumbnail},
computeCommentStyle_:function(a){return a.style?a.style.value.split("TYPE_")[1].replace(/_/g,"-").toLowerCase():"unknown"},
computeIsHeaderBadgeHidden_:function(a){return!a.linkedCommentBadge&&!a.pinnedCommentBadge},
computeMoreButton_:function(){return this.isDecorationExperiment_?"more-button-exp":"more-button"},
computeExpanderClass_:function(){return this.isDecorationExperiment_?"expander-exp":"expander"},
computeLessButton_:function(){return this.isDecorationExperiment_?"less-button-exp":"less-button"},
computeHasCreatorReply_:function(a,b){return!(!a.creatorReply||!a.creatorReply.commentRenderer)||!!b},
computeInappropriateText_:function(a){return this.computeShouldFilter_(a)?"Potentially inappropriate reply hidden.":""},
viewClicked_:function(){this.$["body-inappropriate-reply"].style.display="none";this.$.body.removeAttribute("hidden")},
computeShouldFilter_:function(a){return"viewer-filter-reply"==this.computeCommentStyle_(a)},
computeMaxNestingLevel_:function(){return Math.max(Math.floor((this.parentNode.offsetWidth-this.MIN_RENDERER_WIDTH_)/this.THREAD_MARGIN_INCREMENT_),0)},
updateNestingLevel_:function(a){if(void 0!==a){var b=this.computeMaxNestingLevel_();a=Math.min(b,a-1)*this.THREAD_MARGIN_INCREMENT_+"px";"rtl"==z("HTML_DIR")?this.style.marginRight=a:this.style.marginLeft=a}},
onWindowResize_:function(){this.data&&this.updateNestingLevel_(this.data.threadNestingLevel)},
onYtExpanderMoreTapped_:function(){var a=this.data.expandButton.buttonRenderer;a&&this.logExplicitClick(a)}});var r0=[tY.YtTaskEmitterBehavior,T.YtActionSenderBehavior,{_noAccessors:!0,listeners:{"yt-load-next-continuation":"onLoadNextContinuation_"},nextContinuation:void 0,pendingContinuationRequest_:void 0,listeningForNavigate_:!1,created:function(){this.continuationStartNavCount_=-1;this.getNextContinuation&&this.getNextContinuation instanceof Function&&(this.nextContinuation=this.getNextContinuation())},
detached:function(){this.stopListeningForNavigate_()},
canUseContextualNetworkManager_:function(){return A("polymer_task_manager_proxied_promise")&&this.shouldUseTaskManager()&&!!this.getNetworkManager()},
startListeningForNavigate_:function(){this.canUseContextualNetworkManager_()||this.listeningForNavigate_||(this.listen(document,"yt-navigate-start","onYtNavigateStart_"),this.listeningForNavigate_=!0)},
stopListeningForNavigate_:function(){this.canUseContextualNetworkManager_()||(this.unlisten(document,"yt-navigate-start","onYtNavigateStart_"),this.listeningForNavigate_=!1)},
onLoadNextContinuation_:function(a,b){a.stopPropagation();if(this.nextContinuation.requestPath){a=this.nextContinuation.requestPath;var c={};A("direct_innertube_click_tracking_reporting")&&(c={context:{clickTracking:{clickTrackingParams:this.nextContinuation.clickTrackingParams}}});this.makeNextContinuationRequest_(a,b,c)}else a={locationRetrieved:function(d,e){var g={};A("direct_innertube_click_tracking_reporting")&&e.clickTrackingParams&&Object.assign(g,{context:{clickTracking:{clickTrackingParams:e.clickTrackingParams}}});
this.makeNextContinuationRequest_(d,b,g)}.bind(this)},this.fire("yt-retrieve-location",a)},
makeNextContinuationRequest_:function(a,b,c){A("csi_wait_for_continuation")&&kq("ncl");iq("nct");this.continuationStartNavCount_=z("NAV_COUNT",void 0);this.pendingContinuationRequest_&&this.pendingContinuationRequest_.cancel();a=b(a);var d;this.canUseContextualNetworkManager_()&&(d=this.getNetworkManager());d||(d=this.getInterface(BW));c=this.nextContinuation.usePost?d.postData(a,c):d.fetchData(a,c);c.then(this.updateNextContinuationData_.bind(this,a));this.pendingContinuationRequest_=c;this.startListeningForNavigate_()},
updateNextContinuationData_:function(a,b){iq("ncl");this.continuationStartNavCount_!=z("NAV_COUNT",void 0)&&pq("ncpm",1);this.pendingContinuationRequest_=void 0;if(b){var c={};this.nextContinuation&&(c=this.nextContinuation);if(b.response&&b.response.continuationContents){a=b.response.continuationContents[c.continuationType];var d=c.header||"data.header",e=a[c.responseHeaderKey||"header"];e&&this.set(d,e);d=c.contentsArray||"data.contents";e=this.getContents_(a,c.responseContentsKey||"contents")||
[];this.pathExists_(d)?(e.unshift(d),this.push.apply(this,e)):this.set(d,e);if(e){var g=this.getScreenLayer();e=Wo(g);g=Vo(g);var h=this.get("response.trackingParams",b);h&&e&&g&&(h=go(h),CS(e,g,h),this.sendAction("yt-store-grafted-ve-action",[h]));this.fire("yt-next-continuation-data-updated",{continuationData:b,page:this,contentsArray:d})}this.set(c.continuationsArray||"data.continuations",a[c.responseContinuationsKey||"continuations"]||[])}else b.reload?we(Error("Reloading from continuation is unsupported"),
"WARNING"):b.responseContext&&b.responseContext.errors||(delete b.xsrf_token,delete b.timing,delete b.endpoint,delete b.csn,b.responseContext&&delete b.responseContext.serviceTrackingParams,d=Error("Malformed continuation"),e=nm(a,{ctoken:"x",continuation:"x",itct:"x"}),d.params={request:e,response:JSON.stringify(b).substr(0,4096)},this.nextContinuation&&this.nextContinuation.continuationType&&(d.params.continuationType=this.nextContinuation.continuationType.substr(0,256)),0==a.indexOf("/comment_service_ajax")?
xe(d):we(d)),this.set(c.continuationsArray||"data.continuations",[])}else we(Error("Missing continuation response: "+a))},
getContents_:function(a,b){b=b.split(".");return u.getValueByKeys(a,b)},
pathExists_:function(a){var b=this;a=a.toString().split(".");for(var c=0;c<a.length;c++)if(b=b[a[c]],void 0===b)return!1;return!0},
onYtNavigateStart_:function(){this.pendingContinuationRequest_&&(this.pendingContinuationRequest_.cancel(),this.pendingContinuationRequest_=void 0);this.stopListeningForNavigate_()}}];Polymer({is:"yt-next-continuation",behaviors:[$Y,V.YtRendererBehavior],properties:{data:{type:Object,observer:"observeData_"},showButton:{type:Boolean,value:!1,observer:"showButtonChanged_"},showIcon:{type:Boolean,value:!1},label:{type:Object,computed:"computeLabel_(data, showButton)"},showMoreText_:{type:Object,value:UU(yU("SHOW_MORE",void 0,"Show More"))},spinnerActive_:{type:Boolean,value:!1},hasBeenTriggered_:{type:Boolean,value:!1}},observeVisibleOption:null,observeHiddenOption:null,observePrescanOption:"observe_once",
created:function(){this.triggered_=!1},
detached:function(){this.hasBeenTriggered_=!1},
onPrescanVisible:function(){this.onShow()},
onShow:function(){this.showButton||this.trigger()},
trigger:function(){this.spinnerActive_=!0;this.showButton=!1;this.triggered_||(this.fire("yt-load-next-continuation",this.getContinuationUrl.bind(this)),this.hasBeenTriggered_=this.triggered_=!0)},
triggerIfNotPreviouslyTriggered:function(){this.hasBeenTriggered_||this.trigger()},
computeLabel_:function(a,b){return void 0===a?null:a.label||!b?a.label:this.showMoreText_},
observeData_:function(){this.spinnerActive_=this.triggered_=!1;this.invalidate(!1)},
getContinuationUrl:function(a){var b={ctoken:this.data.continuation,continuation:this.data.continuation};this.data.clickTrackingParams&&(b.itct=this.data.clickTrackingParams);return Ai(a,b)},
showButtonChanged_:function(){this.invalidate(!1)}});Polymer({is:"ytd-comment-replies-renderer",behaviors:[r0,V.YtRendererBehavior,X],properties:{data:{type:Object,observer:"dataChanged_"},hasContinuation_:{type:Boolean,computed:"computeHasContinuation_(data.continuations)"},isLoading_:{type:Boolean,observer:"isLoadingChanged_"},isShowRepliesVisible:{type:Boolean,notify:!0,value:!0,observer:"isShowMoreChanged_"}},created:function(){this.spinnerEl_=null},
listeners:{"yt-load-reload-continuation":"onLoadReloadContinuation_","yt-retrieve-location":"onRetrieveLocation_","yt-expander-more-tapped":"triggerFirstContinuation_"},stampDom:{"data.continuations":{id:"continuation",mapping:{nextContinuationData:{component:"yt-next-continuation",params:{showButton:!0,showIcon:A("enable_read_more_format_decoration")}}}},"data.contents":{id:"loaded-replies",mapping:{commentRenderer:{component:"ytd-comment-renderer",params:{isReply:!0}}}},"data.teaserContents":{id:"teaser-replies",
mapping:{commentRenderer:{component:"ytd-comment-renderer",params:{isReply:!0}}}}},dataChanged_:function(){this.$["expander-contents"].hidden=!0;this.isLoading_=!1},
nextContinuation:{continuationType:"commentRepliesContinuation",usePost:!0},computeMoreButton_:function(){return this.isDecorationExperiment_()?"more-button-exp":"more-button"},
computeLessButton_:function(){return this.isDecorationExperiment_()?"less-button-exp":"less-button"},
computeContinuationButton_:function(){return this.isDecorationExperiment_()?"cont-button-exp":"cont-button"},
computeHasContinuation_:function(a){return!!a},
onRetrieveLocation_:function(a,b){b.locationRetrieved("/comment_service_ajax?action_get_comment_replies=1&pbj=1",void 0);a.stopPropagation()},
triggerFirstContinuation_:function(){this.data.contents||this.$$("yt-next-continuation").trigger()},
isLoadingChanged_:function(a){a&&!this.spinnerEl_&&(this.spinnerEl_=document.createElement("paper-spinner-lite"),Polymer.dom(this.$$("#expander-contents")).appendChild(this.spinnerEl_));this.spinnerEl_&&(this.spinnerEl_.active=a);a?this.$["loaded-replies"].classList.add("reloading"):this.$["loaded-replies"].classList.remove("reloading")},
isDecorationExperiment_:function(){return A("enable_read_more_format_decoration")},
onLoadReloadContinuation_:function(a,b){var c=this;a.stopPropagation();this.isLoading_=!0;this.fire("yt-retrieve-location",{locationRetrieved:function(d){var e,g,h;return Ca(function(m){e=c.getInterface(BW);g=b(d);h=e.postData(g);c.onReloadContinuationData_(h);ua(m)})}})},
onReloadContinuationData_:function(a){a=this.get("response.continuationContents.commentRepliesContinuation",a);this.set("data.contents",a.contents);this.set("data.continuations",a.continuations||[]);this.isLoading_=!1},
handleIsShowMoreTap_:function(){this.isShowRepliesVisible=!1;this.triggerFirstContinuation_();var a=this.data.viewReplies.buttonRenderer;a&&this.logExplicitClick(a)},
handleIsShowLessTap_:function(){this.isShowRepliesVisible=!0;var a=this.data.hideReplies.buttonRenderer;a&&this.logExplicitClick(a)},
isShowMoreChanged_:function(a){this.$["expander-contents"].hidden=a}});OY("itemSectionRenderer","commentThreadRenderer","ytd-comment-thread-renderer");var s0=function(){return F.apply(this,arguments)||this};
l(s0,F);s0.prototype.configureRendererStamper=function(){return{"data.replies":{id:"replies",mapping:{commentRepliesRenderer:{component:"ytd-comment-replies-renderer",noInjection:!0}}}}};
var t0=s0;v([H(V.YtRendererBehavior),w("design:type",Object)],t0.prototype,"ytRendererBehavior",void 0);v([H(X),w("design:type",Object)],t0.prototype,"ytRendererstamperBehavior",void 0);v([I(),w("design:type",Object)],t0.prototype,"data",void 0);t0=v([W({is:"ytd-comment-thread-renderer"})],t0);Polymer({is:"yt-reload-continuation",behaviors:[V.YtRendererBehavior],properties:{data:Object},trigger:function(){this.fire("yt-load-reload-continuation",this.getContinuationUrl.bind(this))},
getContinuationUrl:function(a){var b={ctoken:this.data.continuation};this.data.clickTrackingParams&&(b.itct=this.data.clickTrackingParams);return Ai(a,b)}});Polymer({is:"yt-supported-renderers",behaviors:[V.YtRendererBehavior],properties:{data:Object,rendererElement:{type:Object,readOnly:!0}},observers:["onDataChange_(data)"],visibilityLogging:1,onDataChange_:function(a){var b=Polymer.dom(this.root);if(a=a.reloadContinuationData){if(this.rendererElement)this.rendererElement.data=a;else{var c=document.createElement("yt-reload-continuation");c.data=a;b.appendChild(c);this._setRendererElement(c)}}else{for(;b.firstChild;)b.removeChild(b.firstChild);this._setRendererElement(null)}}});Polymer({is:"yt-dropdown-menu",behaviors:[iY.ComponentBehavior,GY.YtEndpointBehavior],properties:{data:{type:Object,observer:"dataChanged_"},selected:Number,useLabel:{type:Boolean,value:!1},icon:String,iconLabel:String,ariaLabel:String,disabled:{type:Boolean,value:!1,reflectToAttribute:!0},menuExpanded:{type:String,value:"false"},closeOnActivate:{type:Boolean,value:!1}},listeners:{"iron-activate":"onIronActivate_",tap:"onTap_","iron-overlay-closed":"onMenuClose_"},dataChanged_:function(a){this.selected=
void 0;var b=this.computeSelectedIndex_(a);0<=b&&(this.selected=b);a=a&&1<a.length;this.toggleClass("has-items",a);this.$.label.tabIndex=a?0:-1},
computeSelectedIndex_:function(a){if(a)for(var b=0,c=a.length;b<c;b++)if(a[b].selected)return b;return-1},
computeLabel_:function(a){return this.data&&void 0!=a?this.data[a].title:""},
computeShowIcon_:function(a,b){return!b&&!!a},
computeVerticalOffset_:function(a){return a?36:0},
computeEndpoint_:function(a){return a.endpoint||a.navigationEndpoint},
onLabelClick_:function(a){this.data&&1>=this.data.length?a.stopPropagation():this.menuExpanded="true"},
onIronActivate_:function(a){a=a.detail.item;var b=this.$.repeat.itemForElement(a);if(b&&b.serviceEndpoint)this.sendServiceRequestAction([b.serviceEndpoint]),this.fire("yt-playlist-reloading");else a:{if((b=a.querySelector("yt-supported-renderers"))&&(b=b.rendererElement)&&"yt-reload-continuation"==b.is){b.trigger();break a}(a=a.querySelector("yt-reload-continuation"))&&a.trigger()}},
onTap_:function(a){a.preventDefault()},
onLinkFocus_:function(a){if((a=Polymer.dom(a).localTarget)&&a.querySelector){var b=a.querySelector("paper-item");b&&this.debounce("focus",function(){b.focus()})}else{var c=Error("onLinkFocus_ failed.");
c.params=typeof a;xe(c)}},
onMenuClose_:function(){this.menuExpanded="false"},
computeHasSubtitle_:function(a){return!!a},
computeHrefForItem_:function(a){return this.computeHref_(this.computeEndpoint_(a))}});Polymer({is:"yt-sort-filter-sub-menu-renderer",behaviors:[V.YtRendererBehavior],properties:{data:Object,isRightAligned:{type:Boolean,value:!1},disabled:{type:Boolean,value:!1,reflectToAttribute:!0},closeOnActivate:{type:Boolean,value:!1}},computeHorizontalAlign_:function(a){return a?"right":"left"},
computeAccessibilityLabel_:function(a){return this.get("accessibility.accessibilityData.label",a)}});Polymer({is:"ytd-backstage-comments-renderer",behaviors:[r0,$Y,V.YtRendererBehavior,X],properties:{data:{type:Object,observer:"dataChanged_"},hasContinuation_:{type:Boolean,computed:"computeHasContinuation_(data.continuations)"},isLoading_:{type:Boolean,observer:"isLoadingChanged_"}},created:function(){this.spinnerEl_=null},
onShow:function(){this.data.expandCommentsOnInitialLoad&&this.triggerFirstContinuation_()},
listeners:{"yt-load-reload-continuation":"onLoadReloadContinuation_","yt-retrieve-location":"onRetrieveLocation_"},stampDom:{"data.teaserContents":{id:"teaser-comments",mapping:{commentThreadRenderer:{component:"ytd-comment-thread-renderer"}}},"data.contents":{id:"loaded-comments",mapping:{commentThreadRenderer:{component:"ytd-comment-thread-renderer"}}},"data.continuations":{id:"continuation",mapping:{nextContinuationData:{component:"yt-next-continuation",params:{showButton:!0}}}}},dataChanged_:function(){this.$.expander.collapsed=
!this.data.expandCommentsOnInitialLoad;this.isLoading_=!1},
nextContinuation:{continuationType:"backstageCommentsContinuation",usePost:!0},computeHasContinuation_:function(a){return!!a},
onRetrieveLocation_:function(a,b){b.locationRetrieved("/comment_service_ajax?action_get_comment_replies=1&pbj=1",void 0);a.stopPropagation()},
triggerFirstContinuation_:function(){this.data.contents||this.$$("yt-next-continuation").trigger()},
isLoadingChanged_:function(a){if(a&&!this.spinnerEl_){this.spinnerEl_=document.createElement("paper-spinner-lite");var b=this.$["loaded-comments"];Polymer.dom(this.$$("#expander-contents")).insertBefore(this.spinnerEl_,b)}this.spinnerEl_&&(this.spinnerEl_.active=a);a?this.$["loaded-comments"].classList.add("reloading"):this.$["loaded-comments"].classList.remove("reloading")},
onLoadReloadContinuation_:function(a,b){a.stopPropagation();this.isLoading_=!0;a={locationRetrieved:function(c){var d=this.getInterface(BW);c=b(c);d.postData(c).then(this.onReloadContinuationData_.bind(this))}.bind(this)};
this.fire("yt-retrieve-location",a)},
onReloadContinuationData_:function(a){a=this.get("response.continuationContents.backstageCommentsContinuation",a);this.set("data.contents",a.contents);this.set("data.continuations",a.continuations||[]);this.isLoading_=!1}});var mGa={"data.actionMenu":{id:"action-menu",mapping:{menuRenderer:"ytd-menu-renderer"}},"data.authorCommentBadge":{id:"author-comment-badge",mapping:{authorCommentBadgeRenderer:"ytd-author-comment-badge-renderer"}},"data.sponsorsOnlyBadge":{id:"sponsors-only-badge",mapping:{sponsorsOnlyBadgeRenderer:"ytd-sponsors-only-badge-renderer"}},"data.backstageAttachment":{id:"content-attachment",mapping:{videoRenderer:{component:"ytd-video-renderer",params:{isBackstageVideo:!0}},backstageImageRenderer:"ytd-backstage-image-renderer",
playlistRenderer:{component:"ytd-playlist-renderer",params:{isBackstagePlaylist:!0}}}},editDialog_:{id:"edit-dialog",mapping:{backstagePostDialogRenderer:"ytd-backstage-post-dialog-renderer"}}},u0=function(){var a=F.apply(this,arguments)||this;a.editDialog_=null;a.isLoading_=!1;a.spinnerEl=null;a.actionMap={"yt-signal-action-open-post-comment-dialog":"handleSignalActionOpenPostCommentDialogAction_"};return a};
l(u0,F);f=u0.prototype;f.configureRendererStamper=function(){return mGa};
f.created=function(){this.spinnerEl=null};
f.contentTextChanged_=function(){this.$.expander.reset()};
f.dataChanged_=function(a){this.isLoading_=!1;this.editDialog_=null;if(a.actions)for(var b=0,c=a.actions.length;b<c;b++)this.openEditDialog_(a.actions[b].openUpdateCommentDialogAction)};
f.handleSignalActionOpenPostCommentDialogAction_=function(){this.$["action-buttons"].reply()};
f.updatePoll_=function(a){var b=this.$["action-buttons"];0<=a?b.reply():b.hideReplyDialog()};
f.isLoadingChanged_=function(a){!a||this.editDialog_||this.spinnerEl||(this.spinnerEl=document.createElement("paper-spinner-lite"),Polymer.dom(this.root).appendChild(this.spinnerEl));this.spinnerEl&&(this.spinnerEl.active=a)};
f.onYtNavigate=function(a){a=this.get("updateCommentDialogEndpoint",a.detail.endpoint);this.openEditDialog_(a)};
f.onYtCommentboxDismiss=function(){this.editDialog_=null};
f.onYtCommentPollRevert=function(a,b){b&&this.updatePoll_(b.selectedChoiceIndex)};
f.onYtServiceRequestSent=function(a,b){a.stopPropagation();b.endpoint&&(b.endpoint.updateCommentEndpoint||b.endpoint.performCommentActionEndpoint&&!b.endpoint.performCommentActionEndpoint.clientActions)&&(this.isLoading_=!0);if(b.actions)for(a=0;a<b.actions.length;a++){var c=b.actions[a];c.updateBackstagePollAction&&(c=this.get("updateBackstagePollAction.selectedChoiceIndex",c),void 0===c&&(c=-1),this.updatePoll_(c))}};
f.onYtServiceRequestCompleted=function(){this.isLoading_=!1};
f.openEditDialog_=function(a){a&&a.dialog&&(this.editDialog_=a.dialog,a=this.$["edit-dialog"].firstElementChild)&&(a.focus(),a.openDialog&&a.openDialog())};
f.computeIsBodyHidden_=function(a,b){return!!a||b};
f.computeVoteCount_=function(a){return a.voteCount||UU("0")};
ea.Object.defineProperties(u0.prototype,{hasPoll_:{configurable:!0,enumerable:!0,get:function(){return!!(this.data&&this.data.backstageAttachment&&this.data.backstageAttachment.pollRenderer)}}});
var v0=u0;v0.prototype.computeVoteCount_=v0.prototype.computeVoteCount_;v0.prototype.onYtServiceRequestCompleted=v0.prototype.onYtServiceRequestCompleted;v0.prototype.onYtServiceRequestSent=v0.prototype.onYtServiceRequestSent;v0.prototype.onYtCommentPollRevert=v0.prototype.onYtCommentPollRevert;v0.prototype.onYtCommentboxDismiss=v0.prototype.onYtCommentboxDismiss;v0.prototype.onYtNavigate=v0.prototype.onYtNavigate;v0.prototype.dataChanged_=v0.prototype.dataChanged_;
v0.prototype.contentTextChanged_=v0.prototype.contentTextChanged_;v([H(U.YtActionHandlerBehavior),w("design:type",Object)],v0.prototype,"actionHandlerBehavior",void 0);v([H(V.YtRendererBehavior),w("design:type",Object)],v0.prototype,"rendererBehavior",void 0);v([H(X),w("design:type",Object)],v0.prototype,"rendererstamperBehavior",void 0);v([I(),w("design:type",Object)],v0.prototype,"data",void 0);v([I({computed:"computeVoteCount_(data)"}),w("design:type",Object)],v0.prototype,"voteCount_",void 0);
v([I(),w("design:type",Object)],v0.prototype,"editDialog_",void 0);v([I({observer:"isLoadingChanged_"}),w("design:type",Boolean)],v0.prototype,"isLoading_",void 0);v([I({reflectToAttribute:!0,value:A("kevlar_background_color_update")}),w("design:type",Boolean)],v0.prototype,"backgroundColorUpdate",void 0);v([rl("data.contentText"),w("design:type",Function),w("design:paramtypes",[Object]),w("design:returntype",void 0)],v0.prototype,"contentTextChanged_",null);
v([rl("data"),w("design:type",Function),w("design:paramtypes",[Object]),w("design:returntype",void 0)],v0.prototype,"dataChanged_",null);v([ql("yt-navigate"),w("design:type",Function),w("design:paramtypes",[CustomEvent]),w("design:returntype",void 0)],v0.prototype,"onYtNavigate",null);v([ql("yt-commentbox-dismiss"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],v0.prototype,"onYtCommentboxDismiss",null);
v([ql("yt-comment-poll-revert"),w("design:type",Function),w("design:paramtypes",[CustomEvent,Object]),w("design:returntype",void 0)],v0.prototype,"onYtCommentPollRevert",null);v([ql("yt-service-request-sent"),w("design:type",Function),w("design:paramtypes",[CustomEvent,aY]),w("design:returntype",void 0)],v0.prototype,"onYtServiceRequestSent",null);
v([ql("yt-service-request-completed"),w("design:type",Function),w("design:paramtypes",[CustomEvent]),w("design:returntype",void 0)],v0.prototype,"onYtServiceRequestCompleted",null);v([rl("data"),w("design:type",Function),w("design:paramtypes",[Object]),w("design:returntype",void 0)],v0.prototype,"computeVoteCount_",null);v([sl("data.backstageAttachment"),w("design:type",Boolean),w("design:paramtypes",[])],v0.prototype,"hasPoll_",null);v0=v([W({is:"ytd-backstage-post-renderer"})],v0);Polymer({is:"ytd-backstage-poll-renderer",behaviors:[Polymer.PaperItemBehavior,T.YtActionSenderBehavior,V.YtRendererBehavior,dY],properties:{data:{type:Object,observer:"dataChanged_"},isLoading_:{type:Boolean,value:!1},isChannelOwner_:{type:Boolean,computed:"computeIsChannelOwner_(data.choices)"},previousPollInfo_:{type:Object},selectedItemIndex_:{type:Number,value:-1}},listeners:{"yt-comment-poll-revert":"onYtCommentPollRevert_","yt-service-request-sent":"onYtServiceRequestSent_","yt-service-request-completed":"onYtServiceRequestCompleted_",
"yt-popup-closed":"onPopupClosed_"},computeIsChannelOwner_:function(a){if(!a)return!0;a=a[0];return!(a&&(a.signinEndpoint||a.selectServiceEndpoint))},
computePollClass_:function(a){if(!a)return"";a=XU(a.totalVotes);return this.isChannelOwner_&&"0"==a[0]?"owner-no-vote":""},
convertRatio_:function(a){return a?100*a:0},
dataChanged_:function(a){if(a&&(this.isLoading_=!1,this.previousPollInfo_=null,a.choices)){a=a.choices;for(var b=0;b<a.length;b++)if(a[b].selected){this.selectedItemIndex_=b;break}}},
onPopupClosed_:function(a,b){a=this.$["poll-votes"].selected;b.confirmed&&(this.selectChoice_(a,!1),this.sendAction("yt-remove-comment-action",[{removeCommentAction:{commentId:this.data.votedCommentId}}]));this.$["poll-votes"].selected=-1},
onPollChoiceSelected_:function(){this.isLoading_||this.isChannelOwner_||this.selectChoice_(this.$["poll-votes"].selected,!1);this.$["poll-votes"].selected=-1},
onYtCommentPollRevert_:function(a,b){b&&(this.selectChoice_(b.selectedChoiceIndex,!0),this.set("data.totalVotes",b.totalVotes))},
onYtServiceRequestSent_:function(a,b){if(b.actions)for(a=0;a<b.actions.length;a++){var c=b.actions[a];c.updateBackstagePollAction&&this.set("data.totalVotes",c.updateBackstagePollAction.totalVotes)}},
onYtServiceRequestCompleted_:function(a){var b=this.get("detail.data.actionResults.0.feedback",a);a=this.get("detail.data.actionResults.0.status",a);if("FEEDBACK_DESELECT"==b||"FEEDBACK_SELECT"==b)this.isLoading_=!1,"STATUS_FAILED"==a?this.fire("yt-comment-poll-revert",this.previousPollInfo_):this.previousPollInfo_=null},
getEndpoint_:function(a,b){return b==a?this.data.choices[b].deselectServiceEndpoint||null:this.data.choices[a].selectServiceEndpoint||null},
selectChoice_:function(a,b){this.previousPollInfo_||(this.previousPollInfo_={totalVotes:this.data.totalVotes,selectedChoiceIndex:this.selectedItemIndex_});for(var c=0;c<this.data.choices.length;c++){var d;if(a==this.selectedItemIndex_){var e=!1;var g=d=null}else d=(e=c==a)?this.data.choices[c].voteRatioIfSelected:this.data.choices[c].voteRatioIfNotSelected,g=e?this.data.choices[c].votePercentageIfSelected:this.data.choices[c].votePercentageIfNotSelected;this.set("data.choices."+c+".voteRatio",d);
this.set("data.choices."+c+".votePercentage",g);this.set("data.choices."+c+".selected",e)}b||(this.isLoading_=!0,(b=this.getEndpoint_(a,this.selectedItemIndex_))&&this.sendServiceRequestAction([b]));this.selectedItemIndex_=this.selectedItemIndex_==a?-1:a}});Polymer({is:"ytd-post-renderer",behaviors:[eY,V.YtRendererBehavior,X],properties:{data:{type:Object,observer:"dataChanged_"},voteCount_:{type:Object,computed:"computeVoteCount_(data)"},editDialog_:{type:Object,value:null},isLoading_:{type:Boolean,value:!1,observer:"isLoadingChanged_"},hasPoll_:{type:Boolean,computed:"computeHasPoll_(data)"},pollStatus_:{type:Object,computed:"computePollStatus_(data.pollStatus)"},surface_:{type:String,computed:"computeSurfaceType_(data.surface)",reflectToAttribute:!0},
usesCompactLockup_:{type:Boolean,computed:"computeUsesCompactLockup_(data.surface)",reflectToAttribute:!0},showWithoutToolbar_:{type:Boolean,computed:"computeShowWithoutToolbar_(data)",reflectToAttribute:!0},attachment:{type:String,computed:"computePostAttachment_(data)",reflectToAttribute:!0},enableTallerHeight_:{type:Boolean,reflectToAttribute:!0,value:A("enable_taller_posts_on_desktop")},isRichGrid_:{type:Boolean,reflectToAttribute:!0,value:!1}},observers:["contentTextChanged_(data.contentText)"],
listeners:{"yt-commentbox-dismiss":"onYtCommentboxDismiss_","yt-navigate":"onYtNavigate_","yt-service-request-sent":"onYtServiceRequestSent_","yt-service-request-completed":"onYtServiceRequestCompleted_","yt-comment-poll-revert":"onYtCommentPollRevert_"},stampDom:{"data.actionMenu":{id:"action-menu",mapping:{menuRenderer:"ytd-menu-renderer"}},"data.authorCommentBadge":{id:"author-comment-badge",mapping:{authorCommentBadgeRenderer:"ytd-author-comment-badge-renderer"}},"data.sponsorsOnlyBadge":{id:"sponsors-only-badge",
mapping:{sponsorsOnlyBadgeRenderer:"ytd-sponsors-only-badge-renderer"}},"data.backstageAttachment":{id:"content-attachment",mapping:{videoRenderer:{component:"ytd-video-renderer",properties:{isPostCompactVideo:"[[usesCompactLockup_]]"}},backstageImageRenderer:{component:"ytd-backstage-image-renderer",properties:{surface:"[[data.surface]]"}},playlistRenderer:{component:"ytd-playlist-renderer",properties:{isPostCompactPlaylist:"[[usesCompactLockup_]]"}}}},"data.voteButton":{id:"vote-button",mapping:{buttonRenderer:"ytd-button-renderer"}},
editDialog_:{id:"edit-dialog",mapping:{backstagePostDialogRenderer:"ytd-backstage-post-dialog-renderer"}},dismissedRenderer:{id:"dismissed-content",mapping:{notificationMultiActionRenderer:{component:"ytd-notification-multi-action-renderer",registration:["defer-on-home"]},notificationTextRenderer:{component:"ytd-notification-text-renderer",registration:["defer-on-home"]}}}},created:function(){this.spinnerEl_=null},
contentTextChanged_:function(){this.$.expander.reset()},
dataChanged_:function(a){this.isLoading_=!1;this.editDialog_=null;for(var b=0,c=a.actions&&a.actions.length;b<c;b++)this.openEditDialog_(a.actions[b].openUpdateCommentDialogAction)},
updatePoll_:function(a){0<=a?this.$["action-buttons"].reply():this.$["action-buttons"].hideReplyDialog()},
isLoadingChanged_:function(a){!a||this.editDialog_||this.spinnerEl_||(this.spinnerEl_=document.createElement("paper-spinner-lite"),Polymer.dom(this.root).appendChild(this.spinnerEl_));this.spinnerEl_&&(this.spinnerEl_.active=a)},
onYtNavigate_:function(a){a=this.get("updateCommentDialogEndpoint",a.detail.endpoint);this.openEditDialog_(a)},
onYtCommentboxDismiss_:function(){this.editDialog_=null},
onYtCommentPollRevert_:function(a,b){b&&this.updatePoll_(b.selectedChoiceIndex)},
onYtServiceRequestSent_:function(a,b){b.endpoint&&(b.endpoint.updateCommentEndpoint||b.endpoint.performCommentActionEndpoint&&!b.endpoint.performCommentActionEndpoint.clientActions)&&(this.isLoading_=!0);if(b.actions){for(var c=0;c<b.actions.length;c++){var d=b.actions[c];d.updateBackstagePollAction&&(d=this.get("updateBackstagePollAction.selectedChoiceIndex",d),void 0==d&&(d=-1),this.updatePoll_(d))}this.processActions_(a,b.actions)}},
onYtServiceRequestCompleted_:function(a,b){this.isLoading_=!1;if(b=b.actions)for(var c=0,d=b.length;c<d;c++){var e=b[c];e.replaceEnclosingAction&&e.replaceEnclosingAction.item&&e.replaceEnclosingAction.item.notificationTextRenderer&&(this.handleReplaceEnclosingAction_(e.replaceEnclosingAction),a.stopPropagation())}},
openEditDialog_:function(a){a&&a.dialog&&(this.editDialog_=a.dialog,a=this.$["edit-dialog"].firstElementChild)&&(a.focus(),a.openDialog&&a.openDialog())},
computeIsPostHidden_:function(a,b){return!!a||b},
computeVoteCount_:function(a){return a.voteCount||UU("0")},
computeHasPoll_:function(a){return!(!a.backstageAttachment||!a.backstageAttachment.pollRenderer)},
computePollStatus_:function(a){return a?a:null},
computeSurfaceType_:function(a){return a?a.toLowerCase().replace(/_/g,"-"):""},
computeUsesCompactLockup_:function(a){return"BACKSTAGE_SURFACE_TYPE_HOME"==a||"BACKSTAGE_SURFACE_TYPE_REPOST_PREVIEW"==a},
computeShowWithoutToolbar_:function(a){return!a.actionButtons&&!a.actionMenu},
computePostAttachment_:function(a){if(a.backstageAttachment){if(a.backstageAttachment.pollRenderer)return"poll";if(a.backstageAttachment.videoRenderer)return"video";if(a.backstageAttachment.backstageImageRenderer)return a.contentText?"image":"image-only";if(a.backstageAttachment.playlistRenderer)return"playlist"}return"none"},
computePostTabIndex_:function(a){return a?0:-1},
computeButtonTooltipPosition_:function(a){return this.computeUsesCompactLockup_(a)?"top":"bottom"},
onTap_:function(a){this.data&&this.data.navigationEndpoint&&!GZ(Polymer.dom(a).path||[],this,["A","BUTTON","YTD-VIDEO-RENDERER","YTD-PLAYLIST-RENDERER"])&&this.fire("yt-navigate",{endpoint:this.data.navigationEndpoint})}});Polymer({is:"ytd-comment-moderation-panel-renderer",properties:{data:{type:Object,observer:"dataChanged_"},settingsButton:{type:Object,computed:"computeSettingsButton_(data)"},hasSpam_:{type:Boolean,value:!1},hasContinuation_:{type:Boolean,computed:"computeHasContinuation_(data.continuations)"},showButton_:{type:Boolean,value:!0}},listeners:{"yt-next-continuation-data-updated":"onNextContinuationDataUpdated_"},behaviors:[X,U.YtActionHandlerBehavior,V.YtRendererBehavior,r0],actionMap:{"yt-approve-comment-action":"approveCommentAction_",
"yt-ban-author-action":"banAuthorAction_","yt-hide-reported-comment-action":"hideReportedCommentAction_","yt-remove-comment-action":"removeCommentAction_","yt-load-next-continuation":"onLoadNextContinuation_"},stampDom:{"data.continuations":{id:"continuation",mapping:{nextContinuationData:{component:"yt-next-continuation",properties:{showButton:"[[showButton_]]"}}}},"data.contents":{id:"held-comments",mapping:{commentRenderer:{component:"ytd-comment-renderer"}}},"data.likelySpamContents":{id:"likely-spam-comments",
mapping:{commentRenderer:{component:"ytd-comment-renderer"}}}},ready:function(){this.$["moderation-contents"].addEventListener("scroll",this.onPanelScroll_.bind(this))},
dataChanged_:function(){this.$.expander.collapsed=!0},
computeSettingsButton_:function(a){return(a=a&&a.expander&&a.expander.commentModerationPanelExpanderRenderer&&a.expander.commentModerationPanelExpanderRenderer.settingsButton)?a.buttonRenderer:void 0},
nextContinuation:{contentsArray:"data.contents",continuationType:"commentModerationPanelContinuation",requestPath:"/comment_service_ajax?action_get_comment_replies=1&pbj=1",usePost:!0},onPanelScroll_:function(){this.debounce("onPanelScroll_",function(){this.toggleClass("scrolling",0==this.$["moderation-contents"].scrollTop,Polymer.dom(this.$.expander).children[1].offsetParent)},50)},
onNextContinuationDataUpdated_:function(a,b){a=b.continuationData.response;!a.continuationContents.commentModerationPanelContinuation.contents&&a.continuationContents.commentModerationPanelContinuation.likelySpamContents&&(this.data.spamHeaderText=a.continuationContents.commentModerationPanelContinuation.spamHeaderText,this.set("data.likelySpamContents",a.continuationContents.commentModerationPanelContinuation.likelySpamContents),this.nextContinuation={contentsArray:"data.likelySpamContents",continuationType:"commentModerationPanelContinuation",
responseContentsKey:"likelySpamContents",usePost:!0},this.hasSpam_=!0)},
computeHasContinuation_:function(a){return!!a},
hideSpamDivider_:function(a){return!a||a&&0==this.data.contents.length},
computeSpamHeaderText_:function(a,b){return a?b:UU("")},
triggerContinuation_:function(){this.querySelector("yt-next-continuation").trigger();this.showButton_=!1},
approveCommentAction_:function(a){(a=this.get("approveCommentAction.commentId",a))&&this.remove_(a)},
banAuthorAction_:function(a){(a=this.get("banAuthorAction.commentId",a))&&this.remove_(a)},
removeCommentAction_:function(a){(a=this.get("removeCommentAction.commentId",a))&&this.remove_(a)},
hideReportedCommentAction_:function(a){(a=this.get("hideReportedCommentAction.commentId",a))&&this.remove_(a)},
remove_:function(a){var b=this.commentIdToHeldCommentsIndex_(a);a=this.commentIdToLikelySpamCommentsIndex_(a);0<=b?this.splice("data.contents",b,1):0<=a&&this.splice("data.likelySpamContents",a,1);this.data.contents&&0!=this.data.contents.length||this.data.likelySpamContents&&0!=this.data.likelySpamContents.length||this.fire("ytd-comment-moderation-panel-empty")},
commentIdToHeldCommentsIndex_:function(a){if(!this.data.contents)return-1;for(var b=0;b<this.data.contents.length;b++)if(this.data.contents[b].commentRenderer.commentId===a)return b;return-1},
commentIdToLikelySpamCommentsIndex_:function(a){if(!this.data.likelySpamContents)return-1;for(var b=0;b<this.data.likelySpamContents.length;b++)if(this.data.likelySpamContents[b].commentRenderer.commentId===a)return b;return-1}});OY("itemSectionRenderer","backstagePostThreadRenderer","ytd-backstage-post-thread-renderer");
Polymer({is:"ytd-backstage-post-thread-renderer",behaviors:[U.YtActionHandlerBehavior,V.YtRendererBehavior,X],properties:{data:Object,enableBordersOnCommunity:{type:Boolean,reflectToAttribute:!0,value:A("enable_borders_on_community")},enableImprovedCommunityTab:{type:Boolean,reflectToAttribute:!0,value:A("enable_post_renderer_for_kevlar_community_tab")}},listeners:{"ytd-comment-moderation-panel-empty":"onYtCommentModerationPanelEmpty_","yt-rendererstamper-finished":"onStampFinished_"},actionMap:{"yt-signal-action-open-post-comment-dialog":"handleSignalActionOpenPostCommentDialogAction_"},
stampDom:{"data.post":{id:"post",mapping:{backstagePostRenderer:"ytd-backstage-post-renderer",postRenderer:"ytd-post-renderer"}},"data.comments":{id:"comments",mapping:{backstageCommentsRenderer:"ytd-backstage-comments-renderer"}},"data.moderationPanel":{id:"moderation-panel",mapping:{commentModerationPanelRenderer:"ytd-comment-moderation-panel-renderer"}},"data.commentDialog":{id:"comment-dialog",mapping:{commentReplyDialogRenderer:"ytd-comment-reply-dialog-renderer"},events:!0}},created:function(){this.handleOpenPostCommentDialogActionAfterStamp_=
!1},
onStampFinished_:function(){this.handleOpenPostCommentDialogActionAfterStamp_&&this.handleSignalActionOpenPostCommentDialogAction_()},
handleSignalActionOpenPostCommentDialogAction_:function(){var a=this.$$("ytd-comment-reply-dialog-renderer");a?a.openDialog():this.handleOpenPostCommentDialogActionAfterStamp_=!0},
onYtCommentModerationPanelEmpty_:function(){this.set("data.moderationPanel",{})}});OY("itemSectionRenderer","conversationSwitcherInviteItemRenderer","ytd-conversation-switcher-invite-item-renderer");OY("multiPageMenuSectionItems","conversationSwitcherInviteItemRenderer","ytd-conversation-switcher-invite-item-renderer");var w0=function(){return F.apply(this,arguments)||this};
l(w0,F);w0.prototype.onDeclineTap=function(){this.data&&this.data.declineButton&&this.data.declineButton.buttonRenderer&&this.data.declineButton.buttonRenderer.serviceEndpoint&&(this.ytActionSenderBehavior.sendServiceRequestAction([this.data.declineButton.buttonRenderer.serviceEndpoint]),this.fire("yt-remove-conversation-switcher-invite-item",this.data))};
w0.prototype.onAcceptTap=function(){this.data&&this.data.acceptButton&&this.data.acceptButton.buttonRenderer&&this.data.acceptButton.buttonRenderer.serviceEndpoint&&(this.ytActionSenderBehavior.sendServiceRequestAction([this.data.acceptButton.buttonRenderer.serviceEndpoint]),this.fire("yt-remove-conversation-switcher-invite-item",this.data))};
ea.Object.defineProperties(w0.prototype,{declineButtonLabel:{configurable:!0,enumerable:!0,get:function(){return this.data&&this.data.declineButton&&this.data.declineButton.buttonRenderer&&this.data.declineButton.buttonRenderer.accessibility&&this.data.declineButton.buttonRenderer.accessibility.label?this.data.declineButton.buttonRenderer.accessibility.label:""}},
acceptButtonLabel:{configurable:!0,enumerable:!0,get:function(){return this.data&&this.data.acceptButton&&this.data.acceptButton.buttonRenderer&&this.data.acceptButton.buttonRenderer.accessibility&&this.data.acceptButton.buttonRenderer.accessibility.label?this.data.acceptButton.buttonRenderer.accessibility.label:""}}});
var x0=w0;v([H(V.YtRendererBehavior),w("design:type",Object)],x0.prototype,"ytRendererBehavior",void 0);v([H(T.YtActionSenderBehavior),w("design:type",Object)],x0.prototype,"ytActionSenderBehavior",void 0);v([I(),w("design:type",Object)],x0.prototype,"data",void 0);v([sl("data"),w("design:type",String),w("design:paramtypes",[])],x0.prototype,"declineButtonLabel",null);v([sl("data"),w("design:type",String),w("design:paramtypes",[])],x0.prototype,"acceptButtonLabel",null);
x0=v([W({is:"ytd-conversation-switcher-invite-item-renderer"})],x0);var y0=function(){return F.apply(this,arguments)||this};
l(y0,F);y0.prototype.getRoot=function(){return!Polymer.Element||window.ShadyDOM&&window.ShadyDOM.noPatch?this:Polymer.dom(this.root)};
y0.prototype.onDataChanged=function(){if(this.data){for(;this.firstChild;)this.removeChild(this.firstChild);switch(this.data.length){case 1:this.attachImg("full-image",!1,0);break;case 2:this.attachImg("left-half-image",!0,0);this.attachImg("right-half-image",!0,1);break;default:this.attachImg("upper-image",!1,0),this.attachImg("lower-image",!1,1),this.attachImg("right-image",!0,2);}var a=document.createElement("div");a.classList.add("ytd-contact-thumbnail");a.id="count";a.hidden=!0;this.getRoot().appendChild(a);
this.countElement=a;this.onCountChanged()}};
y0.prototype.onCountChanged=function(){this.countElement&&this.count&&(this.countElement.textContent=this.count,this.countElement.hidden=!1)};
y0.prototype.attachImg=function(a,b,c){var d=document.createElement("yt-img-shadow");d.classList.add("ytd-contact-thumbnail");d.thumbnail=this.data[c];d.fit=!0;b?(b=document.createElement("div"),b.classList.add("ytd-contact-thumbnail"),b.classList.add("half-clip"),b.id=a,b.appendChild(d),this.getRoot().appendChild(b),d.classList.add("half-thumbnail")):(d.id=a,this.getRoot().appendChild(d))};
var z0=y0;v([H(V.YtRendererBehavior),w("design:type",Object)],z0.prototype,"ytRendererBehavior",void 0);v([I({observer:"onDataChanged"}),w("design:type",Object)],z0.prototype,"data",void 0);v([I({observer:"onCountChanged"}),w("design:type",String)],z0.prototype,"count",void 0);v([I(),w("design:type",HTMLElement)],z0.prototype,"countElement",void 0);z0=v([W({is:"ytd-contact-thumbnail"})],z0);OY("itemSectionRenderer","conversationSwitcherItemRenderer","ytd-conversation-switcher-item-renderer");OY("multiPageMenuSectionItems","conversationSwitcherItemRenderer","ytd-conversation-switcher-item-renderer");var A0=function(){return F.apply(this,arguments)||this};
l(A0,F);A0.prototype.configureRendererStamper=function(){return{"data.contextMenu":{id:"menu",mapping:{menuRenderer:{component:"ytd-menu-renderer",params:{noInkOnDropdownButton:!0},noInjection:!0}}}}};
A0.prototype.getFirstThumbnail=function(a){return a&&a.length?a[0]:null};
A0.prototype.onTapOpenConversation=function(){this.ytActionSenderBehavior.sendAction("yt-close-popup-action");this.data&&this.ytActionSenderBehavior.sendServiceRequestAction([this.data.serviceEndpoint])};
A0.prototype.onUnreadChanged=function(a){this.toggleClass("unread",a)};
var B0=A0;B0.prototype.onUnreadChanged=B0.prototype.onUnreadChanged;v([H(V.YtRendererBehavior),w("design:type",Object)],B0.prototype,"ytRendererBehavior",void 0);v([H(X),w("design:type",Object)],B0.prototype,"ytRendererstamperBehavior",void 0);v([H(T.YtActionSenderBehavior),w("design:type",Object)],B0.prototype,"ytActionSenderBehavior",void 0);v([I(),w("design:type",Object)],B0.prototype,"data",void 0);
v([rl("data.hasUnreadContent"),w("design:type",Function),w("design:paramtypes",[Boolean]),w("design:returntype",void 0)],B0.prototype,"onUnreadChanged",null);B0=v([W({is:"ytd-conversation-switcher-item-renderer"})],B0);OY("itemSectionRenderer","commentHistoryBlockHeaderRenderer","ytd-comment-history-block-header-renderer");var nGa=function(){return F.apply(this,arguments)||this};
l(nGa,F);var C0=nGa;v([H(V.YtRendererBehavior),w("design:type",Object)],C0.prototype,"ytRendererBehavior",void 0);v([I(),w("design:type",Object)],C0.prototype,"data",void 0);C0=v([W({is:"ytd-comment-history-block-header-renderer"})],C0);var D0=function(){return F.apply(this,arguments)||this};
l(D0,F);D0.prototype.configureRendererStamper=function(){return{"data.actionMenu":{id:"menu",mapping:{menuRenderer:"ytd-menu-renderer"}}}};
var E0=D0;v([H(V.YtRendererBehavior),w("design:type",Object)],E0.prototype,"rendererBehavior",void 0);v([H(eY),w("design:type",Object)],E0.prototype,"dismissableItemBehavior",void 0);v([H(X),w("design:type",Object)],E0.prototype,"rendererstamperBehavior",void 0);v([I(),w("design:type",Object)],E0.prototype,"data",void 0);E0=v([W({is:"ytd-comment-history-entry-renderer"})],E0);OY("multiPageMenuSectionItems","continuationItemRenderer","ytd-continuation-item-renderer");var F0=function(){var a=F.apply(this,arguments)||this;a.isOverridable=!1;a.spinnerActive=!1;a.actionMap={"yt-continuation-override-action":"overrideContinuation"};return a};
l(F0,F);F0.prototype.attached=function(){this.ytActionHandlerBehavior.actionMap=this.actionMap};
F0.prototype.observeData=function(){this.spinnerActive=!1;this.ytRendererBehavior.invalidate(!1)};
F0.prototype.onShow=function(){this.spinnerActive=!0;this.data&&"CONTINUATION_TRIGGER_ON_ITEM_SHOWN"===this.data.trigger&&this.ytActionSenderBehavior.sendServiceRequestAction([this.data.continuationEndpoint])};
F0.prototype.overrideContinuation=function(){this.isOverridable&&(this.spinnerActive=!0,this.ytActionSenderBehavior.sendServiceRequestAction([this.data.continuationEndpoint]))};
var G0=F0;v([H(U.YtActionHandlerBehavior),w("design:type",Object)],G0.prototype,"ytActionHandlerBehavior",void 0);v([H(T.YtActionSenderBehavior),w("design:type",Object)],G0.prototype,"ytActionSenderBehavior",void 0);v([H(V.YtRendererBehavior),w("design:type",Object)],G0.prototype,"ytRendererBehavior",void 0);v([H($Y),w("design:type",Object)],G0.prototype,"ytVisibilityBehavior",void 0);v([I({observer:"observeData"}),w("design:type",Object)],G0.prototype,"data",void 0);
v([I(),w("design:type",Object)],G0.prototype,"isOverridable",void 0);v([I(),w("design:type",Object)],G0.prototype,"spinnerActive",void 0);G0=v([W({is:"ytd-continuation-item-renderer"})],G0);OY("multiPageMenuSectionItems","toggleThemeCompactLinkRenderer","ytd-toggle-theme-compact-link-renderer");var H0=function(){var a=F.apply(this,arguments)||this;a.actionMap={"yt-signal-action-toggle-dark-theme-on":"handleSignalActionToggleDarkThemeOn","yt-signal-action-toggle-dark-theme-off":"handleSignalActionToggleDarkThemeOff"};return a};
l(H0,F);f=H0.prototype;f.attached=function(){this.actionHandlerBehavior.actionMap=this.actionMap};
f.dataChanged=function(){this.setLabel()};
f.setLabel=function(){this.label="USER_INTERFACE_THEME_DARK"===nS()?this.data.toggledOnTitle:this.data.toggledOffTitle};
f.onTap=function(){this.data.serviceEndpoint&&this.actionSenderBehavior.sendServiceRequestAction([this.data.serviceEndpoint])};
f.handleSignalActionToggleDarkThemeOn=function(){iS(0,165,!0);iS(0,174,!1);this.prefs.save();this.actionSenderBehavior.sendAction("yt-dark-mode-toggled-action",[!0]);this.setLabel()};
f.handleSignalActionToggleDarkThemeOff=function(){iS(0,165,!1);iS(0,174,!0);this.prefs.save();this.actionSenderBehavior.sendAction("yt-dark-mode-toggled-action",[!1]);this.setLabel()};
var I0=H0;I0.prototype.onTap=I0.prototype.onTap;v([H(U.YtActionHandlerBehavior),w("design:type",Object)],I0.prototype,"actionHandlerBehavior",void 0);v([H(V.YtRendererBehavior),w("design:type",Object)],I0.prototype,"ytRendererBehavior",void 0);v([H(Polymer.PaperItemBehavior),w("design:type",Object)],I0.prototype,"paperItemBehaviors",void 0);v([H(T.YtActionSenderBehavior),w("design:type",Object)],I0.prototype,"actionSenderBehavior",void 0);
v([I({observer:"dataChanged"}),w("design:type",Object)],I0.prototype,"data",void 0);v([I({value:function(){return eS.getInstance()}}),
w("design:type",eS)],I0.prototype,"prefs",void 0);v([I(),w("design:type",Object)],I0.prototype,"label",void 0);v([ql("tap"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],I0.prototype,"onTap",null);I0=v([W({is:"ytd-toggle-theme-compact-link-renderer"})],I0);var J0={};J0.YtComponentBehavior={_noAccessors:!0,ready:function(){this.provides&&aBa(this.provides,this)},
getInterface:function(a){return MU(a)},
getInterfaceForTs:function(a){return NU(a)},
asyncFrame:function(a,b){return setTimeout(function(){requestAnimationFrame(a)},b)},
getSimpleString:XU,getEndpointHandler_:YU,computeHref_:function(a,b){return a?(a=ZU(a,void 0===b?!1:b))?A("enable_polymer_resin")?Ac(a).getTypedStringValue():a:null:null},
computeNofollow_:function(a){return a?QU(a)?"nofollow":null:null},
computeIcon_:function(a){return a&&a.iconType?a.iconAttributeFromInnertubeIconType(a.iconType):""}};OY("itemSectionRenderer","notificationRenderer","ytd-notification-renderer");OY("multiPageMenuSectionItems","notificationRenderer","ytd-notification-renderer");var K0=function(){return F.apply(this,arguments)||this};
l(K0,F);f=K0.prototype;f.configureRendererStamper=function(){return{"data.contextualMenu":{id:"menu",mapping:{menuRenderer:"ytd-menu-renderer"}},"data.highPriorityNotificationActionButton":{id:"call-to-action",mapping:{buttonRenderer:"ytd-button-renderer"}}}};
f.onKeyUp=function(a){if(13===a.keyCode)this.onTap()};
f.onTap=function(){this.actionSenderBehavior.sendServiceRequestAction([this.data.recordClickEndpoint]);var a=this.data.navigationEndpoint;a&&a.getCommentsFromInboxCommand&&this.actionSenderBehavior.sendServiceRequestAction([a])};
f.readChanged=function(a){this.toggleClass("unread",!a)};
f.dataChanged=function(a){a&&this.toggleClass("high-priority-notification",a.highPriorityNotification)};
f.computeThumbnailSize=function(a){return a?32:48};
f.getEndpointURL=function(a){return a&&!a.getCommentsFromInboxCommand?this.componentBehavior.computeHref_(a):null};
f.getEndpointData=function(a){return a&&!a.getCommentsFromInboxCommand?a:null};
var L0=K0;L0.prototype.computeThumbnailSize=L0.prototype.computeThumbnailSize;L0.prototype.readChanged=L0.prototype.readChanged;L0.prototype.onKeyUp=L0.prototype.onKeyUp;v([H(V.YtRendererBehavior),w("design:type",Object)],L0.prototype,"ytRendererBehavior",void 0);v([H(X),w("design:type",Object)],L0.prototype,"ytRendererstamperBehavior",void 0);v([H(J0.YtComponentBehavior),w("design:type",Object)],L0.prototype,"componentBehavior",void 0);
v([H(T.YtActionSenderBehavior),w("design:type",Object)],L0.prototype,"actionSenderBehavior",void 0);v([I({observer:"dataChanged"}),w("design:type",Object)],L0.prototype,"data",void 0);v([I({computed:"computeThumbnailSize(data.highPriorityNotification)"}),w("design:type",Number)],L0.prototype,"thumbnailSize",void 0);v([ql("keyup"),w("design:type",Function),w("design:paramtypes",[KeyboardEvent]),w("design:returntype",void 0)],L0.prototype,"onKeyUp",null);
v([rl("data.read"),w("design:type",Function),w("design:paramtypes",[Boolean]),w("design:returntype",void 0)],L0.prototype,"readChanged",null);v([rl("data.highPriorityNotification"),w("design:type",Function),w("design:paramtypes",[Boolean]),w("design:returntype",void 0)],L0.prototype,"computeThumbnailSize",null);L0=v([W({is:"ytd-notification-renderer"})],L0);var M0=function(){return F.apply(this,arguments)||this};
l(M0,F);M0.prototype.configureRendererStamper=function(){return{"data.trailer":{id:"trailer",mapping:{playlistVideoPlayerRenderer:"ytd-playlist-video-player-renderer"}}}};
M0.prototype.dataChanged=function(a){a&&(this.collapsible=!!a.isCollapsible,this.collapsed=!(!a.isCollapsible||!a.isCollapsedByDefault),this.updateCollapsedState())};
M0.prototype.onToggleExpanded=function(){this.collapsible&&(this.collapsed=!this.collapsed,this.updateCollapsedState())};
M0.prototype.updateCollapsedState=function(){this.expandIcon.icon=this.collapsed?"yt-icons:expand":"yt-icons:collapse";this.set("data.trailer.playlistVideoPlayerRenderer.hidden",this.collapsed);if(this.data.expandButton){var a=this.data.expandButton.toggleButtonRenderer,b=a.accessibilityData.accessibilityData.label;a=a.toggledAccessibilityData.accessibilityData.label;this.$["expand-button"].setAttribute("aria-label",this.collapsed?a:b)}this.collapsed||this.ytRendererBehavior.markDirty()};
var N0=M0;v([H(U.YtActionHandlerBehavior),w("design:type",Object)],N0.prototype,"actionHandlerBehavior",void 0);v([H(V.YtRendererBehavior),w("design:type",Object)],N0.prototype,"ytRendererBehavior",void 0);v([H(X),w("design:type",Object)],N0.prototype,"ytRendererstamperBehavior",void 0);v([I({observer:"dataChanged"}),w("design:type",Object)],N0.prototype,"data",void 0);v([I({value:!1,reflectToAttribute:!0}),w("design:type",Boolean)],N0.prototype,"collapsed",void 0);
v([I({value:!1,reflectToAttribute:!0}),w("design:type",Boolean)],N0.prototype,"collapsible",void 0);v([tl("#expand-icon"),w("design:type",Object)],N0.prototype,"expandIcon",void 0);N0=v([W({is:"ytd-playlist-segment-renderer"})],N0);var O0={created:function(){this.playerListeners_=new Map},
getPlayerListenerKey_:function(a,b){return a+":"+bb(b)},
getPlayerListener_:function(a,b,c){a=this.getPlayerListenerKey_(a,b);b=this.playerListeners_.get(a);c&&this.playerListeners_.delete(a);return b},
savePlayerListener_:function(a,b){var c=b.bind(this);this.playerListeners_.set(this.getPlayerListenerKey_(a,b),c);return c},
listenToPlayerEvent:function(a,b,c){c=this.savePlayerListener_(b,c);a.addEventListener(b,c)},
listenToPlayerEvents:function(a,b){b.forEach(function(c,d){this.listenToPlayerEvent(a,d,c)}.bind(this))},
unlistenFromPlayerEvent:function(a,b,c){c=this.getPlayerListener_(b,c,!0);a.removeEventListener(b,c)},
unlistenFromPlayerEvents:function(a,b){b.forEach(function(c,d){this.unlistenFromPlayerEvent(a,d,c)}.bind(this))}},P0=function(){};ZX.YtPlayerListenerBehavior=O0;MY.YtPlayerManagerBehaviorImpl_={_noAccessors:!0,created:function(){this.loadPlayerCssPromise_=this.loadPlayerJsPromise_=null;this.playerCssTagId_="player-css"},
loadPlayerJs_:function(){Sa("yt.player.Application")?this.loadPlayerJsPromise_=bw():this.loadPlayerJsPromise_||(this.loadPlayerJsPromise_=new Yv(function(a){var b=vh("SCRIPT");b.addEventListener("load",a);a=hi(z("PLAYER_JS_URL"));jd(b,a);document.querySelector("head").appendChild(b)}));
return this.loadPlayerJsPromise_},
loadPlayerCss_:function(){if(this.loadPlayerCssPromise_)return this.loadPlayerCssPromise_;document.querySelector("link#"+this.playerCssTagId_)?this.loadPlayerCssPromise_=bw():this.loadPlayerCssPromise_=new Yv(function(a){var b=z("PLAYER_CSS_URL"),c=document.createElement("link");c.id=this.playerCssTagId_;c.rel="stylesheet";c.addEventListener("load",a);c.href=b;document.querySelector("head").appendChild(c)}.bind(this));
return this.loadPlayerCssPromise_},
loadPlayer:function(){return ew([this.loadPlayerJs_(),this.loadPlayerCss_()])},
preparePlayer:function(){return this.loadPlayer()}};
MY.YtPlayerManagerBehavior=[iY.ComponentBehavior,MY.YtPlayerManagerBehaviorImpl_];MY.YtPlayerBehaviorImpl_={properties:{requiredExperimentFlag:{type:String,value:"kevlar_use_ytd_player"},watchNextData:{type:Object,observer:"watchNextDataChanged_"}},created:function(){this.player_=null;this.playerResolver_=fw();this.loadedVideo_=this.playerContainer_=this.initPlayerPromise_=null;this.preparePlayerJobId_=0;this.shouldSendAbandonmentPing_=!1;this.startLoadingVideoAsyncId_=0;this.isResetForNewPlayback_=!0;this.debugVideoIdUpdates_=[]},
hasRequiredExperimentFlag:function(){return!this.requiredExperimentFlag||A(this.requiredExperimentFlag)},
attached:function(){if("ytd-player"!=this.is||this.hasRequiredExperimentFlag())this.listen(window,"beforeunload","onBeforeUnload_"),this.listen(window,"yt-navigate-start","sendAbandonmentPing_")},
detached:function(){if("ytd-player"!=this.is||this.hasRequiredExperimentFlag())this.unlisten(window,"beforeunload","onBeforeUnload_"),this.unlisten(window,"yt-navigate-start","sendAbandonmentPing_")},
update:function(a,b){this.debugVideoIdUpdates_.unshift(TAa(a.args));this.debugVideoIdUpdates_=this.debugVideoIdUpdates_.slice(0,5);var c="ytd-player"==this.is;!b&&c&&(b=this);c!=this.hasRequiredExperimentFlag()&&we(Error("Updating the wrong player manager element."));this.updateSwfConfig_(a);c=this.getInterface(vV).getCurrentPage();b||(c&&c.requiresPlayer&&(b=c.getPlayerContainer()),!b&&NV&&(b=xV.getInstance().playerContainer||void 0));if(b){this.isResetForNewPlayback_=!1;var d=this.acquireApi_(b,
a).then(function(e){this.shouldSendAbandonmentPing_=!0;this.fire("yt-player-updated",e)}.bind(this))}else a=Error("Called player update, but no player container is present"),a.params="current page: "+(c&&c.is),xe(a);
return d||bw()},
updatePlayerComponents:function(a,b,c,d){"ytd-player"==this.is!=this.hasRequiredExperimentFlag()&&we(Error("Updating the wrong player manager element."));this.player_?(c?this.player_.updateVideoData({rvs:c}):a&&this.updatePlayerRelated_(a,b),d&&this.updatePlayerPlaylist_(d)):we(Error("Missing player in updatePlayerComponents"))},
acquireApi_:function(a,b){Dn.cancelJob(this.preparePlayerJobId_);if(a==this.playerContainer_){var c=void 0;this.getPlayerPromise().then(function(d){var e=TAa(b.args);this.loadedVideo_&&e==this.loadedVideo_?d.updateVideoData(b.args,!0):this.shouldAutoplay_(b)?d.loadVideoByPlayerVars(b.args):d.cueVideoByPlayerVars(b.args);this.loadedVideo_=null;this.cancelAsync(this.startLoadingVideoAsyncId_)}.bind(this))}else c=void 0,this.initPlayerPromise_=this.releaseAndInitPlayerContainer_(a,b),c&&(a=function(){},
this.initPlayerPromise_.then(a,a));
return this.initPlayerPromise_},
updatePlayerStyles:function(a){return Polymer.Settings.useShadow&&!this.hasLocalStyles_(a)?this.insertLocalStyles_(a):bw()},
releaseAndInitPlayerContainer_:function(a,b){"ytd-player"==this.is?this.initPlayerPromise_&&xe(Error("ytd-player required releasing.")):this.release_();var c=this.getInterface(uV).loadPlayer().then(function(){var d=this.initPlayer_(a,b);this.playerResolver_.resolve(d);return d}.bind(this));
this.playerContainer_=a;return c},
onPlayerReady_:function(a,b,c){a.removeEventListener("onReady",this.onPlayerReadyEvent_);c&&!this.isMdxConnected_()&&a.playVideo();b(a)},
isMdxConnected_:function(){var a=this.sendSingletonAction("yt-get-mdx-status");return!(!a||!a.connected)},
hasLocalStyles_:function(a){a=a.previousElementSibling;return!!a&&"player-css"==a.id},
insertLocalStyles_:function(a){var b=document.getElementById("player-css").cloneNode(!1),c=fw();b.addEventListener("load",c.resolve,!1);Ah(b,a);return c.promise},
initPlayer_:function(a,b){return new Yv(function(c){"ytd-player"==a.is&&(a=a.getInternalContainer());var d=document.querySelector("#player.skeleton"),e=!1,g=!1;if(d){for(var h=d.querySelector("#player-api");0<h.children.length;)e=h.firstChild,Za(e.getPlayerState)&&2==e.getPlayerState()&&(g=!0),Za(e.getVideoAspectRatio)&&this.sendOptionalAction("yt-initial-video-aspect-ratio",[e.getVideoAspectRatio()]),a.appendChild(h.firstChild),e=!0;d.hidden=!0}var m=e&&b.loaded&&!g;d=a.querySelector(".html5-video-player");
m&&d&&Za(d.playVideo)&&!this.isMdxConnected_()&&!A("kevlar_no_early_init_unpause")&&(d.playVideo(),m=!1);this.updatePlayerStyles(a).then(function(){this.player_=QAa(a,b);this.onPlayerReadyEvent_=this.onPlayerReady_.bind(this,this.player_,c,m);this.player_.addEventListener("onReady",this.onPlayerReadyEvent_)}.bind(this))}.bind(this))},
getPlayerPromise:function(){return this.playerResolver_.promise},
getPlayer:function(){return this.player_&&this.player_.isReady()?this.player_:null},
pause:function(){this.getPlayerPromise().then(function(a){a.pauseVideo()})},
play:function(){this.getPlayerPromise().then(function(a){a.playVideo()})},
getInternalContainer:function(){return this.$.container},
release_:function(){this.player_&&(this.player_.removeEventListener("onReady",this.onPlayerReadyEvent_),this.player_.stopVideo&&this.player_.stopVideo(),this.loadedVideo_=this.playerContainer_=this.player_=null,this.playerResolver_.promise.then(function(b){b.destroy()}));
var a=this.playerResolver_;this.playerResolver_=fw();this.playerResolver_.promise.then(a.resolve);this.fire("yt-player-released")},
sendAbandonmentPing_:function(a,b){if(!A("kevlar_abandon_on_stop")){a=xV.getInstance().miniplayerButtonActivation;var c=!1;b&&b.endpoint&&(c=this.shouldSuppressAbandonmentPing_(b.endpoint));this.shouldSendAbandonmentPing_&&this.player_&&!a&&!c&&(this.player_.sendAbandonmentPing(),this.shouldSendAbandonmentPing_=!1)}},
shouldSuppressAbandonmentPing_:function(a){var b=this.getInterface(vV);return b.isOnWatch()&&b.getCurrentPage().playlistData&&!a.watchEndpoint?!0:!1},
updatePlayerRelated_:function(a,b){if(a.results&&a.results.length){if(b)for(var c=0,d=b.sets.length;c<d;c++){var e=b.sets[c];if("NORMAL"==e.mode){var g=e.autoplayVideo;break}}b=[];c=0;for(d=a.results.length;c<d;c++)e={},a.results[c].endScreenVideoRenderer?(e=a.results[c].endScreenVideoRenderer,e={author:XU(e.shortBylineText),id:e.videoId,length_seconds:e.lengthInSeconds||0,session_data:"itct="+e.navigationEndpoint.clickTrackingParams,title:XU(e.title)},g&&g.watchEndpoint.videoId==e.id&&(e.endscreen_autoplay_session_data=
km({autonav:"1",playnext:"1",itct:g.clickTrackingParams,feature:"related-auto"}))):a.results[c].endScreenPlaylistRenderer&&(e=a.results[c].endScreenPlaylistRenderer,e={list:e.playlistId,playlist_title:XU(e.title),playlist_length:parseInt(e.videoCount,10),session_data:"itct="+e.navigationEndpoint.clickTrackingParams,thumbnail_ids:e.navigationEndpoint.watchEndpoint.videoId,video_id:e.navigationEndpoint.watchEndpoint.videoId}),b.push(km(e));b.length&&(xe(Error("rvs data missing, using endscreen renderer.")),
this.player_.updateVideoData({rvs:b.join(",")}))}},
updatePlayerPlaylist_:function(a){var b=!0;A("player_allow_autonav_after_playlist")&&(b=!!this.get("stateData.loopOn",a));this.player_.updatePlaylist(cDa(a,b))},
getPlaylistData_:function(a){for(var b=[],c=0,d=a.contents.length;c<d;c++){var e=a.contents[c].playlistPanelVideoRenderer;if(e){var g="";e.shortBylineText&&(g=XU(e.shortBylineText));var h="";e.title?h=XU(e.title):e.unplayableText&&(h=XU(e.unplayableText));b.push({author:g,encrypted_id:e.videoId,title:h})}}c=!0;A("player_allow_autonav_after_playlist")&&(c=!!this.get("stateData.loopOn",a));b={index:a.currentIndex,list:a.playlistId,loop:c,playlist_title:a.title,playlist_length:a.totalVideos,video:b,
fetch:0,title:a.title,external_list:"1"};a.ownerName&&(b.playlist_author=XU(a.ownerName));return b},
focusOnPlayer:function(){Polymer.RenderStatus.afterNextRender(this,function(){if(this.playerContainer_&&this.playerContainer_.firstElementChild){var a=this.playerContainer_.querySelector(".html5-video-player");a&&(this.getInterface(EY).ignoreNextScroll(),a.focus())}})},
startLoadingVideo:function(a,b){this.isResetForNewPlayback_=!0;this.getPlayerPromise().then(function(c){var d={videoId:a};b&&(d.external_list="1");this.cancelAsync(this.startLoadingVideoAsyncId_);this.startLoadingVideoAsyncId_=this.async(function(){A("kevlar_abandon_on_stop")&&this.maybeSendAbandonmentPing_();c.loadVideoByPlayerVars(d,void 0,void 0,!1);this.loadedVideo_=a})}.bind(this))},
preparePlayer:function(a){if(!this.initPlayerPromise_){var b=new Yv(function(d){if("complete"==document.readyState||"ready"==document.readyState||"interactive"==document.readyState)d();else{var e=function(){document.removeEventListener("DOMContentLoaded",e);d()};
document.addEventListener("DOMContentLoaded",e)}}),c=this.getInterface(uV);
b.then(c.loadPlayer.bind(this)).then(function(){this.initPlayerPromise_||this.preparePlayerJobId_||(this.preparePlayerJobId_=En(function(){if(!this.initPlayerPromise_){var d=(z("FILLER_DATA")||{}).player;d&&(this.initPlayerPromise_=this.releaseAndInitPlayerContainer_(a,d))}}.bind(this)))}.bind(this))}},
updateSwfConfig_:function(a){A("disable_kevlar_update_swfconfig_version")||(a.assets.js=z("PLAYER_JS_URL")||a.assets.js,a.assets.css=z("PLAYER_CSS_URL")||a.assets.css);this.shouldAutoplay_(a)||(a.args.autoplay="0")},
shouldAutoplay_:function(a){if(A("kevlar_player_always_autoplay"))return!0;var b=this.get("args.el",a);if(NV&&b&&"detailpage"!=b){var c=this.sendOptionalAction("yt-miniplayer-active");if(c&&c[0])return!1}return b&&"sponsorshipsoffer"==b&&"0"==this.get("args.autoplay",a)||A("kevlar_add_to_queue_option")&&(a=this.get("args.player_response",a))&&(a=JSON.parse(a),this.get("playerConfig.playbackStartConfig.startPaused",a))?!1:!0},
stop:function(){A("kevlar_abandon_on_stop")&&this.maybeSendAbandonmentPing_();var a=this.getPlayer();a&&5!=a.getPlayerState()&&a.stopVideo()},
resetForNewPlayback:function(){this.isResetForNewPlayback_||(this.stop(),this.isResetForNewPlayback_=!0)},
appendTo:function(a,b){var c=this,d,e,g,h;return Ca(function(m){if(1==m.nextAddress)return b||(b=c),c.initPlayerPromise_?ta(m,c.getPlayerPromise(),2):(a.appendChild(b),m.return());d=m.yieldResult;A("kevlar_player_presenting_player_state_killswitch")||(e=d.getPresentingPlayerType());g=d.getPlayerState(e);h=!1;if(-1==g||1==g||3==g)h=!0;a.appendChild(b);h&&d.playVideo();d.setSize(NaN,NaN);ua(m)})},
onBeforeUnload_:function(a){A("kevlar_abandon_on_stop")?(a=this.getPlayer())&&a.sendAbandonmentPing():this.sendAbandonmentPing_(a,null)},
watchNextDataChanged_:function(a){a&&this.getPlayerPromise().then(function(b){var c={};A("web_player_watch_next_response")&&(c.raw_watch_next_response=a);var d=this.get("contents.twoColumnWatchNextResults.desktopOverlay.desktopOverlayConfigRenderer.suppressShareButton",a),e=this.get("contents.twoColumnWatchNextResults.desktopOverlay.desktopOverlayConfigRenderer.suppressWatchLaterButton",a);d&&(c.ss="1");e&&(c.showwatchlater="0");b.updateVideoData(c)}.bind(this))},
maybeSendAbandonmentPing_:function(){var a=this.getPlayer();a&&5!=a.getPlayerState()&&0!=a.getPlayerState()&&a.sendAbandonmentPing()}};
MY.YtPlayerBehavior=[iY.ComponentBehavior,MY.YtPlayerManagerBehavior,ZX.YtPlayerListenerBehavior,T.YtActionSenderBehavior,MY.YtPlayerBehaviorImpl_];Polymer({is:"ytd-player",factoryImpl:function(){},
behaviors:[MY.YtPlayerBehavior]});var Q0=function(){var a=F.apply(this,arguments)||this;a.videoHidden=!1;return a};
l(Q0,F);f=Q0.prototype;f.attached=function(){this.playerElement.playerResolver_&&this.playerElement.getPlayerPromise().then(this.playerApiReady.bind(this))};
f.detached=function(){this.player&&(this.ytPlayerListenerBehavior.unlistenFromPlayerEvent(this.player,"onVideoDataChange",this.onPlayerVideoDataChanged),this.ytPlayerListenerBehavior.unlistenFromPlayerEvent(this.player,"onStateChange",this.onPlayerStateChange),this.ytPlayerListenerBehavior.unlistenFromPlayerEvent(this.player,"onAdStateChange",this.onPlayerStateChange),this.player=null)};
f.playerApiReady=function(a){this.player=a;this.ytPlayerListenerBehavior.listenToPlayerEvent(a,"onVideoDataChange",this.onPlayerVideoDataChanged.bind(this));this.ytPlayerListenerBehavior.listenToPlayerEvent(a,"onStateChange",this.onPlayerStateChange.bind(this));this.ytPlayerListenerBehavior.listenToPlayerEvent(a,"onAdStateChange",this.onPlayerStateChange.bind(this))};
f.onPlayerStateChange=function(a){(1===a||3===a)&&this.videoHidden&&this.player.pauseVideo()};
f.onPlayerVideoDataChanged=function(a){("dataupdated"===a.type||"dataloaded"===a.type)&&this.videoHidden&&this.player.pauseVideo()};
f.guideVisibleChanged=function(){return Fd(this,function b(){var c=this,d;return Aa(b,function(e){if(1==e.nextAddress)return ta(e,c.playerElement.getPlayerPromise(),2);d=e.yieldResult;d.setSize(NaN,NaN);ua(e)})})};
f.hiddenChanged=function(a){return Fd(this,function c(){var d=this,e;return Aa(c,function(g){if(1==g.nextAddress)return d.videoHidden=a,d.playerElement?ta(g,d.playerElement.getPlayerPromise(),2):g.return();e=g.yieldResult;a?e.pauseVideo():(e.playVideo(),e.setSize(NaN,NaN));ua(g)})})};
var R0=Q0;R0.prototype.hiddenChanged=R0.prototype.hiddenChanged;R0.prototype.guideVisibleChanged=R0.prototype.guideVisibleChanged;v([H(lY.YtdGuideStateAwareBehavior),w("design:type",Object)],R0.prototype,"ytdGuideStateAwareBehavior",void 0);v([H(O0),w("design:type",P0)],R0.prototype,"ytPlayerListenerBehavior",void 0);v([H(DY.YtVideoPlayerRendererBehavior),w("design:type",Object)],R0.prototype,"ytVideoPlayerRendererBehavior",void 0);v([I(),w("design:type",Object)],R0.prototype,"data",void 0);
v([I({reflectToAttribute:!0}),w("design:type",Object)],R0.prototype,"videoHidden",void 0);v([I(),w("design:type",Object)],R0.prototype,"player",void 0);v([tl("#player"),w("design:type",Object)],R0.prototype,"playerElement",void 0);v([rl("guidePersistentAndVisible"),w("design:type",Function),w("design:paramtypes",[Boolean]),w("design:returntype",Promise)],R0.prototype,"guideVisibleChanged",null);
v([rl("data.hidden"),w("design:type",Function),w("design:paramtypes",[Boolean]),w("design:returntype",Promise)],R0.prototype,"hiddenChanged",null);R0=v([W({is:"ytd-playlist-video-player-renderer"})],R0);var S0=function(){return F.apply(this,arguments)||this};
l(S0,F);S0.prototype.configureRendererStamper=function(){return{"data.menu":{id:"menu",mapping:{menuRenderer:"ytd-menu-renderer"}},"data.offerButton":{id:"offer-button",mapping:{buttonRenderer:"ytd-button-renderer"}}}};
S0.prototype.onDrag=function(){if(this.thumbnail){var a=this.thumbnail.$$("yt-img-shadow");a&&a.onShow()}};
S0.prototype.onMenuOverlayChanged=function(a,b){this.menuOpened=b};
var T0=S0;T0.prototype.onMenuOverlayChanged=T0.prototype.onMenuOverlayChanged;v([H(V.YtRendererBehavior),w("design:type",Object)],T0.prototype,"ytRendererBehavior",void 0);v([H(X),w("design:type",Object)],T0.prototype,"ytRendererstamperBehavior",void 0);v([H(sY.YtdMouseDownPrefetchableBehavior),w("design:type",Object)],T0.prototype,"ytdMouseDownPrefetchableBehavior",void 0);v([H(rY),w("design:type",Object)],T0.prototype,"ytdLockupBehavior",void 0);
v([I(),w("design:type",Object)],T0.prototype,"data",void 0);v([I({reflectToAttribute:!0}),w("design:type",Boolean)],T0.prototype,"isEditable",void 0);v([I({reflectToAttribute:!0}),w("design:type",Boolean)],T0.prototype,"canReorder",void 0);v([I({reflectToAttribute:!0}),w("design:type",Boolean)],T0.prototype,"menuOpened",void 0);v([I({reflectToAttribute:!0,value:A("kevlar_background_color_update")}),w("design:type",Boolean)],T0.prototype,"backgroundColorUpdate",void 0);
v([tl("#thumbnail"),w("design:type",F)],T0.prototype,"thumbnail",void 0);v([ql("yt-menu-overlay-changed"),w("design:type",Function),w("design:paramtypes",[CustomEvent,Boolean]),w("design:returntype",void 0)],T0.prototype,"onMenuOverlayChanged",null);T0=v([W({is:"ytd-playlist-video-renderer"})],T0);var oGa={_noAccessors:!0,properties:{scrollMargin:{type:Number,value:100}},created:function(){this.dragScrollSupport_=this.dragListGroup_=null;this.boundOnDraggerCreated_=this.onDraggerCreated_.bind(this);this.boundOnDragStart_=this.onDragStart_.bind(this);this.boundOnDrop_=this.onDrop_.bind(this);this.scrollElement_=document.documentElement;this.boundOnReorderableScroll_=this.onReorderableScroll_.bind(this)},
detached:function(){this.disposeDragDrop_()},
disposeDragDrop_:function(){this.dragListGroup_&&(Mv(this.dragListGroup_,pM,this.boundOnDragStart_),Mv(this.dragListGroup_,qM,this.boundOnDragStart_),this.dragListGroup_.dispose(),this.dragListGroup_=null);this.disposeDragScroll_();this.scrollElement_.removeEventListener("scroll",this.boundOnReorderableScroll_)},
disposeDragScroll_:function(){this.dragScrollSupport_&&(nk(this.dragScrollSupport_),this.dragScrollSupport_=null)},
startDragDrop_:function(a,b){this.disposeDragDrop_();b&&(this.scrollElement_=b);this.dragListGroup_=new oM;this.dragListGroup_.setHysteresis(2);b=this.dragListGroup_;a.dlgGrowthDirection_=0;a.dlgDragHoverClass_=void 0;a.dlgDragPermission=0;b.dragLists_.push(a);this.dragListGroup_.draggerElClasses_=hc("dragging").split(" ");Hv(this.dragListGroup_,Osa,this.boundOnDraggerCreated_);Hv(this.dragListGroup_,pM,this.boundOnDragStart_);Hv(this.dragListGroup_,qM,this.boundOnDrop_);this.dragListGroup_.init();
this.scrollElement_.addEventListener("scroll",this.boundOnReorderableScroll_,{passive:!0})},
onDraggerCreated_:function(a){var b=a.dragger;b.scrollTarget_=this.scrollElement_;a=a.draggerEl;b&&a.menuOpened&&(b.enabled_=!1)},
onDragStart_:function(a){var b=a.draggerEl;a=a.currDragItem;var c=Object.assign({},a.data);c.trackingParams=void 0;b.data=c;b.style.width=a.clientWidth+"px";b.style.zIndex=2026;b.onDrag&&b.onDrag();(a=document.querySelector("ytd-app"))&&a.appendChild(b);this.dragScrollSupport_=new uM(this.scrollElement_,this.scrollMargin);this.dragScrollSupport_.horizontalScrolling_=!1;b=this.dragScrollSupport_;b.constrainScroll_=!!b.margin_&&!0},
onDrop_:function(a){this.handleDrop(a);this.disposeDragScroll_()},
onReorderableScroll_:function(){if(this.dragListGroup_){var a=this.dragListGroup_;sM(a,a.currDragItem_)}},
handleDrop:function(){}};OY("itemSectionRenderer","playlistVideoListRenderer","ytd-playlist-video-list-renderer");
Polymer({is:"ytd-playlist-video-list-renderer",behaviors:[V.YtRendererBehavior,X,U.YtActionHandlerBehavior,r0,oGa],properties:{data:{type:Object,observer:"dataChanged_"},isReloading_:Boolean,isSegment:{type:Boolean,value:!1,reflectToAttribute:!0},isSortable_:{type:Boolean,computed:"computeIsSortable_(data.canReorder, data.contents.length)"},isEditable_:{type:Boolean,computed:"computeIsEditable_(data.isEditable)"},canReorder_:{type:Boolean,computed:"computeCanReorder_(data.canReorder)"},scrollMargin:{type:Number,
value:101}},listeners:{"yt-rendererstamper-finished":"onRendererstamperFinished_","yt-playlist-reloading":"onPlaylistReloading_"},stampDom:{"data.contents":{id:"contents",mapping:{playlistVideoRenderer:{component:"ytd-playlist-video-renderer",properties:{isEditable:"[[isEditable_]]",canReorder:"[[canReorder_]]"}}},events:!0},"data.continuations":{id:"continuations",mapping:{nextContinuationData:"yt-next-continuation"}},"data.sortFilterMenu":{id:"sort-filter-menu",mapping:{sortFilterSubMenuRenderer:{component:"yt-sort-filter-sub-menu-renderer",
params:{closeOnActivate:"true"}}}}},actionMap:{"yt-playlist-remove-videos-action":"handlePlaylistRemoveVideosAction_","yt-update-playlist-action":"handleUpdatePlaylistAction_"},nextContinuation:{continuationType:"playlistVideoListContinuation"},dataChanged_:function(){this.disposeDragDrop_()},
onRendererstamperFinished_:function(){this.isEditable_&&this.canReorder_&&this.startDragDrop_(this.$.contents,document.documentElement)},
onPlaylistReloading_:function(){this.isReloading_=!0},
computeContentsClass_:function(a){return a?"reloading":""},
computeIsSortable_:function(a,b){return a&&0<b&&!this.isSegment&&!A("desktop_playlist_sorting_killswitch")},
computeIsEditable_:function(a){return a&&A("kevlar_enable_editable_playlists")},
computeCanReorder_:function(a){return a&&A("kevlar_enable_reorderable_playlists")},
handlePlaylistRemoveVideosAction_:function(a){if(this.get("playlistRemoveVideosAction.setVideoIds",a)&&this.data&&this.data.contents){a=a.playlistRemoveVideosAction.setVideoIds;for(var b=this.data.contents.length-1;0<=b;){var c=this.data.contents[b].playlistVideoRenderer;c&&c.setVideoId&&a.includes(c.setVideoId)&&this.splice("data.contents",b,1);b--}this.sendAction("yt-close-popup-action",["ytd-menu-popup-renderer"]);this.updateIndices_()}},
updateIndices_:function(){if(this.data&&this.data.contents)for(var a=0;a<this.data.contents.length;a++)this.set("data.contents."+a+".playlistVideoRenderer.index",UU(String(a+1)))},
handleDrop:function(a){a=a.currDragItem;var b=lb(a.parentNode.childNodes,a),c=this.data.contents.splice(parseInt(XU(a.data.index),10)-1,1)[0];this.data.contents.splice(b,0,c);b=b?this.get("contents."+(b-1)+".playlistVideoRenderer.setVideoId",this.data):void 0;this.updateIndices_();a=this.buildReorderServiceEndpoint_(a.data.setVideoId,b);this.sendServiceRequestAction([a])},
buildReorderServiceEndpoint_:function(a,b){return this.data&&this.data.onReorderEndpoint?(this.set("data.onReorderEndpoint.playlistEditEndpoint.actions.0.setVideoId",a),this.set("data.onReorderEndpoint.playlistEditEndpoint.actions.0.movedSetVideoIdPredecessor",b),this.data.onReorderEndpoint):null},
handleUpdatePlaylistAction_:function(a){(a=a.updatePlaylistAction&&a.updatePlaylistAction.updatedRenderer&&a.updatePlaylistAction.updatedRenderer.playlistVideoListRenderer)&&a.contents&&(this.set("data.contents",a.contents),this.isReloading_=!1)}});var U0=function(){return F.apply(this,arguments)||this};
l(U0,F);U0.prototype.configureRendererStamper=function(){return{"data.collection":{id:"dropdown",mapping:{sortFilterSubMenuRenderer:{component:"yt-sort-filter-sub-menu-renderer"}}},"data.actionButtons":{id:"action-buttons",mapping:{buttonRenderer:"ytd-button-renderer"}}}};
U0.prototype.computeActionButtonClass=function(a){return!a.actionButtons||1>=a.actionButtons.length?"single-button":a.description?"vertical-buttons":"horizontal-buttons"};
var V0=U0;v([H(V.YtRendererBehavior),w("design:type",Object)],V0.prototype,"ytRendererBehavior",void 0);v([H(X),w("design:type",Object)],V0.prototype,"ytRendererstamperBehavior",void 0);v([I(),w("design:type",Object)],V0.prototype,"data",void 0);V0=v([W({is:"ytd-playlist-show-metadata-renderer"})],V0);OY("itemSectionRenderer","purchaseItemRenderer","ytd-purchase-item-renderer");var pGa=function(){return F.apply(this,arguments)||this};
l(pGa,F);var W0=pGa;v([H(V.YtRendererBehavior),w("design:type",Object)],W0.prototype,"ytRendererBehavior",void 0);v([H(X),w("design:type",Object)],W0.prototype,"ytRendererstamperBehavior",void 0);v([I(),w("design:type",Object)],W0.prototype,"data",void 0);W0=v([W({is:"ytd-purchase-item-renderer"})],W0);var qGa={properties:{data:Object,layoutStyle:{type:String,computed:"computeLayoutStyle_(data.layoutStyle)",reflectToAttribute:!0},role:{type:String,computed:"computeRole_(data.layoutStyle)",reflectToAttribute:!0}},created:function(){this.LAYOUT_STYLE_PREFIX_="SIMPLE_TEXT_LAYOUT_STYLE_"},
computeLayoutStyle_:function(a){if(a)return a.replace(this.LAYOUT_STYLE_PREFIX_,"").replace(/_/g,"-").toLowerCase()},
computeRole_:function(a){if("SIMPLE_TEXT_LAYOUT_STYLE_PAID_SUBSCRIPTION_TITLE"===a)return"heading"}};OY("itemSectionRenderer","simpleTextSectionRenderer","ytd-simple-text-section-renderer");var X0=function(){return F.apply(this,arguments)||this};
l(X0,F);X0.prototype.onYtNavigate=function(a){var b=this.openPopupBehavior.getNavigationEndpointPopupAction(a.detail.endpoint);b&&(a.stopPropagation(),this.openPopupBehavior.openPopup(b))};
var Y0=X0;Y0.prototype.onYtNavigate=Y0.prototype.onYtNavigate;v([H(qGa),w("design:type",Object)],Y0.prototype,"ytSimpleTextSectionBehavior",void 0);v([H(V.YtRendererBehavior),w("design:type",Object)],Y0.prototype,"ytRendererBehavior",void 0);v([H(dY),w("design:type",Object)],Y0.prototype,"openPopupBehavior",void 0);v([I(),w("design:type",Object)],Y0.prototype,"data",void 0);
v([ql("yt-navigate"),w("design:type",Function),w("design:paramtypes",[CustomEvent]),w("design:returntype",void 0)],Y0.prototype,"onYtNavigate",null);Y0=v([W({is:"ytd-simple-text-section-renderer"})],Y0);OY("itemSectionRenderer","unlimitedPageFeatureInfoRenderer","ytd-unlimited-page-feature-info-renderer");var rGa=function(){return F.apply(this,arguments)||this};
l(rGa,F);var Z0=rGa;v([H(V.YtRendererBehavior),w("design:type",Object)],Z0.prototype,"ytRendererBehavior",void 0);v([I(),w("design:type",Object)],Z0.prototype,"data",void 0);Z0=v([W({is:"ytd-unlimited-page-feature-info-renderer"})],Z0);var $0=function(){return F.apply(this,arguments)||this};
l($0,F);$0.prototype.dataChanged=function(){if(this.data){var a=this.get("background.thumbnailLandscapePortraitRenderer.portrait.thumbnails",this.data);a&&(a=LY(a,screen.width),this.style.backgroundImage="url("+a+")")}};
var a1=$0;a1.prototype.dataChanged=a1.prototype.dataChanged;v([H(V.YtRendererBehavior),w("design:type",Object)],a1.prototype,"ytRendererBehavior",void 0);v([I(),w("design:type",Object)],a1.prototype,"data",void 0);v([rl("data"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],a1.prototype,"dataChanged",null);a1=v([W({is:"ytd-post-redemption-section-renderer"})],a1);var b1=function(){return F.apply(this,arguments)||this};
l(b1,F);b1.prototype.configureRendererStamper=function(){return{"data.sections":{id:"contents",mapping:{postRedemptionSectionRenderer:{component:"ytd-post-redemption-section-renderer",noInjection:!0}}}}};
var c1=b1;v([H(V.YtRendererBehavior),w("design:type",Object)],c1.prototype,"ytRendererBehavior",void 0);v([H(X),w("design:type",Object)],c1.prototype,"ytRendererstamperBehavior",void 0);v([I(),w("design:type",Object)],c1.prototype,"data",void 0);c1=v([W({is:"ytd-ypc-post-redemption-renderer"})],c1);OY("itemSectionRenderer","redeemCodeRenderer","ytd-redeem-code-renderer");
Polymer({is:"ytd-redeem-code-renderer",behaviors:[V.YtRendererBehavior,X,U.YtActionHandlerBehavior,T.YtActionSenderBehavior],properties:{data:{type:Object,observer:"dataChanged_"},isLoading:{type:Boolean,reflectToAttribute:!0},redeemButtonDisabled:Boolean,errorMessage_:Object,postRedemptionRenderer:Object,observer_:Object},listeners:{"yt-service-request-completed":"onYtServiceRequestCompleted_","yt-service-request-error":"onYtServiceRequestError_"},actionMap:{"yt-invoke-instrument-manager-action":"onInvokeInstrumentManagerAction_"},
stampDom:{postRedemptionRenderer:{id:"success-page",mapping:{ypcPostRedemptionRenderer:"ytd-ypc-post-redemption-renderer"}}},MIN_CODE_LENGTH:12,MAX_CODE_LENGTH:24,created:function(){this.riskService_=new WEa;var a=z("YPC_MB_URL");a=REa.test(a)?$b(a):null;if(!window.payments&&a)a=VJ(a,{attributes:{"data-payments-main":"",id:"payment-lib"}});else{var b=fw();a=b.promise;b.resolve()}this.loadPaymentThenable_=a},
ready:function(){this.$.code.addEventListener("keypress",this.onCodeInputKeypress_.bind(this))},
dataChanged_:function(a){var b=this;this.redeemButtonDisabled=!0;this.observer_=new MutationObserver(function(c){c.forEach(function(d){"attributes"==d.type&&"dark"==d.attributeName&&b.updateBackground_(a)})});
this.observer_.observe(document.documentElement,{attributes:!0});this.updateBackground_(a)},
updateBackground_:function(a){document.documentElement.hasAttribute("dark")?this.style["background-image"]="none":(a=this.computeImageUrl_(a.thumbnail),this.style["background-image"]="url("+a+")")},
computeRedeemButton_:function(a){if(a=this.get("redeemButton.buttonRenderer",a))a=Polymer.Base.mixin({},a),a.serviceEndpoint=void 0;return a},
onRedeemButtonTap_:function(a){a.stopPropagation();JEa();this.redeemCode_()},
redeemCode_:function(){var a=this;this.isLoading=!0;var b=this.riskService_.init();jw(ew([b,this.loadPaymentThenable_]).then(function(){var c=a.data.redeemButton.buttonRenderer.serviceEndpoint;if(WX()){var d=window.google.gr;d.init({async:{schedule:"sync"},merchantId:"youtube"});d.start();d=d.finish();d=null!=d?d:""}else d="";var e=payments.business.integration.ClientTokenFactory.createClientToken(c.ypcRedeemCodeEndpoint.countryCode,d);d={c:a.$.code.value.trim(),rd:window.btoa(d),ctk:e};a.sendServiceRequestAction([c,
d])},function(){a.showGenericError_();
SX("YPC_ERROR_REASON_RISK_LIB_LOAD_FAILURE")}),function(){we(Error("failure in redeem code execution."))})},
onYtServiceRequestCompleted_:function(a){a.stopPropagation();this.isLoading=!1;this.errorMessage_=this.get("detail.data.errorMessage",a);this.postRedemptionRenderer=this.get("detail.data.renderer",a);if(a=this.get("detail.data.redirectEndpoint",a))this.isLoading=!0,this.fire("yt-navigate",{endpoint:a});this.errorMessage_?SX("YPC_ERROR_REASON_REDEEM_INNERTUBE_FAILURE"):(this.postRedemptionRenderer||a)&&OX("ypcRedeemFlowSucceeded")},
onYtServiceRequestError_:function(a){a.stopPropagation();this.isLoading=!1;if(a=this.get("detail.error.message",a))this.errorMessage_=UU(a);SX("YPC_ERROR_REASON_YPC_REDEEM_CODE_RPC_FAILURE")},
onInvokeInstrumentManagerAction_:function(a){var b=this,c=this.get("invokeInstrumentManagerAction.addToken",a);a=this.get("invokeInstrumentManagerAction.commonToken",a);QEa(new PEa(c,a)).then(function(){b.redeemCode_()},function(d){switch(d){case"instrumentManagerLoadError":b.showGenericError_();
SX("YPC_ERROR_REASON_INST_MANAGER_LOAD_FAILURE");break;case"instrumentManagerCallbackError":b.showGenericError_();SX("YPC_ERROR_REASON_INST_MANAGER_CALLBACK_FAILURE");break;case"instrumentManagerCancelled":OX("ypcRedeemFlowCancelled");}})},
onInput_:function(){var a=this;this.debounce("onInput_",function(){var b=a.$.code.value.trim();a.redeemButtonDisabled=b.length<a.MIN_CODE_LENGTH||b.length>a.MAX_CODE_LENGTH},200)},
onCodeInputKeypress_:function(a){13!=a.keyCode||this.redeemButtonDisabled||this.isLoading||(JEa(),this.redeemCode_())},
computeImageUrl_:function(a){return a?LY(a.thumbnails,600):null},
showGenericError_:function(){this.isLoading=!1;this.errorMessage_=this.get("errorMessage",this.data)}});var sGa={EMPTY_SEARCH:"promo-full-height"};
Polymer({is:"ytd-background-promo-renderer",behaviors:[X,U.YtActionHandlerBehavior,V.YtRendererBehavior],actionMap:{"yt-show-invite-url-action":"handleConnectionInviteShown_"},properties:{data:Object,rendererStyle:{type:String,computed:"computeRendererStyle_(data)",reflectToAttribute:!0}},stampDom:{"data.ctaButton":{id:"button",mapping:{buttonRenderer:"ytd-button-renderer"}}},computeRendererStyle_:function(a){return a.style?a.style.value.split("TYPE_")[1].replace(/_/g,"-").toLowerCase():a.icon?"":
"no-icon"},
getIconName_:function(a){a=this.get("icon.iconType",a);var b=sGa[a];b||(b="yt-icons");return[b,a].join(":")},
handleConnectionInviteShown_:function(a){if(a=this.get("showInviteUrlAction.inviteUrlRenderer.copyConnectionInviteUrlRenderer",a)){Polymer.dom(this.$.button).firstElementChild.hidden=!0;var b=Polymer.dom(this.$.dynamicContent),c=document.createElement("ytd-copy-connection-invite-url-renderer");c.data=a;b.appendChild(c)}}});OY("itemSectionRenderer","channelAboutFullMetadataRenderer","ytd-channel-about-metadata-renderer");
Polymer({is:"ytd-channel-about-metadata-renderer",behaviors:[X,V.YtRendererBehavior],properties:{data:Object,showEmail_:{type:Boolean,value:!1},hideEmailBtn_:{type:Boolean,value:!1}},GET_BUSINESS_EMAIL_CAPTCHA_PATH:"/channels_profile_ajax?action_get_business_email_captcha=1",stampDom:{"data.actionButtons":{id:"action-buttons",mapping:{buttonRenderer:"ytd-button-renderer"}}},detached:function(){this.showEmail_=this.hideEmailBtn_=!1;this.emptyEmailContainer_();this.emptyCaptchaContainer_()},
computeDetailsHidden_:function(a){return!a.country&&!a.businessEmail},
computeEmailHref_:function(a){return"mailto:"+a},
onBusinessEmailClick_:function(){var a=this;this.hideEmailBtn_=!0;this.data.bypassBusinessEmailCaptcha?this.showEmail_=!0:this.getInterface(BW).postData(this.GET_BUSINESS_EMAIL_CAPTCHA_PATH).then(function(b){"CAPTCHA"==b.str_code&&(Ym(b),a.renderCaptcha_(b.html_content))})},
renderCaptcha_:function(a){dd(this.$["captcha-container"],a);QR("https://www.google.com/recaptcha/api.js");this.initCaptchaForm_()},
initCaptchaForm_:function(){this.querySelector(".captcha-form").onsubmit=this.onCaptchaFormSubmit_.bind(this)},
onCaptchaFormSubmit_:function(a){var b=this;a.preventDefault();a=this.getInterface(BW);var c=this.querySelector(".captcha-form"),d=c.querySelector("#g-recaptcha-response");a.postData(c.action,{channel_id:this.data.channelId,"g-recaptcha-response":d.value}).then(function(e){if("EMAIL_ADDR"==e.str_code||"ERROR"==e.str_code)Ym(e),b.renderInlineContent_(e.html_content)},function(e){"CAPTCHA"==e.str_code&&b.renderCaptcha_(e.html_content)})},
renderInlineContent_:function(a){this.emptyCaptchaContainer_();dd(this.$["email-container"],a);this.$["email-container"].firstElementChild.classList.add("ytd-channel-about-metadata-renderer")},
emptyCaptchaContainer_:function(){zh(this.$["captcha-container"])},
emptyEmailContainer_:function(){zh(this.$["email-container"])}});OY("itemSectionRenderer","channelFeaturedContentRenderer","ytd-channel-featured-content-renderer");var d1=function(){return F.apply(this,arguments)||this};
l(d1,F);d1.prototype.configureRendererStamper=function(){return{"data.items":{id:"contents",mapping:{channelRenderer:"ytd-channel-renderer",playlistRenderer:"ytd-playlist-renderer",radioRenderer:"ytd-radio-renderer",showRenderer:"ytd-show-renderer",videoRenderer:"ytd-video-renderer"}}}};
var e1=d1;v([H(V.YtRendererBehavior),w("design:type",Object)],e1.prototype,"ytRendererBehavior",void 0);v([H(X),w("design:type",Object)],e1.prototype,"ytRendererstamperBehavior",void 0);v([I(),w("design:type",Object)],e1.prototype,"data",void 0);e1=v([W({is:"ytd-channel-featured-content-renderer"})],e1);OY("itemSectionRenderer","channelRenderer","ytd-channel-renderer");var f1=function(){return F.apply(this,arguments)||this};
l(f1,F);f1.prototype.configureRendererStamper=function(){return{"data.subscribeButton":{id:"subscribe-button",mapping:{buttonRenderer:"ytd-button-renderer",subscribeButtonRenderer:"ytd-subscribe-button-renderer",subscriptionNotificationToggleButtonRenderer:"ytd-subscription-notification-toggle-button-renderer"}}}};
f1.prototype.computeHideDot=function(a){return!(a&&a.subscriberCountText&&a.videoCountText)};
var g1=f1;v([H(V.YtRendererBehavior),w("design:type",Object)],g1.prototype,"ytRendererBehavior",void 0);v([H(X),w("design:type",Object)],g1.prototype,"ytRendererstamperBehavior",void 0);v([I(),w("design:type",Object)],g1.prototype,"data",void 0);g1=v([W({is:"ytd-channel-renderer"})],g1);Polymer({is:"ytd-subscription-notification-toggle-button-renderer",properties:{data:Object},behaviors:[U.YtActionHandlerBehavior,T.YtActionSenderBehavior,MY.YtRenderButtonBehavior],listeners:{"yt-service-request-completed":"onYtServiceRequestCompleted_","yt-service-request-error":"onYtServiceRequestError_"},actionMap:{"yt-menu-service-item-selected-action":"handleBellMenuOpenSelectedAction_"},observers:["stateChanged_(data)","stateChanged_(data.currentStateId)"],hostAttributes:{"button-renderer":!0},
currentStateData_:function(a){var b=a||this.data;return b&&b.states&&null!=b.currentStateId?b.states.find(function(c){return c.stateId==b.currentStateId})||null:null},
currentStateRendererData_:function(a){return(a=this.currentStateData_(a))&&a.state&&a.state.buttonRenderer?a.state.buttonRenderer:null},
stateChanged_:function(){this&&this.data&&(this._setEndpoint({}),this._setServiceEndpoint(this.computeServiceEndpoint_(this.data)),this._setButtonIcon(this.computeButtonIcon_(this.data)),this._setButtonText(null),this._setButtonAccessibility(this.computeAccessibility_(this.data)),this._setButtonClass(this.computeButtonClass_(this.data)),this.updateRenderedElements())},
computeButtonIcon_:function(a){return(a=this.currentStateRendererData_(a))&&a.icon?a.icon.iconType.toLowerCase():null},
computeAccessibility_:function(a){return(a=this.currentStateRendererData_(a))&&a.accessibilityData?a.accessibilityData.accessibilityData||null:null},
computeButtonClass_:function(a){var b=this.currentStateRendererData_(a);if(!b)return"";a="";var c=b.style;c&&(c.styleType&&(c=c.styleType),a+=c.toLowerCase().replace(/_/g,"-")+" ");if(b=b.size)b.sizeType&&(b=b.sizeType),a+=b.toLowerCase().replace(/_/g,"-")+" ";return a.trim()},
computeServiceEndpoint_:function(a){if(!a)return null;var b=a&&a.serviceEndpoint,c=this.get("command.commandMetadata.webCommandMetadata.sendPost",a);return b?b:c&&a.command?a.command:null},
computeBellMenuItemParams_:function(a){return a&&a.command&&a.command.commandExecutorCommand?(a=a.command.commandExecutorCommand.commands)&&0!=a.length&&a[0].openPopupAction&&a[0].openPopupAction.popup&&a[0].openPopupAction.popup.menuPopupRenderer&&a[0].openPopupAction.popup.menuPopupRenderer.items?a[0].openPopupAction.popup.menuPopupRenderer.items.map(function(b){return b.menuServiceItemRenderer.trackingParams}):null:null},
handleBellMenuOpenSelectedAction_:function(a){var b=a.trackingParams;this.data&&b&&this.computeBellMenuItemParams_(this.data).includes(b)&&this._setButtonIcon(a.icon.iconType.toLowerCase())},
onYtServiceRequestCompleted_:function(a,b){(a=this.get("data.newNotificationButton.subscriptionNotificationToggleButtonRenderer",b))&&this.set("data",a)},
onYtServiceRequestError_:function(){this._setButtonIcon(this.computeButtonIcon_(this.data))},
resetState:function(){this.set("data.currentStateId",3)}});Polymer({is:"ytd-subscribe-button-renderer",behaviors:[X,V.YtRendererBehavior,U.YtActionHandlerBehavior,AY.YtdReduxBehavior],properties:{data:Object,subscriptionStateEntity:{type:Object,selectorArgs:["data.subscribedEntityKey"],selector:function(a,b){return a.entities.subscriptionStateEntity[b]||null}},
subscribed:{type:Boolean,computed:"computeSubscribed_(data.subscribed, subscriptionStateEntity)"},buttonAccessibility:{type:String,readOnly:!0,computed:"computeAccessibility_(data, subscribed)"},branded:{type:Boolean,reflectToAttribute:!0},buttonRaised:Boolean,buttonStyle:{type:String,reflectToAttribute:!0,computed:"computeButtonStyle_(data)"}},observers:["observedSubscribed_(subscribed)"],listeners:{"yt-service-request-sent":"onYtServiceRequestSent_","yt-service-request-completed":"onYtServiceRequestCompleted_"},
actionMap:{"yt-player-subscribe":"onPlayerSubscribe_","yt-player-unsubscribe":"onPlayerUnsubscribe_","yt-update-subscribe-button-action":"handleUpdateSubscribeButtonAction_"},stampDom:{"data.notificationPreferenceToggleButton":{id:"notification-preference-toggle-button",mapping:{buttonRenderer:"ytd-button-renderer",toggleButtonRenderer:"ytd-toggle-button-renderer"}},"data.notificationPreferenceButton":{id:"notification-preference-button",mapping:{subscriptionNotificationToggleButtonRenderer:"ytd-subscription-notification-toggle-button-renderer"}}},
computeDisplayText_:function(a,b){if(this.data)return a?b.subscribedButtonText:b.unsubscribedButtonText},
onSubscribeButtonTap_:function(a){if(A("kevlar_subscribe_endpoints_killswitch"))this.data.serviceEndpoints&&this.sendServiceRequestAction([this.subscribed?this.data.serviceEndpoints[1]:this.data.serviceEndpoints[0]]);else{var b;this.subscribed?this.data.serviceEndpoints?b=this.data.serviceEndpoints[1]:this.data.onUnsubscribeEndpoints&&(b=this.data.onUnsubscribeEndpoints[0]):this.data.serviceEndpoints?b=this.data.serviceEndpoints[0]:this.data.onSubscribeEndpoints&&(b=this.data.onSubscribeEndpoints[0]);
b&&this.sendServiceRequestAction([b])}a.preventDefault()},
onYtServiceRequestSent_:function(a,b){(this.get("endpoint.subscribeEndpoint",b)||this.get("endpoint.unsubscribeEndpoint",b))&&this.updateSubscriptionState_(!this.subscribed)},
onYtServiceRequestCompleted_:function(a,b){a=this.get("newNotificationButton.subscriptionNotificationToggleButtonRenderer",b.data);b=this.$$("ytd-subscription-notification-toggle-button-renderer");a&&b&&b.set("data",a)},
observedSubscribed_:function(){this.updateStyles()},
computeAccessibility_:function(a,b){return b?this.get("unsubscribeAccessibility.accessibilityData.label",a):this.get("subscribeAccessibility.accessibilityData.label",a)},
onPlayerSubscribe_:function(a){this.isCompactRed_()||a!=this.data.channelId||this.updateSubscriptionState_(!0)},
onPlayerUnsubscribe_:function(a){this.isCompactRed_()||a!=this.data.channelId||this.updateSubscriptionState_(!1)},
handleUpdateSubscribeButtonAction_:function(a){(a=a.updateSubscribeButtonAction)&&a.channelId==this.data.channelId&&this.updateSubscriptionState_(!!a.subscribed)},
computeButtonStyle_:function(a){return this.get("style.styleType",a)||null},
isCompactRed_:function(){return"COMPACT_RED"==this.computeButtonStyle_(this.data)},
computeSubscribed_:function(){return this.subscriptionStateEntity?!!this.subscriptionStateEntity.subscribed:!(!this.data||!this.data.subscribed)},
updateSubscriptionState_:function(a){if(a!==this.subscribed){this.set("data.subscribed",a);var b=this.data.subscribedEntityKey;b&&this.store.dispatch(kFa({type:"REPLACE_ENTITY",payload:{entityPayload:{key:b,subscribed:a},entityType:"subscriptionStateEntity",key:b}}));this.isCompactRed_()||this.fire("yt-subscription-changed",a);a||(this.sendAction("yt-unsubscribe-action"),this.resetNotificationBellState())}},
resetNotificationBellState:function(){var a=this.$$("ytd-subscription-notification-toggle-button-renderer");this.get("notificationPreferenceButton.subscriptionNotificationToggleButtonRenderer",this.data)&&a&&a.resetState()}});OY("itemSectionRenderer","radioRenderer","ytd-radio-renderer");var h1=function(){var a=F.apply(this,arguments)||this;a.displayItemCount=2;return a};
l(h1,F);h1.prototype.computeFirstVideos=function(a,b){return a&&b?a.slice(0,b):[]};
var i1=h1;v([H(V.YtRendererBehavior),w("design:type",Object)],i1.prototype,"ytRendererBehavior",void 0);v([H(rY),w("design:type",Object)],i1.prototype,"ytdLockupBehavior",void 0);v([I(),w("design:type",Object)],i1.prototype,"data",void 0);v([I(),w("design:type",Object)],i1.prototype,"displayItemCount",void 0);i1=v([W({is:"ytd-radio-renderer"})],i1);OY("itemSectionRenderer","showRenderer","ytd-show-renderer");var j1=function(){return F.apply(this,arguments)||this};
l(j1,F);j1.prototype.configureRendererStamper=function(){return{"data.menu":{id:"menu",mapping:{menuRenderer:"ytd-menu-renderer"}}}};
var k1=j1;v([H(V.YtRendererBehavior),w("design:type",Object)],k1.prototype,"ytRendererBehavior",void 0);v([H(X),w("design:type",Object)],k1.prototype,"ytRendererstamperBehavior",void 0);v([I(),w("design:type",Object)],k1.prototype,"data",void 0);k1=v([W({is:"ytd-show-renderer"})],k1);OY("itemSectionRenderer","clarificationRenderer","ytd-clarification-renderer");var l1=function(){return F.apply(this,arguments)||this};
l(l1,F);l1.prototype.configureRendererStamper=function(){return{"data.menu":{id:"menu",mapping:{menuRenderer:"ytd-menu-renderer"}}}};
l1.prototype.dataChanged=function(a){this.imageWidth=this.imageHeight=24;"CLARIFICATION_RENDERER_STYLE_MEDIUM"===a.style?this.imageWidth=this.imageHeight=80:!a.style&&a.image&&a.image.thumbnails.length&&(a=a.image.thumbnails[0],this.imageWidth=a.width||0,this.imageHeight=a.height||0)};
l1.prototype.computeClarifyStyle=function(a){return a?a.replace("CLARIFICATION_RENDERER_STYLE_","").toLowerCase():""};
l1.prototype.isLargeStyle=function(a){return"CLARIFICATION_RENDERER_STYLE_LARGE"===a};
var m1=l1;v([H(V.YtRendererBehavior),w("design:type",Object)],m1.prototype,"ytRendererBehavior",void 0);v([H(X),w("design:type",Object)],m1.prototype,"ytRendererstamperBehavior",void 0);v([I({observer:"dataChanged"}),w("design:type",Object)],m1.prototype,"data",void 0);v([I(),w("design:type",Number)],m1.prototype,"imageWidth",void 0);v([I(),w("design:type",Number)],m1.prototype,"imageHeight",void 0);v([I({computed:"computeIcon_(data.icon)"}),w("design:type",String)],m1.prototype,"icon",void 0);
v([I({reflectToAttribute:!0,computed:"computeClarifyStyle(data.style)"}),w("design:type",String)],m1.prototype,"clarifyStyle",void 0);v([I({reflectToAttribute:!0,value:A("kevlar_background_color_update")}),w("design:type",Boolean)],m1.prototype,"backgroundColorUpdate",void 0);m1=v([W({is:"ytd-clarification-renderer"})],m1);OY("multiPageMenuSectionItems","compactLinkRenderer","ytd-compact-link-renderer");
Polymer({is:"ytd-compact-link-renderer",behaviors:[V.YtRendererBehavior,T.YtActionSenderBehavior],listeners:{tap:"onTap_"},properties:{data:Object,componentStyle:{type:String,reflectToAttribute:!0},active:{type:Boolean,reflectToAttribute:!0,computed:"isActiveEndpoint_(data.navigationEndpoint)"},compactLinkStyle:{type:String,reflectToAttribute:!0,computed:"computeCompactLinkStyle_(data.style)"},icon_:{type:String,computed:"computeIcon_(data.icon)"},secondaryIcon_:{type:String,computed:"computeIcon_(data.secondaryIcon)"},
hasSecondary_:{type:Boolean,computed:"computeHasSecondary_(data)",reflectToAttribute:!0}},computeHasPrimaryIcon_:function(a){return!(!a.icon&&!a.thumbnail)},
computeHasSecondary_:function(a){return!(!a.secondaryIcon&&!a.secondaryNotificationText)},
computeCompactLinkStyle_:function(a){return a?a.toLowerCase().replace(/_/g,"-"):""},
isActiveEndpoint_:function(a){return(a=this.get("commandMetadata.webCommandMetadata.url",a))?mi(ni(5,window.location.href))===a:!1},
onTap_:function(){this.data.serviceEndpoint&&this.sendServiceRequestAction([this.data.serviceEndpoint])}});var tGa=function(){return F.apply(this,arguments)||this};
l(tGa,F);var n1=tGa;v([H(V.YtRendererBehavior),w("design:type",Object)],n1.prototype,"ytRendererBehavior",void 0);v([I(),w("design:type",Object)],n1.prototype,"data",void 0);n1=v([W({is:"ytd-crisis-health-renderer"})],n1);OY("itemSectionRenderer","emergencyOneboxRenderer","ytd-emergency-onebox-renderer");var uGa=function(){return F.apply(this,arguments)||this};
l(uGa,F);var o1=uGa;v([H(V.YtRendererBehavior),w("design:type",Object)],o1.prototype,"ytRendererBehavior",void 0);v([I(),w("design:type",Object)],o1.prototype,"data",void 0);v([I({reflectToAttribute:!0,value:A("kevlar_background_color_update")}),w("design:type",Boolean)],o1.prototype,"backgroundColorUpdate",void 0);o1=v([W({is:"ytd-emergency-onebox-renderer"})],o1);var p1=function(){return F.apply(this,arguments)||this};
l(p1,F);p1.prototype.computeIcon=function(a){return a?"yt-icons:"+a.toLowerCase():null};
var q1=p1;v([H(V.YtRendererBehavior),w("design:type",Object)],q1.prototype,"ytRendererBehavior",void 0);v([I(),w("design:type",Object)],q1.prototype,"data",void 0);q1=v([W({is:"ytd-single-action-emergency-support-renderer"})],q1);OY("itemSectionRenderer","exploratoryResultsRenderer","ytd-exploratory-results-renderer");var r1=function(){return F.apply(this,arguments)||this};
l(r1,F);r1.prototype.configureRendererStamper=function(){return{"data.contents":{id:"contents",mapping:{channelRenderer:"ytd-channel-renderer",playlistRenderer:"ytd-playlist-renderer",showRenderer:"ytd-show-renderer",videoRenderer:"ytd-video-renderer"}}}};
var s1=r1;v([H(V.YtRendererBehavior),w("design:type",Object)],s1.prototype,"ytRendererBehavior",void 0);v([H(X),w("design:type",Object)],s1.prototype,"ytRendererstamperBehavior",void 0);v([I(),w("design:type",Object)],s1.prototype,"data",void 0);s1=v([W({is:"ytd-exploratory-results-renderer"})],s1);OY("itemSectionRenderer","feedEntryRenderer","ytd-feed-entry-renderer");var t1=function(){return F.apply(this,arguments)||this};
l(t1,F);t1.prototype.configureRendererStamper=function(){return{"data.item":{id:"contents",mapping:{channelRenderer:"ytd-channel-renderer",playlistRenderer:"ytd-playlist-renderer",radioRenderer:"ytd-radio-renderer",showRenderer:"ytd-show-renderer",videoRenderer:"ytd-video-renderer"}}}};
var u1=t1;v([H(V.YtRendererBehavior),w("design:type",Object)],u1.prototype,"ytRendererBehavior",void 0);v([H(X),w("design:type",Object)],u1.prototype,"ytRendererstamperBehavior",void 0);v([I(),w("design:type",Object)],u1.prototype,"data",void 0);u1=v([W({is:"ytd-feed-entry-renderer"})],u1);OY("itemSectionRenderer","feedbackElicitationSingleQuestionRenderer","ytd-feedback-elicitation-single-question-renderer");var v1=function(){var a=F.apply(this,arguments)||this;a.messageData=null;return a};
l(v1,F);f=v1.prototype;f.onServiceRequestCompleted=function(a,b){a=b.actions||[];b=0;for(var c=a.length;b<c;b++){var d=a[b];d.replaceEnclosingAction&&d.replaceEnclosingAction.item&&d.replaceEnclosingAction.item.messageRenderer&&(this.messageData=d.replaceEnclosingAction.item.messageRenderer)}};
f.dataChanged=function(){var a=this.data;this.hidden=!1;this.toggleClass("is-channel",a&&!a.avatarIs169);this.submitButton.disabled=!0;this.selectedResponseIndex=void 0};
f.computeThumbnailWidth=function(a){return a?126:56};
f.onSelectedResponseIndexChange=function(){void 0!==this.selectedResponseIndex&&(this.submitButton.disabled=!1)};
f.onSubmitTap=function(){var a=this.data,b=this.selectedResponseIndex;void 0!==a&&void 0!==b&&this.ytActionSenderBehavior.sendServiceRequestAction([a.responses[b].responseData])};
f.onDismissTap=function(){this.hidden=!0;var a=this.data;void 0!==a&&this.ytActionSenderBehavior.sendServiceRequestAction([a.dismissalEndpoint])};
var w1=v1;w1.prototype.onServiceRequestCompleted=w1.prototype.onServiceRequestCompleted;v([H(T.YtActionSenderBehavior),w("design:type",Object)],w1.prototype,"ytActionSenderBehavior",void 0);v([H(V.YtRendererBehavior),w("design:type",Object)],w1.prototype,"ytRendererBehavior",void 0);v([I({observer:"dataChanged"}),w("design:type",Object)],w1.prototype,"data",void 0);v([I(),w("design:type",Object)],w1.prototype,"messageData",void 0);
v([I({observer:"onSelectedResponseIndexChange"}),w("design:type",Number)],w1.prototype,"selectedResponseIndex",void 0);v([tl("#submit-button"),w("design:type",HTMLButtonElement)],w1.prototype,"submitButton",void 0);v([ql("yt-service-request-completed"),w("design:type",Function),w("design:paramtypes",[CustomEvent,bY]),w("design:returntype",void 0)],w1.prototype,"onServiceRequestCompleted",null);w1=v([W({is:"ytd-feedback-elicitation-single-question-renderer"})],w1);OY("itemSectionRenderer","messageRenderer","ytd-message-renderer");OY("multiPageMenuSectionItems","messageRenderer","ytd-message-renderer");
Polymer({is:"ytd-message-renderer",behaviors:[X,V.YtRendererBehavior],properties:{data:Object,shelf:{type:Boolean,reflectToAttribute:!0},componentStyle_:{type:Boolean,reflectToAttribute:!0,computed:"computeMessageStyle_(data.style.value)"}},stampDom:{"data.button":{id:"message-button",mapping:{buttonRenderer:"ytd-button-renderer"}},"data.icon":{id:"icon",mapping:{iconType:{component:"yt-icon",properties:{icon:"[[data.icon.iconType]]"}}}}},computeMessageStyle_:function(a){return a}});var vGa=function(){return F.apply(this,arguments)||this};
l(vGa,F);var x1=vGa;v([I(),w("design:type",Object)],x1.prototype,"data",void 0);v([H(iY.ComponentBehavior),w("design:type",Object)],x1.prototype,"componentBehavior",void 0);x1=v([W({is:"ytd-game-details-renderer"})],x1);var y1=function(){return F.apply(this,arguments)||this};
l(y1,F);y1.prototype.configureRendererStamper=function(){return{"data.game":{id:"game",mapping:{gameDetailsRenderer:"ytd-game-details-renderer"}},"data.subscribeButton":{id:"subscribe-button",mapping:{buttonRenderer:"ytd-button-renderer",subscribeButtonRenderer:"ytd-subscribe-button-renderer"}}}};
var z1=y1;v([H(V.YtRendererBehavior),w("design:type",Object)],z1.prototype,"ytRendererBehavior",void 0);v([H(X),w("design:type",Object)],z1.prototype,"ytRendererstamperBehavior",void 0);v([I(),w("design:type",Object)],z1.prototype,"data",void 0);z1=v([W({is:"ytd-game-card-renderer"})],z1);var A1=function(){return F.apply(this,arguments)||this};
l(A1,F);A1.prototype.configureRendererStamper=function(){return{"data.subscribeButton":{id:"subscribe",mapping:{buttonRenderer:"ytd-button-renderer",subscribeButtonRenderer:"ytd-subscribe-button-renderer",subscriptionNotificationToggleButtonRenderer:"ytd-subscription-notification-toggle-button-renderer"}}}};
var B1=A1;v([H(V.YtRendererBehavior),w("design:type",Object)],B1.prototype,"ytRendererBehavior",void 0);v([H(X),w("design:type",Object)],B1.prototype,"ytRendererstamperBehavior",void 0);v([I(),w("design:type",Object)],B1.prototype,"data",void 0);B1=v([W({is:"ytd-grid-channel-renderer"})],B1);var wGa=function(){return F.apply(this,arguments)||this};
l(wGa,F);var C1=wGa;v([H(V.YtRendererBehavior),w("design:type",Object)],C1.prototype,"ytRendererBehavior",void 0);v([I(),w("design:type",Object)],C1.prototype,"data",void 0);C1=v([W({is:"ytd-grid-movie-playlist-renderer"})],C1);var xGa=function(){return F.apply(this,arguments)||this};
l(xGa,F);var D1=xGa;v([H(V.YtRendererBehavior),w("design:type",Object)],D1.prototype,"ytRendererBehavior",void 0);v([H(rY),w("design:type",Object)],D1.prototype,"ytdLockupBehavior",void 0);v([I(),w("design:type",Object)],D1.prototype,"data",void 0);D1=v([W({is:"ytd-grid-playlist-renderer"})],D1);var E1=function(){return F.apply(this,arguments)||this};
l(E1,F);E1.prototype.configureRendererStamper=function(){return{"data.menu":{id:"menu",mapping:{menuRenderer:{component:"ytd-menu-renderer",params:{noInkOnDropdownButton:!0}}},initialRenderPriority:A("defer_menus")?0:void 0,waitForSignal:"eocs"},dismissedRenderer:{id:"dismissed-content",mapping:{notificationMultiActionRenderer:{component:"ytd-notification-multi-action-renderer",registration:["defer-on-home"]},notificationTextRenderer:{component:"ytd-notification-text-renderer",registration:["defer-on-home"]}}}}};
var F1=E1;v([H(V.YtRendererBehavior),w("design:type",Object)],F1.prototype,"ytRendererBehavior",void 0);v([H(eY),w("design:type",Object)],F1.prototype,"ytdDismissableItemBehavior",void 0);v([H(rY),w("design:type",Object)],F1.prototype,"ytdLockupBehavior",void 0);v([H(X),w("design:type",Object)],F1.prototype,"ytRendererstamperBehavior",void 0);v([I(),w("design:type",Object)],F1.prototype,"data",void 0);F1=v([W({is:"ytd-grid-radio-renderer"})],F1);var G1=function(){return F.apply(this,arguments)||this};
l(G1,F);G1.prototype.configureRendererStamper=function(){return{"data.offerButton":{id:"offer-button",mapping:{buttonRenderer:{component:"ytd-button-renderer",params:{alignByText:!0}}}}}};
var H1=G1;v([H(V.YtRendererBehavior),w("design:type",Object)],H1.prototype,"ytRendererBehavior",void 0);v([H(X),w("design:type",Object)],H1.prototype,"ytRendererstamperBehavior",void 0);v([H(rY),w("design:type",Object)],H1.prototype,"ytdLockupBehavior",void 0);v([I(),w("design:type",Object)],H1.prototype,"data",void 0);H1=v([W({is:"ytd-grid-show-renderer"})],H1);var I1=function(){return F.apply(this,arguments)||this};
l(I1,F);
I1.prototype.configureRendererStamper=function(){return{"data.menu":{id:"menu",mapping:{menuRenderer:{component:"ytd-menu-renderer",params:{noInkOnDropdownButton:!0}}},initialRenderPriority:A("defer_menus")?0:void 0,waitForSignal:"eocs"},"data.buttons":{id:"buttons",mapping:{toggleButtonRenderer:"ytd-toggle-button-renderer"}},dismissedRenderer:{id:"dismissed-content",mapping:{notificationMultiActionRenderer:{component:"ytd-notification-multi-action-renderer",registration:["defer-on-home"]},notificationTextRenderer:{component:"ytd-notification-text-renderer",
registration:["defer-on-home"]}}}}};
I1.prototype.getMetadata=function(a){var b=[];if(a.metadataText&&0<Object.keys(a.metadataText).length){var c=this.ytRendererBehavior.getSimpleString(a.metadataText);a.upcomingEventData&&a.upcomingEventData.upcomingEventText&&(c=sS(c,Number(a.upcomingEventData.startTime)));b.push(c)}else a.shortViewCountText&&b.push(this.ytRendererBehavior.getSimpleString(a.shortViewCountText)),a.publishedTimeText&&b.push(this.ytRendererBehavior.getSimpleString(a.publishedTimeText)),a.upcomingEventData&&a.upcomingEventData.upcomingEventText&&(
c=this.ytRendererBehavior.getSimpleString(a.upcomingEventData.upcomingEventText),b.push(sS(c,Number(a.upcomingEventData.startTime))));return b};
I1.prototype.calculateBylineText=function(a){return a.shortBylineText?a.shortBylineText:a.bylineText?a.bylineText:null};
I1.prototype.onDetailsTap=function(a){var b=this.data&&this.data.navigationEndpoint;b&&!GZ(Polymer.dom(a).path||[],this,["A".toString(),"BUTTON".toString()])&&this.fire("yt-navigate",{endpoint:b})};
var J1=I1;v([H(V.YtRendererBehavior),w("design:type",Object)],J1.prototype,"ytRendererBehavior",void 0);v([H(X),w("design:type",Object)],J1.prototype,"ytRendererstamperBehavior",void 0);v([H(eY),w("design:type",Object)],J1.prototype,"ytdDismissableItemBehavior",void 0);v([H(rY),w("design:type",Object)],J1.prototype,"ytdLockupBehavior",void 0);v([H(sY),w("design:type",Object)],J1.prototype,"ytdMouseDownPrefetchableBehavior",void 0);v([I(),w("design:type",Object)],J1.prototype,"data",void 0);
v([I(),w("design:type",Boolean)],J1.prototype,"noEndpoints",void 0);v([I({computed:"calculateBylineText(data)"}),w("design:type",Object)],J1.prototype,"bylineText",void 0);J1=v([W({is:"ytd-grid-video-renderer"})],J1);var K1=function(){return F.apply(this,arguments)||this};
l(K1,F);K1.prototype.configureRendererStamper=function(){return{"data.offerButton":{id:"offer-button",mapping:{buttonRenderer:{component:"ytd-button-renderer",params:{alignByText:!0}}}}}};
var L1=K1;v([H(V.YtRendererBehavior),w("design:type",Object)],L1.prototype,"ytRendererBehavior",void 0);v([H(X),w("design:type",Object)],L1.prototype,"ytRendererstamperBehavior",void 0);v([H(rY),w("design:type",Object)],L1.prototype,"ytdLockupBehavior",void 0);v([I(),w("design:type",Object)],L1.prototype,"data",void 0);L1=v([W({is:"ytd-grid-movie-renderer"})],L1);var M1=function(){return F.apply(this,arguments)||this};
l(M1,F);ea.Object.defineProperties(M1.prototype,{themeable:{configurable:!0,enumerable:!0,get:function(){return A("desktop_themeable_vulcan")}}});
var N1=M1;v([H(V.YtRendererBehavior),w("design:type",Object)],N1.prototype,"rendererBehaviors",void 0);v([I(),w("design:type",Object)],N1.prototype,"data",void 0);v([I({reflectToAttribute:!0}),w("design:type",Boolean),w("design:paramtypes",[])],N1.prototype,"themeable",null);N1=v([W({is:"ytd-details-bar-renderer"})],N1);Polymer({is:"yt-video-as-thumbnail-details",properties:{data:{type:Object,observer:"dataChanged_"},animatePlaceholderOnEntrance:{type:Boolean,reflectToAttribute:!0},autoplay:{type:Boolean,reflectToAttribute:!0},videoThumbnail_:{type:Object,computed:"getVideoThumbnail_(data.videoThumbnails)"},loop:Boolean,isVideoPlaying_:Boolean},attached:function(){this.isVideoPlaying_=!1;this.$.video.classList.add("hideit");this.$.placeholder.classList.remove("hideit");this.listen(this.$.video,"ended","onEnded_");
this.listen(this.$.mp4,"error","onError_")},
detached:function(){this.unlisten(this.$.video,"ended","onEnded_");this.unlisten(this.$.mp4,"error","onError_")},
play:function(){if(this.$.mp4.getAttribute("src")&&this.isMp4Supported_()){this.$.video.currentTime=0;this.$.video.load();var a=this.$.video.play();a?a.then(this.handleVideoStartPlaying_.bind(this)).catch(function(){this.fire("yt-video-thumbnail-not-playing")}.bind(this)):this.handleVideoStartPlaying_()}else this.fire("yt-video-thumbnail-not-playing")},
handleVideoStartPlaying_:function(){this.$.video.classList.remove("hideit");this.$.placeholder.classList.add("hideit");this.isVideoPlaying_=!0},
stop:function(){this.isVideoPlaying_&&(this.showPlaceholder_(),this.isVideoPlaying_=!1,this.$.video.pause(),this.$.video.currentTime=0)},
dataChanged_:function(a){a.thumbnailPlaceholder&&(a=LY(a.thumbnailPlaceholder.thumbnails,this.width),this.$.placeholder.style["background-image"]="url("+a+")");this.stop();this.autoplay&&this.play()},
showPlaceholder_:function(){this.$.video.classList.add("hideit");this.$.placeholder.classList.remove("hideit")},
onEnded_:function(){this.stop();this.fire("yt-video-thumbnail-ended");this.loop&&this.play()},
onError_:function(){this.fire("yt-video-thumbnail-error")},
isMp4Supported_:function(){return!(!this.$.video.canPlayType||!this.$.video.canPlayType("video/mp4").replace(/no/,""))},
getVideoThumbnail_:function(a){if(a&&a.length)return a[0]}});Polymer({is:"ytd-poster-details-renderer",behaviors:[V.YtRendererBehavior,X],properties:{data:{type:Object,observer:"dataChanged_"},videoData:Object,themeable_:{type:Boolean,value:function(){return A("desktop_themeable_vulcan")},
reflectToAttribute:!0}},dataChanged_:function(a){a=LY(a.foregroundThumbnailDetails.thumbnails,485);this.$.overlay.style["background-image"]="url('"+a+"')"},
updateHoveringState:function(a){var b=this.$$("#video"),c=Polymer.dom(this.$["video-container"]);if(a&&!b){if(a=document.createElement("yt-video-as-thumbnail-details"),a.setAttribute("id","video"),a.autoplay=!0,a.loop=!0,a.data=this.data.videoThumbnail,c.appendChild(a),c=a.$.placeholder)c.style.height="275px",c.style.top="-2px"}else!a&&b&&c.removeChild(b)}});Polymer({is:"ytd-poster-renderer",behaviors:[V.YtRendererBehavior],observers:["updatePosterDetails_(isHovering, isPrevHovering)"],properties:{data:Object,state:{type:String,value:"steady-state",reflectToAttribute:!0},isHovering:{type:Boolean,value:!1,reflectToAttribute:!0},isPrevHovering:{type:Boolean,value:!1,reflectToAttribute:!0},themeable_:{type:Boolean,value:function(){return A("desktop_themeable_vulcan")},
reflectToAttribute:!0}},created:function(){this.MOUSE_ENTER_DELAY_MS_=500;this.mouseEnterDelay_=0},
ready:function(){var a=this.$.view;a.addEventListener("mouseenter",this.onMouseEnter_.bind(this));a.addEventListener("mouseleave",this.onMouseLeave_.bind(this))},
onMouseEnter_:function(){var a=this;this.mouseEnterDelay_=setTimeout(function(){a.isPosterDetailsAvailable_()&&a.fire("poster-renderer-hover")},this.MOUSE_ENTER_DELAY_MS_)},
onMouseLeave_:function(a){this.mouseEnterDelay_&&clearTimeout(this.mouseEnterDelay_);this.isPosterDetailsAvailable_()&&this.fire("poster-renderer-leave",{mouseEvent:a})},
isPosterDetailsAvailable_:function(){return!!(this.data&&this.data.posterDetails&&this.data.posterDetails.posterDetailsRenderer)},
updateTransform:function(a){null==a?(this.style.transform="",this.$.view.style.transform=""):(this.style.transform=CEa(new IX(a.translateX,a.translateY,1,1)),this.$.view.style.transform=this.isHovering?CEa(new IX(-137.5,0,a.scaleX/AEa,a.scaleY)):"")},
isPosterDetailHidden_:function(a,b){return!a&&!b},
updatePosterDetails_:function(a,b){this.$.hover.updateHoveringState(a||b)}});Polymer({is:"yt-music-pass-small-feature-info-renderer",behaviors:[V.YtRendererBehavior],attached:function(){this.parentNode.style.justifyContent="center"},
properties:{data:Object}});OY("itemSectionRenderer","gridRenderer","ytd-grid-renderer");
Polymer({is:"ytd-grid-renderer",behaviors:[Polymer.IronResizableBehavior,V.YtRendererBehavior,X,FY,r0,XX.YtdPosterHoverAnimationBehavior,lY.YtdGuideStateAwareBehavior],properties:{data:Object,collapsed_:Boolean,initialCount:Number,reorderedItems_:Array,showMoreButton_:{type:Object,computed:"computeShowMoreButton_(data.showMoreText)"}},itemsPath:"reorderedItems_",listeners:{"iron-resize":"onIronResize_"},observers:["initCollapsed_(data.isCollapsible)","fillRestIfNotCollapsible_(canShowMore)","persistentGuideChanged_(guidePersistentAndVisible)",
"shownItemsChanged_(data.items.*, initialCount)"],stampDom:{shownItems:{id:"items",mapping:{gridChannelRenderer:"ytd-grid-channel-renderer",gridMoviePlaylistRenderer:"ytd-grid-movie-playlist-renderer",gridMovieRenderer:"ytd-grid-movie-renderer",gridPlaylistRenderer:"ytd-grid-playlist-renderer",gridShowRenderer:"ytd-grid-show-renderer",gridVideoRenderer:"ytd-grid-video-renderer",gridRadioRenderer:"ytd-grid-radio-renderer",musicPassSmallFeatureInfoRenderer:{component:"yt-music-pass-small-feature-info-renderer",
registration:["defer-on-home"]},posterRenderer:"ytd-poster-renderer",gameCardRenderer:"ytd-game-card-renderer",verticalProductCardrenderer:{component:"ytd-vertical-product-card-renderer",registration:["defer-on-home"],noInjection:!0}}},"data.continuations":{id:"continuations",mapping:{nextContinuationData:"yt-next-continuation"}}},shownItemsChanged_:function(a){this.data&&this.data.items&&("data.items"==a.path?this.reorderedItems_=A("recommended_video_reordering")?this.reorderingExperiment_(this.data.items):
this.data.items:a.value.indexSplices&&(a=this.data.items.splice(a.value.indexSplices[0].index),this.push.apply(this,["reorderedItems_"].concat(ka(a)))))},
ready:function(){this.$.items.addEventListener("mouseleave",this.onMouseLeavePosterHoverSection_.bind(this))},
nextContinuation:{continuationType:"gridContinuation",contentsArray:"data.items",responseContentsKey:"items"},persistentGuideChanged_:function(){this.maybeUpdateInitialItemsDisplayed_()},
onIronResize_:function(){this.debounce("updateGridInitItems",this.maybeUpdateInitialItemsDisplayed_.bind(this))},
maybeUpdateInitialItemsDisplayed_:function(){if(this.collapsed_){var a=this.getVisibleWidth_();0!=a&&(a=Math.floor(a/214)*(this.data.visibleRowCount||2),a!=this.initialCount&&(this.initialCount=a,this.data&&this.data.items&&(A("recommended_video_reordering")?this.setInitialItemsOnDataChanged_(this.reorderedItems_):this.setInitialItemsOnDataChanged_(this.data.items))))}},
reorderingExperiment_:function(a){var b=this,c=this.getInterface(vV);if(c&&(c=c.getCurrentPage(),!(!c||c&&"home"!=c.pageSubtype||10!=this.initialCount&&12!=this.initialCount||10>a.length))){var d=nba(12==this.initialCount&&12<=a.length?"twelve_video_reordering":"ten_video_reordering");return a.map(function(e,g){return g<b.initialCount?a[d[g]]:e})}return a},
getVisibleWidth_:function(){return this.offsetWidth},
computeExpandVisible_:function(a,b,c,d){return a&&b&&c&&!!d&&!!d.showMoreText},
computeShowMoreButton_:function(a){return{text:a,style:"STYLE_TEXT",size:"SIZE_DEFAULT"}},
onExpandTap_:function(){this.collapsed_=!1;this.canShowMore&&this.fillRemainingListItems()},
initCollapsed_:function(a){(this.collapsed_=a)&&this.maybeUpdateInitialItemsDisplayed_()},
fillRestIfNotCollapsible_:function(a){this.data&&this.data.isCollapsible||!a||this.fillRemainingListItems()},
computeViewAllHidden_:function(a,b){return a||!b.viewAllEndpoint}});var O1=function(){return F.apply(this,arguments)||this};
l(O1,F);O1.prototype.computeThumbnailWidth=function(a){return a?602:428};
var P1=O1;v([H(V.YtRendererBehavior),w("design:type",Object)],P1.prototype,"ytRendererBehavior",void 0);v([I(),w("design:type",Object)],P1.prototype,"data",void 0);v([I(),w("design:type",Boolean)],P1.prototype,"wide",void 0);P1=v([W({is:"ytd-newspaper-hero-video-renderer"})],P1);var yGa=function(){return F.apply(this,arguments)||this};
l(yGa,F);var Q1=yGa;v([H(V.YtRendererBehavior),w("design:type",Object)],Q1.prototype,"rendererBehavior",void 0);v([I(),w("design:type",Object)],Q1.prototype,"data",void 0);Q1=v([W({is:"ytd-newspaper-mini-video-renderer"})],Q1);OY("itemSectionRenderer","newspaperRenderer","ytd-newspaper-renderer");var R1=function(){return F.apply(this,arguments)||this};
l(R1,F);R1.prototype.configureRendererStamper=function(){return{"data.primaryContents":{id:"primary-contents",mapping:{newspaperHeroVideoRenderer:"ytd-newspaper-hero-video-renderer"}},"data.secondaryContents":{id:"secondary-contents",mapping:{newspaperMiniVideoRenderer:"ytd-newspaper-mini-video-renderer"}}}};
var S1=R1;v([H(X),w("design:type",Object)],S1.prototype,"ytRendererstamperBehavior",void 0);v([H(V.YtRendererBehavior),w("design:type",Object)],S1.prototype,"ytRendererBehavior",void 0);v([I(),w("design:type",Object)],S1.prototype,"data",void 0);S1=v([W({is:"ytd-newspaper-renderer"})],S1);OY("itemSectionRenderer","searchHistoryQueryRenderer","ytd-search-history-query-renderer");var T1=function(){return F.apply(this,arguments)||this};
l(T1,F);T1.prototype.configureRendererStamper=function(){return{"data.menu":{id:"menu",mapping:{menuRenderer:"ytd-menu-renderer"}},dismissedRenderer:{id:"dismissed",mapping:{notificationTextRenderer:"ytd-notification-text-renderer"}}}};
T1.prototype.dataChanged=function(){this.isHistory=-1!==window.location.pathname.indexOf("/feed/history")};
var U1=T1;v([H(V.YtRendererBehavior),w("design:type",Object)],U1.prototype,"ytRendererBehavior",void 0);v([H(X),w("design:type",Object)],U1.prototype,"ytRendererstamperBehavior",void 0);v([H(eY),w("design:type",Object)],U1.prototype,"ytdDismissableItemBehavior",void 0);v([I({observer:"dataChanged"}),w("design:type",Object)],U1.prototype,"data",void 0);v([I({reflectToAttribute:!0}),w("design:type",Boolean)],U1.prototype,"isHistory",void 0);U1=v([W({is:"ytd-search-history-query-renderer"})],U1);var V1,W1=function(){return F.apply(this,arguments)||this};
l(W1,F);W1.prototype.configureRendererStamper=function(){return{"data.menu":{id:"menu",mapping:{menuRenderer:"ytd-menu-renderer"}}}};
W1.prototype.onTap=function(){this.data&&this.data.navigationEndpoint&&this.data.adPlaybackContextParams&&Jya(this.data.navigationEndpoint,this.data.adPlaybackContextParams)};
W1.prototype.dataChanged=function(){this.data&&(this.data.impressionUrls&&!this.data.impressionsFired&&(ap(this.data.impressionUrls),this.data.impressionsFired=!0),this.data.adBadge||this.set("data.adBadge",V1.DEFAULT_AD_BADGE_RENDERER),this.data.activeView&&this.ytdActiveViewBehavior.enableActiveViewMeasurement(this.data.activeView,16))};
var X1=V1=W1;V1.prototype.dataChanged=V1.prototype.dataChanged;V1.prototype.onTap=V1.prototype.onTap;X1.DEFAULT_AD_BADGE_RENDERER={metadataBadgeRenderer:{label:yU("AD_BADGE_TEXT",void 0,"Ad"),style:"BADGE_STYLE_TYPE_AD"}};v([H(X),w("design:type",Object)],X1.prototype,"ytRendererstamperBehavior",void 0);v([H(V.YtRendererBehavior),w("design:type",Object)],X1.prototype,"ytRendererBehavior",void 0);v([H(YX),w("design:type",Object)],X1.prototype,"ytdActiveViewBehavior",void 0);
v([I(),w("design:type",Object)],X1.prototype,"data",void 0);v([ql("tap"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],X1.prototype,"onTap",null);v([rl("data"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],X1.prototype,"dataChanged",null);X1=V1=v([W({is:"ytd-promoted-video-renderer"})],X1);OY("itemSectionRenderer","searchPyvRenderer","ytd-search-pyv-renderer");var Y1=function(){return F.apply(this,arguments)||this};
l(Y1,F);Y1.prototype.configureRendererStamper=function(){return{"data.ads":{id:"contents",mapping:{promotedVideoRenderer:"ytd-promoted-video-renderer"}}}};
var Z1=Y1;v([H(V.YtRendererBehavior),w("design:type",Object)],Z1.prototype,"ytRendererBehavior",void 0);v([H(X),w("design:type",Object)],Z1.prototype,"ytRendererstamperBehavior",void 0);v([I(),w("design:type",Object)],Z1.prototype,"data",void 0);Z1=v([W({is:"ytd-search-pyv-renderer"})],Z1);var $1=function(){return F.apply(this,arguments)||this};
l($1,F);$1.prototype.configureRendererStamper=function(){return{"data.thumbnailOverlays":{id:"button-overlay",mapping:{thumbnailOverlayButtonRenderer:{component:"ytd-thumbnail-overlay-button-renderer",attributes:{tabindex:"0",role:"button"}}}},dismissedRenderer:{id:"dismissed",mapping:{notificationMultiActionRenderer:{component:"ytd-notification-multi-action-renderer",registration:["defer-on-home"]}}}}};
$1.prototype.observeLightsourcePalette=function(){this.data&&this.data.lightsourceColorPaletteData&&HY(this,this.data.lightsourceColorPaletteData)};
var a2=$1;a2.prototype.observeLightsourcePalette=a2.prototype.observeLightsourcePalette;v([H(X),w("design:type",Object)],a2.prototype,"ytRendererstamperBehavior",void 0);v([H(V.YtRendererBehavior),w("design:type",Object)],a2.prototype,"ytRendererBehavior",void 0);v([H(eY),w("design:type",Object)],a2.prototype,"ytdDismissableItemBehavior",void 0);v([I(),w("design:type",Object)],a2.prototype,"data",void 0);
v([rl("data.lightsourceColorPaletteData"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],a2.prototype,"observeLightsourcePalette",null);a2=v([W({is:"ytd-topic-recommendations-chip-renderer"})],a2);var zGa=function(){return F.apply(this,arguments)||this};
l(zGa,F);var b2=zGa;v([H(V.YtRendererBehavior),w("design:type",Object)],b2.prototype,"ytRendererBehavior",void 0);v([I(),w("design:type",Object)],b2.prototype,"data",void 0);b2=v([W({is:"ytd-compact-station-renderer"})],b2);Polymer({is:"ytd-ratings",properties:{percent:{type:Number,observer:"percentChanged_"},spacing:{type:Number,value:6},meta_:{value:Polymer.Base.create("iron-meta",{type:"iconset"})}},created:function(){this.ICON_WIDTH_=18;this.NUM_STARS_=5},
ready:function(){this.initalizeDefs_()},
initalizeDefs_:function(){var a=this.meta_.byKey("yt-icons");var b=a.$$("#star");var c=a.$$("#star_half");a=a.$$("#star_border");this.$.defs.appendChild(b.cloneNode(!0));this.$.defs.appendChild(c.cloneNode(!0));this.$.defs.appendChild(a.cloneNode(!0))},
percentChanged_:function(a){for(var b=this.$.rating;b.firstChild;)b.removeChild(b.firstChild);b=Math.round(a/(2*this.NUM_STARS_));a=Math.floor(b/2);b%=2;var c=this.NUM_STARS_-a-b;this.appendStars_("star",a,0);this.appendStars_("star_half",b,a);this.appendStars_("star_border",c,a+b)},
appendStars_:function(a,b,c){for(var d=0;d<b;d++){var e=(this.ICON_WIDTH_+this.spacing)*(d+c),g=document.createElementNS("http://www.w3.org/2000/svg","use");g.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href","#"+a);g.setAttribute("x",e);g.setAttribute("y",0);this.$.rating.appendChild(g)}}});var c2={};c2.YtMacroReplacementBehavior=[T.YtActionSenderBehavior,{sendServiceRequestAction:function(a){if(a&&1==a.length&&Array.isArray(a[0].loggingUrls)){a=u.unsafeClone(a[0]);var b=this.macros||{},c=this.getAdModuleClient_();if(!c)return bw();a.loggingUrls.forEach(function(d){if(d.baseUrl){var e=d.baseUrl;var g=b;g=void 0===g?{}:g;e=c.getOptions_().includes("replaceUrlMacros")?SAa(c,"replaceUrlMacros",{url:e,additionalMapping:g}):e;d.baseUrl=e}},this);
a=[a]}return T.YtActionSenderBehavior.sendServiceRequestAction.call(this,a)},
getAdModuleClient_:function(){if(A("kevlar_js_fixes")){var a=qW(this);return a?(a=a.getPlayer())?new IU(a):null:null}a=sW(this).getPlayer();return new IU(a)}}];Polymer({is:"ytd-pla-shelf-item-renderer",behaviors:[V.YtRendererBehavior,c2.YtMacroReplacementBehavior],properties:{data:{type:Object,observer:"dataChanged_"},macros:{type:Object,computed:"getMacros_(data)",value:{}},fixie_:{type:Boolean,value:function(){return A("kevlar_fixie_watch_layout")},
reflectToAttribute:!0}},dataChanged_:function(a){A("kevlar_logging_urls_killswitch")&&a.impressionEndpoints&&this.sendTrackingPings_(a.impressionEndpoints)},
getMacros_:function(){var a=Sa("yt.www.ads.eventcache.getLastPlaShelfData");return a?(a=a())&&a.macros||{}:{}},
computeRating_:function(a){return 100*a/5},
shouldShowRating_:function(a){return .01<=a},
sendTrackingPings_:function(a){mb(a,function(b){b.pingingEndpoint&&this.handlePingingCommand_(b)},this)},
handlePingingCommand_:function(a){a.loggingUrls&&mb(a.loggingUrls,function(b){b.baseUrl&&Zo(b.baseUrl)})}});var AGa=function(){return F.apply(this,arguments)||this};
l(AGa,F);var d2=AGa;v([H(V.YtRendererBehavior),w("design:type",Object)],d2.prototype,"ytRendererBehavior",void 0);v([I(),w("design:type",Object)],d2.prototype,"data",void 0);d2=v([W({is:"ytd-panel-show-style-metadata-renderer"})],d2);var e2=function(){return F.apply(this,arguments)||this};
l(e2,F);e2.prototype.configureRendererStamper=function(){return{"data.metadata":{id:"panel-metadata",mapping:{panelShowStyleMetadataRenderer:"ytd-panel-show-style-metadata-renderer"}}}};
e2.prototype.computeThumbnail=function(a){if(a)return a.smallFormFactorBackgroundThumbnail||a.largeFormFactorBackgroundThumbnail};
var f2=e2;v([H(V.YtRendererBehavior),w("design:type",Object)],f2.prototype,"ytRendererBehavior",void 0);v([H(X),w("design:type",Object)],f2.prototype,"ytRendererstamperBehavior",void 0);v([I(),w("design:type",Object)],f2.prototype,"data",void 0);f2=v([W({is:"ytd-primetime-promo-panel-renderer"})],f2);var g2=function(){return F.apply(this,arguments)||this};
l(g2,F);g2.prototype.getMacros=function(){var a=Sa("yt.www.ads.eventcache.getLastCompanionData");return a?(a=a())&&a.macros||{}:{}};
g2.prototype.onTap=function(){this.data&&this.fire("yt-navigate",{endpoint:this.data.clickthroughEndpoint})};
var h2=g2;v([H(V.YtRendererBehavior),w("design:type",Object)],h2.prototype,"ytRendererBehavior",void 0);v([H(c2.YtMacroReplacementBehavior),w("design:type",Object)],h2.prototype,"ytMacroReplacementBehavior",void 0);v([I(),w("design:type",Object)],h2.prototype,"data",void 0);v([I({computed:"getMacros(data)"}),w("design:type",Object)],h2.prototype,"macros",void 0);h2=v([W({is:"ytd-shopping-companion-item-renderer"})],h2);var i2=function(){return F.apply(this,arguments)||this};
l(i2,F);i2.prototype.configureRendererStamper=function(){return{"data.menu":{id:"menu",mapping:{menuRenderer:{component:"ytd-menu-renderer",params:{noInkOnDropdownButton:!0}}},initialRenderPriority:A("defer_menus")?0:void 0,waitForSignal:"eocs"}}};
i2.prototype.dataChanged=function(a){a=this.get("colorExtractionPalette.section1Color",a);a=sX(a);this.updateStyles({"--ytd-channel-recommendation-card-avatar-overlay-color":a})};
i2.prototype.computeCardStyle=function(a){return this.get("style.value",a)||null};
var j2=i2;v([H(V.YtRendererBehavior),w("design:type",Object)],j2.prototype,"ytRendererBehavior",void 0);v([H(X),w("design:type",Object)],j2.prototype,"ytRendererstamperBehavior",void 0);v([H(eY),w("design:type",Object)],j2.prototype,"ytdDismissableItemBehavior",void 0);v([I({observer:"dataChanged"}),w("design:type",Object)],j2.prototype,"data",void 0);v([I({reflectToAttribute:!0,computed:"computeCardStyle(data)"}),w("design:type",String)],j2.prototype,"cardStyle",void 0);
j2=v([W({is:"ytd-compact-channel-recommendation-card-renderer"})],j2);var k2=function(){return F.apply(this,arguments)||this};
l(k2,F);k2.prototype.dataChanged=function(){this.isNoPriceFormat=this.isUsFormat=this.isEuFormat=!1;this.data.price?"REGIONAL_FORMAT_EU"===this.data.regionFormat?this.isEuFormat=!0:this.isUsFormat=!0:this.isNoPriceFormat=!0};
k2.prototype.computeAriaLabel=function(){return this.data&&this.data.accessibilityTitle?this.data.accessibilityTitle:this.data.title+", "+this.data.price+", "+this.data.additionalFeesText+", "+this.data.vendorName};
var l2=k2;l2.prototype.dataChanged=l2.prototype.dataChanged;v([H(V.YtRendererBehavior),w("design:type",Object)],l2.prototype,"ytRendererBehavior",void 0);v([I(),w("design:type",Object)],l2.prototype,"data",void 0);v([I(),w("design:type",Boolean)],l2.prototype,"isEuFormat",void 0);v([I(),w("design:type",Boolean)],l2.prototype,"isUsFormat",void 0);v([I(),w("design:type",Boolean)],l2.prototype,"isNoPriceFormat",void 0);
v([rl("data"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],l2.prototype,"dataChanged",null);var BGa=l2=v([W({is:"ytd-merch-shelf-item-renderer"})],l2);Polymer({is:"yt-horizontal-list-renderer",behaviors:[V.YtRendererBehavior,X,XX.YtdHorizontalListBehavior],properties:{data:{type:Object,observer:"dataChanged_"},thumbnailHeight:{type:Number,value:118,observer:"onThumbnailHeightChanged_"},buttonClasses_:{type:Array,value:["arrow"]},initialCount:{type:Number,computed:"computeInitialCountNumber_(data)"}},stampDom:{shownItems:{id:"items",mapping:{compactStationRenderer:{component:"ytd-compact-station-renderer",registration:["defer-on-watch"]},gridChannelRenderer:{component:"ytd-grid-channel-renderer",
registration:["defer-on-watch"]},gridMoviePlaylistRenderer:{component:"ytd-grid-movie-playlist-renderer",registration:["defer-on-watch"]},gridMovieRenderer:{component:"ytd-grid-movie-renderer",registration:["defer-on-watch"]},gridPlaylistRenderer:{component:"ytd-grid-playlist-renderer",registration:["defer-on-watch"]},gridRadioRenderer:{component:"ytd-grid-radio-renderer",registration:["defer-on-watch"]},gridShowRenderer:{component:"ytd-grid-show-renderer",registration:["defer-on-watch"]},gridVideoRenderer:{component:"ytd-grid-video-renderer",
registration:["defer-on-watch"]},merchShelfItemRenderer:{component:"ytd-merch-shelf-item-renderer",registration:["defer-on-home"]},plaShelfItemRenderer:{component:"ytd-pla-shelf-item-renderer",registration:["defer-on-home"]},shoppingCompanionCarouselItemRenderer:{component:"ytd-shopping-companion-item-renderer",registration:["defer-on-home"]},commentRenderer:{component:"ytd-comment-renderer",registration:["defer-on-home","defer-on-watch"]},compactChannelRecommendationCardRenderer:{component:"ytd-compact-channel-recommendation-card-renderer",
registration:["defer-on-home"]},postRenderer:{component:"ytd-post-renderer",registration:["defer-on-watch"]},topicRecommendationsChipRenderer:{component:"ytd-topic-recommendations-chip-renderer",registration:["defer-on-watch"]},primetimePromoPanelRenderer:{component:"ytd-primetime-promo-panel-renderer",registration:["defer-on-watch"]}}},"data.previousButton":{id:"left-arrow",mapping:{buttonRenderer:{component:"ytd-button-renderer",properties:{"on-tap":"[[boundPrevClick]]"},classListBinding:"[[buttonClasses_]]"}},
initialRenderPriority:0,waitForSignal:"eocs"},"data.nextButton":{id:"right-arrow",mapping:{buttonRenderer:{component:"ytd-button-renderer",properties:{"on-tap":"[[boundNextClick]]"},classListBinding:"[[buttonClasses_]]"}}}},created:function(){this.POST_HEIGHT_=200;this.POST_TALL_HEIGHT_=218},
dataChanged_:function(){this.reset();this.data&&this.data.items&&this.data.items.some(function(a){return!!a.postRenderer})&&(this.thumbnailHeight=A("enable_taller_posts_on_desktop")?this.POST_TALL_HEIGHT_:this.POST_HEIGHT_,this.useFloorScrolling=!0)},
onThumbnailHeightChanged_:function(a){this.updateStyles({"--ytd-thumbnail-height":a+"px"})},
computeInitialCountNumber_:function(a){return a?a.items.some(function(b){return!!b.topicRecommendationsChipRenderer})?9:6:6}});var m2=function(){return F.apply(this,arguments)||this};
l(m2,F);m2.prototype.configureRendererStamper=function(){return{"data.actionButton":{id:"button",mapping:{buttonRenderer:"ytd-button-renderer"}},"data.dismissButton":{id:"dismiss-button",mapping:{buttonRenderer:"ytd-button-renderer"}},dismissedRenderer:{id:"dismissed",mapping:{notificationTextRenderer:{component:"ytd-notification-text-renderer",registration:["defer-on-home"]},notificationMultiActionRenderer:{component:"ytd-notification-multi-action-renderer",registration:["defer-on-home"]}}}}};
var n2=m2;v([H(V.YtRendererBehavior),w("design:type",Object)],n2.prototype,"ytRendererBehavior",void 0);v([H(X),w("design:type",Object)],n2.prototype,"ytRendererstamperBehavior",void 0);v([H(eY),w("design:type",Object)],n2.prototype,"ytdDismissableItemBehavior",void 0);v([I(),w("design:type",Object)],n2.prototype,"data",void 0);n2=v([W({is:"ytd-compact-promoted-item-renderer"})],n2);var o2=function(){return F.apply(this,arguments)||this};
l(o2,F);o2.prototype.configureRendererStamper=function(){return{shownItems:{id:"grid-container",mapping:{channelRenderer:{component:"ytd-channel-renderer",registration:["defer-on-home"]},compactPromotedItemRenderer:"ytd-compact-promoted-item-renderer",playlistRenderer:{component:"ytd-playlist-renderer",registration:["defer-on-home"]},radioRenderer:"ytd-radio-renderer",showRenderer:{component:"ytd-show-renderer",registration:["defer-on-home"]},videoRenderer:"ytd-video-renderer"}}}};
o2.prototype.fillRestIfNoShowMore=function(a,b){!a.showMoreText&&b&&this.ytLazyListBehavior.fillRemainingListItems()};
o2.prototype.onShowMoreClick=function(){this.ytLazyListBehavior.fillRemainingListItems()};
o2.prototype.computeViewAllHidden=function(a,b){return a||!b.viewAllEndpoint};
var p2=o2;p2.prototype.fillRestIfNoShowMore=p2.prototype.fillRestIfNoShowMore;v([H(V.YtRendererBehavior),w("design:type",Object)],p2.prototype,"ytRendererBehavior",void 0);v([H(X),w("design:type",Object)],p2.prototype,"ytRendererstamperBehavior",void 0);v([H(FY),w("design:type",Object)],p2.prototype,"ytLazyListBehavior",void 0);v([I(),w("design:type",Object)],p2.prototype,"data",void 0);
v([rl("data","canShowMore"),w("design:type",Function),w("design:paramtypes",[Object,Boolean]),w("design:returntype",void 0)],p2.prototype,"fillRestIfNoShowMore",null);p2=v([W({is:"ytd-expanded-shelf-contents-renderer"})],p2);OY("itemSectionRenderer","shelfRenderer","ytd-shelf-renderer");var q2=function(){return F.apply(this,arguments)||this};
l(q2,F);f=q2.prototype;
f.configureRendererStamper=function(){return{"data.content":{id:"contents",mapping:{gridRenderer:"ytd-grid-renderer",horizontalListRenderer:{component:"yt-horizontal-list-renderer",params:{thumbnailHeight:118}},horizontalMovieListRenderer:{component:"yt-horizontal-list-renderer",params:{thumbnailHeight:302}},expandedShelfContentsRenderer:"ytd-expanded-shelf-contents-renderer",messageRenderer:{component:"ytd-message-renderer",params:{shelf:!0}},verticalListRenderer:{component:"ytd-vertical-list-renderer",registration:["defer-on-home"]}}},
"data.playAllButton":{id:"play-button",mapping:{buttonRenderer:"ytd-button-renderer"}},"data.subscribeButton":{id:"subscribe-button",mapping:{buttonRenderer:"ytd-button-renderer",subscribeButtonRenderer:"ytd-subscribe-button-renderer"}},"data.menu":{id:"menu",mapping:{menuRenderer:{component:"ytd-menu-renderer",attributes:{condensed:!0,icon:"yt-icons:more"}}}},"data.sortFilter":{id:"sort-filter",mapping:{sortFilterSubMenuRenderer:"yt-sort-filter-sub-menu-renderer"}},dismissedRenderer:{id:"dismissed",
mapping:{notificationTextRenderer:{component:"ytd-notification-text-renderer",registration:["defer-on-home"]},notificationMultiActionRenderer:{component:"ytd-notification-multi-action-renderer",registration:["defer-on-home"]}}}}};
f.computeThumbnailStyle=function(a){return a||""};
f.computePlaceAnnotationUnderTitle=function(a){return"CHANNEL_THUMBNAIL_STYLE_BOXART"===a.thumbnailStyle};
f.onDataChange=function(a){a&&a.content&&a.content.horizontalListRenderer&&!a.content.horizontalListRenderer.items&&(a.content.horizontalListRenderer=void 0)};
f.onLockupRequested=function(a){if(this.data&&this.data.content&&this.data.content.gridRenderer&&this.data.content.gridRenderer.items&&a.detail&&a.detail.videoIds){for(var b=this.data.content.gridRenderer.items,c=new Set,d=k(a.detail.videoIds),e=d.next();!e.done;e=d.next())c.add(e.value);a.detail.returnValue=b.filter(function(g){return g.gridVideoRenderer&&g.gridVideoRenderer.videoId&&c.has(g.gridVideoRenderer.videoId)}).map(function(g){return g.gridVideoRenderer})}};
var r2=q2;r2.prototype.onLockupRequested=r2.prototype.onLockupRequested;r2.prototype.onDataChange=r2.prototype.onDataChange;v([H(X),w("design:type",Object)],r2.prototype,"ytRendererstamperBehavior",void 0);v([H(eY),w("design:type",Object)],r2.prototype,"ytdDismissableItemBehavior",void 0);v([H(V.YtRendererBehavior),w("design:type",Object)],r2.prototype,"ytRendererBehavior",void 0);v([H(Polymer.IronResizableBehavior),w("design:type",Object)],r2.prototype,"ironResizableBehavior",void 0);
v([I(),w("design:type",Object)],r2.prototype,"data",void 0);v([I({reflectToAttribute:!0,value:function(){return A("kevlar_fluid_dismiss")}}),
w("design:type",Boolean)],r2.prototype,"enableFluidDismiss",void 0);v([I({reflectToAttribute:!0,computed:"computeThumbnailStyle(data.thumbnailStyle)"}),w("design:type",String)],r2.prototype,"thumbnailStyle",void 0);v([rl("data"),w("design:type",Function),w("design:paramtypes",[Object]),w("design:returntype",void 0)],r2.prototype,"onDataChange",null);
v([ql("yt-lockup-requested"),w("design:type",Function),w("design:paramtypes",[CustomEvent]),w("design:returntype",void 0)],r2.prototype,"onLockupRequested",null);r2=v([W({is:"ytd-shelf-renderer"})],r2);var s2=function(){return F.apply(this,arguments)||this};
l(s2,F);f=s2.prototype;f.configureRendererStamper=function(){return{visibleItems:{id:"items",mapping:{channelRenderer:"ytd-channel-renderer",playlistRenderer:"ytd-playlist-renderer",radioRenderer:"ytd-radio-renderer",showRenderer:"ytd-show-renderer",videoRenderer:"ytd-video-renderer"}}}};
f.computeVisibleItems=function(a,b){return void 0!==a&&a.items?b?a.items.slice(0,this.data.collapsedItemCount):a.items:[]};
f.computeHideShowMore=function(a,b,c){return a>=b||!c};
f.computeHideShowAll=function(a,b,c){return!(a&&b)||c};
f.onMoreClick=function(){this.collapsed=!1};
var t2=s2;v([H(V.YtRendererBehavior),w("design:type",Object)],t2.prototype,"ytRendererBehavior",void 0);v([H(X),w("design:type",Object)],t2.prototype,"ytRendererstamperBehavior",void 0);v([I(),w("design:type",Object)],t2.prototype,"data",void 0);v([I({computed:"computeVisibleItems(data,collapsed)"}),w("design:type",Array)],t2.prototype,"visibleItems",void 0);v([I({value:!0}),w("design:type",Boolean)],t2.prototype,"collapsed",void 0);
v([I({computed:"computeHideShowMore(data.collapsedItemCount,data.items.length,collapsed)"}),w("design:type",Boolean)],t2.prototype,"hideShowMore",void 0);v([I({computed:"computeHideShowAll(data.expandedStateButtonEndpoint,\n data.expandedStateButtonText,collapsed)",value:!0}),w("design:type",Boolean)],t2.prototype,"hideShowAll",void 0);t2=v([W({is:"ytd-vertical-list-renderer"})],t2);var u2=function(){return F.apply(this,arguments)||this};
l(u2,F);u2.prototype.configureRendererStamper=function(){return{"data.menu":{id:"menu",mapping:{menuRenderer:{component:"ytd-menu-renderer",params:{icon:"yt-icons:more_vert"}}}},"data.exploreButton":{id:"explore-button",mapping:{buttonRenderer:{component:"ytd-button-renderer",params:{alignByText:!0},noInjection:!0}}}}};
u2.prototype.onTextWrapperTap=function(a){var b=this.data&&this.data.navigationEndpoint;b&&!GZ(Polymer.dom(a).path||[],this,["A".toString(),"BUTTON".toString()])&&this.fire("yt-navigate",{endpoint:b})};
u2.prototype.dataChanged=function(){var a=this.get("data.offerButton.buttonRenderer.serviceEndpoint");a&&a.commandMetadata&&a.commandMetadata.webHandleServiceEndpointExtension&&a.commandMetadata.webHandleServiceEndpointExtension.fireAutomatically&&this.ytRendererBehavior.sendServiceRequestAction([a])};
var v2=u2;v([H(V.YtRendererBehavior),w("design:type",Object)],v2.prototype,"ytRendererBehavior",void 0);v([H(X),w("design:type",Object)],v2.prototype,"ytRendererstamperBehavior",void 0);v([I({observer:"dataChanged"}),w("design:type",Object)],v2.prototype,"data",void 0);v([I({reflectToAttribute:!0}),w("design:type",Boolean)],v2.prototype,"leftAligned",void 0);v2=v([W({is:"ytd-movie-renderer"})],v2);var CGa=function(){return F.apply(this,arguments)||this};
l(CGa,F);var w2=CGa;v([I(),w("design:type",Object)],w2.prototype,"data",void 0);v([H(DY.YtVideoPlayerRendererBehavior),w("design:type",Object)],w2.prototype,"ytVideoPlayerRendererBehavior",void 0);w2=v([W({is:"ytd-channel-video-player-renderer"})],w2);Polymer({is:"ytd-default-promo-panel-renderer-inline-playback-renderer",properties:{data:Object,playing:{type:Boolean,value:!1,reflectToAttribute:!0}},created:function(){this.active_=!1},
detached:function(){this.stop()},
play:function(){var a=this,b,c,d,e,g;return Ca(function(h){if(1==h.nextAddress){b=z("FILLER_DATA",{});if(!b||!b.player)return h.return();a.active_=!0;c=a.get("data.inlinePlaybackEndpoint.watchEndpoint");d=Object.assign({},b.player);d.args=Object.assign({},d.args||{},{autoplay:!0,video_id:c.videoId||a.data.videoId,mute:1,mutedautoplay:1,startSeconds:c.startTimeSeconds||0,controls:0,showinfo:0,iv_load_policy:3,rel:0,el:"profilepage",player_response:void 0});d.attrs=Object.assign({},d.attrs||{},{id:"ytd-default-promo-panel-renderer-inline-playback-renderer"+
bb(a)});e=a.$.player;e.update(d);return ta(h,e.getPlayerPromise(),2)}g=h.yieldResult;g.addEventListener("onStateChange",function(m){return a.onPlayerStateChange_(m)});
ua(h)})},
onPlayerStateChange_:function(a){if(this.active_)switch(this.playing=1==a,a){case 1:this.fire("yt-default-promo-panel-renderer-playing");break;case 0:this.fire("yt-default-promo-panel-renderer-ended");}},
stop:function(){this.$.player.stop();this.playing=this.active_=!1},
resize:function(){var a=this,b;return Ca(function(c){if(1==c.nextAddress)return ta(c,a.$.player.getPlayerPromise(),2);b=c.yieldResult;b.setSize(NaN,NaN);ua(c)})}});ZX.YtBooleanLogicBehavior={bindIf:function(a,b,c){return a?b:c},
bindIfDefined:function(a,b){return void 0!=a?a:b},
booleanString:function(a){return(!!a).toString()},
equals:function(a){for(var b=arguments[0],c=1;c<arguments.length;c++)if(b!=arguments[c])return!1;return!0},
isGreaterThan:function(a,b){return a>b},
isLessThan:function(a,b){return a<b},
logicalAND:function(a){for(var b=!!arguments[0],c=1;c<arguments.length;c++)b=b&&!!arguments[c];return b},
logicalOR:function(a){for(var b=!!arguments[0],c=1;c<arguments.length;c++)b=b||!!arguments[c];return b},
toBool:function(a){return!!a}};Polymer({is:"ytd-default-promo-panel-renderer",behaviors:[jY.YtdGridStateAwareBehavior,lY.YtdGuideStateAwareBehavior,ZX.YtBooleanLogicBehavior,U.YtActionHandlerBehavior,X,V.YtRendererBehavior],properties:{autoplay:{type:Boolean,reflectToAttribute:!0},data:{type:Object,observer:"dataChanged_"},panelLayout:{type:String,computed:"computePanelLayout_(data)",reflectToAttribute:!0},animationEnabled:{type:Boolean,value:function(){return A("enable_web_ketchup_hero_animation")},
reflectToAttribute:!0},transitioningOut:{type:Boolean,reflectToAttribute:!0,value:!1},useBrowseWidth:{type:Boolean,reflectToAttribute:!0,value:!1},metadataOrder:{type:Boolean,computed:"computeMetadataOrder_(data)"},narrow_:{type:Boolean,reflectToAttribute:!0,value:!1},layoutStyle:{type:String,reflectToAttribute:!0}},stampDom:{"data.actionButton":{id:"action-button",mapping:{buttonRenderer:"ytd-button-renderer"}}},actionMap:{"yt-window-resized":"onWindowResized_"},listeners:{"yt-default-promo-panel-renderer-playing":"onPlaying_",
"yt-default-promo-panel-renderer-ended":"onEnded_"},VIDEO_PLAYING_DELAY_MS_:1500,ready:function(){document.fonts&&document.fonts.load&&this.forceLoadFontForTitle_()},
created:function(){this.videoTimeout_=this.panelTimeout_=0;this.gridStateAwareSizingElementSelector="#content"},
attached:function(){this.onWindowResized_();En(this.autoplayVideo_.bind(this),this.VIDEO_PLAYING_DELAY_MS_)},
detached:function(){this.clearTimeouts_()},
onWindowResized_:function(){this.narrow_=16*this.clientHeight/9>this.clientWidth;this.$.player&&this.data&&this.data.inlinePlaybackRenderer&&this.$.player.resize()},
computePanelLayout_:function(a){return a&&a.panelLayout||"DEFAULT_PROMO_PANEL_RENDERER_LAYOUT_A"},
forceLoadFontForTitle_:function(){var a=this;document.fonts.load("58px YT Sans").then(function(b){1<=b.length?a.$["hero-title"].classList.add("visible"):Im(a.forceLoadFontForTitle_.bind(a),50)})},
playVideo:function(){this.$.video&&this.data.videoThumbnail&&this.$.video.play();this.$.player&&this.data.inlinePlaybackRenderer&&this.$.player.play()},
stopVideo:function(){this.$.video&&this.data.videoThumbnail&&this.$.video.stop();this.$.player&&this.data.inlinePlaybackRenderer&&this.$.player.stop()},
transitionOut:function(){var a=this;this.transitioningOut=!0;return new Promise(function(b){var c=function(){a.$["action-button"].removeEventListener("animationend",c);Dn.cancelJob(d);b();a.transitioningOut=!1};
var d=En(c,1E3);a.$["action-button"].addEventListener("animationend",c);a.$.player&&(a.$.player.playing=!1)})},
computeMetadataOrder_:function(a){return a&&a.metadataOrder&&"DEFAULT_PROMO_PANEL_RENDERER_METADATA_ORDER_UNSPECIFIED"!==a.metadataOrder?a.metadataOrder:"DEFAULT_PROMO_PANEL_RENDERER_METADATA_ORDER_TITLE_DESCRIPTION"},
dataChanged_:function(a){this.clearTimeouts_();this.setBackgroundImage_(a);this.setScrimLayer_(a);this.startPanelTimeout_()},
autoplayVideo_:function(){this.autoplay&&this.playVideo()},
setBackgroundImage_:function(a){(a=this.getBackgroundImageUrl_(a))&&(this.$.hero.style["background-image"]="url("+a+")")},
setScrimLayer_:function(a){var b=this.getScrimLayerColorStops_(a);a=(a.scrimRotation||0)+180;"rtl"==z("HTML_DIR",void 0)&&(a=-a);b&&(this.$.scrim.style["background-image"]="linear-gradient("+a+"deg, "+b+")")},
getScrimLayerColorStops_:function(){var a=this.data.scrimColorValues;if(!a)return null;if(1==a.length)return a=tX(a[0]),a+" 0%, "+a+" 100%";if(3==a.length){var b=[0,72,98];return a.map(function(c,d){return tX(c)+" "+b[d]+"%"}).join(",")}return null},
getBackgroundImageUrl_:function(a){return a&&a.largeFormFactorBackgroundThumbnail?LY((a.largeFormFactorBackgroundThumbnail.thumbnailLandscapePortraitRenderer.landscape||a.largeFormFactorBackgroundThumbnail.thumbnailLandscapePortraitRenderer.portrait).thumbnails,screen.width):null},
onPlaying_:function(){this.startVideoTimeout_()},
onEnded_:function(){this.rotate_()},
startPanelTimeout_:function(){var a=this;if(!this.panelTimeout_){var b=this.get("data.minPanelDisplayDurationMs");b&&(this.panelTimeout_=En(function(){return a.rotate_()},b))}},
startVideoTimeout_:function(){var a=this;if(!this.videoTimeout_){var b=this.get("data.minVideoPlayDurationMs");b&&(this.videoTimeout_=En(function(){return a.rotate_()},b))}},
clearTimeouts_:function(){Dn.cancelJob(this.panelTimeout_);this.panelTimeout_=0;Dn.cancelJob(this.videoTimeout_);this.videoTimeout_=0},
rotate_:function(){this.clearTimeouts_();this.fire("yt-default-promo-panel-renderer-rotate")}});OY("itemSectionRenderer","carouselItemRenderer","ytd-carousel-item-renderer");
Polymer({is:"ytd-carousel-item-renderer",behaviors:[jY.YtdGridStateAwareBehavior,lY.YtdGuideStateAwareBehavior,X,V.YtRendererBehavior],properties:{data:{type:Object,observer:"onDataChanged_"},currentItem_:Object,currentItemIndex_:Number,rotationTimeout:Number,jobId_:Number,dotMenuVisible_:{type:Boolean,computed:"computeDotMenuVisible_(data)"},active:{type:Boolean,value:!0,observer:"activeChanged_"}},stampDom:{currentItem_:{id:"carousel-item",mapping:{defaultPromoPanelRenderer:{component:"ytd-default-promo-panel-renderer",
attributes:{autoplay:!0},properties:{useBrowseWidth:"[[data.paginationThumbnails]]",layoutStyle:"[[data.layoutStyle]]"}}}}},listeners:{"yt-video-thumbnail-ended":"onVideoThumbnailEnded_","yt-video-thumbnail-error":"onVideoThumbnailError_","yt-video-thumbnail-not-playing":"onVideoNotPlaying_","yt-default-promo-panel-renderer-rotate":"onVideoThumbnailEnded_"},created:function(){this.SELECTED_CLASS_="selected";this.FINISHED_CLASS_="finished";this.gridStateAwareSizingElementSelector="#pagination-thumbnails"},
setNextCarouselItem:function(){this.setCarouselItem(this.currentItemIndex_+1)},
setCarouselItem:function(a){if(this.shouldRotate_()){Km(this.jobId_);var b=this.getCurrentPanelElement_();b&&b.stopVideo();this.currentItemIndex_=a%this.data.carouselItems.length;this.currentItem_=this.data.carouselItems[this.currentItemIndex_];this.currentItemHasVideo()?(b||(b=this.getCurrentPanelElement_()),b.playVideo()):this.startRotationJob_()}},
getCurrentPanelElement_:function(){return Polymer.dom(this.$["carousel-item"]).querySelector("ytd-default-promo-panel-renderer")},
getCurrentPaginationElement_:function(){return Polymer.dom(this.$["pagination-thumbnails"]).querySelector(".ytd-carousel-item-renderer.selected")},
onDataChanged_:function(a){this.currentItemIndex_=0;this.currentItem_=a.carouselItems[0];this.rotationTimeout=a.autoRotateDurationMs},
getNavigationClass_:function(a,b){return a==b?this.SELECTED_CLASS_:""},
getNavigationDuration_:function(a){return this.get("data.carouselItems."+a+".defaultPromoPanelRenderer.minPanelDisplayDurationMs")||0},
onNavigationTap_:function(a){a=a.model.index;a!=this.currentItemIndex_&&this.getCurrentPanelElement_().transitionOut().then(this.setCarouselItem.bind(this,a))},
onVideoThumbnailEnded_:function(){var a=this.getCurrentPaginationElement_();a.classList.add(this.FINISHED_CLASS_);this.getCurrentPanelElement_().transitionOut().then(function(){a.classList.remove(this.FINISHED_CLASS_);this.setNextCarouselItem()}.bind(this))},
onVideoThumbnailError_:function(){this.startRotationJob_()},
onVideoNotPlaying_:function(){this.startRotationJob_()},
currentItemHasVideo:function(){return!!this.get("defaultPromoPanelRenderer.videoThumbnail",this.currentItem_)||!!this.get("defaultPromoPanelRenderer.inlinePlaybackRenderer",this.currentItem_)},
startRotationJob_:function(){Km(this.jobId_);this.shouldRotate_()&&this.rotationTimeout&&(this.jobId_=this.setTimeout_(function(){this.getCurrentPanelElement_().transitionOut().then(this.setNextCarouselItem.bind(this))}.bind(this),this.rotationTimeout))},
setTimeout_:function(a,b){return Im(a.bind(this),b)},
computeDotMenuVisible_:function(a){return!!a.carouselItems&&1<a.carouselItems.length&&!a.paginationThumbnails},
shouldRotate_:function(){return 1<this.data.carouselItems.length&&this.active},
activeChanged_:function(a){this.data&&(a?this.setCarouselItem(this.currentItemIndex_):this.currentItem_=void 0)}});var x2=function(){return F.apply(this,arguments)||this};
l(x2,F);f=x2.prototype;f.configureRendererStamper=function(){return{shownItems:{id:"items",mapping:{redCarpetVideoRenderer:{component:"ytd-red-carpet-video-renderer"},posterRenderer:{component:"ytd-poster-renderer"}}}}};
f.ready=function(){this.$["scroll-container"].addEventListener("mouseleave",this.onMouseLeave.bind(this))};
f.onMouseLeave=function(a){this.ytdPosterHoverAnimationBehavior.onMouseLeavePosterHoverSection_(a)};
f.dataChanged=function(){this.ytdHorizontalListBehavior.reset()};
f.nextButtonTap=function(){this.ytdHorizontalListBehavior.boundNextClick();this.ytdPosterHoverAnimationBehavior.resetSteadyState()};
f.previousButtonTap=function(){this.ytdHorizontalListBehavior.boundPrevClick();this.ytdPosterHoverAnimationBehavior.resetSteadyState()};
var y2=x2;v([H(X),w("design:type",Object)],y2.prototype,"ytRendererstamperBehavior",void 0);v([H(V.YtRendererBehavior),w("design:type",Object)],y2.prototype,"ytRendererBehavior",void 0);v([H(XX.YtdHorizontalListBehavior),w("design:type",Object)],y2.prototype,"ytdHorizontalListBehavior",void 0);v([H(XX.YtdPosterHoverAnimationBehavior),w("design:type",Object)],y2.prototype,"ytdPosterHoverAnimationBehavior",void 0);
v([H(Polymer.IronResizableBehavior),w("design:type",Object)],y2.prototype,"ironResizableBehavior",void 0);v([I({observer:"dataChanged"}),w("design:type",Object)],y2.prototype,"data",void 0);v([I({value:function(){return A("desktop_themeable_vulcan")},
reflectToAttribute:!0}),w("design:type",Boolean)],y2.prototype,"themeable",void 0);y2=v([W({is:"ytd-red-carpet-horizontal-list-renderer"})],y2);var z2=function(){return F.apply(this,arguments)||this};
l(z2,F);ea.Object.defineProperties(z2.prototype,{themeable:{configurable:!0,enumerable:!0,get:function(){return A("desktop_themeable_vulcan")}}});
var A2=z2;v([H(V.YtRendererBehavior),w("design:type",Object)],A2.prototype,"rendererBehaviors",void 0);v([I(),w("design:type",Object)],A2.prototype,"data",void 0);v([I({reflectToAttribute:!0}),w("design:type",Boolean),w("design:paramtypes",[])],A2.prototype,"themeable",null);A2=v([W({is:"ytd-red-carpet-video-renderer"})],A2);OY("itemSectionRenderer","redCarpetShelfRenderer","ytd-red-carpet-shelf-renderer");var B2=function(){return F.apply(this,arguments)||this};
l(B2,F);B2.prototype.configureRendererStamper=function(){return{"data.contents":{id:"contents",mapping:{gridRenderer:{component:"ytd-grid-renderer",params:{guidePersistentAndVisible:!1}},redCarpetHorizontalListRenderer:{component:"ytd-red-carpet-horizontal-list-renderer"}}}}};
B2.prototype.ready=function(){this.stampDom["data.contents"].mapping.gridRenderer.params.initialCount=this.getInitialCount()};
B2.prototype.dataChanged=function(a){var b=this.getInitialCount();a&&a.contents&&0<a.contents.length&&a.contents[0].gridRenderer&&a.contents[0].gridRenderer.items&&a.contents[0].gridRenderer.items.length<b&&(a.contents[0].gridRenderer.isCollapsible=!1)};
B2.prototype.getInitialCount=function(){return 1290>window.innerWidth?6:12};
var C2=B2;v([H(V.YtRendererBehavior),w("design:type",Object)],C2.prototype,"ytRendererBehavior",void 0);v([H(X),w("design:type",Object)],C2.prototype,"ytRendererstamperBehavior",void 0);v([H(lY.YtdGuideStateAwareBehavior),w("design:type",Object)],C2.prototype,"ytdGuideStateAwareBehavior",void 0);v([I({observer:"dataChanged"}),w("design:type",Object)],C2.prototype,"data",void 0);v([I({value:function(){return A("desktop_themeable_vulcan")},
reflectToAttribute:!0}),w("design:type",Boolean)],C2.prototype,"themeable",void 0);C2=v([W({is:"ytd-red-carpet-shelf-renderer"})],C2);var DGa=function(a,b){this.rootData=a;this.scrollTop=b};var EGa=function(a,b,c,d,e){this.endpoint=a;this.forward=b;this.historyEntry=c;this.savedComponentState=d;this.legacyBorder=void 0===e?!1:e};var D2=function(){};
D2.prototype.navigate=function(){};
D2.prototype.navigateApp=function(){};
D2.prototype.pageRequestFinished=function(){};
D2.prototype.resetChunkState=function(){};OY("multiPageMenuSectionSettings","webMultiPageMenuSectionRendererExtension","ytd-account-settings");
Polymer({is:"ytd-account-settings",behaviors:[J0.YtComponentBehavior,T.YtActionSenderBehavior],properties:{covered:{type:Boolean,computed:"computeCovered_(dropdownPage_, data)",observer:"coveredChanged_",notify:!0,reflectToAttribute:!0},data:{type:Object,observer:"dataChanged_"},dropdownPage_:{type:String,value:"main"},clientSettings_:Object,languages_:Array,countries_:Array,languagesLoading_:Boolean,countriesLoading_:Boolean,menuStrings_:{type:Object,value:{BACK_ALT_LABEL:yU("BACK_ALT_LABEL",void 0,
"Back"),COUNTRY_LABEL:yU("COUNTRY_LABEL",void 0,"Country:"),CHOOSE_COUNTRY_LABEL:yU("CHOOSE_COUNTRY_LABEL",void 0,"Choose your content location"),CHOOSE_LANGUAGE_LABEL:yU("CHOOSE_LANGUAGE_LABEL",void 0,"Choose your language"),LANGUAGE_LABEL:yU("LANGUAGE_LABEL",void 0,"Language:"),OFF:yU("OFF",void 0,"Off"),ON:yU("ON",void 0,"On"),RESTRICTED_MODE_LABEL:yU("RESTRICTED_MODE_LABEL",void 0,"Restricted Mode:"),RESTRICTED_MODE_TEXT_LINE_1:yU("RESTRICTED_MODE_TEXT_LINE_1",void 0,"Restricted Mode hides videos that may contain inappropriate content flagged by users and other signals. No filter is 100% accurate, but it should help you avoid mostinappropriate content."),
RESTRICTED_MODE_TEXT_LINE_2:yU("RESTRICTED_MODE_TEXT_LINE_2",void 0,"Your Restricted Mode setting will apply to this browser only."),RESTRICTED_MODE_TITLE:yU("RESTRICTED_MODE_TITLE",void 0,"Restricted Mode"),CLASSIC_YOUTUBE_LABEL:yU("CLASSIC_YOUTUBE_LABEL",void 0,"Restore classic YouTube")}}},created:function(){this.prefs_=eS.getInstance()},
reset:function(){this.dropdownPage_="main"},
dataChanged_:function(a){this.clientSettings_={language:z("LANGUAGE"),country:z("COUNTRY"),restrictedMode:this.isManagedRestrictedMode_()||hS(0,58)};if(a.page){this.dropdownPage_=a.page;if("languages"==a.page)this.onLanguageTap_();if("countries"==a.page)this.onCountryTap_()}},
onCountryTap_:function(){this.fetchCountries_().then(function(){this.set("dropdownPage_","countries")}.bind(this))},
onLanguageTap_:function(){var a=this;return Ca(function(b){if(1==b.nextAddress)return ta(b,a.fetchLanguages_(),2);a.set("dropdownPage_","languages");ua(b)})},
fetchCountries_:function(){return new Yv(function(a){this.countries_||this.countriesLoading_?a():(this.countriesLoading_=!0,this.getInterface(BW).fetchData("/picker_ajax?action_country_json=1").then(function(b){b=b.data||b;this.set("countries_",b[0].concat(b[1]));this.countriesLoading_=!1;a()}.bind(this)))}.bind(this))},
fetchLanguages_:function(){return new Yv(function(a){this.languages_||this.languagesLoading_?a():(this.languagesLoading_=!0,this.getInterface(BW).fetchData("/picker_ajax?action_language_json=1").then(function(b){this.set("languages_",b.data);this.languagesLoading_=!1;a()}.bind(this)))}.bind(this))},
onRestrictedModeTap_:function(){this.set("dropdownPage_","restricted-mode")},
onPreferenceToSuppressPolymer_:function(a){Zo("/gen_204?nyoutube_restore_classic_intent",void 0);this.sendAction("yt-opt-out-dialog-requested",[Polymer.dom(a).rootTarget]);this.sendAction("yt-close-popup-action",["ytd-multi-page-menu-renderer"])},
onBackTap_:function(){this.set("dropdownPage_","main")},
onLanguageSelect_:function(a){a=this.$$("#language-repeat").itemForElement(Polymer.dom(a).rootTarget);this.prefs_.set("hl",a[0]);this.prefs_.save();this.getInterface(D2).reload()},
onCountrySelect_:function(a){a=this.$$("#country-repeat").itemForElement(Polymer.dom(a).rootTarget);var b=Gi(window.location.href,"persist_gl",1);zU(Gi(b,"gl",a[1]))},
onRestrictedModeChange_:function(a){this.isManagedRestrictedMode_()||(iS(0,58,Polymer.dom(a).rootTarget.checked),this.prefs_.save(),this.getInterface(D2).reload())},
computeIsMainPage_:function(a){return"main"==a},
computeIsLanguagesPage_:function(a){return"languages"==a},
computeIsCountriesPage_:function(a){return"countries"==a},
computeIsRestrictedModePage_:function(a){return"restricted-mode"==a},
isManagedRestrictedMode_:function(){return!(!this.data||!this.data.managedRestrictedMode)},
computeRestrictedModeText_:function(a){return a?this.menuStrings_.ON:this.menuStrings_.OFF},
computeCovered_:function(a,b){return!b||b.inlined?!1:"main"!=a},
coveredChanged_:function(a){this.fire("yt-account-settings-covered-changed",a)},
getListItemClass_:function(a){return"list-item"+(a?" selected":"")}});Polymer({is:"yt-search-query-correction",behaviors:[iY.ComponentBehavior],properties:{correctedText:Object,correctedQuery:Object,correctedEndpoint:Object,originalText:Object,originalQuery:{type:Object,value:null},originalEndpoint:{type:Object,value:null},showOriginalQueryWithoutEndpoint:{type:Boolean,value:!1,computed:"computeShowOriginalQueryWithoutEndpoint_(originalQuery, originalEndpoint)"}},computeShowOriginalQueryWithoutEndpoint_:function(a,b){return!(!a||b)}});OY("itemSectionRenderer","didYouMeanRenderer","yt-did-you-mean-renderer");Polymer({is:"yt-did-you-mean-renderer",behaviors:[V.YtRendererBehavior],properties:{data:Object}});OY("itemSectionRenderer","includingResultsForRenderer","yt-including-results-for-renderer");Polymer({is:"yt-including-results-for-renderer",behaviors:[V.YtRendererBehavior],properties:{data:Object}});OY("itemSectionRenderer","musicPassFeatureInfoRenderer","yt-music-pass-feature-info-renderer");Polymer({is:"yt-music-pass-feature-info-renderer",behaviors:[V.YtRendererBehavior],properties:{data:Object},observers:["computeUrlImg_(data)"],computeExtraClasses_:function(a,b){var c="";a&&(c+=" "+a.toLowerCase().replace(/_/g,"-"));b&&(c+=" "+b.toLowerCase().replace(/_/g,"-"));return c},
computeUrlImg_:function(a){a.image&&(this.$.container.style.backgroundImage="url("+LY(a.image.thumbnails,Number.MAX_VALUE)+")")}});OY("itemSectionRenderer","noResultsFoundShowingResultsForRenderer","yt-no-results-found-showing-results-for-renderer");Polymer({is:"yt-no-results-found-showing-results-for-renderer",behaviors:[V.YtRendererBehavior],properties:{data:Object}});OY("itemSectionRenderer","resultsWithoutQuotesRenderer","yt-results-without-quotes-renderer");Polymer({is:"yt-results-without-quotes-renderer",behaviors:[V.YtRendererBehavior],properties:{data:Object}});OY("itemSectionRenderer","searchNoResultsRenderer","yt-search-no-results-renderer");Polymer({is:"yt-search-no-results-renderer",behaviors:[V.YtRendererBehavior],properties:{data:Object}});OY("itemSectionRenderer","showingResultsForRenderer","yt-showing-results-for-renderer");Polymer({is:"yt-showing-results-for-renderer",behaviors:[V.YtRendererBehavior],properties:{data:Object}});OY("itemSectionRenderer","subscriptionProductRenderer","yt-subscription-product-renderer");
Polymer({is:"yt-subscription-product-renderer",behaviors:[V.YtRendererBehavior,X],listeners:{"yt-rendererstamper-finished":"onStampFinished_"},properties:{data:Object},stampDom:{"data.primaryButton":{id:"primary-button",mapping:{buttonRenderer:{component:"yt-button-renderer"}}},"data.secondaryButton":{id:"secondary-button",mapping:{buttonRenderer:{component:"yt-button-renderer"}}},"data.menu":{id:"menu",mapping:PY("menuRenderer"),events:!0}},onStampFinished_:function(){this.$.menu.children[0].icon=
"yt-icons:more_vert"}});ZX.YtRendererStamperBehavior=X;Polymer({is:"yt-card-item-actions-renderer",behaviors:[ZX.YtRendererStamperBehavior,V.YtRendererBehavior],properties:{data:Object},stampDom:{"data.primaryButtonRenderer":{id:"primary-button-renderer",mapping:PY("sharingToggleButtonAndDefaultButton")},"data.secondaryButtonRenderer":{id:"secondary-button-renderer",mapping:PY("sharingToggleButtonAndDefaultButton")}}});var E2={},FGa=function(a,b,c){a.removeAttribute("top-"+c);a.removeAttribute("bottom-"+c);a.removeAttribute("left-"+c);a.removeAttribute("right-"+c);b&&(b.top&&a.setAttribute("top-"+c,b.top),b.bottom&&a.setAttribute("bottom-"+c,b.bottom),b.left&&a.setAttribute("left-"+c,b.left),b.right&&a.setAttribute("right-"+c,b.right))};
E2.YtCardItemBoxBehavior=[{observers:["cardItemContainerMarginChanged_(data.containerMargin)","cardItemContainerPaddingChanged_(data.containerPadding)"],created:function(){this.cardItemBoxBehaviorPaddingTargetId=this.cardItemBoxBehaviorPaddingMarginId=""},
cardItemContainerMarginChanged_:function(a){FGa(this.cardItemBoxBehaviorMarginTargetId&&this.$?this.$[this.cardItemBoxBehaviorMarginTargetId]:this,a,"margin")},
cardItemContainerPaddingChanged_:function(a){FGa(this.cardItemBoxBehaviorPaddingTargetId&&this.$?this.$[this.cardItemBoxBehaviorPaddingTargetId]:this,a,"padding")}}];var F2={CARD_ITEM_COLOR_GENERAL_BACKGROUND_A:"var(--yt-spec-general-background-a)",CARD_ITEM_COLOR_GENERAL_BACKGROUND_B:"var(--yt-spec-general-background-b)",CARD_ITEM_COLOR_ERROR_BACKGROUND:"var(--yt-spec-error-background)",CARD_ITEM_COLOR_TEXT_PRIMARY:"var(--yt-spec-text-primary)",CARD_ITEM_COLOR_TEXT_SECONDARY:"var(--yt-spec-text-secondary)",CARD_ITEM_COLOR_CALL_TO_ACTION:"var(--yt-spec-call-to-action)",CARD_ITEM_COLOR_ICON_INACTIVE:"var(--yt-spec-icon-inactive)",CARD_ITEM_COLOR_ICON_DISABLED:"var(--yt-spec-icon-disabled)",
CARD_ITEM_COLOR_BRAND_ICON_ACTIVE:"var(--yt-spec-brand-icon-active)",CARD_ITEM_COLOR_BRAND_ICON_INACTIVE:"var(--yt-spec-brand-icon-inactive)",CARD_ITEM_COLOR_10_PERCENT_LAYER:"var(--yt-spec-10-percent-layer)",CARD_ITEM_COLOR_TEXT_PRIMARY_INVERSE:"var(--yt-spec-text-primary-inverse)",CARD_ITEM_COLOR_ICON_ACTIVE_OTHER:"var(--yt-spec-icon-active-other)"};Polymer({is:"yt-card-item-text-renderer",behaviors:[V.YtRendererBehavior,E2.YtCardItemBoxBehavior],observers:["textColorChanged_(data.textColor)"],properties:{data:Object},textColorChanged_:function(a){this.style.color=F2[a||"CARD_ITEM_COLOR_TEXT_PRIMARY"]}});Polymer({is:"yt-card-item-text-collection-renderer",behaviors:[V.YtRendererBehavior,X],properties:{data:Object},stampDom:{"data.textRenderers":{id:"text-renderers",mapping:{cardItemTextRenderer:{component:"yt-card-item-text-renderer"}}}}});Polymer({is:"yt-themed-image-renderer",behaviors:[V.YtRendererBehavior,X,E2.YtCardItemBoxBehavior,U.YtActionHandlerBehavior],properties:{data:Object,fit:{type:Boolean,value:!1},isDarkTheme_:Boolean,themeImage_:{type:Object,computed:"computeThemeImage_(data, isDarkTheme_)"},themeIcon_:{type:Object,computed:"computeThemeIcon_(data)"},isCircular_:{type:Boolean,reflectToAttribute:!0,value:!1}},actionMap:{"yt-dark-mode-toggled-action":"handleDarkModeToggledAction_"},attached:function(){this.isDarkTheme_=
document.documentElement.hasAttribute("dark")},
handleDarkModeToggledAction_:function(a){this.isDarkTheme_=a},
computeThemeImage_:function(a,b){if(!a||!a.imageLight)return!1;if(!a.imageDark)return we(Error("dark themed image not present")),!1;this.isCircular_=a.isCircular;return b?a.imageDark:a.imageLight},
computeThemeIcon_:function(a){if(!a||!a.themedIcon)return!1;var b=a.themedIcon;this.$.icon.style.color=F2[b.iconColor||"CARD_ITEM_COLOR_GENERAL_BACKGROUND_A"];this.$.icon.style.width=(a.imageWidth||18)+"px";this.$.icon.style.height=(a.imageHeight||18)+"px";return"yt-icons:"+b.icon.iconType}});Polymer({is:"yt-card-item-text-with-image-renderer",behaviors:[ZX.YtRendererStamperBehavior,V.YtRendererBehavior],properties:{data:Object,imagePlacement:{type:String,value:"CARD_ITEM_IMAGE_PLACEMENT_UNKNOWN",computed:"computeImagePlacement_(data.imagePlacement)",reflectToAttribute:!0}},stampDom:{"data.imageRenderer":{id:"themed-image-renderer",mapping:{themedImageRenderer:{component:"yt-themed-image-renderer"}}},"data.textCollectionRenderer":{id:"card-item-text-collection-renderer",mapping:{cardItemTextCollectionRenderer:{component:"yt-card-item-text-collection-renderer"}}}},
computeImagePlacement_:function(a){return a||"CARD_ITEM_IMAGE_PLACEMENT_UNKNOWN"}});Polymer({is:"yt-card-item-error-renderer",behaviors:[ZX.YtRendererStamperBehavior,V.YtRendererBehavior],properties:{data:Object},stampDom:{"data.errorTextRenderer":{id:"error-text-renderer",mapping:{cardItemTextCollectionRenderer:{component:"yt-card-item-text-collection-renderer"},cardItemTextWithImageRenderer:{component:"yt-card-item-text-with-image-renderer"}}}}});OY("itemSectionRenderer","CardItemRenderer","yt-card-item-renderer");
Polymer({is:"yt-card-item-renderer",behaviors:[T.YtActionSenderBehavior,V.YtRendererBehavior,X,E2.YtCardItemBoxBehavior],properties:{data:Object,isExpanded_:{type:Boolean,value:!1},isErrorRendererVisible_:{type:Boolean,value:!1},tapEnabled:{type:Boolean,value:!1,observer:"onTapEnabledChanged_"}},listeners:{"yt-toggle-button":"onYtToggleButton_","yt-commerce-action-init-done":"onServiceRequestFinished_","yt-service-request-error":"onServiceRequestFinished_","yt-commerce-action-done":"onServiceRequestFinished_"},
observers:["backgroundColorChanged_(data.backgroundColor)","errorRendererVisibilityChanged_(data.errorRenderer, isExpanded_)","onTapChanged_(data.onTap)"],stampDom:{"data.headingRenderer":{id:"heading-renderer",mapping:{cardItemTextCollectionRenderer:{component:"yt-card-item-text-collection-renderer"},cardItemTextWithImageRenderer:{component:"yt-card-item-text-with-image-renderer"}}},"data.descriptionRenderer":{id:"description-renderer",mapping:{cardItemTextCollectionRenderer:{component:"yt-card-item-text-collection-renderer"}}},
"data.additionalInfoRenderer":{id:"additional-info-renderer",mapping:{cardItemActionsRenderer:{component:"yt-card-item-actions-renderer"},cardItemTextCollectionRenderer:{component:"yt-card-item-text-collection-renderer"},themedImageRenderer:{component:"yt-themed-image-renderer"}}},"data.errorRenderer":{id:"error-renderer",mapping:{cardItemErrorRenderer:{component:"yt-card-item-error-renderer"}}}},created:function(){this.cardItemBoxBehaviorPaddingTargetId="main-content"},
onTapChanged_:function(a){this.tapEnabled=!!a},
backgroundColorChanged_:function(a){this.$["main-content"].style.backgroundColor=F2[a||"CARD_ITEM_COLOR_UNKNOWN"]||"transparent"},
errorRendererVisibilityChanged_:function(a,b){this.isErrorRendererVisible_=!!a&&!b},
onTapEnabledChanged_:function(){this.tapEnabled?(this.$["main-content"].setAttribute("tabIndex",0),this.$["main-content"].setAttribute("role","link")):(this.$["main-content"].removeAttribute("tabIndex"),this.$["main-content"].removeAttribute("role"))},
onMainContentKeyDown_:function(a){if(13===a.keyCode||32===a.keyCode)this.onMainContentTap_()},
onMainContentTap_:function(){if(this.tapEnabled){var a=this.data.onTap;a.ypcGetCartEndpoint?(this.sendServiceRequestAction([a]),this.tapEnabled=!1):this.sendInnerTubeActions([a],this)}},
onServiceRequestFinished_:function(a){a.target==this&&(this.tapEnabled=!!this.data.onTap)},
onYtToggleButton_:function(a,b){this.isExpanded_=b.toggled}});Polymer({is:"yt-offer-item-upsell-renderer",behaviors:[V.YtRendererBehavior,X],properties:{data:Object},observers:["backgroundColorChanged_(data.backgroundColor)"],stampDom:{"data.imageRenderer":{id:"image-renderer",mapping:{themedImageRenderer:{component:"yt-themed-image-renderer"}}},"data.headingRenderer":{id:"heading-renderer",mapping:{cardItemTextCollectionRenderer:{component:"yt-card-item-text-collection-renderer"}}},"data.descriptionRenderer":{id:"description-renderer",mapping:{cardItemTextCollectionRenderer:{component:"yt-card-item-text-collection-renderer"}}},
"data.priceRenderer":{id:"price-renderer",mapping:{cardItemTextRenderer:{component:"yt-card-item-text-renderer"}}},"data.actionsRenderer":{id:"actions-renderer",mapping:{cardItemActionsRenderer:{component:"yt-card-item-actions-renderer"}}}},backgroundColorChanged_:function(a){this.style.backgroundColor=F2[a||"CARD_ITEM_COLOR_UNKNOWN"]||"transparent"}});OY("itemSectionRenderer","CardItemContainerRenderer","yt-card-item-container-renderer");
Polymer({is:"yt-card-item-container-renderer",isInjectionRoot:!0,behaviors:[X,r0,V.YtRendererBehavior,Eq.InjectBehavior],properties:{data:{type:Object,observer:"dataChanged_"},isExpanded_:{type:Boolean,reflectToAttribute:!0,value:!1},continuationStatus_:{type:String,value:"not-started"},showSpinner_:{type:Boolean,reflectToAttribute:!0,computed:"computeShowSpinner_(isExpanded_, continuationStatus_)",value:!1}},listeners:{"yt-toggle-button":"onToggleButton_","yt-next-continuation-data-updated":"nextContinuationDataUpdated_"},
stampDom:{"data.baseRenderer":{id:"base",mapping:{cardItemRenderer:{component:"yt-card-item-renderer",noInjection:!0}}},"data.contents":{id:"contents",mapping:{cardItemRenderer:{component:"yt-card-item-renderer",noInjection:!0},offerItemUpsellRenderer:{component:"yt-offer-item-upsell-renderer",noInjection:!0}}},"data.continuationSection":{id:"continuation-section",mapping:PY("sharingItemSection")}},nextContinuation:{continuationType:"sectionListContinuation",contentsArray:"data.continuationSection"},
computeShowSpinner_:function(a,b){return a&&"in-progress"===b},
onToggleButton_:function(a){var b=this;a.stopPropagation();(this.isExpanded_=a.detail&&a.detail.toggled)&&!this.data.continuationSection&&this.data.continuation&&"in-progress"!==this.continuationStatus_&&(this.fire("yt-load-next-continuation",function(c){return b.getContinuationUrl_(c)}),this.continuationStatus_="in-progress")},
getContinuationUrl_:function(a){var b=this.get("continuation.onClickContinuationData.continuation",this.data),c=this.get("continuation.onClickContinuationData.clickTrackingParams",this.data),d=Wo();c&&d&&Co(d,go(c),void 0);return Ai(a,{continuation:b})},
nextContinuationDataUpdated_:function(){this.continuationStatus_="complete";var a=this.querySelector("#continuation-section");a&&(a=a.querySelectorAll("ytmusic-item-section-renderer"))&&a.forEach(function(b){return b.classList.add("memberships-and-purchases")})},
dataChanged_:function(){this.isExpanded_=!!this.data.contents}});Polymer({is:"yt-generic-faq-question-renderer",behaviors:[V.YtRendererBehavior],properties:{data:Object,answerExpanded:{reflectToAttribute:!0,type:Boolean,value:!1}},listeners:{tap:"toggleAnswer_"},toggleAnswer_:function(a){var b=Polymer.dom(a).rootTarget;if(!b||!b.classList.contains("yt-simple-endpoint")&&"yt-endpoint"!=b.getAttribute("is"))a.preventDefault(),a.stopPropagation(),this.answerExpanded=!this.answerExpanded}});OY("itemSectionRenderer","faqSectionRenderer","yt-faq-section-renderer");Polymer({is:"yt-faq-section-renderer",behaviors:[X,V.YtRendererBehavior],properties:{data:Object},stampDom:{"data.questions":{id:"contents",mapping:{genericFaqQuestionRenderer:"yt-generic-faq-question-renderer"}}}});OY("itemSectionRenderer","OfferItemExpandedRenderer","yt-offer-item-expanded-renderer");
Polymer({is:"yt-offer-item-expanded-renderer",behaviors:[V.YtRendererBehavior,X],properties:{data:Object},stampDom:{"data.imageRenderer":{id:"image-renderer",mapping:{themedImageRenderer:{component:"yt-themed-image-renderer",params:{fit:!0}}}},"data.headingRenderer":{id:"heading-renderer",mapping:{cardItemTextCollectionRenderer:{component:"yt-card-item-text-collection-renderer"}}},"data.descriptionRenderer":{id:"description-renderer",mapping:{cardItemTextCollectionRenderer:{component:"yt-card-item-text-collection-renderer"}}},
"data.additionalInfoRenderer":{id:"additional-info-renderer",mapping:{cardItemActionsRenderer:{component:"yt-card-item-actions-renderer"}}}}});OY("itemSectionRenderer","OfferItemRenderer","yt-offer-item-renderer");
Polymer({is:"yt-offer-item-renderer",behaviors:[V.YtRendererBehavior,X],properties:{data:Object},stampDom:{"data.imageRenderer":{id:"image-renderer",mapping:{themedImageRenderer:{component:"yt-themed-image-renderer",params:{fit:!0}}}},"data.headingRenderer":{id:"heading-renderer",mapping:{cardItemTextCollectionRenderer:{component:"yt-card-item-text-collection-renderer"}}},"data.descriptionRenderer":{id:"description-renderer",mapping:{cardItemTextCollectionRenderer:{component:"yt-card-item-text-collection-renderer"}}},"data.additionalInfoRenderer":{id:"additional-info-renderer",
mapping:{cardItemActionsRenderer:{component:"yt-card-item-actions-renderer"}}}}});OY("itemSectionRenderer","subscriptionProductHeaderRenderer","yt-subscription-product-header-renderer");Polymer({is:"yt-subscription-product-header-renderer",behaviors:[V.YtRendererBehavior],properties:{data:Object,ariaLevel:{type:String,computed:"computeAriaLevel_(data.level)",reflectToAttribute:!0},role:{type:String,value:"heading",reflectToAttribute:!0},tabindex:{type:Number,value:-1,reflectToAttribute:!0}},computeAriaLevel_:function(a){return this.getLevelID_(a)},
getLevelID_:function(a){return(a=a.match(/[0-9]+$/))&&1==a.length?a[0]:"1"}});OY("itemSectionRenderer","subscriptionProductUpsellOfferRenderer","yt-subscription-product-upsell-offer-renderer");
Polymer({is:"yt-subscription-product-upsell-offer-renderer",behaviors:[V.YtRendererBehavior,X],properties:{data:Object},observers:["imageScrimColorValuesChanged_(data.imageScrimColorValues)"],stampDom:{"data.primaryButton":{id:"primary-button",mapping:{buttonRenderer:"yt-button-renderer"}},"data.secondaryButton":{id:"secondary-button",mapping:{buttonRenderer:"yt-button-renderer"}}},imageScrimColorValuesChanged_:function(a){this.$.scrim.style.backgroundColor=a?tX(a[0]):"transparent"}});var G2=[T.YtActionSenderBehavior,{openToastWithFormattedMessage:function(a){this.sendAction("yt-open-popup-action",[{openPopupAction:{popupType:"TOAST",popup:{notificationActionRenderer:{responseText:a}}}},this])},
openToast:function(a){this.openToastWithFormattedMessage(UU(a))}}];Polymer({is:"yt-single-ypc-offer-renderer",behaviors:[V.YtRendererBehavior,G2],listeners:{"yt-service-request-error":"onYtServiceRequestError_"},properties:{data:Object,collapsible:{type:Boolean,value:!1,reflectToAttribute:!0},isManageRed:{reflectToAttribute:!0,type:Boolean,value:!1}},onYtServiceRequestError_:function(a){this.openToast(a.detail.error.message)}});Polymer({is:"yt-single-ypc-offer-list-renderer",behaviors:[X,V.YtRendererBehavior],properties:{data:Object,isManageRed:{type:Boolean,reflectToAttribute:!0,value:!1}},stampDom:{"data.singleYpcOfferSupportedRenderers":{id:"contents",mapping:{singleYpcOfferRenderer:{component:"yt-single-ypc-offer-renderer",properties:{isManageRed:"[[isManageRed]]"}}}}}});OY("itemSectionRenderer","ypcOffersListRenderer","yt-ypc-offers-list-renderer");Polymer({is:"yt-ypc-offers-list-renderer",behaviors:[V.YtRendererBehavior,X],properties:{data:Object,isManageRed:{type:Boolean,value:!1}},stampDom:{"data.offersList":{id:"contents",mapping:{singleYpcOfferListRenderer:{component:"yt-single-ypc-offer-list-renderer",properties:{isManageRed:"[[isManageRed]]"}}}}}});OY("itemSectionRenderer","unlimitedManageSubscriptionPageRenderer","yt-unlimited-manage-subscription-page-renderer");
Polymer({is:"yt-unlimited-manage-subscription-page-renderer",behaviors:[V.YtRendererBehavior,X],properties:{data:Object},stampDom:{"data.manageFixFopButton":{id:"manage-fix-fop-button",mapping:{buttonRenderer:{component:"yt-button-renderer",params:{alignByText:!0}}}},"data.helpButton":{id:"help-button",mapping:{buttonRenderer:{component:"yt-button-renderer",params:{alignByText:!0}}}},"data.manageFamilyButton":{id:"manage-family-button",mapping:{buttonRenderer:{component:"yt-button-renderer",params:{alignByText:!0}}}},
"data.manageSubscriptionButton":{id:"manage-subscription-button",mapping:{buttonRenderer:{component:"yt-button-renderer",params:{alignByText:!0}}}},"data.offers":{id:"offers",mapping:{ypcOffersListRenderer:{component:"yt-ypc-offers-list-renderer",params:{isManageRed:!0}}}}}});Polymer({is:"yt-collapsible-ypc-offer-renderer",behaviors:[Polymer.IronA11yKeysBehavior,X,V.YtRendererBehavior],hostAttributes:{role:"button",tabindex:0},keyBindings:{"enter:keypress":"onKeypress_"},properties:{data:{type:Object,observer:"dataChanged_"},offersVisible_:{type:Boolean,reflectToAttribute:!0}},stampDom:{"data.singleYpcOfferListSupportedRenderers":{id:"offers",mapping:{singleYpcOfferRenderer:{component:"yt-single-ypc-offer-renderer",params:{collapsible:!0}}}}},onKeypress_:function(a){a.detail.keyboardEvent.target==
this&&this.expandOffers_()},
handleHeaderTap_:function(a){a.preventDefault();a.stopPropagation();this.expandOffers_()},
expandOffers_:function(){this.offersVisible_=!0;this.setAttribute("tabindex","-1")},
dataChanged_:function(a){this.offersVisible_=!a.isCollapsed}});OY("itemSectionRenderer","unlimitedPageHeaderRenderer","yt-unlimited-page-header-renderer");
Polymer({is:"yt-unlimited-page-header-renderer",behaviors:[X,V.YtRendererBehavior,G2],listeners:{"yt-service-request-error":"onYtServiceRequestError_"},properties:{data:{type:Object,observer:"dataChanged_"}},stampDom:{"data.moreOffersRenderers":{id:"more-offers",mapping:{collapsibleYpcOfferRenderer:{component:"yt-collapsible-ypc-offer-renderer"}}}},dataChanged_:function(){if(this.data.backgroundImage){var a=LY(this.data.backgroundImage.thumbnails,screen.width),b=this.getScrimLayerColorStops_();this.style["background-image"]=
b?"linear-gradient(180deg, "+b+"), url("+a+")":"url("+a+")";this.data.gtmId&&UEa(this.data.gtmId)}},
onYtServiceRequestError_:function(a){this.openToast(a.detail.error.message)},
getScrimLayerColorStops_:function(){var a=this.get("unlimitedHeaderV2Data.unlimitedHeaderV2Data",this.data);if(!a)return null;var b=100/a.scrimLayerColors.length;return a.scrimLayerColors.map(function(c,d){d*=b;return tX(c)+" "+d+"%"}).join(",")}});OY("itemSectionRenderer","UnlimitedUserNotificationRenderer","yt-unlimited-user-notification-renderer");Polymer({is:"yt-unlimited-user-notification-renderer",behaviors:[X,V.YtRendererBehavior],properties:{data:Object},stampDom:{"data.actionButton":{id:"action-button",mapping:{buttonRenderer:{component:"yt-button-renderer",attributes:{"dialog-confirm":!0}}}}}});OY("itemSectionRenderer","channelCustomGadgetRenderer","yt-channel-custom-gadget-renderer");Polymer({is:"yt-channel-custom-gadget-renderer",behaviors:[V.YtRendererBehavior],properties:{data:Object}});Polymer({is:"ytd-sentiment-bar-renderer",behaviors:[V.YtRendererBehavior],properties:{data:{type:Object},activated_:{type:Boolean,reflectToAttribute:!0}},observers:["observeLikeStatus_(data.likeStatus)"],listeners:{"yt-service-request-sent":"onYtServiceRequestSent_"},notifyLikeChange:function(a){a.status&&this.observeLikeStatus_(a.status)},
observeLikeStatus_:function(a){this.data&&("DISLIKE"==a?(a=this.data.percentIfDisliked||0,this.activated_=!0):"LIKE"==a?(a=this.data.percentIfLiked||0,this.activated_=!0):(a=this.data.percentIfIndifferent||0,this.activated_=!1),this.$["like-bar"].style.width=a+"%")}});Polymer({is:"yt-view-count-renderer",behaviors:[iY.ComponentBehavior],properties:{data:Object,small_:{type:Boolean,value:function(){return A("kevlar_fixie_watch_layout")||A("no_sub_count_on_sub_button")},
reflectToAttribute:!0}}});Polymer({is:"ytd-video-primary-info-renderer",behaviors:[U.YtActionHandlerBehavior,V.YtRendererBehavior,X,tY.YtTaskEmitterBehavior],properties:{data:{type:Object,observer:"dataChanged_"},hasDateText_:{type:Boolean,computed:"computeHasDateText_(data)",reflectToAttribute:!0}},listeners:{"yt-service-request-sent":"onYtServiceRequestSent_","yt-service-request-completed":"onYtServiceRequestCompleted_"},actionMap:{"yt-update-viewership-action":"handleUpdateViewershipAction_","yt-update-title-action":"handleUpdateTitleAction_",
"yt-update-date-text-action":"handleUpdateDateTextAction_"},dataChanged_:function(){this.scheduleInitialUpdatedMetadataRequest_();this.setSentimentBarWidth_()},
scheduleInitialUpdatedMetadataRequest_:function(){this.data&&this.data.updatedMetadataEndpoint&&Fn(this.getTaskManager(),this.fetchUpdatedMetadata_.bind(this),250)},
setSentimentBarWidth_:function(){Polymer.RenderStatus.afterNextRender(this,function(){var a=this.$$("ytd-menu-renderer");if(a){a=(Polymer.Element?Polymer.dom(a.root):a).querySelectorAll("[button-renderer]");for(var b=0,c=0;c<a.length;c++){var d=a[c],e=this.get("toggleButtonSupportedData.toggleButtonIdData.id",d.data);if("TOGGLE_BUTTON_ID_TYPE_DISLIKE"==e||"TOGGLE_BUTTON_ID_TYPE_LIKE"==e)b+=d.clientWidth+8;else break}b&&(this.$.sentiment.style.width=b-8+"px")}}.bind(this))},
fetchUpdatedMetadata_:function(a){var b;a&&(b={continuation:a});this.sendServiceRequestAction([this.data.updatedMetadataEndpoint,b])},
stampDom:{"data.videoActions":{id:"menu",mapping:{menuRenderer:{component:"ytd-menu-renderer",params:{icon:"yt-icons:more"}}}},"data.viewCount":{id:"count",mapping:{videoViewCountRenderer:"yt-view-count-renderer"}}},onYtServiceRequestSent_:function(a,b){if(b.endpoint&&b.endpoint.likeEndpoint){this.set("data.sentimentBar.sentimentBarRenderer.likeStatus",b.endpoint.likeEndpoint.status);if((a=b.endpoint)&&a.likeEndpoint){a=a.likeEndpoint;b=this.get("data.videoActions.menuRenderer.topLevelButtons");for(var c=
0;c<b.length;c++){var d=this.get("toggleButtonRenderer.defaultServiceEndpoint.likeEndpoint",b[c]);d&&(d=d.status,"LIKE"==d?this.set(["data.videoActions.menuRenderer.topLevelButtons",c,"toggleButtonRenderer.isToggled"],"LIKE"==a.status):"DISLIKE"==d&&this.set(["data.videoActions.menuRenderer.topLevelButtons",c,"toggleButtonRenderer.isToggled"],"DISLIKE"==a.status))}}this.setSentimentBarWidth_()}},
onYtServiceRequestCompleted_:function(a,b){this.get("continuation.timedContinuationData",b.data)&&this.data&&this.data.updatedMetadataEndpoint&&(a=b.data.continuation.timedContinuationData,Fn(this.getTaskManager(),this.fetchUpdatedMetadata_.bind(this,a.continuation),a.timeoutMs))},
handleUpdateViewershipAction_:function(a){var b=this.$$("yt-view-count-renderer");b&&(b.hidden=a.updateViewershipAction.isEmpty);a.updateViewershipAction&&(a.updateViewershipAction.viewership?this.set("data.viewCount",a.updateViewershipAction.viewership):a.updateViewershipAction.viewCount&&this.set("data.viewCount",a.updateViewershipAction.viewCount))},
handleUpdateTitleAction_:function(a){this.set("data.title",a.updateTitleAction.title)},
handleUpdateDateTextAction_:function(a){this.hasDateText_&&this.set("data.dateText",a.updateDateTextAction.dateText)},
computeHasDateText_:function(a){return!!a&&!!a.dateText}});var H2=function(){var a=F.apply(this,arguments)||this;a.actionMap={"yt-update-description-action":"handleUpdateDescriptionAction"};return a};
l(H2,F);f=H2.prototype;f.configureRendererStamper=function(){return{"data.subscribeButton":{id:"subscribe-button",mapping:{buttonRenderer:"ytd-button-renderer",subscribeButtonRenderer:{component:"ytd-subscribe-button-renderer",params:{withCount:!0}},subscriptionNotificationToggleButtonRenderer:"ytd-subscription-notification-toggle-button-renderer"}},"data.membershipButton":{id:"sponsor-button",mapping:{buttonRenderer:"ytd-button-renderer"}}}};
f.attached=function(){this.ytActionHandlerBehavior.actionMap=this.actionMap};
f.expand=function(){this.expanded=!0;this.fire("yt-metadata-expanded",!0)};
f.collapse=function(){this.expanded&&(this.expanded=!1,this.fire("yt-metadata-expanded",!1))};
f.handleUpdateDescriptionAction=function(a){this.description.hidden=a.updateDescriptionAction.isEmpty;this.set("data.description",a.updateDescriptionAction.description)};
var I2=H2;v([H(U.YtActionHandlerBehavior),w("design:type",Object)],I2.prototype,"ytActionHandlerBehavior",void 0);v([H(V.YtRendererBehavior),w("design:type",Object)],I2.prototype,"ytRendererBehavior",void 0);v([H(X),w("design:type",Object)],I2.prototype,"ytRendererstamperBehavior",void 0);v([I(),w("design:type",Object)],I2.prototype,"data",void 0);v([I({reflectToAttribute:!0}),w("design:type",Boolean)],I2.prototype,"expanded",void 0);
v([tl("#description"),w("design:type",Object)],I2.prototype,"description",void 0);I2=v([W({is:"ytd-video-secondary-info-renderer-fixie"})],I2);var J2=function(){return F.apply(this,arguments)||this};
l(J2,F);
J2.prototype.configureRendererStamper=function(){return{alwaysShownItems:{id:"always-shown",mapping:{metadataRowRenderer:"ytd-metadata-row-renderer",metadataWithImageRowRenderer:"ytd-metadata-with-image-row-renderer",metadataRowHeaderRenderer:"ytd-metadata-row-header-renderer",richMetadataRowRenderer:"ytd-rich-metadata-row-renderer"}},collapsibleItems:{id:"collapsible",mapping:{metadataRowRenderer:"ytd-metadata-row-renderer",metadataWithImageRowRenderer:"ytd-metadata-with-image-row-renderer",metadataRowHeaderRenderer:"ytd-metadata-row-header-renderer",
richMetadataRowRenderer:"ytd-rich-metadata-row-renderer"}}}};
J2.prototype.computeCollapsibleItems=function(a,b,c){return void 0===a||void 0===b||void 0===c||c?[]:a.slice(b)};
J2.prototype.computeAlwaysShownItems=function(a,b){return a&&a.length?a.slice(0,b):[]};
var K2=J2;v([H(V.YtRendererBehavior),w("design:type",Object)],K2.prototype,"ytRendererBehavior",void 0);v([H(X),w("design:type",Object)],K2.prototype,"ytRendererstamperBehavior",void 0);v([I(),w("design:type",Object)],K2.prototype,"data",void 0);v([I({value:!1}),w("design:type",Boolean)],K2.prototype,"collapsed",void 0);v([I({computed:"computeAlwaysShownItems(data.rows,data.collapsedItemCount)"}),w("design:type",Array)],K2.prototype,"alwaysShownItems",void 0);
v([I({computed:"computeCollapsibleItems(data.rows,data.collapsedItemCount,collapsed)"}),w("design:type",Array)],K2.prototype,"collapsibleItems",void 0);K2=v([W({is:"ytd-metadata-row-container-renderer"})],K2);var L2=function(){return F.apply(this,arguments)||this};
l(L2,F);L2.prototype.computeHasDividerLine=function(a){return a};
var M2=L2;v([H(V.YtRendererBehavior),w("design:type",Object)],M2.prototype,"ytRendererBehavior",void 0);v([I(),w("design:type",Object)],M2.prototype,"data",void 0);v([I({reflectToAttribute:!0,computed:"computeHasDividerLine(data.hasDividerLine)"}),w("design:type",Boolean)],M2.prototype,"hasDividerLine",void 0);M2=v([W({is:"ytd-metadata-row-header-renderer"})],M2);var N2=function(){return F.apply(this,arguments)||this};
l(N2,F);N2.prototype.computeHasDividerLine=function(a){return a};
var O2=N2;v([H(V.YtRendererBehavior),w("design:type",Object)],O2.prototype,"ytRendererBehavior",void 0);v([I(),w("design:type",Object)],O2.prototype,"data",void 0);v([I({reflectToAttribute:!0,computed:"computeHasDividerLine(data.hasDividerLine)"}),w("design:type",Boolean)],O2.prototype,"hasDividerLine",void 0);O2=v([W({is:"ytd-metadata-row-renderer"})],O2);var GGa=function(){return F.apply(this,arguments)||this};
l(GGa,F);var P2=GGa;v([H(V.YtRendererBehavior),w("design:type",Object)],P2.prototype,"ytRendererBehavior",void 0);v([I(),w("design:type",Object)],P2.prototype,"data",void 0);P2=v([W({is:"ytd-metadata-with-image-row-renderer"})],P2);var Q2=function(){return F.apply(this,arguments)||this};
l(Q2,F);Q2.prototype.computeStyle=function(a){return a};
Q2.prototype.computeThumbnailWidth=function(a){switch(a){case"RICH_METADATA_RENDERER_STYLE_THUMBNAIL":return 178;case"RICH_METADATA_RENDERER_STYLE_BOX_ART":return 70;default:return 68;}};
var R2=Q2;v([H(V.YtRendererBehavior),w("design:type",Object)],R2.prototype,"ytRendererBehavior",void 0);v([I(),w("design:type",Object)],R2.prototype,"data",void 0);v([I({reflectToAttribute:!0,computed:"computeStyle(data.style)"}),w("design:type",String)],R2.prototype,"componentStyle",void 0);v([I({computed:"computeThumbnailWidth(data.style)"}),w("design:type",Number)],R2.prototype,"thumbnailWidth",void 0);R2=v([W({is:"ytd-rich-metadata-renderer"})],R2);var S2=function(){return F.apply(this,arguments)||this};
l(S2,F);S2.prototype.configureRendererStamper=function(){return{"data.contents":{id:"contents",mapping:{richMetadataRenderer:"ytd-rich-metadata-renderer"}}}};
S2.prototype.computeHasDividerLine=function(a){return a};
var T2=S2;v([H(X),w("design:type",Object)],T2.prototype,"ytRendererstamperBehavior",void 0);v([I(),w("design:type",Object)],T2.prototype,"data",void 0);v([I({reflectToAttribute:!0,computed:"computeHasDividerLine(data.hasDividerLine)"}),w("design:type",Boolean)],T2.prototype,"hasDividerLine",void 0);T2=v([W({is:"ytd-rich-metadata-row-renderer"})],T2);var U2=function(){var a=F.apply(this,arguments)||this;a.actionMap={"yt-update-date-text-action":"handleUpdateDateTextAction","yt-update-description-action":"handleUpdateDescriptionAction","yt-update-horizontal-card-list-action":"handleUpdateHorizontalCardListAction"};return a};
l(U2,F);f=U2.prototype;f.configureRendererStamper=function(){return{subscribeButtonData:{id:"subscribe-button",mapping:{buttonRenderer:"ytd-button-renderer",subscribeButtonRenderer:{component:"ytd-subscribe-button-renderer",params:{withCount:!0}},subscriptionNotificationToggleButtonRenderer:"ytd-subscription-notification-toggle-button-renderer"}}}};
f.attached=function(){this.ytActionHandlerBehavior.actionMap=this.actionMap};
f.dataChanged=function(a){this.collapsed=!(a&&a.defaultExpanded);this.subscribeButtonData=a.subscribeButton;this.descriptionCollapsedHeight=20*(a.descriptionCollapsedLines||3);this.updateInlineRecs(void 0)};
f.handleUpdateHorizontalCardListAction=function(a){a=this.get("updateHorizontalCardListAction.contents.horizontalCardListRenderer",a);this.updateInlineRecs(a)};
f.updateInlineRecs=function(a){this.inlineRecsListRenderer.set("data",a);this.toggleClass("expanded",!this.inlineRecsListRenderer.empty,this.$["list-container"])};
f.handleUpdateDateTextAction=function(a){this.data&&this.data.dateText&&this.set("data.dateText",a.updateDateTextAction.dateText)};
f.handleUpdateDescriptionAction=function(a){this.$.description.hidden=a.updateDescriptionAction.isEmpty;this.set("data.description",a.updateDescriptionAction.description)};
f.computeMetadataCollapsible=function(a){return!!a&&!!a.rows&&a.rows.length>a.collapsedItemCount};
var V2=U2;v([H(U.YtActionHandlerBehavior),w("design:type",Object)],V2.prototype,"ytActionHandlerBehavior",void 0);v([H(V.YtRendererBehavior),w("design:type",Object)],V2.prototype,"ytRendererBehavior",void 0);v([H(X),w("design:type",Object)],V2.prototype,"ytRendererstamperBehavior",void 0);v([I({observer:"dataChanged"}),w("design:type",Object)],V2.prototype,"data",void 0);v([I(),w("design:type",Boolean)],V2.prototype,"collapsed",void 0);v([I(),w("design:type",Boolean)],V2.prototype,"canCollapse",void 0);
v([I(),w("design:type",Object)],V2.prototype,"subscribeButtonData",void 0);v([I(),w("design:type",Number)],V2.prototype,"descriptionCollapsedHeight",void 0);v([tl("#inline-recs-list-renderer"),w("design:type",Object)],V2.prototype,"inlineRecsListRenderer",void 0);V2=v([W({is:"ytd-video-secondary-info-renderer"})],V2);var W2=function(){var a=F.apply(this,arguments)||this;a.actionMap={"yt-button-refresh-action":"handleButtonRefreshAction","yt-unsubscribe-action":"handleUnsubscribeAction"};return a};
l(W2,F);f=W2.prototype;f.configureRendererStamper=function(){return{"data.membershipButton":{id:"sponsor-button",mapping:{buttonRenderer:"ytd-button-renderer"}},"data.analyticsButton":{id:"analytics-button",mapping:{buttonRenderer:"ytd-button-renderer"}}}};
f.attached=function(){this.actionHandlerBehavior.actionMap=this.actionMap};
f.handleButtonRefreshAction=function(a){a.buttonRefreshAction&&this.set("data.membershipButton",a.buttonRefreshAction.membershipButton)};
f.onYtServiceRequestError=function(a){this.ytOpenToastBehavior.openToast(a.detail.error.message)};
f.handleUnsubscribeAction=function(){this.data&&this.data.membershipButton&&"STYLE_PRIMARY"===this.data.membershipButton.buttonRenderer.style&&this.$$("#sponsor-button ytd-button-renderer").set("data.style","STYLE_SUGGESTIVE")};
var X2=W2;X2.prototype.onYtServiceRequestError=X2.prototype.onYtServiceRequestError;v([H(U.YtActionHandlerBehavior),w("design:type",Object)],X2.prototype,"actionHandlerBehavior",void 0);v([H(V.YtRendererBehavior),w("design:type",Object)],X2.prototype,"ytRendererBehavior",void 0);v([H(X),w("design:type",Object)],X2.prototype,"ytRendererstamperBehavior",void 0);v([H(G2),w("design:type",Object)],X2.prototype,"ytOpenToastBehavior",void 0);
v([H(T.YtActionSenderBehavior),w("design:type",Object)],X2.prototype,"actionSenderBehavior",void 0);v([I(),w("design:type",Object)],X2.prototype,"data",void 0);v([ql("yt-service-request-error"),w("design:type",Function),w("design:paramtypes",[CustomEvent]),w("design:returntype",void 0)],X2.prototype,"onYtServiceRequestError",null);X2=v([W({is:"ytd-video-owner-renderer"})],X2);var Y2=function(){return F.apply(this,arguments)||this};
l(Y2,F);Y2.prototype.computeThumbnailWidth=function(a){return"CARD_RENDERER_STYLE_TYPE_UNIVERSAL_WATCH_CARD"===a?90:156};
Y2.prototype.computeThumbnailHeight=function(a){return"CARD_RENDERER_STYLE_TYPE_UNIVERSAL_WATCH_CARD"===a?90:88};
Y2.prototype.computeCardStyle=function(a){return a?a.replace("CARD_RENDERER_STYLE_TYPE_","").toLowerCase():""};
var Z2=Y2;v([H(V.YtRendererBehavior),w("design:type",Object)],Z2.prototype,"ytRendererBehavior",void 0);v([I(),w("design:type",Object)],Z2.prototype,"data",void 0);v([I({computed:"computeThumbnailWidth(data.searchRefinementCardRendererStyle.value)"}),w("design:type",Number)],Z2.prototype,"thumbnailWidth",void 0);v([I({computed:"computeThumbnailHeight(data.searchRefinementCardRendererStyle.value)"}),w("design:type",Number)],Z2.prototype,"thumbnailHeight",void 0);
v([I({reflectToAttribute:!0,computed:"computeCardStyle(data.searchRefinementCardRendererStyle.value)"}),w("design:type",String)],Z2.prototype,"cardStyle",void 0);Z2=v([W({is:"ytd-search-refinement-card-renderer"})],Z2);var $2=function(){return F.apply(this,arguments)||this};
l($2,F);$2.prototype.configureRendererStamper=function(){return{"data.channelThumbnail":{id:"avatar",mapping:{channelThumbnailWithLinkRenderer:"yt-channel-thumbnail-with-link-renderer"}}}};
$2.prototype.computeTitleStyle=function(a){return a||null};
$2.prototype.computeAvatarStyle=function(a){return a||null};
var a3=$2;v([H(V.YtRendererBehavior),w("design:type",Object)],a3.prototype,"ytRendererBehavior",void 0);v([H(X),w("design:type",Object)],a3.prototype,"ytRendererstamperBehavior",void 0);v([I(),w("design:type",Object)],a3.prototype,"data",void 0);v([I({reflectToAttribute:!0,computed:"computeTitleStyle(data.titleStyle.style)"}),w("design:type",String)],a3.prototype,"titleStyle",void 0);
v([I({reflectToAttribute:!0,computed:"computeAvatarStyle(data.channelThumbnail.channelThumbnailWithLinkRenderer.style)"}),w("design:type",String)],a3.prototype,"avatarStyle",void 0);a3=v([W({is:"ytd-rich-list-header-renderer"})],a3);Polymer({is:"yt-channel-thumbnail-with-link-renderer",behaviors:[V.YtRendererBehavior],properties:{data:Object,style_:{type:String,reflectToAttribute:!0,computed:"computeStyle_(data.style)"}},computeStyle_:function(a){return a}});var HGa=function(){return F.apply(this,arguments)||this};
l(HGa,F);var b3=HGa;v([H(V.YtRendererBehavior),w("design:type",Object)],b3.prototype,"ytRendererBehavior",void 0);v([I(),w("design:type",Object)],b3.prototype,"data",void 0);b3=v([W({is:"ytd-title-and-button-list-header-renderer"})],b3);Polymer({is:"ytd-horizontal-card-list-renderer",behaviors:[V.YtRendererBehavior,X,XX.YtdHorizontalListBehavior],properties:{data:{type:Object,observer:"dataChanged_"},initialCount:{type:Number,computed:"computeInitialCountNumber_(data.style.type)"},cardListStyle:{type:String,reflectToAttribute:!0,computed:"computeCardListStyle_(data.style.type)"},empty:{type:Boolean,value:!0,reflectToAttribute:!0,computed:"computeEmpty_(data)"},hasSubtitle:{type:Boolean,reflectToAttribute:!0,computed:"computeHasSubtitle_(data)"},
thumbnailStyle_:{type:String,reflectToAttribute:!0,computed:"computeThumbnailStyle_(data)"},hasGameCard:{type:Boolean,readOnly:!0,reflectToAttribute:!0,computed:"computeHasGameCard_(data)"}},itemsPath:"data.cards",stampDom:{shownItems:{id:"items",mapping:{searchRefinementCardRenderer:"ytd-search-refinement-card-renderer",compactChannelRecommendationCardRenderer:"ytd-compact-channel-recommendation-card-renderer",videoCardRenderer:{component:"ytd-grid-video-renderer",registration:["defer-on-watch"]},
gameCardRenderer:{component:"ytd-game-card-renderer",registration:["defer-on-watch"]}}},"data.header":{id:"header",mapping:{titleAndButtonListHeaderRenderer:"ytd-title-and-button-list-header-renderer",richListHeaderRenderer:"ytd-rich-list-header-renderer"}},"data.sortFilter":{id:"sort-filter",mapping:{sortFilterSubMenuRenderer:"yt-sort-filter-sub-menu-renderer"}},"data.button":{id:"header-button",mapping:{buttonRenderer:"ytd-button-renderer"}},"data.previousButton":{id:"left-arrow-button",mapping:{buttonRenderer:{component:"ytd-button-renderer",
properties:{"on-tap":"[[boundPrevClick]]"},attributes:{arrow:!0}}},initialRenderPriority:0,waitForSignal:"eocs"},"data.nextButton":{id:"right-arrow-button",mapping:{buttonRenderer:{component:"ytd-button-renderer",properties:{"on-tap":"[[boundNextClick]]"},attributes:{arrow:!0}}}}},dataChanged_:function(){this.reset()},
computeCardListStyle_:function(a){return a||null},
computeEmpty_:function(a){return!this.get("cards.length",a)},
computeThumbnailStyle_:function(a){return this.get("header.richListHeaderRenderer.channelThumbnail.channelThumbnailWithLinkRenderer.style",a)||null},
computeHasSubtitle_:function(a){return!!this.get("header.richListHeaderRenderer.subtitle",a)},
computeInitialCountNumber_:function(a){return"HORIZONTAL_CARD_LIST_STYLE_TYPE_CHANNEL_SHELF"===a?6:"HORIZONTAL_CARD_LIST_STYLE_TYPE_INLINE_RECOMMENDATIONS"===a?8:"HORIZONTAL_CARD_LIST_STYLE_TYPE_NARROW_SHELF"===a?10:4},
computeHasGameCard_:function(a){return(a=this.get("cards",a))?a.some(function(b){return b.gameCardRenderer}):!1},
handleKeyDown_:function(){this.fillRemainingListItems();this.markDirty()}});Polymer({is:"ytd-donation-shelf-renderer",behaviors:[cY.YtOpenPopupBehavior,X,V.YtRendererBehavior,U.YtActionHandlerBehavior],actionMap:{"yt-dark-mode-toggled-action":"onDarkModeToggledAction_","yt-update-donation-shelf-command":"handleUpdate_"},properties:{data:{type:Object,observer:"dataChanged_"},isCollapsed:{type:Boolean,value:!1},headerBackgroundUrl_:{type:String,computed:"computeHeaderBackgroundUrl_(data, isDarkTheme_)"},isDarkTheme_:Boolean,watchColorUpdate_:{type:Boolean,reflectToAttribute:!0,
value:function(){return A("kevlar_watch_color_update")}}},
attached:function(){this.isDarkTheme_=document.documentElement.hasAttribute("dark")},
stampDom:{"data.donateButton":{id:"donate-button",mapping:{buttonRenderer:"ytd-button-renderer"}}},onDonateTap_:function(){var a=this.get("data.donateButton.buttonRenderer.command");if(a){var b=Wo(),c=this.get("data.donateButton.buttonRenderer.trackingParams");b&&c&&Co(b,go(c),void 0);this.openPopup(a)}},
onShowMore_:function(){this.isCollapsed=!1;var a=Wo(),b=this.get("data.expandButton.buttonRenderer.trackingParams");a&&b&&Co(a,go(b),void 0)},
onShowLess_:function(){this.isCollapsed=!0},
dataChanged_:function(){this.updateStyles({"--progress-bar-completion":100*this.data.progress+"%"})},
onDarkModeToggledAction_:function(a){this.isDarkTheme_=a},
handleUpdate_:function(a){if(a=this.get("updateDonationShelfCommand.donationShelf.donationShelfRenderer",a))this.set("data.startLabel",a.startLabel),this.set("data.endLabel",a.endLabel),this.set("data.progress",a.progress),this.set("data.amountRaisedLabel",a.amountRaisedLabel),this.dataChanged_()},
computeHeaderBackgroundUrl_:function(a,b){if(a)return b?a.headerBackgroundDarkUrl:a.headerBackgroundUrl},
isProgressBarVisible:function(a){return!(!a||void 0===a.progress)},
headerBackgroundClass:function(){return"rtl"===z("HTML_DIR",void 0)?"flip":""}});var IGa=function(){return F.apply(this,arguments)||this};
l(IGa,F);var c3=IGa;v([I(),w("design:type",Object)],c3.prototype,"data",void 0);c3=v([W({is:"ytd-donation-unavailable-renderer"})],c3);var d3=function(){var a=F.apply(this,arguments)||this;a.playerListenerConfig=null;return a};
l(d3,F);d3.prototype.dataChanged=function(){var a=this,b=qW(this);b&&b.getPlayerPromise().then(this.maybeRemovePlayerListener.bind(this));var c=this.data&&this.data.survey;if(c){var d=c.singleOptionSurveyRenderer||c.checkboxSurveyRenderer,e=d&&d.displayTime||"UNKNOWN";"UNKNOWN"===e?this.openSurvey(c):b&&b.getPlayerPromise().then(function(g){var h=function(){a.openSurvey(c);a.maybeRemovePlayerListener(g)};
if("ON_VIDEO_COMPLETION"===e){var m="onStateChange";var n=function(p){0===p&&h()}}else if("ON_PREROLL_AD_START"===e)m="onVideoProgress",n=function(p){g.getPresentingPlayerType&&2===g.getPresentingPlayerType()&&p&&h()};else
if("ON_PREROLL_AD_END"===e)m="onAdEnd",n=h;else return;a.playerListenerConfig={event:m,listener:n};a.ytPlayerListenerBehavior.listenToPlayerEvent(g,m,n)})}};
d3.prototype.openSurvey=function(a){this.ytdOpenPopupBehavior.openPopup({openPopupAction:{popupType:"SURVEY",popup:a}})};
d3.prototype.maybeRemovePlayerListener=function(a){if(this.playerListenerConfig){var b=this.playerListenerConfig.event,c=this.playerListenerConfig.listener;this.playerListenerConfig=null;this.ytPlayerListenerBehavior.unlistenFromPlayerEvent(a,b,c)}};
var e3=d3;e3.prototype.dataChanged=e3.prototype.dataChanged;v([H(V.YtRendererBehavior),w("design:type",Object)],e3.prototype,"ytRendererBehavior",void 0);v([H(dY),w("design:type",Object)],e3.prototype,"ytdOpenPopupBehavior",void 0);v([H(O0),w("design:type",P0)],e3.prototype,"ytPlayerListenerBehavior",void 0);v([I(),w("design:type",Object)],e3.prototype,"data",void 0);v([I(),w("design:type",Object)],e3.prototype,"playerListenerConfig",void 0);
v([rl("data"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],e3.prototype,"dataChanged",null);e3=v([W({is:"ytd-survey-trigger-renderer"})],e3);var f3=function(){return F.apply(this,arguments)||this};
l(f3,F);f3.prototype.computeIconType=function(a){return a?"yt-icons:"+a.toLowerCase():null};
var g3=f3;v([H(V.YtRendererBehavior),w("design:type",Object)],g3.prototype,"ytRendererBehavior",void 0);v([I(),w("design:type",Object)],g3.prototype,"data",void 0);g3=v([W({is:"ytd-limited-state-message-renderer"})],g3);Polymer({is:"ytd-transcript-body-renderer",behaviors:[U.YtActionHandlerBehavior,V.YtRendererBehavior],properties:{data:{type:Object,observer:"dataChanged_"},hideTimestamps:{type:Boolean,value:function(){return!!kT(this.HIDE_TRANSCRIPT_TIMESTAMPS_KEY)},
observer:"hideTimestampsChanged_",reflectToAttribute:!0},isHovered_:Boolean,panel:{type:Boolean,reflectToAttribute:!0,value:function(){return A("kevlar_transcript_engagement_panel")}},
refresh:{type:Boolean,reflectToAttribute:!0,value:function(){return A("kevlar_transcript_panel_refreshed_styles")}}},
actionMap:{"yt-signal-action-toggle-transcript-timestamps":"handleSignalActionToggleTranscriptTimestamps_","yt-player-time-changed":"onYtPlayerTimeChanged_"},listeners:{tap:"onTap_",mouseenter:"onMouseEnter_",mouseleave:"onMouseLeave_"},HIDE_TRANSCRIPT_TIMESTAMPS_KEY:"hide-transcript-timestamps",PLAYER_SEEK_BUFFER:.5,created:function(){this.flatCues_=[];this.currentCueIndex_=-1},
hideTimestampsChanged_:function(a){jT(this.HIDE_TRANSCRIPT_TIMESTAMPS_KEY,a)},
toggleTranscriptTimestampAction_:function(){this.hideTimestamps=!this.hideTimestamps},
handleSignalActionToggleTranscriptTimestamps_:function(){this.toggleTranscriptTimestampAction_()},
dataChanged_:function(a){a&&a.cueGroups&&(this.flatCues_.length=0,this.currentCueIndex_=-1,a.cueGroups.forEach(function(b){b.transcriptCueGroupRenderer.cues.forEach(function(c){this.flatCues_.push(parseInt(c.transcriptCueRenderer.startOffsetMs,10))},this)},this))},
onYtPlayerTimeChanged_:function(a){if(!(0>a)){for(var b=this.currentCueIndex_,c=b;;){var d=0<=c?this.flatCues_[c]/1E3:-1;if(a+this.PLAYER_SEEK_BUFFER<d)--c;else if(d=c+1<this.flatCues_.length?this.flatCues_[c+1]/1E3:Infinity,a+this.PLAYER_SEEK_BUFFER>d)c+=1;else break}c!=b&&(0<=b&&(this.getCueElement_(b).classList.remove("active"),this.getCueGroupElement_(b).classList.remove("active")),this.getCueElement_(c).classList.add("active"),this.getCueGroupElement_(c).classList.add("active"),this.currentCueIndex_=
c,this.isHovered_||this.scrollElementToTop_(c))}},
scrollElementToTop_:function(a){a=this.getCueElement_(3<=a?a-3:0);this.scrollTop=Math.min(a.offsetTop-this.offsetTop,this.scrollHeight-this.offsetHeight)},
getCueElement_:function(a){return this.$$(".cue[start-offset=\""+this.flatCues_[a]+"\"]")},
getCueGroupElement_:function(a){return this.getCueElement_(a).parentElement.parentElement},
onTap_:function(a){var b=Polymer.dom(a).rootTarget;a.target.classList.contains("cue")&&(a=parseInt(b.getAttribute("start-offset"),10),this.sendAction("yt-transcript-player-seek",[a/1E3]))},
onMouseEnter_:function(){this.isHovered_=!0},
onMouseLeave_:function(){this.isHovered_=!1}});var h3=function(){return F.apply(this,arguments)||this};
l(h3,F);h3.prototype.configureRendererStamper=function(){return{"data.languageMenu":{id:"menu",mapping:{sortFilterSubMenuRenderer:"yt-sort-filter-sub-menu-renderer"}}}};
var i3=h3;v([H(V.YtRendererBehavior),w("design:type",Object)],i3.prototype,"ytRendererBehavior",void 0);v([H(X),w("design:type",Object)],i3.prototype,"ytRendererstamperBehavior",void 0);v([I(),w("design:type",Object)],i3.prototype,"data",void 0);v([I({reflectToAttribute:!0,value:function(){return A("kevlar_transcript_engagement_panel")}}),
w("design:type",Boolean)],i3.prototype,"panel",void 0);v([I({reflectToAttribute:!0,value:function(){return A("kevlar_watch_color_update")}}),
w("design:type",Boolean)],i3.prototype,"watchColorUpdate",void 0);i3=v([W({is:"ytd-transcript-footer-renderer"})],i3);var j3=function(){return F.apply(this,arguments)||this};
l(j3,F);j3.prototype.configureRendererStamper=function(){return{"data.overflowMenu":{id:"menu",mapping:{menuRenderer:"ytd-menu-renderer"}},"data.actionButton":{id:"close",mapping:{buttonRenderer:"ytd-button-renderer"}}}};
var k3=j3;v([H(V.YtRendererBehavior),w("design:type",Object)],k3.prototype,"ytRendererBehavior",void 0);v([H(X),w("design:type",Object)],k3.prototype,"ytRendererstamperBehavior",void 0);v([I(),w("design:type",Object)],k3.prototype,"data",void 0);k3=v([W({is:"ytd-transcript-header-renderer"})],k3);var l3=function(){var a=F.apply(this,arguments)||this;a.player=null;a.playerPollJobId=0;return a};
l(l3,F);f=l3.prototype;f.panelContentVisibleChanged=function(){this.updatePlayerPolling()};
f.onLoadReloadContinuation=function(a){A("kevlar_transcript_engagement_panel")&&this.ytActionSenderBehavior.sendServiceRequestAction([{clickTrackingParams:a.target.data.clickTrackingParams,getTranscriptEndpoint:{params:a.target.data.continuation}}])};
f.configureRendererStamper=function(){return{"data.footer":{id:"footer",mapping:{transcriptFooterRenderer:"ytd-transcript-footer-renderer"}},"data.body":{id:"body",mapping:{transcriptBodyRenderer:"ytd-transcript-body-renderer"}},"data.header":{id:"header",mapping:{transcriptHeaderRenderer:"ytd-transcript-header-renderer"}}}};
f.created=function(){A("kevlar_transcript_engagement_panel")&&(this.ytActionHandlerBehavior.actionMap={"yt-transcript-player-seek":"onYtTranscriptPlayerSeek"})};
f.attached=function(){A("kevlar_transcript_engagement_panel")&&this.updatePlayerPolling()};
f.detached=function(){A("kevlar_transcript_engagement_panel")&&this.updatePlayerPolling()};
f.updatePlayerPolling=function(){this.isAttached&&this.panelContentVisible?(this.player&&this.stopPollingPlayerTime(),this.startPollingPlayerTime()):this.stopPollingPlayerTime()};
f.startPollingPlayerTime=function(){return Fd(this,function b(){var c=this,d;return Aa(b,function(e){if(1==e.nextAddress)return(d=qW(c))?ta(e,d.getPlayerPromise(),2):e.return();c.player=e.yieldResult;c.playerPollJobId=Fn(Dn,c.getPlayerVideoProgress.bind(c),1E3);ua(e)})})};
f.getPlayerVideoProgress=function(){Dn.cancelJob(this.playerPollJobId);if(this.player){var a=this.player.getCurrentTime();this.ytActionSenderBehavior.sendAction("yt-player-time-changed",[a])}this.playerPollJobId=Fn(Dn,this.getPlayerVideoProgress.bind(this),1E3)};
f.stopPollingPlayerTime=function(){this.player=null;Dn.cancelJob(this.playerPollJobId)};
f.onYtTranscriptPlayerSeek=function(a){this.player&&this.player.seekTo(a,!0)};
var m3=l3;m3.prototype.onLoadReloadContinuation=m3.prototype.onLoadReloadContinuation;m3.prototype.panelContentVisibleChanged=m3.prototype.panelContentVisibleChanged;v([H(V.YtRendererBehavior),w("design:type",Object)],m3.prototype,"ytRendererBehavior",void 0);v([H(X),w("design:type",Object)],m3.prototype,"ytRendererstamperBehavior",void 0);v([H(U.YtActionHandlerBehavior),w("design:type",Object)],m3.prototype,"ytActionHandlerBehavior",void 0);
v([H(T.YtActionSenderBehavior),w("design:type",Object)],m3.prototype,"ytActionSenderBehavior",void 0);v([I(),w("design:type",Object)],m3.prototype,"data",void 0);v([I({reflectToAttribute:!0,value:A("kevlar_transcript_engagement_panel")}),w("design:type",Boolean)],m3.prototype,"panel",void 0);v([I({reflectToAttribute:!0,value:function(){return A("kevlar_transcript_panel_refreshed_styles")}}),
w("design:type",Boolean)],m3.prototype,"refresh",void 0);v([I({reflectToAttribute:!0}),w("design:type",Boolean)],m3.prototype,"panelContentVisible",void 0);v([rl("panelContentVisible"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],m3.prototype,"panelContentVisibleChanged",null);v([ql("yt-load-reload-continuation"),w("design:type",Function),w("design:paramtypes",[Object]),w("design:returntype",void 0)],m3.prototype,"onLoadReloadContinuation",null);
m3=v([W({is:"ytd-transcript-renderer"})],m3);var n3=function(){var a=F.apply(this,arguments)||this;a.actionMap={"yt-change-engagement-panel-visibility-action":"onYtChangeEngagementPanelVisibilityAction","yt-update-engagement-panel-action":"onYtUpdateEngagementPanelAction"};return a};
l(n3,F);f=n3.prototype;f.configureRendererStamper=function(){return{"data.header":{id:"header",mapping:{engagementPanelTitleHeaderRenderer:"ytd-engagement-panel-title-header-renderer"},events:!0},"data.content":{id:"content",mapping:{continuationItemRenderer:"ytd-continuation-item-renderer",transcriptRenderer:"ytd-transcript-renderer",clipSectionRenderer:"yt-clip-section-renderer"},events:!0}}};
f.attached=function(){this.actionHandlerBehavior.actionMap=this.actionMap};
f.onYtRendererstamperFinished=function(){this.updateChildVisibilityProperties()};
f.computeVisibility=function(a){return a};
f.visibilityChanged=function(){this.updateChildVisibilityProperties()};
f.updateChildVisibilityProperties=function(){var a=this.data.visibility,b=this.$.header.firstElementChild;b&&(b.collapsed="ENGAGEMENT_PANEL_VISIBILITY_COLLAPSED"===a);if(b=this.$.content.firstElementChild)a&&"ENGAGEMENT_PANEL_VISIBILITY_EXPANDED"!==a?b.removeAttribute("panel-content-visible"):(b.setAttribute("panel-content-visible",""),b.markDirty())};
f.onYtChangeEngagementPanelVisibilityAction=function(a){(a=a.changeEngagementPanelVisibilityAction)&&a.targetId===this.data.targetId&&this.set("data.visibility",a.visibility)};
f.onYtUpdateEngagementPanelAction=function(a){a=a.updateEngagementPanelAction;a.targetId===this.data.targetId&&(a.header&&this.set("data.header",a.header),a.content&&this.set("data.content",a.content),this.updateChildVisibilityProperties())};
var o3=n3;o3.prototype.onYtRendererstamperFinished=o3.prototype.onYtRendererstamperFinished;v([H(U.YtActionHandlerBehavior),w("design:type",Object)],o3.prototype,"actionHandlerBehavior",void 0);v([H(X),w("design:type",Object)],o3.prototype,"ytRendererstamperBehavior",void 0);v([I(),w("design:type",Object)],o3.prototype,"data",void 0);v([I({computed:"computeVisibility(data.visibility)",reflectToAttribute:!0,observer:"visibilityChanged"}),w("design:type",String)],o3.prototype,"visibility",void 0);
v([I({reflectToAttribute:!0,value:function(){return A("kevlar_watch_color_update")}}),
w("design:type",Boolean)],o3.prototype,"watchColorUpdate",void 0);v([ql("yt-rendererstamper-finished"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],o3.prototype,"onYtRendererstamperFinished",null);o3=v([W({is:"ytd-engagement-panel-section-list-renderer"})],o3);Polymer({is:"ytd-engagement-panel-title-header-renderer",behaviors:[X],properties:{data:Object,watchColorUpdate_:{type:Boolean,reflectToAttribute:!0,value:function(){return A("kevlar_watch_color_update")}}},
stampDom:{"data.visibilityButton":{id:"visibility-button",mapping:{buttonRenderer:"ytd-button-renderer"}},"data.menu":{id:"menu",mapping:{menuRenderer:"ytd-menu-renderer"}}}});Polymer({is:"yt-clip-attribution-renderer",properties:{data:Object},behaviors:[ZX.YtRendererStamperBehavior,V.YtRendererBehavior],stampDom:{"data.authorBadges":{id:"badges",mapping:{}},"data.buttons":{id:"buttons",mapping:{buttonRenderer:"yt-button-renderer"}},"data.returnToVideo":{id:"under",mapping:{buttonRenderer:"yt-button-renderer"}}}});Polymer({is:"yt-clip-creation-scrubber-renderer",properties:{data:Object,start:{type:Number,value:0,observer:"onStartChanged_"},startValid:{type:Boolean,computed:"computeStartValid_(start, end)",observer:"onStartValidChanged_"},end:{type:Number,value:30,observer:"onEndChanged_"},endValid:{type:Boolean,computed:"computeEndValid_(end, start)",observer:"onEndValidChanged_"},duration:{type:Number,computed:"computeDuration_(start, end)"},durationLabel:{type:String,computed:"computeDurationLabel_(data.lengthTemplate, duration)"},
videoId:{type:String,value:"",observer:"onVideoIdChanged_"},active:{type:Boolean,value:!1},player_:{type:Object}},behaviors:[U.YtActionHandlerBehavior,V.YtRendererBehavior],observers:["initializeClipRange_(player_, active)","updateLoopRange_(player_, active, start, end)"],actionMap:{"yt-clip-creation-visibility-changed":"onVisibilityChangedAction_"},created:function(){this.activeLoopRange_=!1},
ready:function(){var a=this;qW(this).getPlayerPromise().then(function(b){a.player_=b;a.videoId=b.getVideoData().video_id||""});
this.$.start.addEventListener("input",this.handleStartInput_.bind(this));this.$.end.addEventListener("input",this.handleEndInput_.bind(this));this.$.start.addEventListener("blur",this.handleStartBlur_.bind(this));this.$.end.addEventListener("blur",this.handleEndBlur_.bind(this));this.activeLoopRange_=!1},
initializeClipRange_:function(a,b){if(a&&b)if(b){var c=a.getCurrentTime();2==a.getPlayerState()?(b=parseFloat(c),a=parseFloat(Math.min(a.getDuration(),c+30))):(b=parseFloat(Math.max(0,c-30)),a=parseFloat(c));this.set("start",b);this.set("end",a);this.$.start.value=this.start.toFixed(1);this.$.end.value=this.end.toFixed(1)}else this.set("start",0),this.$.start.value="",this.set("end",0),this.$.end.value="",this.set("active",!1)},
updateLoopRange_:function(a,b,c,d){a&&(b?(a.setLoopRange({startTimeMs:1E3*c,endTimeMs:1E3*d}),this.activeLoopRange_=!0,b=a.getCurrentTime(),(b<c||b>d)&&a.seekTo(c)):this.activeLoopRange_&&(a.setLoopRange(null),this.activeLoopRange_=!1))},
handleStartInput_:function(a){this.set("start",parseFloat(a.target.value))},
handleEndInput_:function(a){this.set("end",parseFloat(a.target.value))},
handleStartBlur_:function(){this.isValidTime_(this.start)&&(this.$.start.value=parseFloat(this.start).toFixed(1))},
handleEndBlur_:function(){this.isValidTime_(this.end)&&(this.$.end.value=parseFloat(this.end).toFixed(1))},
computeDurationLabel_:function(a,b){return a?a.replace("$clip_length",parseFloat(b).toFixed(1)):""},
computeDuration_:function(a,b){return this.isValidTime_(a)&&this.isValidTime_(b)&&a<b?b-a:0},
onStartChanged_:function(a){this.fire("start-changed",{start:a})},
onEndChanged_:function(a){this.fire("end-changed",{end:a})},
onVideoIdChanged_:function(a){this.fire("video-id-changed",{videoId:a})},
computeStartValid_:function(a,b){return this.isValidTime_(a)&&a<b},
computeEndValid_:function(a,b){return this.isValidTime_(a)&&b<a},
onStartValidChanged_:function(a){this.fire("start-valid-changed",{valid:a})},
onEndValidChanged_:function(a){this.fire("end-valid-changed",{valid:a})},
isValidTime_:function(a){return isNaN(parseFloat(a))||0>a||this.player&&a>this.player.getDuration()?!1:!0},
onVisibilityChangedAction_:function(a){this.set("active",a.visible)}});Polymer({is:"yt-clip-creation-text-input-renderer",properties:{data:Object,value:{type:String,observer:"onValueChanged_"},valid:{type:Boolean,value:!1,observer:"onValidChanged_"},fieldValid:{type:Boolean,computed:"computeFieldValid_(valid, userChangedValue_)"},userChangedValue_:{type:Boolean,value:!1}},behaviors:[V.YtRendererBehavior],listeners:{input:"handleInput_",blur:"handleBlur_"},detached:function(){this.userChangedValue_=!1},
handleInput_:function(a){this.set("value",a.target.value);this.valid=this.$.title.validate();this.userChangedValue_=!0},
handleBlur_:function(){this.valid=this.$.title.validate()},
onValueChanged_:function(a){this.fire("title-changed",{title:a})},
onValidChanged_:function(a){this.fire("title-valid-changed",{valid:a})},
computeFieldValid_:function(a,b){return!b||a}});Polymer({is:"yt-clip-creation-renderer",properties:{data:Object,titleValue:{type:String,value:""},titleValid:{type:Boolean,value:!1},start:{type:Number,value:0},startValid:{type:Boolean,value:!0},end:{type:Number,value:0},endValid:{type:Boolean,value:!0},videoId:{type:String,value:""},formValid:{type:Boolean,computed:"computeFormValid_(data, titleValid, startValid, endValid)",observer:"onFormValidChanged_"},submitButton_:{type:Object,computed:"computeSubmitButton_(data.saveButton)"},submitCommand_:{type:Object,
computed:"computeSubmitCommand_(data.saveButton.buttonRenderer.command)"}},behaviors:[T.YtActionSenderBehavior,X],listeners:{"title-changed":"onTitleChanged_","title-valid-changed":"onTitleValidChanged_","start-changed":"onStartChanged_","start-valid-changed":"onStartValidChanged_","end-changed":"onEndChanged_","end-valid-changed":"onEndValidChanged_","video-id-changed":"onVideoIdChanged_"},stampDom:{submitButton_:{id:"share",mapping:{buttonRenderer:"yt-button-renderer"}},"data.titleInput":{id:"title-input",
mapping:{clipCreationTextInputRenderer:"yt-clip-creation-text-input-renderer"}},"data.scrubber":{id:"scrubber",mapping:{clipCreationScrubberRenderer:"yt-clip-creation-scrubber-renderer"}}},ready:function(){this.$.share.addEventListener("tap",this.onSubmit_.bind(this))},
onTitleChanged_:function(a){this.set("titleValue",a.detail.title)},
onStartChanged_:function(a){this.set("start",a.detail.start)},
onEndChanged_:function(a){this.set("end",a.detail.end)},
onTitleValidChanged_:function(a){this.set("titleValid",a.detail.valid)},
onStartValidChanged_:function(a){this.set("startValid",a.detail.valid)},
onEndValidChanged_:function(a){this.set("endValid",a.detail.valid)},
onVideoIdChanged_:function(a){this.set("videoId",a.detail.videoId)},
computeFormValid_:function(a,b,c,d){return!!(a&&b&&c&&d)},
onFormValidChanged_:function(a){this.set("submitButton_.buttonRenderer.isDisabled",!a)},
computeSubmitButton_:function(a){return a&&a.buttonRenderer?(a=Polymer.Base.mixin({},a.buttonRenderer),a.command=void 0,a.isDisabled=!this.formValid,{buttonRenderer:a}):null},
computeSubmitCommand_:function(a){return a||null},
onSubmit_:function(a){var b=this;a.stopPropagation();a.preventDefault();this.submitCommand_&&(a={},a.comment_text=this.titleValue,a.clip_external_video_id=this.videoId,a.clip_offset_ms=parseInt(1E3*this.start,10),a.clip_duration_ms=parseInt(1E3*(this.end-this.start),10),this.sendServiceRequestAction([this.submitCommand_,a]).then(function(c){b.sendServiceRequestAction(c.actions)}))}});Polymer({is:"yt-clip-section-footer-renderer",properties:{data:Object},behaviors:[X],stampDom:{"data.buttons":{id:"buttons",mapping:{buttonRenderer:"yt-button-renderer"}}}});Polymer({is:"yt-clip-section-renderer",behaviors:[T.YtActionSenderBehavior,X,V.YtRendererBehavior,$Y],properties:{data:Object,panelContentVisible:{type:Boolean,reflectToAttribute:!0,observer:"onPanelContentVisibleChanged_"}},stampDom:{"data.contents":{id:"contents",mapping:{clipAttributionRenderer:"yt-clip-attribution-renderer",clipCreationRenderer:"yt-clip-creation-renderer"}},"data.footer":{id:"footer",mapping:{clipSectionFooterRenderer:"yt-clip-section-footer-renderer"}}},onPanelContentVisibleChanged_:function(a){this.sendAction("yt-clip-creation-visibility-changed",
[{visible:!!a}])}});Polymer({is:"ytd-alert-with-button-renderer",behaviors:[V.YtRendererBehavior,X],properties:{data:{type:Object,observer:"dataChanged_"},type:{type:String,computed:"computeType_(data.type)",reflectToAttribute:!0},isDisplayed:{type:Boolean,value:!0,reflectToAttribute:!0}},listeners:{"yt-service-request-completed":"onYtServiceRequestCompleted_"},stampDom:{"data.button":{id:"button",mapping:{buttonRenderer:"ytd-button-renderer"}},"data.dismissButton":{id:"dismiss-button",mapping:{buttonRenderer:"ytd-button-renderer"}}},
dataChanged_:function(a){this.isDisplayed=!0;this.writeKansasPromoImpression_(a)},
computeType_:function(a){return a||"UNKNOWN"},
onYtServiceRequestCompleted_:function(a){a.stopPropagation();this.isDisplayed=!1},
onClose_:function(){this.isDisplayed=!1},
writeKansasPromoImpression_:function(a){a&&(a=this.get("button.buttonRenderer.hint.hintRenderer.hintId",a))&&this.getInterface(BW).postData("/promo_ajax",{action_write_promo:1,method:"write_impression",subtype:a})}});var p3=function(){return F.apply(this,arguments)||this};
l(p3,F);f=p3.prototype;f.configureRendererStamper=function(){return{shownItems:{id:"items",mapping:{merchandiseItemRenderer:"ytd-merch-shelf-item-renderer"}}}};
f.onToggleTap=function(){this.collapsed=!this.collapsed;this.expandIcon&&(this.expandIcon.icon=this.collapsed?"yt-icons:expand-more":"yt-icons:expand-less")};
f.dataChanged=function(a){this.ytdHorizontalListBehavior.reset();this.collapsed=!1;this.expandIcon&&(this.expandIcon.icon="yt-icons:expand-less");this.singleItem=!!a.items&&1===a.items.length};
f.computeShowOrHideText=function(a,b){return void 0===b?"":a?this.data.showText||"":this.data.hideText||""};
f.updateOffset=function(){this.ytdHorizontalListBehavior.offset_=Math.max(0,Math.min(this.ytdHorizontalListBehavior.offset_,this.items.clientWidth-this.$["scroll-container"].clientWidth));this.ytdHorizontalListBehavior.reposition_()};
var q3=p3;q3.prototype.updateOffset=q3.prototype.updateOffset;v([H(U.YtActionHandlerBehavior),w("design:type",Object)],q3.prototype,"ytActionHandlerBehavior",void 0);v([H(V.YtRendererBehavior),w("design:type",Object)],q3.prototype,"ytRendererBehavior",void 0);v([H(X),w("design:type",Object)],q3.prototype,"ytRendererstamperBehavior",void 0);v([H(XX.YtdHorizontalListBehavior),w("design:type",Object)],q3.prototype,"ytdHorizontalListBehavior",void 0);
v([H(iY.ComponentBehavior),w("design:type",Object)],q3.prototype,"componentBehavior",void 0);v([I({observer:"dataChanged"}),w("design:type",Object)],q3.prototype,"data",void 0);v([I({reflectToAttribute:!0,value:!0}),w("design:type",Boolean)],q3.prototype,"collapsed",void 0);v([I({value:6}),w("design:type",Number)],q3.prototype,"initialCount",void 0);v([I({reflectToAttribute:!0,value:!1}),w("design:type",Boolean)],q3.prototype,"singleItem",void 0);
v([I({computed:"computeShowOrHideText(collapsed,data)"}),w("design:type",String)],q3.prototype,"showOrHideText",void 0);v([I({reflectToAttribute:!0,value:A("align_merch_shelf_with_description_on_desktop")}),w("design:type",Boolean)],q3.prototype,"alignWithDescription",void 0);v([I({reflectToAttribute:!0,value:A("kevlar_watch_color_update")}),w("design:type",Boolean)],q3.prototype,"watchColorUpdate",void 0);v([I({value:"data.items"}),w("design:type",String)],q3.prototype,"itemsPath",void 0);
v([tl("#items"),w("design:type",BGa)],q3.prototype,"items",void 0);v([tl("#expand-icon"),w("design:type",Object)],q3.prototype,"expandIcon",void 0);v([ql("iron-resize"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],q3.prototype,"updateOffset",null);q3=v([W({is:"ytd-merch-shelf-renderer"})],q3);var r3=function(){return F.apply(this,arguments)||this};
l(r3,F);r3.prototype.configureRendererStamper=function(){return{"data.scrollUpButton":{id:"scroll-up",mapping:{buttonRenderer:"ytd-button-renderer"}},"data.menu":{id:"menu",mapping:{menuRenderer:{component:"ytd-menu-renderer",params:{icon:"yt-icons:more"}}}},"data.subscribeButton":{id:"subscribe",mapping:{buttonRenderer:"ytd-button-renderer",subscribeButtonRenderer:"ytd-subscribe-button-renderer"}}}};
r3.prototype.activate=function(a){a.appendTo(this.player);a.getPlayerPromise().then(function(b){b.setMinimized(!0);b.setUseFastSizingOnWatch(!1)});
this.active=!0};
r3.prototype.deactivate=function(){var a=this.player.firstElementChild;a.getPlayerPromise().then(function(b){b.setMinimized(!1);b.setUseFastSizingOnWatch(!0)});
this.active=!1;return a};
r3.prototype.onScrollUpTap=function(){this.componentBehavior.getInterfaceForTs("ytd-page-manager").getCurrentPage().setScrollTop(0)};
var s3=r3;v([H(V.YtRendererBehavior),w("design:type",Object)],s3.prototype,"ytRendererBehavior",void 0);v([H(X),w("design:type",Object)],s3.prototype,"ytRendererstamperBehavior",void 0);v([H(J0.YtComponentBehavior),w("design:type",Object)],s3.prototype,"componentBehavior",void 0);v([I(),w("design:type",Object)],s3.prototype,"data",void 0);v([I({reflectToAttribute:!0}),w("design:type",Boolean)],s3.prototype,"active",void 0);v([I({reflectToAttribute:!0,value:function(){return A("kevlar_watch_while_miniplayer_bar_dark_launch")}}),
w("design:type",Boolean)],s3.prototype,"darkLaunch",void 0);v([tl("#player"),w("design:type",HTMLDivElement)],s3.prototype,"player",void 0);s3=v([W({is:"ytd-miniplayer-bar-renderer"})],s3);var t3=function(){return F.apply(this,arguments)||this};
l(t3,F);t3.prototype.dataChanged=function(a){a&&(this.$.text.innerHTML=a.companionLegalText)};
t3.prototype.computeAutoScrollEnabled=function(a,b){return a&&!b};
t3.prototype.expandedChanged=function(){this.expanderIcon=this.expanded?"expand-less":"expand-more"};
t3.prototype.onToggleTap=function(){this.expanded=!this.expanded};
var u3=t3;v([H(V.YtRendererBehavior),w("design:type",Object)],u3.prototype,"ytRendererBehavior",void 0);v([H(XEa),w("design:type",Object)],u3.prototype,"ytdAutoScrollBehavior",void 0);v([I({observer:"dataChanged"}),w("design:type",Object)],u3.prototype,"data",void 0);v([I({reflectToAttribute:!0,observer:"expandedChanged",value:!1}),w("design:type",Boolean)],u3.prototype,"expanded",void 0);
v([I({computed:"computeAutoScrollEnabled(data.companionLegalTextEnableAutoscroll, expanded)"}),w("design:type",Boolean)],u3.prototype,"autoScrollEnabled",void 0);v([I(),w("design:type",String)],u3.prototype,"expanderIcon",void 0);u3=v([W({is:"ytd-companion-legal-text-renderer"})],u3);var v3=function(){var a=F.apply(this,arguments)||this;a.adBadgeText=yU("AD_BADGE_TEXT",void 0,"Ad");return a};
l(v3,F);v3.prototype.dataChanged=function(){var a=this;this.data&&this.data.impressionCommands&&this.data.impressionCommands.forEach(function(b){b.clickTrackingParams&&delete b.clickTrackingParams;a.macroReplacementBehavior.sendServiceRequestAction([b])})};
v3.prototype.getButtonRenderer=function(a){return a.actionButton&&a.actionButton.buttonRenderer?(delete a.actionButton.buttonRenderer.navigationEndpoint,a.actionButton.buttonRenderer):{}};
v3.prototype.onTap=function(){this.data&&this.data.navigationEndpoint&&(this.fire("yt-navigate",{endpoint:this.data.navigationEndpoint}),this.actionSenderBehavior.sendAction("yt-companion-ad-clicked",["action-companion"]))};
v3.prototype.shouldHideBanner=function(a){return(a=a&&this.get("thumbnail.thumbnails.0.url",a))?-1!==a.indexOf("/default_banner"):!0};
ea.Object.defineProperties(v3.prototype,{macros:{configurable:!0,enumerable:!0,get:function(){var a=Sa("yt.www.ads.eventcache.getLastCompanionData");return a?(a=a())&&a.macros||{}:{}}}});
var w3=v3;w3.prototype.onTap=w3.prototype.onTap;w3.prototype.dataChanged=w3.prototype.dataChanged;v([H(V.YtRendererBehavior),w("design:type",Object)],w3.prototype,"rendererBehavior",void 0);v([H(c2.YtMacroReplacementBehavior),w("design:type",Object)],w3.prototype,"macroReplacementBehavior",void 0);v([H(T.YtActionSenderBehavior),w("design:type",Object)],w3.prototype,"actionSenderBehavior",void 0);v([I(),w("design:type",Object)],w3.prototype,"data",void 0);
v([I(),w("design:type",String)],w3.prototype,"adBadgeText",void 0);v([sl("data"),w("design:type",Object),w("design:paramtypes",[])],w3.prototype,"macros",null);v([rl("data"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],w3.prototype,"dataChanged",null);v([ql("tap"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],w3.prototype,"onTap",null);w3=v([W({is:"ytd-action-companion-ad-renderer"})],w3);var JGa=function(){return F.apply(this,arguments)||this};
l(JGa,F);var x3=JGa;v([H(V.YtRendererBehavior),w("design:type",Object)],x3.prototype,"ytRendererBehavior",void 0);v([I(),w("design:type",Object)],x3.prototype,"data",void 0);x3=v([W({is:"ytd-ad-hover-text-button-renderer"})],x3);Polymer({is:"ytd-iframe-companion-renderer",AFV_SCRIPT_URL:dc(Sb("//pagead2.googlesyndication.com/pagead/show_companion_ad.js")),AFV_CONTAINER_ID:"google_companion_ad_div",GPT_SCRIPT_URL:dc(Sb("//www.googletagservices.com/tag/js/gpt.js")),AFV_GLOBALS:{google_ad_output:"html",google_ad_format:"300x250_as",google_alternate_ad_url:"https://www.youtube.com/ad_frame?action=auto-collapse-kevlar-companion",google_container_id:"google_companion_ad_div"},behaviors:[U.YtActionHandlerBehavior,T.YtActionSenderBehavior,
V.YtRendererBehavior],properties:{data:{type:Object,observer:"dataChanged_"}},actionMap:{"yt-dark-mode-toggled-action":"onDarkModeToggledAction_"},created:function(){this.afvContainer_=this.iframe_=null;this.afvGlobals_=[];this.afvPromise_=null},
unloadCompanionOsd_:function(){var a=window.Goog_Osd_UnloadAdBlock,b=bh(document,this.AFV_CONTAINER_ID);Za(a)&&null!=b&&a(Gh(b))},
reset_:function(){window.google_persistent_state_async={};window.google_unique_id=null;this.unloadCompanionOsd_();Dh(bh(document,this.AFV_CONTAINER_ID));window.google_ad_width=void 0;this.afvPromise_&&this.afvPromise_.cancel();this.afvGlobals_.forEach(function(a){window[a]=void 0});
zh(this.$.scripts);zh(this.$.container);this.afvContainer_=this.iframe_=null;this.afvGlobals_.length=0;this.afvPromise_=null},
dataChanged_:function(a){var b=this;this.reset_();if(a)if(a.url)this.createIframe_(a.url,a.width||300,a.height||250,a.log_impression_callback,a.log_no_ad_callback,a.impressionTrackingUrls,a.clickTrackingUrls).then(function(){b.sendOptionalAction("yt-refit-popups-action")});else
{var c=a.showAfv&&a.afvParams;a=a.useGut&&a.gutParams&&a.gutParams.tag;c&&a&&(this.afvPromise_=jw(this.loadAndShowAfv_(c,a).then(function(){b.sendOptionalAction("yt-refit-popups-action")}),function(){}))}},
loadAndShowAfv_:function(a,b){this.afvContainer_=document.createElement("div");this.afvContainer_.id=this.AFV_CONTAINER_ID;this.afvContainer_.className+=" ytd-iframe-companion-renderer";this.$.container.appendChild(this.afvContainer_);for(var c in a){var d=a[c],e=this.getSnakeFromCamel_(c);this.setAndSaveGlobal_(e,d)}return this.injectScript_(this.GPT_SCRIPT_URL).then(function(){var g=window.googletag;if(!g)throw Error("The GPT script probably failed to load.");return g}).then(function(g){return new Yv(function(h,
m){g.cmd.push(function(){var n=g.defineSlot(b,[[300,
250],[300,60]],this.AFV_CONTAINER_ID);n?(n.set("ad_type","flash"),n.addService(g.companionAds()),g.enableServices(),h()):m(Error("GPT slot registration failed."))})}.bind(this))}.bind(this)).then(function(){for(var g in this.AFV_GLOBALS)this.setAndSaveGlobal_(g,this.AFV_GLOBALS[g]);
return this.injectScript_(this.AFV_SCRIPT_URL)}.bind(this)).then(function(){window.google_show_companion_ad&&window.google_show_companion_ad()}.bind(this))},
createIframe_:function(a,b,c,d,e,g,h){a=yi(a,"polymer",1);document.documentElement.hasAttribute("dark")&&(a=yi(a,"dark_mode",1));var m=this.iframe_=vh("IFRAME");m.width=b;m.height=c;m.frameBorder="0";m.marginHeight="0";m.marginWidth="0";m.scrolling="no";b=new Yv(function(n,p){m.addEventListener("load",function(){var x=this;if(m===this.iframe_){xw(function(){0==m.clientHeight||0==m.clientWidth?e&&e():d&&d()},1E3);
ap(g);var y=this.getIFrameClickElement_(m);null!=y&&Hv(y,"click",function(){ap(h);x.sendAction("yt-companion-ad-clicked",["videowall-companion"])},!1);
n(m)}else p()}.bind(this))}.bind(this));
m.src=a;this.$.container.appendChild(m);this.scopeSubtree(m,!1);return b},
onDarkModeToggledAction_:function(a){this.iframe_&&this.iframe_.contentWindow&&this.iframe_.contentWindow.postMessage({"video-wall-set-dark-theme":a},"*")},
injectScript_:function(a){this.removeScript_(Zb(a));var b=vh("SCRIPT"),c=new Yv(function(d){b.addEventListener("load",d)});
jd(b,a);this.$.scripts.appendChild(b);return c},
removeScript_:function(a){(a=this.$.scripts.querySelector("script[src=\""+a+"\"]"))&&Dh(a)},
setAndSaveGlobal_:function(a,b){this.afvGlobals_.push(a);window[a]=b},
getSnakeFromCamel_:function(a){return a.replace(/[A-Z]/g,function(b){return"_"+b.toLowerCase()})},
getIFrameClickElement_:function(a){try{var b=Ph(a);return b&&b.body}catch(c){return null}}});var y3=function(){return F.apply(this,arguments)||this};
l(y3,F);
y3.prototype.dataChanged=function(){var a=this;if(this.data){if(this.data.image&&this.data.image.thumbnail&&this.data.image.thumbnail.thumbnails&&this.data.image.thumbnail.thumbnails.length){var b=this.data.image.thumbnail.thumbnails[0];this.imageSrc=b.url||"";this.imageWidth=b.width||0;this.imageHeight=b.height||0}this.data.clickthroughEndpoint&&this.data.clickthroughEndpoint.urlEndpoint&&(b=this.data.clickthroughEndpoint.urlEndpoint.url,A("kevlar_sanitize_image_companion_killswitch")?this.clickThroughUrl=b||
"":b?(b=Ac(b),this.clickThroughUrl=wc(b)):this.clickThroughUrl=void 0);this.data.impressionCommands&&this.data.impressionCommands.forEach(function(c){c.clickTrackingParams&&delete c.clickTrackingParams;a.macroReplacementBehavior.sendServiceRequestAction([c])})}};
y3.prototype.onTap=function(){var a=this;this.data&&this.data.clickthroughEndpoint&&(this.fire("yt-navigate",{endpoint:this.data.clickthroughEndpoint}),this.data.onClickCommands&&this.data.onClickCommands.forEach(function(b){a.macroReplacementBehavior.sendServiceRequestAction([b])}),this.actionSenderBehavior.sendAction("yt-companion-ad-clicked",["image-companion"]))};
y3.prototype.onLoad=function(){this.actionSenderBehavior.sendOptionalAction("yt-refit-popups-action")};
ea.Object.defineProperties(y3.prototype,{macros:{configurable:!0,enumerable:!0,get:function(){var a=Sa("yt.www.ads.eventcache.getLastCompanionData");return a?(a=a())&&a.macros||{}:{}}}});
var z3=y3;z3.prototype.onLoad=z3.prototype.onLoad;z3.prototype.onTap=z3.prototype.onTap;z3.prototype.dataChanged=z3.prototype.dataChanged;v([H(V.YtRendererBehavior),w("design:type",Object)],z3.prototype,"rendererBehavior",void 0);v([H(c2.YtMacroReplacementBehavior),w("design:type",Object)],z3.prototype,"macroReplacementBehavior",void 0);v([H(T.YtActionSenderBehavior),w("design:type",Object)],z3.prototype,"actionSenderBehavior",void 0);v([I(),w("design:type",Object)],z3.prototype,"data",void 0);
v([sl("data"),w("design:type",Object),w("design:paramtypes",[])],z3.prototype,"macros",null);v([I(),w("design:type",String)],z3.prototype,"clickThroughUrl",void 0);v([I(),w("design:type",String)],z3.prototype,"imageSrc",void 0);v([I(),w("design:type",Number)],z3.prototype,"imageWidth",void 0);v([I(),w("design:type",Number)],z3.prototype,"imageHeight",void 0);v([rl("data"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],z3.prototype,"dataChanged",null);
v([ql("tap"),w("design:type",Function),w("design:paramtypes",[Event]),w("design:returntype",void 0)],z3.prototype,"onTap",null);v([ql("load"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],z3.prototype,"onLoad",null);z3=v([W({is:"ytd-image-companion-renderer"})],z3);var A3=function(){return F.apply(this,arguments)||this};
l(A3,F);f=A3.prototype;f.dataChanged=function(){A("kevlar_logging_urls_killswitch")&&this.sendTrackingPings(this.data&&this.data.impressionEndpoints)};
f.onCompanionClicked=function(a){this.data&&(a.target!==this.shopTitle&&this.sendTrackingPings(this.data.clickTrackingEndpoints),this.ytActionSenderBehavior.sendAction("yt-companion-ad-clicked",["shopping-companion"]))};
f.onShopTextTap=function(){this.data&&this.fire("yt-navigate",{endpoint:this.data.clickToAdvSiteEndpoint})};
f.sendTrackingPings=function(a){a&&0!=a.length&&a[0].loggingUrls&&ap(pb(a[0].loggingUrls,this.getBaseUrl))};
f.getBaseUrl=function(a){return a.baseUrl||""};
ea.Object.defineProperties(A3.prototype,{macros:{configurable:!0,enumerable:!0,get:function(){var a=Sa("yt.www.ads.eventcache.getLastCompanionData");return a?(a=a())&&a.macros||{}:{}}}});
var B3=A3;B3.prototype.onCompanionClicked=B3.prototype.onCompanionClicked;B3.prototype.dataChanged=B3.prototype.dataChanged;v([H(T.YtActionSenderBehavior),w("design:type",Object)],B3.prototype,"ytActionSenderBehavior",void 0);v([H(V.YtRendererBehavior),w("design:type",Object)],B3.prototype,"ytRendererBehavior",void 0);v([H(c2.YtMacroReplacementBehavior),w("design:type",Object)],B3.prototype,"macroReplacementBehavior",void 0);v([I(),w("design:type",Object)],B3.prototype,"data",void 0);
v([tl("#title"),w("design:type",HTMLElement)],B3.prototype,"shopTitle",void 0);v([rl("data.impressionEndpoints"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],B3.prototype,"dataChanged",null);v([sl("data"),w("design:type",Object),w("design:paramtypes",[])],B3.prototype,"macros",null);v([ql("yt-navigate"),w("design:type",Function),w("design:paramtypes",[Event]),w("design:returntype",void 0)],B3.prototype,"onCompanionClicked",null);
B3=v([W({is:"ytd-shopping-companion-renderer"})],B3);var C3={shoppingCompanionCarouselRenderer:"ytd-shopping-companion-renderer",iframeCompanionRenderer:"ytd-iframe-companion-renderer",imageCompanionAdRenderer:"ytd-image-companion-renderer",actionCompanionAdRenderer:"ytd-action-companion-ad-renderer"};
Polymer({is:"ytd-companion-slot-renderer",behaviors:[iY.ComponentBehavior,U.YtActionHandlerBehavior,V.YtRendererBehavior,X,O0],actionMap:{"yt-companion-ad-clicked":"handleCompanionAdClicked_"},properties:{data:{type:Object,observer:"dataChanged_"},oneofRenderer:{type:Object}},stampDom:{oneofRenderer:{id:"companion",mapping:{shoppingCompanionCarouselRenderer:"ytd-shopping-companion-renderer",iframeCompanionRenderer:"ytd-iframe-companion-renderer",imageCompanionAdRenderer:"ytd-image-companion-renderer",
actionCompanionAdRenderer:"ytd-action-companion-ad-renderer"}}},updateRendererStamper_:function(){var a={};if(this.data)for(var b in C3)if(this.data[b]){a[b]=this.data[b];break}void 0==this.oneofRenderer&&u.isEmpty(a)||(this.oneofRenderer=a)},
created:function(){this.showAfvJobId_=this.updateCompanionDataJobId_=0;this.contentVideoId_=null;this.isAfcLoaded_=!1;this.player_=null},
attached:function(){var a=this,b=qW(this);b&&b.getPlayerPromise().then(function(c){a.getCachedDataAndListen_(c)})},
detached:function(){this.player_&&(this.unlistenFromPlayerEvent(this.player_,"updateKevlarOrC3Companion",this.receiveCompanionData_),this.player_=null)},
getCachedDataAndListen_:function(a){var b=this.retrieveCachedCompanionData_();b&&!u.isEmpty(b)&&this.receiveCompanionData_(b);this.listenToPlayerEvent(a,"updateKevlarOrC3Companion",this.receiveCompanionData_);this.player_=a},
retrieveCachedCompanionData_:function(){var a=Sa("yt.www.ads.eventcache.getLastCompanionData");return a&&a()},
receiveCompanionData_:function(a){a&&!u.isEmpty(a)&&(this.contentVideoId_=a.contentVideoId);this.setCompanionData_(a)},
setCompanionData_:function(a){this.defineGlobals_(a);this.cancelPendingCompanionAdJobs_();if(a){var b=function(c){this.updateCompanionDataJobId_=0;for(var d in C3)this.data[d]=void 0;c.shoppingCompanionCarouselRenderer?this.set("data.shoppingCompanionCarouselRenderer",c.shoppingCompanionCarouselRenderer):c.backfillMpuCompanionAdRenderer?"BACKFILL_MPU_TYPE_AFV"==c.backfillMpuCompanionAdRenderer.type?this.showAfv_(c):"BACKFILL_MPU_TYPE_AFC"==c.backfillMpuCompanionAdRenderer.type&&this.loadAfc_(c):c.afcMpu?
this.loadAfc_(c):c.afvMpu?this.showAfv_(c):a.iframeCompanionRenderer?this.set("data.iframeCompanionRenderer",c.iframeCompanionRenderer):a.imageCompanionAdRenderer?this.set("data.imageCompanionAdRenderer",c.imageCompanionAdRenderer):a.actionCompanionAdRenderer&&(this.set("data.actionCompanionAdRenderer",c.actionCompanionAdRenderer),A("enable_offer_suppression")&&this.sendOptionalAction("yt-hide-unlimited-offer-module"));this.updateRendererStamper_()}.bind(this,a);
a.iframeCompanionRenderer?this.updateCompanionDataJobId_=En(b):b()}},
dataChanged_:function(){this.isAfcLoaded_=!1;if(A("kevlar_js_fixes")){var a=qW(this);if(!a){xe(Error("Missing PlayerManager"));return}}else a=sW(this);a.getPlayerPromise().then(function(b){this.contentVideoId_&&pc(b.getVideoUrl(),"v="+this.contentVideoId_)||(this.cancelPendingCompanionAdJobs_(),zB(),this.updateRendererStamper_())}.bind(this))},
showAfv_:function(a){this.showAfvJobId_=En(function(){for(var b in C3)this.data[b]=void 0;this.data.iframeCompanionRenderer=a.backfillMpuCompanionAdRenderer?{afvParams:a.backfillMpuCompanionAdRenderer.afvParams,gutParams:a.backfillMpuCompanionAdRenderer.googleUnifiedTagParams,useGut:a.backfillMpuCompanionAdRenderer.useGoogleUnifiedTag,showAfv:!0}:{afvParams:this.data.afvParams,gutParams:this.data.gutParams,useGut:this.data.useGut,showAfv:this.data.showAfv};this.updateRendererStamper_();this.showAfvJobId_=
0}.bind(this))},
loadAfc_:function(a){if(!this.isAfcLoaded_){this.isAfcLoaded_=!0;if(a.backfillMpuCompanionAdRenderer){var b=a.backfillMpuCompanionAdRenderer.afvParams;var c=a.backfillMpuCompanionAdRenderer.afcParams}else b=this.data&&this.data.afvParams,c=this.data&&this.data.afcParams;if(b&&c){window.google_ad_client=b.googleAdClient;window.google_page_url=b.googlePageUrl;window.google_page_location=window.location.href;for(var d in c){var e=c[d],g=xd(e);if("noInitialAds"===d&&e){zB();a.afcMpu.logNoAd&&a.afcMpu.logNoAd();
return}if("format"!==d||gc(g)){if("loeid"!==d||gc(g)){var h="google_"+this.getSnakeFromCamel_(d);(KA[h]||MA[h]||OA[h])&&(window[h]=e)}else window.google_loeid=g;}else{var m=g.match(/(\d+)x(\d+)/);m&&(window.google_ad_width=m[1],window.google_ad_height=m[2],window.google_ad_format=g)}}var n=new aca,p=n.slotVars;null==p.google_ad_output&&(p.google_ad_output="html");if(null!=p.google_ad_client){var x=String(p.google_ad_client);if(x){var y=x=x.toLowerCase();y&&"ca-"!=y.substring(0,3)&&(y="ca-"+y);var B=
x=y}else B="";p.google_ad_client=B}null!=p.google_ad_slot&&(p.google_ad_slot=String(p.google_ad_slot));if(null==p.google_flash_version){try{var G=kca()}catch(Zj){G="0"}p.google_flash_version=G}p.google_webgl_support=!!Ge.WebGLRenderingContext;p.google_ad_section=p.google_ad_section||p.google_ad_region||"";p.google_country=p.google_country||p.google_gl||"";var P=new Date().getTime();Wa(p.google_color_bg)&&(p.google_color_bg=AB(n,p.google_color_bg,P));Wa(p.google_color_text)&&(p.google_color_text=AB(n,
p.google_color_text,P));Wa(p.google_color_link)&&(p.google_color_link=AB(n,p.google_color_link,P));Wa(p.google_color_url)&&(p.google_color_url=AB(n,p.google_color_url,P));Wa(p.google_color_border)&&(p.google_color_border=AB(n,p.google_color_border,P));Wa(p.google_color_line)&&(p.google_color_line=AB(n,p.google_color_line,P));window.google_alternate_ad_url="https://www.youtube.com/ad_frame?action=auto-collapse-kevlar-companion";window.google_loader_used="yt";var S=n.slotVars,ca=Ti().document,Ja={},
Ya=Ti(),Mb;var Vb=CB(Ti(),!1).win;var Y=Pja(Vb);a:{var aa=Ti(),Z=S.google_ad_width||aa.google_ad_width,Pa=S.google_ad_height||aa.google_ad_height;if(aa&&aa.top==aa)var Yb=!1;else{var Ld=ca.documentElement;if(Z&&Pa){var Ck=1,Bm=1;aa.innerHeight?(Ck=aa.innerWidth,Bm=aa.innerHeight):Ld&&Ld.clientHeight?(Ck=Ld.clientWidth,Bm=Ld.clientHeight):ca.body&&(Ck=ca.body.clientWidth,Bm=ca.body.clientHeight);if(Bm>2*Pa||Ck>2*Z){Yb=!1;break a}}Yb=!0}}var ob=Mb=Yb,Hg=Y.isTopUrl,wf=Ti();var yp=wf.top==wf?0:Ii(wf.top)?
1:2;var sw=4;ob||1!=yp?ob||2!=yp?ob&&1==yp?sw=7:ob&&2==yp&&(sw=8):sw=6:sw=5;Hg&&(sw|=16);var VHa=""+sw;var kna=Qja();var LZ=Vb,MZ=Mb,NZ=!!S.google_page_url;Ja.google_iframing=VHa;0!=kna&&(Ja.google_iframing_environment=kna);if(!NZ&&"ad.yieldmanager.com"==ca.domain){for(var zC=ca.URL.substring(ca.URL.lastIndexOf("http"));-1<zC.indexOf("%");)try{zC=decodeURIComponent(zC)}catch(Zj){break}S.google_page_url=zC;NZ=!!zC}NZ?(Ja.google_page_url=S.google_page_url,Ja.google_page_location=(MZ?ca.referrer:ca.URL)||
"EMPTY"):(MZ&&Ii(Ya.top)&&ca.referrer&&Ya.top.document.referrer===ca.referrer?Ja.google_page_url=Ya.top.document.URL:Ja.google_page_url=MZ?ca.referrer:ca.URL,Ja.google_page_location=null);a:{if(ca.URL==Ja.google_page_url)try{var lna=Date.parse(ca.lastModified)/1E3;break a}catch(Zj){}lna=null}Ja.google_last_modified_time=lna;if(LZ==LZ.top)var mna=LZ.document.referrer;else{var nna=Ej();mna=nna&&nna.referrer||""}Ja.google_referrer_url=mna;Oja(Ja,S);var qL=S.google_page_location||S.google_page_url;"EMPTY"==
qL&&(qL=S.google_page_url);if(qL){var zi=qL.toString();0==zi.indexOf("http://")?zi=zi.substring(7,zi.length):0==zi.indexOf("https://")&&(zi=zi.substring(8,zi.length));var OZ=zi.indexOf("/");-1==OZ&&(OZ=zi.length);var ona=zi.substring(0,OZ);if(Sja.test(ona))var PZ=!1;else{var tw=ona.split("."),rL=!1;3<=tw.length&&(rL=tw[tw.length-3]in Rja);2<=tw.length&&(rL=rL||tw[tw.length-2]in Rja);PZ=rL}}else PZ=!1;var pna=PZ?"pagead2.googlesyndication.com":"googleads.g.doubleclick.net",ma={};Jka(n,ma);gF();ma.adsid=
eF[1];gF();ma.pucrd=eF[6];var mh=n.slotVars,AC=n.slotVars;ma.dt=Rj;AC.google_async_iframe_id&&AC.google_bpp&&(ma.bpp=AC.google_bpp);var WHa=Ti();b:{var XHa=Ti();try{var uw=XHa.performance;if(uw&&uw.timing&&uw.now){var qna=uw.timing.navigationStart+Math.round(uw.now())-uw.timing.domLoading;break b}}catch(Zj){}qna=null}var rna=qna;if(rna){var YHa=WHa.Date.now()-Rj;var sna=cF(rna,YHa,1E6)}else sna=null;var tna=sna;tna&&(ma.bdt=tna);var una=AC.google_iframe_start_time;if(Ma(una)){AC.google_iframe_start_time=
null;var vna=cF(una,Rj)}else vna=null;var wna=vna;null!=wna&&(ma.fdt=wna);ma.idt=cF(n.showAdsImplStartTime,Rj);var xna=n.slotVars;ma.shv="r20100101";ma.cbv="/r20100101".replace("/","");/^\w{1,3}$/.test(xna.google_loader_used)&&(ma.saldr=xna.google_loader_used);var QZ=Ej(n.pubWin);if(QZ){ma.is_amp=1;var RZ=QZ||Ej();ma.amp_v=RZ&&RZ.mode?+RZ.mode.version||null:null;var SZ=QZ||Ej();if(SZ&&SZ.container){for(var yna=SZ.container.split(","),zna=[],TZ=0;TZ<yna.length;TZ++)zna.push(hca[yna[TZ]]||"x");var Ana=
zna.join()}else Ana=null;var Bna=Ana;Bna&&(ma.act=Bna)}Ti()==window.top&&(ma.abxe=1);var Io=HB(),Cna=IB(Io,8,{}),sL=mh.google_ad_section;Cna[sL]&&(ma.prev_fmts=Cna[sL]);var Dna=IB(Io,9,{});Dna[sL]&&(ma.prev_slotnames=Dna[sL].toLowerCase());var UZ=IB(Io,8,{}),VZ=IB(Io,9,{}),vw=mh.google_ad_section,WZ=mh.google_ad_format,XZ=mh.google_ad_slot;WZ?UZ[vw]=UZ[vw]?UZ[vw]+(","+WZ):WZ:XZ&&(VZ[vw]=VZ[vw]?VZ[vw]+(","+XZ):XZ);var Ena=IB(Io,15,0);0<Ena&&(ma.nras=String(Ena));var Fna=Ti(),Gna=Ej(Fna);if(Gna){var YZ=
Gna||Ej();if(YZ){var Hna=YZ.pageViewId,Ina=YZ.clientId;Ka(Ina)&&(Hna+=Ina.replace(/\D/g,"").substr(0,6));var Jna=Hna}else Jna=null;var Kna=+Jna}else{var Lna=CB(Fna,!1).win,ZZ=Lna.google_global_correlator;ZZ||(Lna.google_global_correlator=ZZ=1+Math.floor(Math.random()*Math.pow(2,43)));Kna=ZZ}ma.correlator=IB(Io,7,Kna);eB().defaultBucket["21060549"]&&(ma.rume=1);if(mh.google_ad_channel){for(var Mna=IB(Io,10,{}),Nna="",Ona=mh.google_ad_channel.split(Gka),$Z=0;$Z<Ona.length;$Z++){var a_=Ona[$Z];Mna[a_]?
Nna+=a_+"+":Mna[a_]=!0}ma.pv_ch=Nna}if(mh.google_ad_host_channel){for(var tL=IB(Io,11,[]),Pna=mh.google_ad_host_channel.split("|"),uL=-1,b_=[],Pl=0;Pl<Pna.length;Pl++){var Qna=Pna[Pl].split(Gka);tL[Pl]||(tL[Pl]={});for(var BC="",c_=0;c_<Qna.length;c_++){var vL=Qna[c_];""!==vL&&(tL[Pl][vL]?BC+="+"+vL:tL[Pl][vL]=!0)}BC=BC.slice(1);b_[Pl]=BC;""!==BC&&(uL=Pl)}var d_="";if(-1<uL){for(var e_=0;e_<uL;e_++)d_+=b_[e_]+"|";d_+=b_[uL]}ma.pv_h_ch=d_}ma.frm=mh.google_iframing;ma.ife=mh.google_iframing_environment;
var Rna=mh.google_ad_client;try{var Sna=DB(),wL=Sna.google_prev_clients;wL||(wL=Sna.google_prev_clients={});if(Rna in wL)var f_=1;else wL[Rna]=!0,f_=2}catch(Zj){f_=0}ma.pv=f_;var g_=n.pubWin.document,Tna=n.slotVars,Una="";try{Una=g_.cookie}catch(Zj){}var Vna=g_.domain,CC=Una,xL=n.pubWin.screen,ZHa=g_.referrer,$Ha=Kj();if(Ej())var Wna=Ti().gaGlobal||{};else{var h_=Math.round(new Date().getTime()/1E3),i_=Tna.google_analytics_domain_name,yL="undefined"==typeof i_?vga("auto",Vna):vga(i_,Vna),aIa=-1<CC.indexOf("__utma="+
yL+"."),bIa=-1<CC.indexOf("__utmb="+yL),j_;if(!(j_=GB().gaGlobal)){var cIa={};j_=GB().gaGlobal=cIa}var ee=j_,Xna=!1;if(aIa){var k_=CC.split("__utma="+yL+".")[1].split(";")[0].split(".");bIa?ee.sid=k_[3]+"":ee.sid||(ee.sid=h_+"");ee.vid=k_[0]+"."+k_[1];ee.from_cookie=!0}else{ee.sid||(ee.sid=h_+"");if(!ee.vid){Xna=!0;var dIa=Math.round(2147483647*Math.random()),Yna=$Ha,Zna,ns=[KB.appName,KB.version,KB.language?KB.language:KB.browserLanguage,KB.platform,KB.userAgent,tga()?1:0].join("");if(xL)ns+=xL.width+
"x"+xL.height+xL.colorDepth;else if(q.java&&q.java.awt){var $na=q.java.awt.Toolkit.getDefaultToolkit().getScreenSize();ns+=$na.screen.width+"x"+$na.screen.height}ns=ns+CC+(ZHa||"");for(Zna=ns.length;0<Yna;)ns+=Yna--^Zna++;ee.vid=(dIa^uga(ns)&2147483647)+"."+h_}ee.from_cookie=!1}if(!ee.cid){b:{var ww=i_,aoa=999;ww&&(ww=0==ww.indexOf(".")?ww.substr(1):ww,aoa=(""+ww).split(".").length);for(var boa,coa=999,zL=CC.split(";"),DC=0;DC<zL.length;DC++){var AL=wga.exec(zL[DC])||xga.exec(zL[DC])||yga.exec(zL[DC]);
if(AL){var l_=AL[1]||0;if(l_==aoa){var doa=AL[2];break b}l_<coa&&(coa=l_,boa=AL[2])}}doa=boa}var EC=doa;Xna&&EC&&-1!=EC.search(/^\d+\.\d+$/)?ee.vid=EC:EC!=ee.vid&&(ee.cid=EC)}ee.dh=yL;ee.hid||(ee.hid=Math.round(2147483647*Math.random()));Wna=ee}var FC=Wna;ma.ga_vid=FC.vid;ma.ga_sid=FC.sid;ma.ga_hid=FC.hid;ma.ga_fc=FC.from_cookie;ma.ga_cid=FC.cid;ma.ga_wpids=Tna.google_analytics_uacct;var GC=n.pubWin,HC=new SA(GC);GC.location&&GC.location.ancestorOrigins&&(ma.iag=WA(HC));ma.icsg=XA(HC);var m_=HC.windowContexts[0].depth;
m_&&0<m_&&(ma.nhd=m_);ma.dssz=GC.document.scripts?GC.document.scripts.length:0;ma.mdo=Wfa(HC);ma.mso=Xfa(HC);var n_=mh.google_ad_layout;n_&&0<=hka[n_]&&(ma.rplot=hka[n_]);Lj(ma);var eoa=Ej(),BL=eoa&&eoa.initialIntersection,o_=(BL&&$a(BL.rootBounds)?new Yg(BL.rootBounds.width,BL.rootBounds.height):null)||Pj(!1,n.pubWin.top);o_&&(ma.biw=o_.width,ma.bih=o_.height);var foa=n.pubWin;if(foa.top!=foa){var p_=Pj(!1,n.pubWin);p_&&(ma.isw=p_.width,ma.ish=p_.height)}var IC=n.pubWin;if(Oj(IC)){var CL=[IC.document.URL];
IC.name&&CL.push(IC.name);var goa=Pj(!1,IC,!1);CL.push(goa.width.toString());CL.push(goa.height.toString());var hoa=Mi(CL.join(""))}else hoa=0;var ioa=hoa;0!==ioa&&(ma.ifk=ioa);var DL=Si(n.pubWin);if(DL&&DL.document){var EL=DL.document,JC=DL;JC=void 0===JC?q:JC;var joa=EL.scrollingElement||("CSS1Compat"==EL.compatMode?EL.documentElement:EL.body);var koa=new Wg(JC.pageXOffset||joa.scrollLeft,JC.pageYOffset||joa.scrollTop)}else koa=new Wg(-12245933,-12245933);var FL=koa;var q_=void 0===q_?!1:q_;Dj.getInstance().getBooleanFlag(196,
q_)?(ma.scr_x=Math.round(FL.x),ma.scr_y=Math.round(FL.y)):(ma.scr_x=FL.x,ma.scr_y=FL.y);var loa=eB(),moa=gka(loa),GL=n.slotVars.google_eids;if(Wa(GL)){n.featuresUsed|=64;for(var HL=0;HL<GL.length;HL++)Ka(GL[HL])&&moa.push(GL[HL])}ma.eid=moa.join();var noa=fka(loa),ooa=n.slotVars.google_loeid;Ka(ooa)&&(n.featuresUsed|=4096,Db(noa,ooa.split(",")));ma.loeid=noa.join();n.oseId&&(ma.oid=n.oseId);if("423550201"===fB(139)){var r_=Si(n.pubWin);if(r_){var s_=wB(r_);ma.pg_h=s_.scrollHeight==wB(r_).clientHeight?
s_.offsetHeight:s_.scrollHeight}}var eIa=HB(),poa=IB(eIa,20,{})[n.slotVars.google_ad_client];poa&&(ma.psts=poa.join());var Mf=n.slotVars,IL=n.pubWin,qoa=DB();ma.ref=Mf.google_referrer_url;ma.loc=Mf.google_page_location;var JL=Ej(n.pubWin);if(JL&&$a(JL.data)&&Ka(JL.data.type)){var t_=JL.data.type.toLowerCase();var roa="doubleclick"==t_||"adsense"==t_?null:t_}else roa=null;var soa=roa;soa&&(ma.apn=soa.substr(0,10));var KC=Pja(qoa);ma.url||ma.loc||!KC.url||(ma.url=KC.url,KC.isTopUrl||(ma.usrc=1));KC.url!=(
ma.loc||ma.url)&&(ma.top=KC.url);Mf.google_async_rrc&&(ma.rr=Mf.google_async_rrc);ma.rx=0;var toa;if(aF&&jka(aF))var uoa=aF;else{var u_=DB(),Ql=u_.google_jobrunner;uoa=Ql&&(ica(Ql)||Gj(Ql))&&jka(Ql)&&Ij(Ql.nq)&&Ij(Ql.nqa)&&Ij(Ql.al)&&Ij(Ql.rl)?aF=Ql:u_.google_jobrunner=aF=new $E(u_)}var voa=uoa;(toa=Ij(voa.tc)?voa.tc():null)&&(ma.jtc=toa);0<=n.expandableAdsEligibility&&(ma.eae=n.expandableAdsEligibility);var woa=aka(Mf,n.topWin);woa&&(ma.fc=woa);var xoa=Mf.google_ad_format;if(!(xoa&&0<xoa.indexOf("_0ads"))){var LC=
(n.iframeWin||n.pubWin).document,yoa="";if(LC.documentMode){var os=new Zg(LC).createElement("IFRAME");os.frameBorder="0";os.style.height=0;os.style.width=0;os.style.position="absolute";if(LC.body){LC.body.appendChild(os);try{var KL=os.contentWindow.document;KL.open();KL.write("<!DOCTYPE html>");KL.close();yoa+=KL.documentMode}catch(Zj){}LC.body.removeChild(os)}}ma.docm=yoa}ma.brdim=Sj(IL).join();var fIa="618018086"===fB(67),LL=0;!Ia(q.postMessage)&&(LL|=1);fIa&&(zha(IL)&&(LL|=256),eD(IL)&&(LL|=
1024));var zoa=LL;0<zoa&&(ma.osd=zoa);ma.vis=yl(IL.document);if(!Tja(Mf)){a:{var MC=Number(Mf.google_ad_width),NC=Number(Mf.google_ad_height);if(!(0<MC&&0<NC)){b:{try{var v_=String(Mf.google_ad_format);if(v_&&v_.match){var w_=v_.match(/(\d+)x(\d+)/i);if(w_){var Aoa=parseInt(w_[1],10),Boa=parseInt(w_[2],10);if(0<Aoa&&0<Boa){var Coa={width:Aoa,height:Boa};break b}}}}catch(Zj){}Coa=null}var x_=Coa;if(!x_){var Doa=null;break a}MC=0<MC?MC:x_.width;NC=0<NC?NC:x_.height}Doa={width:MC,height:NC}}var y_=Doa;
if(y_){var Eoa=0;a:{try{var Foa=Mf.google_async_iframe_id,Goa=Ti().document;if(Foa)var Hoa=Goa.getElementById(Foa);else{var Ioa=Goa.getElementsByTagName("script"),Joa=Ioa[Ioa.length-1];Hoa=Joa&&Joa.parentNode||null}var Koa=Hoa;if(Koa){for(var OC=[],ML=Koa,gIa=0,hIa=fb();100>=++gIa&&50>fb()-hIa&&(ML=Hka(ML));)1===ML.nodeType&&OC.push(ML);b:{for(var z_=0;z_<OC.length;z_++){c:{var Rl=OC[z_];try{if(Rl.parentNode&&0<Rl.offsetWidth&&0<Rl.offsetHeight&&Rl.style&&"none"!==Rl.style.display&&"hidden"!==Rl.style.visibility&&(
!Rl.style.opacity||0!==Number(Rl.style.opacity))){var Loa=Rl.getBoundingClientRect();var Moa=0<Loa.right&&0<Loa.bottom;break c}}catch(Zj){}Moa=!1}if(!Moa){var Noa=!1;break b}}Noa=!0}if(Noa){b:{for(var iIa=fb(),jIa=/^html|body$/i,kIa=/^fixed/i,A_=0;A_<OC.length&&50>fb()-iIa;A_++){var NL=OC[A_];if(!jIa.test(NL.tagName)&&kIa.test(NL.style.position||dj(NL))){var B_=NL;break b}}B_=null}break a}}}catch(Zj){}B_=null}var C_=B_;C_&&C_.offsetWidth*C_.offsetHeight<=4*y_.width*y_.height&&(Eoa=1);ma.pfx=Eoa}}if("26835106"===
fB(41)&&n.topWin){try{var Ooa=n.topWin.document.getElementsByTagName("head")[0];var Poa=Ooa?Dka(Ooa):0}catch(Zj){Poa=0}var Qoa=Poa;0!==Qoa&&(ma.cms=Qoa)}var Roa=Uja(qoa,Mf);0!=Roa&&(ma.ifsl=Roa);"r20100101"!==Mf.google_lrv&&(ma.alvm=Mf.google_lrv||"none");ma.fu=n.featuresUsed;ma.bc=xl();gF();ma.jar=eF[4];ma.url&&ec(String(ma.url),"https:")&&Qc()&&0<=sc(Kaa(),57)&&(ma.osw_key=rka(ma));var Soa=n.slotVars,lIa=Soa.google_ad_channel,Toa="/pagead/ads?";"ca-pub-6219811747049371"===Soa.google_ad_client&&
Kka.test(lIa)&&(Toa="/pagead/lopri?");var D_=Dga(pna,Toa);3===yl(n.pubWin.document)&&(n.adsAreDeferred=!0,n.originalBaseUrl=D_,D_=Dga(pna,"/pagead/blank.gif#?"));var Uoa=jca(ma,D_+"");S.google_ad_url=Uoa;this.set("data.iframeCompanionRenderer",Uoa&&a.afcMpu?{width:window.google_ad_width,height:window.google_ad_height,url:window.google_ad_url,log_impression_callback:a.afcMpu.logImpression,log_no_ad_callback:a.afcMpu.logNoAd}:void 0);zB()}else a.afcMpu.logNoAd&&a.afcMpu.logNoAd()}},
cancelPendingCompanionAdJobs_:function(){this.showAfvJobId_&&(Dn.cancelJob(this.showAfvJobId_),this.showAfvJobId_=0);this.updateCompanionDataJobId_&&(Dn.cancelJob(this.updateCompanionDataJobId_),this.updateCompanionDataJobId_=0)},
getSnakeFromCamel_:function(a){return a.replace(/[A-Z]/g,function(b){return"_"+b.toLowerCase()})},
defineGlobals_:function(a){if(a=a&&a.backfillMpuCompanionAdRenderer&&a.backfillMpuCompanionAdRenderer.afvParams||this.data.afvParams)for(var b in a){var c=this.getSnakeFromCamel_(b);window[c]=a[b]}},
handleCompanionAdClicked_:function(a){this.player_.onAdUxClicked(a);"videowall-companion"!=a&&this.player_.pauseVideo()}});Polymer({is:"ytd-player-legacy-desktop-watch-ads-renderer",behaviors:[V.YtRendererBehavior],properties:{data:{type:Object,observer:"dataChanged_"},companionSlotData:{type:Object},pyvResponse:{type:Array}},created:function(){this.pyvNonce_=-1},
dataChanged_:function(a){var b=this;this.pyvResponse=null;var c=this.get("data.displayAds.pyvAdTag");!c&&A("enable_pyv_ad_tag_diff_logging")&&new Az(function(){b.sendAction("yt-pyv-logging-ready",[c])},2E3).start();
if(c&&Ka(c)&&!A("disable_legacy_pyv_for_web")){var d=this.generatePyvClientParams_(),e=Ai(c,d),g=this.pyvNonce_=Math.random();Vm(e,{format:"RAW",onSuccess:function(h){if(g===this.pyvNonce_)this.onPyvAjaxSuccess_(h,e)}.bind(this),
onError:this.onPyvAjaxError_.bind(this),withCredentials:!0})}this.companionSlotData=a&&!A("kevlar_disable_companions")?{afcParams:a.afcParams,afvParams:a.afvParams,gutParams:a.gutParams,showAfv:a.showAfv,useGut:a.useGut}:void 0},
onPyvAjaxSuccess_:function(a,b){if(!A("disable_legacy_pyv_for_web")){A("enable_pyv_ad_tag_diff_logging")&&this.sendAction("yt-pyv-logging-ready",[b]);a=a.responseText;var c=this.pyvRequestCallback_.bind(this),d={google_ad_request_done:c};try{new Function("window","google_ad_request_done",a)(d,c)}catch(e){cn(e,"WARNING",{pyvTagUrl:b})}}},
pyvRequestCallback_:function(a){A("disable_legacy_pyv_for_web")||(this.pyvResponse=a,a.length&&(a=a.map(function(b){return this.createCompactPromotedVideoRendererData_(b)},this),a=a.filter(function(b){return b},this),a.length&&this.sendAction("yt-pyv-renderers-ready",[a])))},
createCompactPromotedVideoRendererData_:function(a){if(A("disable_legacy_pyv_for_web"))return null;var b=a.media_template_data.find(function(n){return n.imageUrl});
if(!b)return null;var c=b.imageUrl.replace(/^http(s)?:/,"");pc(c,"/vi/")&&(c=c.replace(/\/(([\d]+|default)\.jpg)$/,"/hq$1"));c=[{url:c}];var d=b.headline||pd(a.line1),e=b.channelName;"UC"==e.substr(0,2)&&(e=null);e=a.display_name||e||null;var g=null;"view_count"in a&&(g=new zM().format(a.view_count)+" views");var h=this.formatAdDuration_(a.duration/1E3),m=pd(a.url);b={videoId:b.videoId,thumbnail:{thumbnails:c},title:{runs:[{text:d}]},lengthText:{runs:[{text:h}]},navigationEndpoint:{urlEndpoint:{url:m}}};
e&&(b.shortBylineText={runs:[{text:e}]});g&&(b.shortViewCountText={runs:[{text:g}]});A("enable_wta_kevlar_watch_pyv")&&RDa(b,a);return b},
generatePyvClientParams_:function(){var a=rm(qm);eb(a,sm(qm));var b={};b=(b.dff="times new roman",b.dfs="16",b.ppjl="u",b.rsz="||n|",b);eb(a,b);b=new SA(Ge);var c=b.windowContexts[0].depth,d={};d=(d.dssz=Fe.scripts?Fe.scripts.length:0,d.icsg=XA(b),d.mdo=Wfa(b),d.mso=Xfa(b),d);Ge.location&&Ge.location.ancestorOrigins&&(d.iag=WA(b));0<c&&(d.nhd=c);eb(a,d);eb(a,{lact:Rn()});return a},
formatAdDuration_:function(a){var b=Math.floor(a/3600),c=a%3600;a=Math.floor(c/60);c%=60;return b?ld("%s:%s:%s",b.toString(),wd(a,2),wd(c,2)):ld("%s:%s",a.toString(),wd(c,2))},
onPyvAjaxError_:function(){}});var D3=function(){var a=F.apply(this,arguments)||this;a.onShowMoreButtonTap=function(){a.showingMore=!0};
a.onShowMoreButtonFocus=function(b){"show-more-button"===Polymer.dom(b).localTarget.id&&(a.showingMore=!0,Polymer.RenderStatus.afterNextRender(a,function(){var c=Polymer.dom(a.$$("table")).children;c=Polymer.dom(c[3]).children;Polymer.dom(c[3]).children[0].focus()}))};
a.onShowLessButtonTap=function(){a.showingMore=!1};
a.toggleCollapse=function(){a.collapsed=!a.collapsed};
return a};
l(D3,F);f=D3.prototype;f.attached=function(){var a=this.$["show-more-button"];a.addEventListener("tap",this.onShowMoreButtonTap);a.addEventListener("focus",this.onShowMoreButtonFocus);this.$["show-less-button"].addEventListener("tap",this.onShowLessButtonTap);this.$.toggler.addEventListener("tap",this.toggleCollapse)};
f.detached=function(){var a=this.$["show-more-button"];a.removeEventListener("tap",this.onShowMoreButtonTap);a.removeEventListener("focus",this.onShowMoreButtonFocus);this.$["show-less-button"].removeEventListener("tap",this.onShowLessButtonTap);this.$.toggler.removeEventListener("tap",this.toggleCollapse)};
f.dataChanged=function(){this.firstEvent=this.get("data.events.0.ticketEventRenderer");this.data&&this.data.events&&(this.canShowMore=4<this.data.events.length,this.$.separator.style.visibility=1<this.data.events.length?"visible":"hidden");this.collapsed=this.showingMore=!1;this.showingMoreChanged(!1)};
f.showingMoreChanged=function(a){var b=this.get("data.events")||[];this.set("restEvents",b.slice(1,a?b.length:4).map(function(c){return c.ticketEventRenderer}));
b.slice(0,a?b.length:4).forEach(function(c){var d=Wo();c=c.ticketEventRenderer.trackingParams;Vo()&&d&&c&&(c=go(c),d&&zo(bo,d,c,void 0))})};
f.computeCollapsedIcon=function(a){return a?"yt-icons:expand-more":"yt-icons:expand-less"};
f.computeAriaLabel=function(a){return a.subtitle1+", "+a.subtitle2};
f.computeShowOrHideText=function(a){return a?this.data.showText||"":this.data.hideText||""};
f.onFirstEventTap=function(){this.firstEvent&&this.logTap(this.firstEvent)};
f.onEventTap=function(a){this.logTap(a.model.get("item"))};
f.logTap=function(a){var b=Wo();a=a.trackingParams;Vo()&&b&&a&&(a=go(a),b&&Co(b,a,void 0))};
var E3=D3;E3.prototype.showingMoreChanged=E3.prototype.showingMoreChanged;E3.prototype.dataChanged=E3.prototype.dataChanged;v([H(V.YtRendererBehavior),w("design:type",Object)],E3.prototype,"ytRendererBehavior",void 0);v([I(),w("design:type",Object)],E3.prototype,"data",void 0);v([I(),w("design:type",Object)],E3.prototype,"firstEvent",void 0);v([I(),w("design:type",Object)],E3.prototype,"restEvents",void 0);v([I(),w("design:type",String)],E3.prototype,"imageUrl",void 0);
v([I({reflectToAttribute:!0}),w("design:type",Boolean)],E3.prototype,"showingMore",void 0);v([I({reflectToAttribute:!0}),w("design:type",Boolean)],E3.prototype,"canShowMore",void 0);v([I({reflectToAttribute:!0}),w("design:type",Boolean)],E3.prototype,"collapsed",void 0);v([I({reflectToAttribute:!0,value:A("kevlar_fixie_watch_layout")}),w("design:type",Boolean)],E3.prototype,"fixie",void 0);
v([I({reflectToAttribute:!0,value:A("show_updated_ticket_shelf_ui")}),w("design:type",Boolean)],E3.prototype,"showUpdatedUi",void 0);v([rl("data"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],E3.prototype,"dataChanged",null);v([rl("showingMore"),w("design:type",Function),w("design:paramtypes",[Boolean]),w("design:returntype",void 0)],E3.prototype,"showingMoreChanged",null);E3=v([W({is:"ytd-ticket-shelf-renderer"})],E3);var KGa=[[{listeners:{"yt-get-context-provider":"getContextProvider_"},attached:function(){this.getProvidedContext()&&this.getProvidedContext().start()},
detached:function(){this.getProvidedContext()&&this.getProvidedContext().pause()},
getContextProvider_:function(a){a.detail.contextProvider=this;a.stopPropagation()},
getProvidedContext:function(){return null}},
{created:function(){this.pageContext=null},
getProvidedContext:function(){return this.pageContext}}],
[mY.YtVisibilityObserverBehavior,{isVisibilityRoot:!0,resetVisibilityRoot:function(){nk(this.visibilityObserverForChild_)},
disconnectVisibilityRoot:function(){this.visibilityObserverForChild_&&this.visibilityObserverForChild_.disconnect()},
reconnectVisibilityRoot:function(){this.visibilityObserverForChild_&&this.visibilityObserverForChild_.reconnect();A("kevlar_enable_vimio_logging")&&JS()}}],
{_noAccessors:!0,properties:{active:Boolean,data:Object,loading:Boolean},observers:["ytPageBehaviorActiveObserver_(active)"],created:function(){this.pageCount=0;this.readyResolver_=fw();this.pageScrollElement=null},
ready:function(){this.readyResolver_.resolve()},
getReady:function(){return this.readyResolver_.promise},
loadPage:function(a){this.pageCount+=1;A("kevlar_attach_vimio_behavior")&&(this.disconnectVisibilityRoot(),this.reconnectVisibilityRoot());this.loadPage_(a)},
loadPage_:function(a){this.data=a},
ytPageBehaviorActiveObserver_:function(a){A("kevlar_attach_vimio_behavior")&&(a?this.reconnectVisibilityRoot():this.disconnectVisibilityRoot())},
setScrollTop:function(a){if(!this.setScrollTopJobId_){var b=this;this.setScrollTopJobId_=window.requestAnimationFrame(function(){b.setScrollTopJobId_=0;var c=b.getInterface(EY);c&&c.ignoreNextScroll();this.getPageScrollingElement().scrollTop=a}.bind(this))}},
getPageScrollingElement:function(){return this.pageScrollElement||nh(document)},
getScrollTop:function(){return this.getPageScrollingElement().scrollTop}}];MY.YtPageBehavior=KGa;function LGa(a){var b=u.getValueByKeys.apply(u,[a].concat(ka(yBa)));a=u.getValueByKeys.apply(u,[a].concat(ka(wBa)));return!(!b&&!a)}
function F3(a){var b=Gi(window.location.href,"disable_polymer",!0);a&&(b=Fi(b,"view_as"));zU(b)}
;var MGa=["videoPrimaryInfoRenderer","title"],NGa=["videoSecondaryInfoRenderer","owner","videoOwnerRenderer","title"];
function G3(a,b){b=void 0===b?!1:b;var c=u.getValueByKeys(a,"contents","twoColumnWatchNextResults","results","results","contents"),d=u.getValueByKeys(a,"contents","twoColumnWatchNextResults","playlist","playlist")||null;b&&(d=null);var e=b=null;if(d)b=u.getValueByKeys(d,"titleText"),e=u.unsafeClone(u.getValueByKeys(d,"longBylineText")),!d.isInfinite&&-1<d.currentIndex&&0<d.totalVideos&&(c=d.currentIndex+1+" / "+d.totalVideos,e?e.runs.push({text:" - "}):e={runs:[]},e.runs.push({text:c}));else if(c){c=
k(c);for(var g=c.next();!g.done;g=c.next())g=g.value,g.videoPrimaryInfoRenderer&&(b=u.getValueByKeys.apply(u,[g].concat(ka(MGa)))),g.videoSecondaryInfoRenderer&&(e=u.getValueByKeys.apply(u,[g].concat(ka(NGa))))}else xe(Error("WN data missing, unable to minimize player"));return{miniplayerTitle:b,miniplayerSubtitle:e,watchEndpoint:a.currentVideoEndpoint,playlistData:d}}
;Polymer({is:"yt-alert-renderer",properties:{data:Object}});XX.YtdWatchBehaviorImpl_={_noAccessors:!0,properties:{data:{type:Object,observer:"dataChanged_"},info:{type:Object},meta:{type:Object},ticket:{type:Object},merch:{type:Object},donation:{type:Object},clarifyBox:{type:Object,computed:"getClarifyBox(data)"},limitedState:{type:Object,computed:"getLimitedState(data)"},comments:{type:Object,value:null},playerData:{type:Object,observer:"playerDataChanged_"},playerAds:{type:Object,value:null},localPlaylistData_:{type:Object,value:{},computed:"setPlaylistData_(data.contents.twoColumnWatchNextResults.playlist.playlist)"},
externalPlaylistData_:{type:Object,value:{}},playlistData:{type:Object,computed:"computePlaylistData_(localPlaylistData_, externalPlaylistData_)"},theater:{type:Boolean,value:!1,reflectToAttribute:!0},noAnchorOverflow_:{type:Boolean,reflectToAttribute:!0},fullWindowMode_:{type:Boolean,reflectToAttribute:!0,value:function(){return se("START_IN_FULL_WINDOW_MODE")}},
fullscreen:{type:Boolean,reflectToAttribute:!0},playlist:{type:Boolean,reflectToAttribute:!0,computed:"hasPlaylist_(playlistData, loadingData.playlist)",observer:"secondaryColumnModulePresenceChanged_"},hideAutoplay_:{type:Boolean,computed:"computeHideAutoplay_(playlistData)"},alerts:{type:Object,computed:"getAlerts_(playerData.playabilityStatus)"},commentsReady:Boolean,theaterRequested_:{type:Boolean,reflectToAttribute:!0,value:function(){return se("START_IN_THEATER_MODE")}},
speedyGData_:{type:Object,value:null},loading:{type:Boolean,observer:"onLoadingChanged_"},loadingData:{type:Object,value:{playlist:!1}},playerUnavailable:{type:Boolean,value:!1,reflectToAttribute:!0,computed:"isPlayerUnavailable_(playerData.playabilityStatus, playerLoading_)"},plaShelfEnabled_:{type:Boolean,value:!1,computed:"isPlaShelfEnabled_(playerData)"},monetizationShelvesEnabled_:{type:Boolean,value:!1},merchandiseShelfEnabled_:{type:Boolean},transcriptOpened_:{type:Boolean,value:!1,observer:"secondaryColumnModulePresenceChanged_",
reflectToAttribute:!0},watchNextShownItems:Array,watchNextCanShowMore:Boolean,legacyTheaterMode:{type:Boolean,reflectToAttribute:!0,value:function(){return A("kevlar_legacy_theater_mode")}},
useLargerMinHeightForChat:{type:Boolean,value:function(){return A("live_chat_increased_min_height")}},
hidden:{type:Boolean,reflectToAttribute:!0,value:!1},shouldStampChat:{type:Boolean,value:!1,computed:"computeShouldStampChat_(data, hidden)",observer:"secondaryColumnModulePresenceChanged_",reflectToAttribute:!0},canScheduleCommentJobs_:{type:Boolean,value:!0},canShowComments_:{type:Boolean,value:!1},videoId:{type:String,value:"",computed:"identity(data.currentVideoEndpoint.watchEndpoint.videoId)",reflectToAttribute:!0},isTwoColumns_:{type:Boolean,reflectToAttribute:!0,observer:"isTwoColumnsChanged_"},
splitPane_:{type:Boolean,value:!1,reflectToAttribute:!0},isVerticalVideo_:{type:Boolean,reflectToAttribute:!0,computed:"computeIsVerticalVideo_(videoHeightToWidthRatio_)"},isFourThreeToSixteenNineVideo_:{type:Boolean,reflectToAttribute:!0,computed:"computeIsFourThreeToSixteenNineVideo_(videoHeightToWidthRatio_)"},isExtraWideVideo_:{type:Boolean,reflectToAttribute:!0,computed:"computeIsExtraWideVideo_(videoHeightToWidthRatio_)"},videoHeightToWidthRatio_:{type:Number,value:.5625,observer:"videoHeightToWidthRatioChanged_"},
showFixieCommentHeader_:{type:Boolean,computed:"computeShowFixieCommentHeader_(comments, canShowComments_, shouldStampChat)"},peekingCommentData_:Object,collapsiblePlaylist_:{type:Boolean,value:function(){return A("kevlar_watch_collapsible_playlist")}},
flexySmallWindow_:{type:Boolean,reflectToAttribute:!0},flexyLargeWindow_:{type:Boolean,reflectToAttribute:!0},playerLoading_:{type:Boolean,value:!1},jsPanelHeight_:{type:Boolean,value:function(){return A("kevlar_watch_js_panel_height")},
reflectToAttribute:!0},watchColorUpdate_:{type:Boolean,reflectToAttribute:!0,value:function(){return A("kevlar_watch_color_update")}}},
observers:"watchPageActiveChanged_(active);shouldProceedToNextVideo_(playerData.playabilityStatus, data, playlist);autoplayDataChanged_(data.contents.twoColumnWatchNextResults.autoplay.autoplay);userEngagementConfigDataChanged_(data.userEngagementConfig);updateTheaterModeState_(theaterRequested_);watchNextShownItemsAddedOrRemoved_(watchNextShownItems.splices, watchNextCanShowMore);youthereDataChanged_(playerData.messages)".split(";"),requiresPlayer:!0,monitorScroll:!0,DEFAULT_COMMENTS_DELAY:1E3,FULLERSCREEN_EDU_CLICKED_SCROLL_DISTANCE_:186,
FULLERSCREEN_EDU_BUTTON_CLICK_COUNT_KEY_:"yt-fullerscreen-edu-button-click-count",FULLERSCREEN_EDU_BUTTON_SHOWN_COUNT_KEY_:"yt-fullerscreen-edu-button-shown-count",stampDom:{info:{id:"info-contents",mapping:{videoPrimaryInfoRenderer:{component:"ytd-video-primary-info-renderer"}}},meta:{id:"meta-contents",mapping:{videoSecondaryInfoRenderer:{component:"ytd-video-secondary-info-renderer"}}},ticket:{id:"ticket-shelf",mapping:{ticketShelfRenderer:"ytd-ticket-shelf-renderer"}},merch:{id:"merch-shelf",
mapping:{merchandiseShelfRenderer:"ytd-merch-shelf-renderer"}},donation:{id:"donation-shelf",mapping:{donationShelfRenderer:{component:"ytd-donation-shelf-renderer",properties:{isCollapsed:"[[shouldStampChat]]"}},donationUnavailableRenderer:{component:"ytd-donation-unavailable-renderer"}}},clarifyBox:{id:"clarify-box",mapping:{clarificationRenderer:"ytd-clarification-renderer"}},limitedState:{id:"limited-state",mapping:{limitedStateMessageRenderer:"ytd-limited-state-message-renderer"}},playerAds:{id:"player-ads",
mapping:{playerLegacyDesktopWatchAdsRenderer:"ytd-player-legacy-desktop-watch-ads-renderer"},initialRenderPriority:3,waitForSignal:kp(ip.getInstance(),["aa","eocs"])},"data.survey":{id:"survey",mapping:{surveyTriggerRenderer:"ytd-survey-trigger-renderer"},initialRenderPriority:3,waitForSignal:kp(ip.getInstance(),["aa","eocs"])},alerts:{id:"alerts",mapping:{alertRenderer:{component:"yt-alert-renderer",registration:["defer-on-all"]},alertWithButtonRenderer:{component:"ytd-alert-with-button-renderer",
registration:["defer-on-all"]}}},"data.contents.twoColumnWatchNextResults.miniplayerBar":{id:"miniplayer-bar",mapping:{miniplayerBarRenderer:"ytd-miniplayer-bar-renderer"}},"data.engagementPanels":{id:"panels",mapping:{engagementPanelSectionListRenderer:"ytd-engagement-panel-section-list-renderer"}}},listeners:{"yt-autoplay-on-changed":"onButtonAutonavChangeRequest_","yt-navigate":"onYtNavigate_","yt-page-navigate-start":"onYtPageNavigateStart_","yt-retrieve-location":"onRetrieveLocation_","yt-subscription-changed":"onSubscriptionChanged_",
"yt-page-data-will-update":"onYtPageDataWillUpdate_","yt-show-survey":"onYtShowSurvey_"},actionMap:{"yt-sync-with-remote-video":"syncWithRemoteVideo_","yt-signal-action-cancel-autonav":"onYtSignalCancelAutonav_","yt-open-transcript-action":"onYtOpenTranscriptAction_","yt-signal-action-close-transcript-pane":"onYtSignalActionCloseTranscriptPane_","yt-window-resized":"onWindowResized_","yt-toggle-theater-mode":"theaterModeChanged_","yt-activate-miniplayer-from-watch-action":"onCollapseMiniplayer_",
"yt-initial-video-aspect-ratio":"onYtInitialVideoAspectRatio_","yt-update-player-next-video":"onUpdatePlayerNextVideo_","yt-is-theater":"isTheater_","yt-autonav-state-changed-action":"onYtAutonavStateChangedAction_","yt-disable-watch-anchor-overflow-action":"onDisableWatchAnchorOverflow_","yt-fullscreen-change-action":"onFullscreenChange_","yt-signal-action-pause-player":"handleSignalActionPausePlayer_","yt-signal-action-play-player":"handleSignalActionPlayPlayer_","yt-signal-action-acknowledge-youthere":"handleSignalActionAcknowledgeYouThere_",
"yt-user-activity":"onYtUserActivity_"},created:function(){this.pageDisposeJobs=[this.showMetadataPlaceholder_.bind(this),this.clearComments_.bind(this),this.clearPlayerAds_.bind(this),this.closeTranscript_.bind(this),this.resetAutonavCanceledForNewPlayback_.bind(this)];this.DISABLE_SCROLLING_IN_LOADING_STATE_=this.WATCH_PAGE_SKELETON_ENABLED_=A("kevlar_watch_skeleton");this.watchNextSkeletonEl_=null;var a=this.getInterface(uV);a&&a.loadPlayer();this.playerState_=this.player=null;this.onPlayingCallbacks_=
[];this.timeBetweenAutonavScrollEventsMs_=200;this.scrollThrottle_=new Cw(this.onThrottledScroll_,this.timeBetweenAutonavScrollEventsMs_,this);this.setCommentsJobId_=0;this.setCommentsJobSet_=null;this.clearPlayerAdsJobId_=this.clearCommentsJobId_=0;this.showFullerscreenEdu_=!1;this.fullerscreenEduScrollAnimation_=new fV(this.setScrollTop.bind(this));this.enableMiniPlayer_=A("kevlar_miniplayer");this.windowSize_=this.previousPlayerEventId_=this.currentPlayerEventId_=null;this.autonavCanceledSignal_=
!1;A("kevlar_watch_while")&&(this.watchWhileScrollThreshold_=NaN,this.SPACE_ABOVE_PLAYER_=24,this.MASTHEAD_HEIGHT_=56,this.MINIPLAYER_BAR_HEIGHT_=142);a=rW.bind(null,this);this.youThereManager_=new mDa(a,this);this.pageDisposeJobs.push(this.youThereManager_.reset.bind(this.youThereManager_));A("external_fullscreen")&&(this.fullerscreenEduButtonShownThisPlayback_=this.fullerscreenEduButtonClickedThisPlayback_=!1,this.pageDisposeJobs.push(this.resetFullerscreenEduButtonForNewPlayback_.bind(this)));
A("kevlar_watch_js_panel_height")&&(this.panelMaxHeightUpdateJob_=0);this.PLAYER_EVENTS_=new Ak;this.PLAYER_EVENTS_.set("SIZE_CLICKED",this.theaterModeChanged_);this.PLAYER_EVENTS_.set("onAutonavChangeRequest",this.onPlayerAutonavChangeRequest_);this.PLAYER_EVENTS_.set("onPlayVideo",this.onPlayerPlayVideo_);this.PLAYER_EVENTS_.set("onFeedbackStartRequest",this.onPlayerFeedbackStartRequest_);this.PLAYER_EVENTS_.set("onFeedbackArticleRequest",this.onPlayerFeedbackArticleRequest_);this.PLAYER_EVENTS_.set("onYpcContentRequest",
this.onPlayerYpcContentRequest_);this.PLAYER_EVENTS_.set("onAutonavPauseRequest",this.onPlayerAutonavPauseRequest_);this.PLAYER_EVENTS_.set("onAdStateChange",this.onAdStateChange_);this.PLAYER_EVENTS_.set("onStateChange",this.onPlayerStateChange_);this.PLAYER_EVENTS_.set("CONNECTION_ISSUE",this.onPlayerConnectionIssue_);this.PLAYER_EVENTS_.set("SUBSCRIBE",this.onPlayerSubscribe_);this.PLAYER_EVENTS_.set("UNSUBSCRIBE",this.onPlayerUnsubscribe_);this.PLAYER_EVENTS_.set("onYtShowToast",this.onPlayerAdYtShowToast_);
this.PLAYER_EVENTS_.set("onCollapseMiniplayer",this.onCollapseMiniplayer_);this.PLAYER_EVENTS_.set("onFullerscreenEduClicked",this.onFullerscreenEduClicked_);this.PLAYER_EVENTS_.set("onFullscreenChange",this.onPlayerFullscreenChange_);this.PLAYER_EVENTS_.set("onVideoDataChange",this.onPlayerPresentingVideoDataChange_);"ytd-watch-fixie"==this.is&&(this.stampDom.meta.mapping.videoSecondaryInfoRenderer.component="ytd-video-secondary-info-renderer-fixie")},
loadPage_:function(a){this.initCsi_();this.updatePageData_(a)},
updatePageData_:function(a){if(a)if(this.data==a)this.onPageLoadWithSameData_();else if(this.data=a,a=this.get("onResponseReceivedEndpoints",this.data))for(var b=0;b<a.length;b++){var c=a[b].signalServiceEndpoint&&a[b].signalServiceEndpoint.actions;c&&this.sendInnerTubeActions(c,this)}this.playlist&&pq("yt_pl",1);1==this.pageCount&&rq("nw");this.loading=!1;En(this.initBotguard_.bind(this));En(this.initDclkstatus_.bind(this))},
onPageLoadWithSameData_:function(){this.initComments_();this.setPlayerAds_();this.updateTitle_(this.playerData);this.updateMonetizationShelvesEnabled_(this.playerData)},
setLoadingState_:function(){this.WATCH_PAGE_SKELETON_ENABLED_&&(this.classList.remove("hide-skeleton"),this.classList.add("show-skeleton"));this.setPlayerLoadingState_();this.classList.add("loading");var a=this.get("endpoint.watchEndpoint.playlistId",this.loadingData);this.set("loadingData.playlist",!!a);this.set("loadingData.playlistLoading",a&&a!=this.get("playlistId",this.playlistData));if(!this.WATCH_PAGE_SKELETON_ENABLED_){a=this.$$("ytd-video-primary-info-renderer");var b=this.$$("ytd-video-secondary-info-renderer");
a&&a.classList.add("loading");b&&b.classList.add("loading")}this.DISABLE_SCROLLING_IN_LOADING_STATE_&&this.toggleBodyScrolling_(!1);if(this.watchNextSkeletonEl_)for(this.playlist?this.watchNextSkeletonEl_.setAttribute("playlist",""):this.watchNextSkeletonEl_.removeAttribute("playlist"),a=this.watchNextSkeletonEl_.firstElementChild;a;)a.classList.remove("hidden"),a=a.nextElementSibling},
clearLoadingState_:function(){this.WATCH_PAGE_SKELETON_ENABLED_&&(this.classList.remove("show-skeleton"),this.classList.add("hide-skeleton"),!this.get("data.contents.twoColumnWatchNextResults.secondaryResults.secondaryResults")&&this.$["related-skeleton"]&&(this.$["related-skeleton"].hidden=!0));this.clearPlayerLoadingState_();this.classList.remove("loading");this.loadingData={playlist:!1};if(!this.WATCH_PAGE_SKELETON_ENABLED_){var a=this.$$("ytd-video-primary-info-renderer"),b=this.$$("ytd-video-secondary-info-renderer");
a&&a.classList.remove("loading");b&&b.classList.remove("loading")}this.DISABLE_SCROLLING_IN_LOADING_STATE_&&this.toggleBodyScrolling_(!0);"ytd-watch-fixie"==this.is&&this.updateVideoTitleHeight_()},
onLoadingChanged_:function(a){a?this.setLoadingState_():this.clearLoadingState_()},
setPlayerLoadingState_:function(){this.playerLoading_||(this.playerLoading_=!0,this.classList.add("loading-player"))},
clearPlayerLoadingState_:function(){this.playerLoading_&&(this.playerLoading_=!1,this.classList.remove("loading-player"))},
toggleBodyScrolling_:function(a){a?document.body.removeAttribute("no-y-overflow"):document.body.setAttribute("no-y-overflow","");Fn(Dn,function(){this.onWindowResized_(NW(!0))}.bind(this))},
updateTheaterModeState_:function(a){a=a||this.fullWindowMode_;if(void 0!==this.theater||a)this.theater=a;"ytd-watch-flexy"==this.is&&(this.updatePlayerElementLocation_(),this.updateSplitPaneSetting_());this.player&&this.setPlayerTheaterMode_();this.togglePageSwatchActive_()},
updatePlayerElementLocation_:function(){var a=this.theater;A("external_fullscreen")&&this.fullscreen&&(a=!0);a=a?this.$["player-theater-container"]:this.$["player-container-inner"];var b=this.getPlayerContainer();b.parentElement!=a&&(rW(this).appendTo(a,b),a.appendChild(this.$["error-screen"]))},
isTheater_:function(){return this.theater&&this.active},
dataChanged_:function(){this.initComments_();this.info=this.getPageContents(this.data);this.meta=this.getPageContents(this.data);this.ticket=this.getPageContents(this.data);this.merch=this.getPageContents(this.data);this.donation=this.getOfferModule(this.data);A("kevlar_metadata_reset_on_nav")&&this.WATCH_PAGE_SKELETON_ENABLED_&&this.classList.add("hide-skeleton");this.getInterface(SW).cancelVideoSkip();"ytd-watch-fixie"==this.is&&this.updateVideoTitleHeight_();this.noAnchorOverflow_=!1},
updateVideoTitleHeight_:function(){var a=this.$["info-contents"].offsetHeight;a&&this.updateStyles({"--ytd-watch-fixie-video-title-height":a+"px"})},
playerDataChanged_:function(a){!a.playabilityStatus||this.isVideoPlayable_(a.playabilityStatus)&&!this.isLiveStreamOffline_(a.playabilityStatus)&&this.isReloadWithoutPolymer_(a.playabilityStatus)||Polymer.RenderStatus.afterNextRender(this,function(){rq("pbu")});
this.setPlayerAds_();this.sendOptionalAction("ytd-watch-player-data-changed");a&&(this.speedyGData_?this.speedyGData_=a.videoQualityPromoSupportedRenderers:En(function(){this.speedyGData_=a.videoQualityPromoSupportedRenderers}.bind(this),50),this.updateTitle_(a),this.updateMonetizationShelvesEnabled_(a))},
watchPageActiveChanged_:function(a){a?this.activate_():this.deactivate_()},
attached:function(){var a=rW(this);A("kevlar_disable_prepare_player")||a.preparePlayer(a);this.getInterface(SW).setPlayer(a);this.WATCH_PAGE_SKELETON_ENABLED_&&this.attachWatchPageSkeleton_();this.updateSplitPaneSetting_();if("ytd-watch-flexy"==this.is){a=zDa();var b=1E3+a,c=1294+a;this.$["two-column-query"].query="(min-width: "+b+"px)";this.$["small-window-query"].query="(max-height: 629px) and (min-width: "+(657+a+"px), (min-height: 630px) and (min-width: ")+(b+"px) and (max-width: ")+(c+"px)");
this.$["large-window-query"].query="(min-height: 630px) and (min-width: "+(c+"px)");this.updateStyles({"--ytd-watch-flexy-scrollbar-width":a+"px"})}A("external_fullscreen")&&this.fire("yt-set-fullerscreen-styles")},
calculateCurrentPlayerSize_:function(){var a=this.$["miniplayer-bar"].firstChild;return a&&a.active||this.theater||!this.active||!this.windowSize_?new Yg(NaN,NaN):A("kevlar_watch_snap_sizing")?this.calculateNormalPlayerSize_():fX(this.windowSize_,this.videoHeightToWidthRatio_,this.isTwoColumns_&&(this.playlist||this.shouldStampChat||this.transcriptOpened_))},
calculateNormalPlayerSize_:function(){var a;if(A("kevlar_watch_snap_sizing"))a:{for(a=0;a<dDa.length;a++){var b=dDa[a];if(b.query.matches){a=new Yg(b.size.width,b.size.height);break a}}a=void 0}else a=fX(this.windowSize_,this.videoHeightToWidthRatio_,this.isTwoColumns_&&(this.playlist||this.shouldStampChat||this.transcriptOpened_));return a},
detached:function(){this.deactivate_()},
activate_:function(){this.listen(window,"scroll","onWatchScroll_");this.fullWindowMode_&&this.fire("yt-set-fullerscreen-styles");this.onWindowResized_(NW());this.theaterRequested_=this.theater;this.togglePageSwatchActive_();var a=rW(this);this.listen(a,"yt-player-updated","onPlayerUpdated_");a.getPlayerPromise().then(this.playerApiReady_.bind(this));a=this.getInterface(SW);this.listen(a,"yt-navigate","onYtNavigate_");a.setPlaylistComponent(this.$.playlist);this.listen(a,"yt-playlist-data-updated",
"onYtPlaylistDataUpdated_");this.onYtPlaylistDataUpdated_();Fn(Dn,function(){this.fire("yt-autonav-pause-scroll")}.bind(this))},
deactivate_:function(){this.unlisten(window,"scroll","onWatchScroll_");this.disconnectFromPlayer_();var a=rW(this);this.unlisten(a,"yt-player-updated","onPlayerUpdated_");a=this.getInterface(SW);this.unlisten(a,"yt-navigate","onYtNavigate_");a.cancelVideoSkip();this.unlisten(a,"yt-playlist-data-updated","onYtPlaylistDataUpdated_");this.previousPlayerEventId_=this.currentPlayerEventId_=null;this.loading&&this.DISABLE_SCROLLING_IN_LOADING_STATE_&&this.toggleBodyScrolling_(!0);A("kevlar_watch_while")&&
this.updateMiniplayerBarVisibility_();this.schedulePlayerSizeUpdate_();this.fire("yt-autonav-pause-player",!1);a=uS();A("kevlar_exit_fullscreen_leaving_watch")&&a&&tS(a)},
disconnectFromPlayer_:function(){this.player&&(this.unlistenFromPlayerEvents(this.player,this.PLAYER_EVENTS_),this.player=null)},
onUpdatePlayerNextVideo_:function(a){this.player&&this.player.updateVideoData({rvs:a.rvs})},
getPageContents:function(a){return a&&a.contents&&a.contents.twoColumnWatchNextResults&&a.contents.twoColumnWatchNextResults.results&&a.contents.twoColumnWatchNextResults.results.results.contents},
getClarifyBox:function(a){if(a=this.getPageContents(a))for(var b=0;b<a.length;b++)if(a[b]&&a[b].itemSectionRenderer)return a[b].itemSectionRenderer.contents},
getLimitedState:function(a){if(a=this.getPageContents(a))for(var b=0;b<a.length;b++)if(a[b]&&a[b].itemSectionRenderer)return a[b].itemSectionRenderer.contents},
getOfferModule:function(a){a=this.get("contents.twoColumnWatchNextResults.secondaryResults.secondaryResults.offerModule",a);A("reload_without_polymer_innertube")&&a&&(a.channelOfferModuleRenderer||A("enable_polymer_live_ppv_offers")&&a.liveOfferModuleRenderer)&&F3();return a},
onRetrieveLocation_:function(a,b){b.hasComments?b.locationRetrieved("/comment_service_ajax?action_get_comments=1&pbj=1",void 0):b.locationRetrieved("/related_ajax",void 0);a.stopPropagation()},
onSubscriptionChanged_:function(a,b){this.player&&(b?this.player.channelSubscribed():this.player.channelUnsubscribed())},
initCsi_:function(){Vp("watch",["pbs","pbp","pbu"]);pq("psc",this.pageCount)},
getPlayerContainer:function(){if(!this.$){var a=Error("Missing $ member in getPlayerContainer.");a.params="this.is: "+this.is+", this.tagName: "+this.tagName+", this.isAttached: "+(this.isAttached+", is window: "+(this===window));xe(a)}return this.$["player-container"]},
getPlayer:function(){return this.$["ytd-player"]},
playerApiReady_:function(a){this.player=a;this.listenToPlayerEvents(this.player,this.PLAYER_EVENTS_);this.updatePlayerStartTime_();this.setPlayerTheaterMode_();this.onPlayerPresentingVideoDataChange_();this.handlePlayerUpdated_();A("external_fullscreen")&&this.updateFullerscreenEduButtonSubtleModeState_()},
onFullerscreenEduClicked_:function(){this.fullerscreenEduScrollAnimation_.start(0,this.FULLERSCREEN_EDU_CLICKED_SCROLL_DISTANCE_,500);this.fullerscreenEduButtonClickedThisPlayback_||(this.fullerscreenEduButtonClickedThisPlayback_=!0,this.incrementFullerscreenEduButtonCount_(this.FULLERSCREEN_EDU_BUTTON_CLICK_COUNT_KEY_))},
theaterModeChanged_:function(a){uS()&&A("external_fullscreen")&&(tS(document.documentElement),a=!0);this.theaterRequested_=a;Wn("wide",a?"1":"0",-1);this.togglePageSwatchActive_();this.setPlayerTheaterMode_();this.schedulePlayerSizeUpdate_();A("kevlar_watch_js_panel_height")&&this.schedulePanelMaxHeightUpdate_();this.sendAction("yt-close-popup-action",["yt-tooltip-renderer"])},
togglePageSwatchActive_:function(){void 0!==this.theater&&this.active&&this.fire("yt-set-theater-mode-enabled",{enabled:this.theater})},
onWatchScroll_:function(){this.scrollThrottle_.fire()},
setPlayerTheaterMode_:function(){this.player.setSizeStyle(!0,this.theater)},
onPlayerPlayVideo_:function(a){A("kevlar_allow_multistep_video_init")&&rW(this).startLoadingVideo(a.videoId,!!a.listId);this.navigateToVideo_(a.videoId,a.listId,a.sessionData)},
onPlayerAutonavChangeRequest_:function(a){this.autonavAllowed_()&&(a=a?2:1,hV.getInstance().setState(a))},
onButtonAutonavChangeRequest_:function(a){this.autoplayOn=a.detail},
hasPlaylist_:function(a,b){return this.loading?b:!u.isEmpty(a)},
updatePlayerWithAutonavState_:function(){if(this.player){var a=typeof this.player.setAutonavState;"function"==a?this.autonavAllowed_()?this.player.setAutonavState(hV.getInstance().getState()):this.player.setAutonavState(1):xe(Error("Error setting autoplay state; "+a+" != \"function\""))}},
autonavAllowed_:function(){return this.autonavCanceledSignal_?!1:!!this.get("contents.twoColumnWatchNextResults.autoplay.autoplay",this.data)},
autoplayDataChanged_:function(){this.updatePlayerWithAutonavState_()},
youthereDataChanged_:function(a){if(a)for(var b=0,c=a.length;b<c;b++)a[b].youThereRenderer&&qDa(this.youThereManager_,a[b].youThereRenderer)},
setPlaylistData_:function(a){return a||{}},
userEngagementConfigDataChanged_:function(a){if(a)if("LOW_USER_ENGAGEMENT_ACTION_LOWER_QUALITY"==a.lowUserEngagementAction){var b=this.youThereManager_;Rn()<a.lowEngagementThresholdMs||tDa(b,!0)}else"LOW_USER_ENGAGEMENT_ACTION_PAUSE_AUTOPLAY"==a.lowUserEngagementAction&&this.sendAction("yt-autonav-pause-user-engagement",[a])},
hasLiveChat_:function(a){return!!a},
isPlayerUnavailable_:function(a,b){return!!a&&!this.isVideoPlayable_(a)&&!b},
isVideoPlayable_:function(a){if(!a)return!1;var b="OK"==a.status||"LIVE_STREAM_OFFLINE"==a.status,c=this.get("errorScreen.playerLegacyDesktopYpcTrailerRenderer",a)||this.get("errorScreen.ypcTrailerRenderer",a);a=this.get("errorScreen.playerLegacyDesktopYpcOfferRenderer",a);return!!b||!!c||!!a},
isLiveStreamOffline_:function(a){return a?"LIVE_STREAM_OFFLINE"==a.status:!1},
isReloadWithoutPolymer_:function(a){if(!A("reload_without_polymer_innertube"))return!1;a&&a.messageRenderers&&F3();return!1},
shouldProceedToNextVideo_:function(a,b,c){b=!!this.get("contents.twoColumnWatchNextResults.secondaryResults.secondaryResults.offerModule",b);var d=a&&"AGE_CHECK_REQUIRED"==a.status,e=this.get("skip.playabilityErrorSkipConfig.skipOnPlayabilityError",a);void 0==e&&(e=!0);!c||this.isVideoPlayable_(a)||b||d||!e||this.getInterface(SW).skipVideo()},
getServiceTrackingParams:function(){return this.data.responseContext.serviceTrackingParams},
onPlayerUpdated_:function(){this.handlePlayerUpdated_();qEa()},
onPlayerFeedbackStartRequest_:function(a){this.sendAction("yt-feedback-dialog-requested",[a])},
onPlayerFeedbackArticleRequest_:function(a){this.sendAction("yt-help-dialog-requested",[a])},
onPlayerYpcContentRequest_:function(){for(var a=["episodeOfferModuleRenderer","movieOfferModuleRenderer","unlimitedOfferModuleRenderer","liveOfferModuleRenderer"],b=0;b<a.length;++b){var c="contents.twoColumnWatchNextResults.secondaryResults.secondaryResults.offerModule."+a[b]+".offerButton.buttonRenderer.",d=this.get(c+"navigationEndpoint",this.data);if(d){this.fire("yt-navigate",{endpoint:d});break}if(d=this.get(c+"serviceEndpoint",this.data)){this.sendServiceRequestAction([d]);break}}},
onPlayerAutonavPauseRequest_:function(a){this.fire("yt-autonav-pause-player",a)},
onPlayerPlaying_:function(){this.onPlayingCallbacks_.forEach(function(a){a()});
this.onPlayingCallbacks_.length=0},
onAdStateChange_:function(a){this.playerState_=a;switch(a){case 3:this.clearPlayerLoadingState_();break;case 1:this.clearPlayerLoadingState_(),this.onPlayerPlaying_();}},
onPlayerStateChange_:function(a){this.playerState_=a;switch(a){case 3:this.clearPlayerLoadingState_();break;case 1:this.clearPlayerLoadingState_();this.onPlayerPlaying_();break;case 0:this.fire("yt-autonav-pause-player-ended");}A("kevlar_classic_exit_fullscreen_event_parenting")||(a=this.player.getVideoData().eventId)&&this.currentPlayerEventId_!=a&&(this.previousPlayerEventId_=this.currentPlayerEventId_,this.currentPlayerEventId_=a)},
onPlayerSubscribe_:function(a){this.sendAction("yt-player-subscribe",[a])},
onPlayerUnsubscribe_:function(a){this.sendAction("yt-player-unsubscribe",[a])},
onPlayerAdYtShowToast_:function(a){if(a.notificationActionRenderer)var b={popup:{notificationActionRenderer:a.notificationActionRenderer},popupType:"TOAST"};else{b=a.toastMessage;var c=a.toastActionMessage;a=a.toastActionUrl;var d="";if("/"==a||a.startsWith("/?"))d="WEB_PAGE_TYPE_BROWSE";b={popup:{notificationActionRenderer:{responseText:{runs:[{text:b}]},actionButton:{buttonRenderer:{text:{runs:[{text:c}]},navigationEndpoint:{commandMetadata:{webCommandMetadata:{url:a,webPageType:d}}}}}}},popupType:"TOAST"}}this.fire("yt-action",
new KU("yt-open-popup-action",!1,[{openPopupAction:b},this]))},
getAlerts_:function(a){if(a){var b=a.messages||[];a=a.messageRenderers||[];for(var c=0;c<b.length;c++)a.push({alertRenderer:this.constructWarning_(b[c])});return a}},
constructWarning_:function(a){return{text:UU(a),type:"WARNING"}},
isPlaShelfEnabled_:function(a){if((this.get("adPlacements",a)||[]).length)return!0;a=this.get("playerAds",a)||[];return!(!a.length||!this.get("playerLegacyDesktopWatchAdsRenderer.playerAdParams.allowBelowThePlayerCompanion",a[0]))},
closeTranscript_:function(){this.transcriptOpened_&&(this.transcriptOpened_=!1,this.$["transcript-loader"].close())},
onYtOpenTranscriptAction_:function(a){if(a=a.openTranscriptAction)this.transcriptOpened_=!0,this.$["transcript-loader"].open(a),this.$["transcript-loader"].focus()},
getTranscriptTabIndex_:function(a){return a?0:-1},
onYtSignalCancelAutonav_:function(){this.autonavCanceledSignal_=!0;this.updatePlayerWithAutonavState_()},
resetAutonavCanceledForNewPlayback_:function(){this.autonavCanceledSignal_=!1},
onYtSignalActionCloseTranscriptPane_:function(){this.closeTranscript_()},
onThrottledScroll_:function(){var a=this;this.fire("yt-autonav-pause-scroll");this.maybeParkSetComments_(3)||this.setComments_();A("kevlar_watch_while")&&this.updateMiniplayerBarVisibility_();var b=0<this.getScrollTop();b!=this.showFullerscreenEdu_&&A("external_fullscreen_with_edu")&&this.fullscreen&&(this.showFullerscreenEdu_=b,rW(this).getPlayerPromise().then(function(c){c.updateFullerscreenEduButtonVisibility(0<a.getScrollTop())}))},
onYtPageDataWillUpdate_:function(){A("kevlar_use_page_data_will_update")&&this.preparePageReset_()},
onYtPageNavigateStart_:function(){A("kevlar_use_page_data_will_update")||this.preparePageReset_()},
onCollapseMiniplayer_:function(){var a=this,b,c,d,e;return Ca(function(g){if(1==g.nextAddress)return b=rW(a),c=a.getInterface(vV),d=G3(c.data.response),e=c.data,xV.getInstance().miniplayerButtonActivation=!0,a.sendAction("yt-collapse-miniplayer-action"),xV.getInstance().currentEndpoint=d.watchEndpoint||null,ta(g,xV.getInstance().navigationFinishPromise,2);a.sendAction("yt-activate-miniplayer-action",[b,d,e]);xV.getInstance().userActivation=!0;ua(g)})},
preparePageReset_:function(){this.clearScheduledCommentJobs_()},
maybeParkSetComments_:function(a){if(!se("ENABLE_SELECTIVE_REGISTRATION"))return!1;this.setCommentsJobSet_&&this.setCommentsJobSet_.cancel();this.setCommentsJobSet_=new qp(a,"ytd-comments");sp(this.setCommentsJobSet_,this.setComments_.bind(this));return!0},
initComments_:function(){this.commentsReady=!1;this.canShowComments_=!0;this.maybeParkSetComments_(1)||(Dn.cancelJob(this.setCommentsJobId_),this.setCommentsJobId_=En(this.setComments_.bind(this),this.DEFAULT_COMMENTS_DELAY))},
setComments_:function(){if(!this.commentsReady){rq("cmi");Dn.cancelJob(this.setCommentsJobId_);var a=this.getPageContents(this.data);if(a&&a.length)for(var b=0,c=a.length;b<c;b++)if("comment-item-section"==this.get("itemSectionRenderer.sectionIdentifier",a[b])){this.comments=a[b].itemSectionRenderer;this.canScheduleCommentJobs_=!0;break}this.commentsReady=!0;this.comments&&"ytd-watch-fixie"==this.is&&A("kevlar_fixie_watch_peeking_comments")&&this.$.comments.loadComments()}},
clearScheduledCommentJobs_:function(){A("kevlar_cancel_scheduled_comment_jobs_on_navigate")&&(this.canScheduleCommentJobs_=!1)},
showMetadataPlaceholder_:function(){A("kevlar_metadata_reset_on_nav")&&(this.donation=this.merch=this.ticket=this.meta=this.info=void 0,this.WATCH_PAGE_SKELETON_ENABLED_&&this.classList.remove("hide-skeleton"))},
clearComments_:function(){this.doRemoveComments_();rq("cmc")},
doRemoveComments_:function(){this.comments={};this.canShowComments_=!1},
setPlayerAds_:function(){Dn.cancelJob(this.clearPlayerAdsJobId_);this.playerAds=this.get("playerAds",this.playerData)},
clearPlayerAds_:function(){Dn.cancelJob(this.clearPlayerAdsJobId_);this.playerAds=void 0},
onYtNavigate_:function(a,b){if(b.endpoint.watchEndpoint){var c=b.endpoint.watchEndpoint;!(b=this.get("data.currentVideoEndpoint.watchEndpoint"))||c.videoId!=b.videoId||c.playlistId&&c.playlistId!=b.playlistId||void 0!=c.index&&c.index!=b.index||!Ma(c.startTimeSeconds)||(a.stopPropagation(),this.setScrollTop(0),rW(this).getPlayerPromise().then(function(d){d.seekTo(c.startTimeSeconds);d.playVideo()}))}},
updatePlayerStartTime_:function(){var a=window.location.hash;"#"==a.charAt(0)&&(a="!"==a.charAt(1)?a.substr(2):a.substr(1));a=lm(a);if("t"in a){var b=a.t;a=0;-1!=b.indexOf("h")&&(b=b.split("h"),a=3600*b[0],b=b[1]);-1!=b.indexOf("m")&&(b=b.split("m"),a=60*b[0]+a,b=b[1]);-1!=b.indexOf("s")?(b=b.split("s"),a=1*b[0]+a):a=1*b+a;this.player.seekTo(a,!0)}},
updateTitle_:function(a){a=this.get("videoDetails.title",a)||"";this.fire("yt-update-title",a)},
updateMonetizationShelvesEnabled_:function(a){this.merchandiseShelfEnabled_=this.monetizationShelvesEnabled_=!1;var b=rW(this);b&&b.getPlayerPromise().then(function(c){a&&(c=new IU(c),(c.getOptions_().includes("isExternalShelfAllowedFor")?SAa(c,"isExternalShelfAllowedFor",{playerResponse:a}):1)?this.merchandiseShelfEnabled_=this.monetizationShelvesEnabled_=!0:this.merchandiseShelfEnabled_=A("show_merch_shelf_with_ads")||this.monetizationShelvesEnabled_)}.bind(this))},
onPlayerConnectionIssue_:function(){var a=this.querySelector("#speedyg");a&&a.activateSpeedygPromo&&a.activateSpeedygPromo()},
syncWithRemoteVideo_:function(a,b,c){if(this.active&&this.player){var d=this.player.getVideoData();d.video_id==c&&(c=d.list,A("polymer_enable_mdx_queue")&&ec(c,"RQ")&&(c=void 0),d.video_id==a&&c==b||this.navigateToVideo_(a,b,null,!0))}},
navigateToVideo_:function(a,b,c,d){var e={url:"/watch?v="+a,webPageType:"WEB_PAGE_TYPE_WATCH",rootVe:3832};b&&(e.url+="&list="+b);a={watchEndpoint:{videoId:a},commandMetadata:{webCommandMetadata:e}};b&&(a.watchEndpoint.playlistId=b);c&&c.itct&&(a.clickTrackingParams=c.itct);b={endpoint:a,isRemotePlayback:d||!1};c&&(b.tempData=c);this.fire("yt-navigate",b)},
initBotguard_:function(){var a=this.get("attestation.playerAttestationRenderer.botguardData",this.playerData);a&&(a.program&&re({BG_P:a.program}),a.interpreterUrl&&re({BG_IU:a.interpreterUrl}),a.interpreter&&re({BG_I:a.interpreter}),a=z("BG_P",void 0),yya(a)&&(z("BG_I")||z("BG_IU"))&&(uya=!0,VR.initialize(z("BG_I",null),z("BG_IU",null),a,xya,void 0)))},
initDclkstatus_:function(){sya()},
attachWatchPageSkeleton_:function(){var a=document.querySelector("#watch-page-skeleton");if(a){var b=a.querySelector("#primary-info"),c=a.querySelector("#secondary-info"),d=a.querySelector("#related");b&&this.$["info-skeleton"].appendChild(b);c&&this.$["meta-skeleton"].appendChild(c);d&&(this.$["related-skeleton"].appendChild(d),this.watchNextSkeletonEl_=d);Dh(a)}},
handlePlayerUpdated_:function(){this.updatePlayerWithAutonavState_();rW(this).focusOnPlayer()},
watchNextShownItemsAddedOrRemoved_:function(a,b){if(this.watchNextSkeletonEl_&&"undefined"!==typeof b){var c=this.watchNextSkeletonEl_.children,d=a&&a.indexSplices.length?a.indexSplices[0].index:0;a=Math.min(this.watchNextShownItems.length,c.length);b||(d=0,a=c.length);for(b=d;b<a;b++)c[b].classList.add("hidden")}},
onPlayerFullscreenChange_:function(a){A("external_fullscreen")||this.sendAction("yt-player-fullscreen",[a.fullscreen])},
onFullscreenChange_:function(a){this.fullscreen=a;this.pageScrollElement&&(a?this.listen(this.pageScrollElement,"scroll","onWatchScroll_"):this.unlisten(this.pageScrollElement,"scroll","onWatchScroll_"));var b=rW(this);b.getPlayerPromise().then(function(c){c.setFauxFullscreen(!!uS())}.bind(this));
"ytd-watch-flexy"==this.is&&(this.updatePlayerElementLocation_(),this.updateSplitPaneSetting_());a&&(b.focusOnPlayer(),this.fullerscreenEduButtonShownThisPlayback_||(this.fullerscreenEduButtonShownThisPlayback_=!0,this.incrementFullerscreenEduButtonCount_(this.FULLERSCREEN_EDU_BUTTON_SHOWN_COUNT_KEY_)))},
computeShouldStampChat_:function(a,b){return!!this.get("data.contents.twoColumnWatchNextResults.conversationBar")&&!b},
computeShowComments_:function(a,b,c){return A("kevlar_show_comments_spinner_earlier")?b&&!c:!!a&&!u.isEmpty(a)},
identity:Lb,onWindowResized_:function(a){this.windowSize_=a;"ytd-watch-flexy"==this.is&&this.active&&(this.schedulePlayerSizeUpdate_(!0),A("kevlar_watch_js_panel_height")&&this.schedulePanelMaxHeightUpdate_());A("kevlar_watch_while")&&this.updateMiniplayerBarVisibility_();"ytd-watch-fixie"==this.is&&this.updateVideoTitleHeight_()},
onPlayerPresentingVideoDataChange_:function(a){a&&"dataloaded"!=a.type&&"dataupdated"!=a.type||rW(this).getPlayerPromise().then(function(b){var c=b.getPlayerState();5!=c&&0!=c&&(b=1/b.getVideoAspectRatio(),this.videoHeightToWidthRatio_!=b&&(this.videoHeightToWidthRatio_=b))}.bind(this))},
schedulePlayerSizeUpdate_:function(a){var b=function(){rW(this).getPlayerPromise().then(function(c){if(A("kevlar_set_internal_player_size")){var d=this.calculateCurrentPlayerSize_();c.setInternalSize(d.width,d.height)}else c.setSize(NaN,NaN);A("kevlar_watch_while")&&this.updateWatchWhileScrollThreshold_()}.bind(this))}.bind(this);
a?b():Hn(Dn,b)},
secondaryColumnModulePresenceChanged_:function(){this.isAttached&&"ytd-watch-flexy"==this.is&&(this.schedulePlayerSizeUpdate_(),this.updateSplitPaneSetting_())},
onYtShowSurvey_:function(a){this.set("data.survey",a.detail)},
updateWatchWhileScrollThreshold_:function(){if(this.windowSize_){if(this.theater){var a=.5625*this.windowSize_.width;a=Ug(a,480,this.windowSize_.height-185)}else a=this.calculateNormalPlayerSize_().height,a+=this.SPACE_ABOVE_PLAYER_;this.watchWhileScrollThreshold_!=a&&(this.watchWhileScrollThreshold_=a,this.updateMiniplayerBarVisibility_())}},
updateMiniplayerBarVisibility_:function(){var a=this.$$("ytd-miniplayer-bar-renderer");if(this.windowSize_&&a){var b=this.windowSize_.height>=4*this.MINIPLAYER_BAR_HEIGHT_+this.MASTHEAD_HEIGHT_,c=this.active?this.getScrollTop():0;!a.active&&b&&c>=this.watchWhileScrollThreshold_?(a.activate(this.getPlayer()),this.schedulePlayerSizeUpdate_()):a.active&&(!b||c<this.watchWhileScrollThreshold_&&!uS())&&(a.deactivate().appendTo(this.getPlayerContainer()),this.schedulePlayerSizeUpdate_())}},
isTwoColumnsChanged_:function(a,b){if("ytd-watch-flexy"==this.is){var c=!A("live_chat_over_playlist");1==a&&void 0==b&&c||(this.isTwoColumns_?(this.$["secondary-inner"].appendChild(this.$.panels),c&&this.$["secondary-inner"].appendChild(this.$.playlist),this.$["secondary-inner"].appendChild(this.$["transcript-loader"]),this.$["secondary-inner"].appendChild(this.$["donation-shelf"]),(a=this.$$("chat"))&&this.$["secondary-inner"].appendChild(a),this.$["secondary-inner"].appendChild(this.$["chat-template"]),
c||this.$["secondary-inner"].appendChild(this.$.playlist),this.$["secondary-inner"].appendChild(this.$.related)):(Ah(this.$.panels,this.$.alerts),Ah(this.$["transcript-loader"],this.$.alerts),c&&Ah(this.$.playlist,this.$.alerts),Ah(this.$["donation-shelf"],this.$.alerts),Ah(this.$["chat-template"],this.$.alerts),(a=this.$$("chat"))&&Ah(a,this.$.alerts),c||Ah(this.$.playlist,this.$.alerts),Ah(this.$.related,this.$.comments)),this.updateSplitPaneSetting_(),A("kevlar_watch_js_panel_height")&&this.active&&
this.schedulePanelMaxHeightUpdate_())}},
updateSplitPaneSetting_:function(){if(A("kevlar_watch_split_pane")){var a=!this.theater&&!this.playlist&&!this.shouldStampChat&&!this.transcriptOpened_&&this.isTwoColumns_&&!this.fullscreen;this.splitPane_!=a&&((this.splitPane_=a)?this.listen(this.$.primary,"scroll","onWatchScroll_"):this.unlisten(this.$.primary,"scroll","onWatchScroll_"),this.pageScrollElement=this.splitPane_?this.$.primary:null)}},
videoHeightToWidthRatioChanged_:function(a,b){"ytd-watch-flexy"!=this.is&&"ytd-watch-fixie"!=this.is||!b||(this.updateStyles({"--ytd-watch-flexy-width-ratio":1,"--ytd-watch-flexy-height-ratio":this.videoHeightToWidthRatio_}),this.schedulePlayerSizeUpdate_(),A("kevlar_watch_js_panel_height")&&this.schedulePanelMaxHeightUpdate_())},
onYtInitialVideoAspectRatio_:function(a){this.videoHeightToWidthRatio_=1/a},
computeIsVerticalVideo_:function(a){return 1<=a},
computeIsFourThreeToSixteenNineVideo_:function(a){return .7501>=a&&.5624<=a},
computeIsExtraWideVideo_:function(a){return .5624>a},
computeShowFixieCommentHeader_:function(a,b,c){return!!A("kevlar_fixie_watch_layout")&&!!this.get("header.commentsHeaderRenderer",a)&&this.computeShowComments_(a,b,c)},
onYtAutonavStateChangedAction_:function(){this.updatePlayerWithAutonavState_()},
onDisableWatchAnchorOverflow_:function(){this.noAnchorOverflow_||(this.noAnchorOverflow_=!0,Polymer.RenderStatus.afterNextRender(this,function(){var a=window.scrollY;window.scroll(0,a+1);window.scroll(0,a)}))},
onYtUserActivity_:function(){a:{var a=this.youThereManager_;if(a.youThereData_){if(a.ignoreFullscreenExitUserActivity_)break a;OS("YOU_THERE_EVENT_TYPE_LACT_RESET",Wo());eo();nDa(a,!0)}tDa(a,!1)}},
handleSignalActionPausePlayer_:function(){this.active&&rW(this).pause()},
handleSignalActionPlayPlayer_:function(){this.active&&rW(this).play()},
handleSignalActionAcknowledgeYouThere_:function(){OS("YOU_THERE_EVENT_TYPE_USER_RESPONDED",Wo())},
incrementFullerscreenEduButtonCount_:function(a){var b=kT(a)||0;jT(a,b+1,31536E3);this.updateFullerscreenEduButtonSubtleModeState_()},
updateFullerscreenEduButtonSubtleModeState_:function(){var a=kT(this.FULLERSCREEN_EDU_BUTTON_CLICK_COUNT_KEY_)||0,b=kT(this.FULLERSCREEN_EDU_BUTTON_SHOWN_COUNT_KEY_)||0,c=Be("external_fullscreen_button_shown_threshold"),d=a>=Be("external_fullscreen_button_click_threshold")||b>=c;rW(this).getPlayerPromise().then(function(e){e.updateFullerscreenEduButtonSubtleModeState(d)})},
resetFullerscreenEduButtonForNewPlayback_:function(){this.fullerscreenEduButtonShownThisPlayback_=this.fullerscreenEduButtonClickedThisPlayback_=!1},
computePlaylistData_:function(a,b){return b},
onYtPlaylistDataUpdated_:function(){this.externalPlaylistData_=this.getInterface(SW).getPlaylistData()||{}},
schedulePanelMaxHeightUpdate_:function(){var a=this;this.panelMaxHeightUpdateJob_&&Dn.cancelJob(this.panelMaxHeightUpdateJob_);this.panelMaxHeightUpdateJob_=Fn(Dn,function(){a.panelMaxHeightUpdateJob_=0;var b=!a.isTwoColumns_||a.theater||a.fullscreen?460:a.calculateNormalPlayerSize_().height;a.updateStyles({"--ytd-watch-flexy-panel-max-height":Math.min(b,502)+"px","--ytd-watch-flexy-chat-max-height":b+"px"})})},
computeHideAutoplay_:function(){return this.playlistData&&this.playlistData.totalVideos&&void 0!==this.playlistData.currentIndex?this.playlistData.currentIndex!=this.playlistData.totalVideos-1:!1}};
XX.YtdWatchBehavior=[V.YtRendererBehavior,O0,X,U.YtActionHandlerBehavior,MY.YtPageBehavior,GY.YtEndpointBehavior,XX.YtdWatchBehaviorImpl_];var OGa=new function(a,b,c){this.supportedPopups=a;this.navigationEndpointPopupMap=b;this.popupTypeMap=c}({adFeedbackRenderer:!0,
adInfoDialogRenderer:!0,addToPlaylistRenderer:!0,backstagePostDialogPopupRenderer:!0,bubbleHintRenderer:!0,channelWarmWelcomeRenderer:!0,channelWarmWelcomeContRenderer:!0,checkboxSurveyRenderer:!0,confirmDialogRenderer:!0,dismissalFollowUpRenderer:!0,formPopupRenderer:!0,gamingAccountLinkConfirmDialogRenderer:!0,gamingAccountLinkSettingRenderer:!0,gamingMultipleAccountLinkDialogRenderer:!0,hotkeyDialogRenderer:!0,manageMembershipRenderer:!0,sponsorshipConfirmCancelRenderer:!0,modalWithTitleAndButtonRenderer:!0,
notificationActionRenderer:!0,reportFormModalRenderer:!0,searchSuggestionReportDialog:!0,sharingRenderer:!0,sharingEmbedRenderer:!0,menuPopupRenderer:!0,queueToPlayDialogRenderer:!0,singleOptionSurveyRenderer:!0,surveyFollowUpRenderer:!0,unifiedSharePanelRenderer:!0,unlimitedFamilyMessageInterstitialRenderer:!0,unlimitedFamilyProfileInterstitialRenderer:!0,unpluggedPauseMembershipDialogRenderer:!0,ypcUpgradeDialogRenderer:!0,ypcOffersOverlayRenderer:!0,redCancelSurveyRenderer:!0,conversationSectionController:!0,
conversationHighPriorityNotificationContentRenderer:!0},{adFeedbackEndpoint:"adFeedbackEndpoint.content",adInfoDialogEndpoint:"adInfoDialogEndpoint.dialog",createBackstagePostDialogEndpoint:"createBackstagePostDialogEndpoint.dialog",confirmDialogEndpoint:"confirmDialogEndpoint.content",managePurchaseEndpoint:"managePurchaseEndpoint.content",modalEndpoint:"modalEndpoint.modal",shareEndpoint:"shareEndpoint",shareEntityEndpoint:"shareEntityEndpoint",unlimitedFamilyFlowEndpoint:"unlimitedFamilyFlowEndpoint.unlimitedFamilyFlowEndpointSupportedRenderers",
openPopupAction:"openPopupAction.popup",ypcCancelSurveyEndpoint:"ypcCancelSurveyEndpoint.surveySupportedRenderers"},{adFeedbackRenderer:"DIALOG",adInfoDialogRenderer:"RESPONSIVE_DROPDOWN",addToPlaylistRenderer:A("desktop_add_to_playlist_renderer_dialog_popup")?"DIALOG":"RESPONSIVE_DROPDOWN",backstagePostDialogPopupRenderer:"DIALOG",bubbleHintRenderer:"HINT",checkboxSurveyRenderer:"SURVEY",confirmDialogRenderer:"DIALOG",dismissalFollowUpRenderer:"DIALOG",gamingAccountLinkConfirmDialogRenderer:"DIALOG",
gamingAccountLinkSettingRenderer:"DIALOG",gamingMultipleAccountLinkDialogRenderer:"DIALOG",queueToPlayDialogRenderer:"DIALOG",hotkeyDialogRenderer:"DIALOG",manageMembershipRenderer:"DIALOG",sponsorshipConfirmCancelRenderer:"DIALOG",menuPopupRenderer:"RESPONSIVE_DROPDOWN",modalWithTitleAndButtonRenderer:"RESPONSIVE_DROPDOWN",notificationActionRenderer:"TOAST",reportFormModalRenderer:"DIALOG",searchSuggestionReportDialog:"DIALOG",sharingEmbedRenderer:"DIALOG",sharingRenderer:"RESPONSIVE_DROPDOWN",singleOptionSurveyRenderer:"SURVEY",
surveyFollowUpRenderer:"SURVEY",unifiedSharePanelRenderer:"DIALOG",unlimitedFamilyMessageInterstitialRenderer:"DIALOG",unlimitedFamilyProfileInterstitialRenderer:"DIALOG",unpluggedPauseMembershipDialogRenderer:"DIALOG",ypcOffersOverlayRenderer:"DIALOG",ypcUpgradeDialogRenderer:"DIALOG",redCancelSurveyRenderer:"DIALOG",conversationSectionController:"MOLE",conversationHighPriorityNotificationContentRenderer:"NOTIFICATION"}),PGa=new function(){this.popupConfig=gX;this.forwardedEvents="yt-action yt-navigate yt-popup-canceled yt-popup-closed yt-popup-opened yt-service-request-completed yt-service-request-error yt-service-request-sent yt-request-is-in-queued-item yt-lockup-requested".split(" ");
this.prefix="ytd";this.SHARED_RENDERERS_={bubbleHintRenderer:!0,confirmDialogRenderer:!0,fancyDismissibleDialogRenderer:!0,notificationActionRenderer:!0,reportFormModalRenderer:!0,sharingEmbedRenderer:!0,sharingRenderer:!0,sortFilterSubMenuPopupRenderer:!0,tooltipRenderer:!0,unlimitedFamilyMessageInterstitialRenderer:!0,unlimitedFamilyProfileInterstitialRenderer:!0,unpluggedPauseMembershipDialogRenderer:!0,upsellDialogRenderer:!0,ypcUpgradeDialogRenderer:!0,loadingRenderer:!0}};Polymer({is:"yt-guide-manager",provides:kY,behaviors:[Polymer.IronResizableBehavior,U.YtActionHandlerBehavior,J0.YtComponentBehavior],properties:{data:Object,guidePersistentAndVisible:{type:Boolean,notify:!0,observer:"guidePersistentAndVisibleChanged_"},miniGuideVisible:{type:Boolean,value:!1,notify:!0,observer:"miniGuideVisibleChanged_"},forceMiniGuideClose_:Boolean,activeEndpoint:{type:Object,notify:!0,observer:"activeEndpointChanged_"},renderGuide:{type:Boolean,notify:!0},guideOpened_:{type:Boolean,
observer:"guideOpenedChanged_"},guidePersistent_:{type:Boolean,notify:!0},guideUserStateOpened_:{type:Boolean,value:!0},pageUrl_:{type:String,observer:"pageUrlChanged_"},pageType_:String,cachedClientWidth_:{type:Number,observer:"cachedClientWidthChanged_"},guideElement:{type:Object,observer:"onGuideElementChanged_"}},observers:["computeGuidePersistentAndVisible_(guideOpened_, guidePersistent_)","observeForMiniGuideVisible_(guidePersistentAndVisible, pageUrl_, cachedClientWidth_)"],listeners:{"iron-resize":"onResize_"},
actionMap:{"player-update-pre":"prePlayerUpdate_"},factoryImpl:function(){},
created:function(){this.PERSISTENT_GUIDE_WIDTH_THRESHOLD=Be("kevlar_persistent_guide_width_threshold",1276);this.MINI_GUIDE_WIDTH_THRESHOLD=Be("kevlar_mini_guide_width_threshold",746);this.PERSISTENT_GUIDE_BLACKLIST_PAGES_="/musicpremium /new /premium /red /watch /account /pair".split(" ");this.animationTransitionDuration_=0;this.lateDataResolver_=fw()},
attached:function(){this.cachedClientWidth_=z("initialBodyClientWidth",void 0)||document.body.clientWidth;this.listen(document,"yt-navigate","onYtNavigate_");this.listen(document,"yt-navigate-finish","onYtNavigateFinish_");this.listen(document,"yt-guide-toggle","onYtGuideToggle_");this.listen(document,"yt-guide-close","onYtGuideClose_");Polymer.RenderStatus.afterNextRender(this,function(){this.animationTransitionDuration_=200})},
detached:function(){this.unlisten(document,"yt-navigate","onYtNavigate_");this.unlisten(document,"yt-navigate-finish","onYtNavigateFinish_");this.unlisten(document,"yt-guide-toggle","onYtGuideToggle_");this.unlisten(document,"yt-guide-close","onYtGuideClose_");this.guideElement&&(this.unlisten(this.guideElement,"opened-changed","onDrawerOpenedChanged_"),this.unlisten(this.guideElement,"app-drawer-transitioned","onAppDrawerTransitioned_"))},
load:function(){var a=this,b,c,d;return Ca(function(e){if(1==e.nextAddress){if(!window.ytInitialGuideData&&window.ytInitialGuideDataPresent)return window.loadGuideDataHook=a.lateDataResolver_.resolve.bind(a),e.return(a.lateDataResolver_.promise);if(window.ytInitialGuideData)return b=fw(),b.resolve(window.ytInitialGuideData),e.return(b.promise);c=a.getInterface(BW);return ta(e,c.fetchData("/guide_ajax?action_load_guide=1"),2)}d=e.yieldResult;return e.return(d.response)})},
setGuideData:function(a){var b=this,c,d,e;return Ca(function(g){if(1==g.nextAddress){if(b.data)return a.data=b.data,g.return();c=b;return ta(g,b.load(),2)}c.data=g.yieldResult;b.graftGuideToPage_();d=se("IS_HOMEPAGE_COLD")?"eop":void 0;A("disable_element_pool_populator")?b.setGuideData_(a):(e=new qp(1,d),sp(e,b.setGuideData_.bind(b,a)));ua(g)})},
setGuideData_:function(a){a.data=this.data;a.markDirty();this.async(r(rq,this,"gle"));Polymer.RenderStatus.afterNextRender(this,r(rq,this,"gpe"))},
graftGuideToPage_:function(){if(this.data){var a=Wo(),b=Vo(),c=this.data&&this.data.trackingParams;c&&a&&b&&CS(a,b,go(c))}},
onGuideElementChanged_:function(a){this.listen(a,"opened-changed","onDrawerOpenedChanged_")},
onDrawerOpenedChanged_:function(a,b){!b.value&&this.guideOpened_&&(this.guideOpened_=!1)},
onYtGuideToggle_:function(){this.guideOpened_=!this.guideOpened_;this.guidePersistent_&&(this.guideUserStateOpened_=this.guideOpened_);this.updateGuideDrawerElementState_();this.guideOpened_&&this.guideElement&&this.listen(this.guideElement,"app-drawer-transitioned","onAppDrawerTransitioned_")},
onAppDrawerTransitioned_:function(){this.unlisten(this.guideElement,"app-drawer-transitioned","onAppDrawerTransitioned_");this.guideOpened_&&this.guideElement&&wm(this.guideElement)},
guidePersistentAndVisibleChanged_:function(a){this.sendOptionalAction("ytd-update-guide-state-action",[a])},
miniGuideVisibleChanged_:function(a){this.sendOptionalAction("ytd-update-mini-guide-state-action",[a])},
guideOpenedChanged_:function(a){this.sendOptionalAction("ytd-update-guide-opened-action",[a])},
activeEndpointChanged_:function(a){this.sendOptionalAction("ytd-update-active-endpoint-action",[a])},
pageUrlChanged_:function(a){this.forceMiniGuideClose_=!1;this.persistentGuideEnabled_(this.pageType_,a)?(this.guidePersistent_=this.canFitPersistentGuide_(this.cachedClientWidth_),this.guideUserStateOpened_&&this.guidePersistent_?this.renderGuide=this.guideOpened_=!0:this.guideOpened_=!1):this.guidePersistent_=this.guideOpened_=!1;this.updateGuideDrawerElementState_()},
cachedClientWidthChanged_:function(a){this.persistentGuideEnabled_(this.pageType_,this.pageUrl_)&&((a=this.canFitPersistentGuide_(a))?this.guideOpened_=this.guideUserStateOpened_:this.guidePersistent_&&(this.guideOpened_=!1),this.guidePersistent_=a);this.updateGuideDrawerElementState_()},
getGuidePersistentAndVisible:function(){return this.guidePersistentAndVisible},
getGuideOpened:function(){return this.guideOpened_},
getActiveEndpoint:function(){return this.activeEndpoint},
updateGuideDrawerElementState_:function(){this.guideElement&&(this.guidePersistent_?this.disableGuideAnimation_():this.guideElement.persistent?this.disableGuideAnimation_():this.enableGuideAnimation_(),this.guideElement.opened=this.guideOpened_,this.guideElement.persistent=this.guidePersistent_,this.guideOpened_&&this.guidePersistent_&&this.fire("yt-guide-hover"),!this.guideOpened_||this.guidePersistent_)&&(document.body.style.overflow="")},
computeGuidePersistentAndVisible_:function(a,b){this.debounce("computeGuidePersistentAndVisible_",function(){this.guidePersistentAndVisible=a&&b})},
observeForMiniGuideVisible_:function(a,b,c){this.miniGuideVisible=!this.forceMiniGuideClose_&&!a&&this.canFitMiniGuide_(c)&&this.persistentGuideEnabled_(this.pageType_,b)},
closeGuide_:function(){this.guideOpened_=!1;this.updateGuideDrawerElementState_()},
onYtGuideClose_:function(){this.closeGuide_();this.forceMiniGuideClose_=!0;this.miniGuideVisible=!1},
prePlayerUpdate_:function(){this.closeGuide_()},
onYtNavigateFinish_:function(a,b){this.activeEndpoint=b.endpoint;this.pageType_=b.pageType;this.pageUrl_=b.response.url;this.graftGuideToPage_()},
onYtNavigate_:function(a,b){a=this.get("endpoint.webNavigationEndpointData.url",b);this.pageUrl_!=a||this.guidePersistent_||this.closeGuide_()},
persistentGuideEnabled_:function(a,b){if(!b||"watch"==a)return!1;var c=mi(ni(5,b))||"";return!this.PERSISTENT_GUIDE_BLACKLIST_PAGES_.some(function(d){return ec(c,d)})},
canFitPersistentGuide_:function(a){return-1==this.PERSISTENT_GUIDE_WIDTH_THRESHOLD?!1:a>this.PERSISTENT_GUIDE_WIDTH_THRESHOLD},
canFitMiniGuide_:function(a){return-1==this.MINI_GUIDE_WIDTH_THRESHOLD?!1:a>this.MINI_GUIDE_WIDTH_THRESHOLD},
onResize_:function(){this.debounce("calculateGuideState",this.onResizeDebounced_.bind(this))},
onResizeDebounced_:function(){this.cachedClientWidth_=document.body.clientWidth},
disableGuideAnimation_:function(){this.guideElement.transitionDuration=0},
enableGuideAnimation_:function(){this.guideElement.transitionDuration=this.animationTransitionDuration_}});Polymer({is:"ytd-third-party-manager",behaviors:[cY.YtOpenPopupBehavior,U.YtActionHandlerBehavior,T.YtActionSenderBehavior],actionMap:{"yt-service-request":"handleServiceRequest_","yt-initialize-third-party":"handleInitializeRequest_","yt-link-third-party":"handleLinkRequest_","yt-account-link-command":"handleAccountLinkCommand_","yt-account-unlink-command":"handleAccountUnlinkCommand_","yt-refresh-account-link-button-command":"refreshAccountLinkButton_","yt-signal-service-endpoint":"handleSignalServiceEndpoint_"},
listeners:{"yt-service-request-completed":"onServiceRequestCompleted_"},created:function(){this.config_={apiKey:z("LINK_API_KEY",void 0),authUser:(z("SESSION_INDEX",void 0)||0).toString(),oisDomain:z("LINK_OIS_DOMAIN",void 0),appAuthOnly:!0};this.getTokenPromises_={};this.lastCallback=null},
handleServiceRequest_:function(a,b){(a=this.get("signalServiceEndpoint.actions.0.openPopupAction.popup",b))&&a.gamingAccountLinkSettingRenderer&&(a=a.gamingAccountLinkSettingRenderer.thirdPartyId)&&this.handleInitializeRequest_(a);b.accountLinkCommand?this.handleLinkRequest_(b.accountLinkCommand):b.accountUnlinkCommand&&this.handleUnlinkRequest_(b.accountUnlinkCommand)},
handleSignalServiceEndpoint_:function(a,b){var c=this,d=this.get("signalServiceEndpoint.actions.0",a);a=["ytd-gaming-account-link-confirm-dialog-renderer","ytd-gaming-account-link-setting-renderer"].find(function(e){return b.className.includes(e)});
d&&a&&(this.sendAction("yt-close-popup-action",[a,this]),Polymer.RenderStatus.afterNextRender(this,function(){c.sendAction("yt-open-popup-action",[d,c])}))},
handleInitializeRequest_:function(a){var b=new yJ(this.config_);this.getTokenPromises_[a]=jw(b.getTokenForService({passive:!1,serviceId:a}).then(),function(){}.bind(this))},
handleAccountLinkCommand_:function(a){this.handleLinkRequest_(a.accountLinkCommand)},
handleLinkRequest_:function(a){var b=a.thirdPartyId;if(b){this.logLinkStarted_(b);var c=function(e,g){this.logLinkFailed_(b);this.closeAndFire_(e,g)}.bind(this,"ytd-gaming-account-link-setting-renderer",a.onFailureCommand),d=function(e,g){this.logLinkSucceeded_(b);
this.closeAndFire_(e,g)}.bind(this,"ytd-gaming-account-link-setting-renderer",a.onSuccessCommand);
this.lastCallback=d;jw(this.getTokenPromises_[b].then(function(e){var g;"NEEDS_UI"===e.status&&(g=e.getTokenWithUi(!1));g?jw(g.then(d),c):d()}),c)}},
closeAndFire_:function(a,b){this.sendAction("yt-close-popup-action",[a]);b&&(a=this.get("signalServiceEndpoint.actions",b)||null)&&this.sendInnerTubeActions(a,this)},
handleAccountUnlinkCommand_:function(a){this.handleUnlinkRequest_(a.accountUnlinkCommand)},
handleUnlinkRequest_:function(a){var b=a.thirdPartyId;if(b){this.logUnlinkStarted_(b);var c=new yJ(this.config_),d=function(e,g){this.logUnlinkFailed_(b);this.closeAndFire_(e,g)}.bind(this,"ytd-gaming-account-link-confirm-dialog-renderer",a.onFailureCommand);
this.lastCallback=a=function(e,g){this.logUnlinkSucceeded_(b);this.closeAndFire_(e,g)}.bind(this,"ytd-gaming-account-link-confirm-dialog-renderer",a.onSuccessCommand);
jw(this.unlinkUser_(c,b).then(a),d)}},
unlinkUser_:function(a,b){return a.listAssociatedAccounts({serviceId:b}).then(function(c){c=c.map(function(d){return a.deleteAssociatedAccount({accountId:d.accountId})});
return ew(c)})},
refreshAccountLinkButton_:function(a){this.sendServiceRequestAction([a])},
onServiceRequestCompleted_:function(a,b){this.handleServiceRequestActions_(b)},
handleServiceRequestActions_:function(a){if(a=a.actions)for(var b=0;b<a.length;b++){var c=a[b];c.accountLinkCommand?this.handleLinkRequest_(c.accountLinkCommand):c.accountUnlinkCommand&&this.handleUnlinkRequest_(c.accountUnlinkCommand)}},
logLinkStarted_:function(a){this.logEvent_(a,"GAMING_ACCOUNT_LINK_ACTION_LINKING","GAMING_ACCOUNT_LINK_ACTION_STATUS_STARTED")},
logLinkSucceeded_:function(a){this.logEvent_(a,"GAMING_ACCOUNT_LINK_ACTION_LINKING","GAMING_ACCOUNT_LINK_ACTION_STATUS_SUCCEEDED")},
logLinkFailed_:function(a){this.logEvent_(a,"GAMING_ACCOUNT_LINK_ACTION_LINKING","GAMING_ACCOUNT_LINK_ACTION_STATUS_FAILED")},
logUnlinkStarted_:function(a){this.logEvent_(a,"GAMING_ACCOUNT_LINK_ACTION_UNLINKING","GAMING_ACCOUNT_LINK_ACTION_STATUS_STARTED")},
logUnlinkSucceeded_:function(a){this.logEvent_(a,"GAMING_ACCOUNT_LINK_ACTION_UNLINKING","GAMING_ACCOUNT_LINK_ACTION_STATUS_SUCCEEDED")},
logUnlinkFailed_:function(a){this.logEvent_(a,"GAMING_ACCOUNT_LINK_ACTION_UNLINKING","GAMING_ACCOUNT_LINK_ACTION_STATUS_FAILED")},
logEvent_:function(a,b,c){co("gamingAccountLinkStatusChanged",{thirdPartyId:a,action:b,actionStatus:c})}});var QGa=function(){return F.apply(this,arguments)||this};
l(QGa,F);var RGa=QGa;RGa=v([W({is:"ytd-browse-items"})],RGa);var H3=function(){return F.apply(this,arguments)||this};
l(H3,F);H3.prototype.onTap=function(a){a.preventDefault();this.data&&(a=!this.data.checked,this.set("data.checked",a),this.fire("ytd-checkbox-survey-option-changed",{checked:a,value:this.data.value}))};
ea.Object.defineProperties(H3.prototype,{label:{configurable:!0,enumerable:!0,get:function(){return this.data&&this.data.responseText?this.ytRendererBehavior.getSimpleString(this.data.responseText):""}}});
var I3=H3;v([H(V.YtRendererBehavior),w("design:type",Object)],I3.prototype,"ytRendererBehavior",void 0);v([I(),w("design:type",Object)],I3.prototype,"data",void 0);v([sl("data.responseText"),w("design:type",String),w("design:paramtypes",[])],I3.prototype,"label",null);I3=v([W({is:"ytd-checkbox-survey-option-renderer"})],I3);var J3=function(){var a=F.apply(this,arguments)||this;a.followUpSurveyCommand=null;a.selectedRatingEndpoint=null;a.actionMap={"ytd-inline-survey-rating-select-action":"handleInlineSurveyRatingSelect"};return a};
l(J3,F);f=J3.prototype;
f.configureRendererStamper=function(){return{"data.inlineContent":{id:"inline-survey-compact-video-renderer",mapping:{compactVideoRenderer:{component:"ytd-compact-video-renderer"}}},"data.response.expandableSurveyResponseRenderer.options":{id:"rating-survey",mapping:{ratingSurveyRenderer:{component:"ytd-rating-survey-renderer"}}},"followUpSurveyCommand.followUpOptions":{id:"follow-up-survey-options",mapping:{checkboxSurveyOptionRenderer:{component:"ytd-checkbox-survey-option-renderer"}}},dismissedRenderer:{id:"dismissed",
mapping:{messageRenderer:{component:"ytd-message-renderer",registration:["defer-on-home"]}}}}};
f.attached=function(){this.actionHandlerBehavior.actionMap=this.actionMap};
f.dataChanged=function(){this.selectedRatingEndpoint=this.followUpSurveyCommand=null};
f.handleRequestCompletion=function(){this.hidden&&this.fire("yt-dismissable-item-dismissed")};
f.handleInlineSurveyRatingSelect=function(a,b){var c=this;this.selectedRatingEndpoint=a;this.followUpSurveyCommand=b;this.expanded=!!a;this.getOptionRenderers().forEach(function(d,e){c.notifyPath("followUpSurveyCommand.followUpOptions."+e+".checkboxSurveyOptionRenderer.checked");c.set("followUpSurveyCommand.followUpOptions."+e+".checkboxSurveyOptionRenderer.checked",!1)})};
f.onDismissTap=function(){this.hidden=!0;this.actionSenderBehavior.sendServiceRequestAction([this.get("data.dismissalEndpoint")])};
f.onSubmitTap=function(){this.selectedRatingEndpoint&&(this.actionSenderBehavior.sendServiceRequestAction([this.selectedRatingEndpoint]),this.submitFollowUpResponses())};
f.submitFollowUpResponses=function(){var a=this.getOptionRenderers().filter(function(c){return c.checked});
if(a.length){a=a.map(function(c){return c.responseEndpoint});
var b=[];a.forEach(function(c,d){0!==d&&c&&c.feedbackEndpoint&&c.feedbackEndpoint.feedbackToken&&b.push(c.feedbackEndpoint.feedbackToken)});
a=[a[0]];b.length&&a.push({extra_feedback_tokens:b});this.actionSenderBehavior.sendServiceRequestAction(a)}};
f.getOptionRenderers=function(){return this.followUpSurveyCommand&&this.followUpSurveyCommand.followUpOptions?this.get("followUpSurveyCommand.followUpOptions").map(function(a){return a.checkboxSurveyOptionRenderer}):[]};
var K3=J3;K3.prototype.handleRequestCompletion=K3.prototype.handleRequestCompletion;K3.prototype.dataChanged=K3.prototype.dataChanged;v([H(X),w("design:type",Object)],K3.prototype,"ytRendererstamperBehavior",void 0);v([H(U.YtActionHandlerBehavior),w("design:type",Object)],K3.prototype,"actionHandlerBehavior",void 0);v([H(T.YtActionSenderBehavior),w("design:type",Object)],K3.prototype,"actionSenderBehavior",void 0);
v([H(V.YtRendererBehavior),w("design:type",Object)],K3.prototype,"ytRendererBehavior",void 0);v([H(eY),w("design:type",Object)],K3.prototype,"ytdDismissableItemBehavior",void 0);v([I(),w("design:type",Object)],K3.prototype,"data",void 0);v([I(),w("design:type",Object)],K3.prototype,"followUpSurveyCommand",void 0);v([I(),w("design:type",Object)],K3.prototype,"selectedRatingEndpoint",void 0);v([I({reflectToAttribute:!0,value:!1}),w("design:type",Boolean)],K3.prototype,"expanded",void 0);
v([I({reflectToAttribute:!0,value:function(){return A("rich_grid")}}),
w("design:type",Boolean)],K3.prototype,"richGrid",void 0);v([rl("data"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],K3.prototype,"dataChanged",null);v([ql("yt-service-request-completed"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],K3.prototype,"handleRequestCompletion",null);K3=v([W({is:"ytd-inline-survey-renderer"})],K3);var L3=function(){return F.apply(this,arguments)||this};
l(L3,F);L3.prototype.onTap=function(a){a.preventDefault();this.data&&this.fire("ytd-rating-survey-option-changed",this.data)};
var M3=L3;v([H(V.YtRendererBehavior),w("design:type",Object)],M3.prototype,"ytRendererBehavior",void 0);v([H(J0.YtComponentBehavior),w("design:type",Object)],M3.prototype,"ytComponentBehavior",void 0);v([I(),w("design:type",Object)],M3.prototype,"data",void 0);M3=v([W({is:"ytd-rating-survey-option-renderer"})],M3);var N3=function(){var a=F.apply(this,arguments)||this;a.selectedOptionText=null;a.notSureSelected=!1;return a};
l(N3,F);f=N3.prototype;f.configureRendererStamper=function(){return{"data.ratings":{id:"ratings",mapping:{ratingSurveyOptionRenderer:"ytd-rating-survey-option-renderer"}}}};
f.dataChanged=function(){var a=this;this.getOptionRenderers().forEach(function(b,c){a.setSurveyOptionValue(c,!1,"checked");a.setSurveyOptionValue(c,!1,"selected")})};
f.onOptionChange=function(a,b){var c=this,d=this.ytRendererBehavior.getSimpleString(b.responseText),e=!0;this.set("notSureSelected",!1);this.getOptionRenderers().forEach(function(h,m){c.setSurveyOptionValue(m,e,"checked");c.setSurveyOptionValue(m,!1,"selected");c.ytRendererBehavior.getSimpleString(h.responseText)===d&&(e=!1,c.setSurveyOptionValue(m,!0,"selected"),c.set("selectedOptionText",h.responseText),c.selectedOptionText=h.responseText)});
a=b.responseEndpoint;if(b.followUpCommand)var g=b.followUpCommand.addFollowUpSurveyCommand;this.actionSenderBehavior.sendAction("ytd-inline-survey-rating-select-action",[a,g])};
f.getOptionRenderers=function(){return this.data&&this.data.ratings?this.data.ratings.map(function(a){return a.ratingSurveyOptionRenderer}):[]};
f.onNotSureTap=function(){this.set("notSureSelected",!0);this.set("selectedOptionText",this.get("data.notSureButton.buttonRenderer.text"));var a=this.get("data.notSureEndpoint"),b=this.get("data.notSureButton.buttonRenderer.command.addFollowUpSurveyCommand");this.actionSenderBehavior.sendAction("ytd-inline-survey-rating-select-action",[a,b])};
f.onUndoTap=function(){var a=this;this.set("selectedOptionText",null);this.set("notSureSelected",!1);this.getOptionRenderers().forEach(function(b,c){a.setSurveyOptionValue(c,!1,"checked");a.setSurveyOptionValue(c,!1,"selected")});
this.actionSenderBehavior.sendAction("ytd-inline-survey-rating-select-action",[null,null])};
f.setSurveyOptionValue=function(a,b,c){this.notifyPath("data.ratings."+a+".ratingSurveyOptionRenderer."+c);this.set("data.ratings."+a+".ratingSurveyOptionRenderer."+c,b)};
var O3=N3;O3.prototype.onOptionChange=O3.prototype.onOptionChange;O3.prototype.dataChanged=O3.prototype.dataChanged;v([H(X),w("design:type",Object)],O3.prototype,"ytRendererstamperBehavior",void 0);v([H(T.YtActionSenderBehavior),w("design:type",Object)],O3.prototype,"actionSenderBehavior",void 0);v([H(V.YtRendererBehavior),w("design:type",Object)],O3.prototype,"ytRendererBehavior",void 0);v([I(),w("design:type",Object)],O3.prototype,"data",void 0);
v([I(),w("design:type",Object)],O3.prototype,"selectedOptionText",void 0);v([I({reflectToAttribute:!0}),w("design:type",Object)],O3.prototype,"notSureSelected",void 0);v([rl("data"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],O3.prototype,"dataChanged",null);v([ql("ytd-rating-survey-option-changed"),w("design:type",Function),w("design:paramtypes",[CustomEvent,Object]),w("design:returntype",void 0)],O3.prototype,"onOptionChange",null);
O3=v([W({is:"ytd-rating-survey-renderer"})],O3);var P3=function(){return F.apply(this,arguments)||this};
l(P3,F);P3.prototype.configureRendererStamper=function(){return{"data.menu":{id:"menu",mapping:{menuRenderer:{component:"ytd-menu-renderer",params:{noInkOnDropdownButton:!0}}}},"data.buttons":{id:"buttons",mapping:{toggleButtonRenderer:"ytd-toggle-button-renderer"}},dismissedRenderer:{id:"dismissed",mapping:{notificationMultiActionRenderer:"ytd-notification-multi-action-renderer"}}}};
var Q3=P3;v([H(jFa),w("design:type",Object)],Q3.prototype,"ytdQueueableItemBehavior",void 0);v([H(V.YtRendererBehavior),w("design:type",Object)],Q3.prototype,"ytRendererBehavior",void 0);v([H(X),w("design:type",Object)],Q3.prototype,"ytRendererstamperBehavior",void 0);v([H(eY),w("design:type",Object)],Q3.prototype,"ytdDismissableItemBehavior",void 0);v([H(rY),w("design:type",Object)],Q3.prototype,"ytdLockupBehavior",void 0);
v([H(sY.YtdMouseDownPrefetchableBehavior),w("design:type",Object)],Q3.prototype,"ytdMouseDownPrefetchableBehavior",void 0);v([I(),w("design:type",Boolean)],Q3.prototype,"queued",void 0);v([I(),w("design:type",Object)],Q3.prototype,"data",void 0);var SGa=Q3=v([W({is:"ytd-compact-video-renderer"})],Q3);var R3=function(){return F.apply(this,arguments)||this};
l(R3,F);R3.prototype.configureRendererStamper=function(){return{"data.deleteButton":{id:"delete-button",mapping:{buttonRenderer:{component:"ytd-button-renderer",params:{alignByText:!0}}}}}};
var S3=R3;v([H(V.YtRendererBehavior),w("design:type",Object)],S3.prototype,"ytRendererBehavior",void 0);v([H(X),w("design:type",Object)],S3.prototype,"ytRendererstamperBehavior",void 0);v([I(),w("design:type",Object)],S3.prototype,"data",void 0);S3=v([W({is:"ytd-labs-edit-renderer"})],S3);Polymer({is:"ytd-labs-header-renderer",behaviors:[V.YtRendererBehavior,X],properties:{data:Object,headerStyle:{type:String,reflectToAttribute:!0,computed:"computeHeaderStyle_(data)"}},stampDom:{"data.primaryButton":{id:"primary-button",mapping:{buttonRenderer:"ytd-button-renderer"}}},getIcon_:function(a){return a?"labs:"+a.toLowerCase():null},
computeHeaderStyle_:function(a){return a.headerStyle}});var T3=function(){var a=F.apply(this,arguments)||this;a.actionMap={"yt-check-labs-opted-in-state":"onCheckLabsOptedInState","yt-manage-labs-state-command":"onManageLabsState"};return a};
l(T3,F);T3.prototype.configureRendererStamper=function(){return{"data.primaryButton":{id:"primary-button",mapping:{buttonRenderer:{component:"ytd-button-renderer",params:{alignByText:!0}},toggleButtonRenderer:{component:"ytd-toggle-button-renderer",params:{buttonSize:"size-large"}}}},"data.feedbackButton":{id:"feedback-button",mapping:{buttonRenderer:{component:"ytd-button-renderer",params:{buttonSize:"size-large"}}}}}};
T3.prototype.onYtToggleButton=function(a){this.notifyPath("data.primaryButton.toggleButtonRenderer.isToggled",a.detail.toggled)};
T3.prototype.onManageLabsState=function(a){a.manageLabsStateCommand&&("LABS_STATE_TYPE_OVERRIDE_OPT_IN"===a.manageLabsStateCommand.stateChange&&this.data?a.manageLabsStateCommand.labsItemId!==this.data.labsItemId?this.set("data.primaryButton.toggleButtonRenderer.isToggled",!1):this.set("data.primaryButton.toggleButtonRenderer.isToggled",!0):this.data&&a.manageLabsStateCommand.labsItemId===this.data.labsItemId&&("LABS_STATE_TYPE_OPT_IN"===a.manageLabsStateCommand.stateChange?this.ytActionSenderBehavior.sendAction("yt-check-labs-opted-in-state").some(function(b){return b})?
this.data.confirmationDialogCommand&&this.ytActionSenderBehavior.sendInnerTubeActions([this.data.confirmationDialogCommand],this):(this.ytActionSenderBehavior.sendServiceRequestAction([this.data.optInCommand]),this.set("data.primaryButton.toggleButtonRenderer.isToggled",!0)):"LABS_STATE_TYPE_OPT_OUT"===a.manageLabsStateCommand.stateChange&&(this.ytActionSenderBehavior.sendServiceRequestAction([this.data.optOutCommand]),this.set("data.primaryButton.toggleButtonRenderer.isToggled",!1))))};
T3.prototype.onCheckLabsOptedInState=function(){var a=this.get("data.primaryButton.toggleButtonRenderer");return a?a.isToggled:!1};
ea.Object.defineProperties(T3.prototype,{itemStyle:{configurable:!0,enumerable:!0,get:function(){return this.data&&this.data.itemStyle}}});
var U3=T3;U3.prototype.onYtToggleButton=U3.prototype.onYtToggleButton;v([H(V.YtRendererBehavior),w("design:type",Object)],U3.prototype,"ytRendererBehavior",void 0);v([H(X),w("design:type",Object)],U3.prototype,"ytRendererstamperBehavior",void 0);v([H(U.YtActionHandlerBehavior),w("design:type",Object)],U3.prototype,"ytActionHandlerBehavior",void 0);v([H(T.YtActionSenderBehavior),w("design:type",Object)],U3.prototype,"ytActionSenderBehavior",void 0);
v([I(),w("design:type",Object)],U3.prototype,"data",void 0);v([I({reflectToAttribute:!0}),sl("data"),w("design:type",Object),w("design:paramtypes",[])],U3.prototype,"itemStyle",null);v([ql("yt-toggle-button"),w("design:type",Function),w("design:paramtypes",[CustomEvent]),w("design:returntype",void 0)],U3.prototype,"onYtToggleButton",null);U3=v([W({is:"ytd-labs-item-renderer"})],U3);var V3=function(){return F.apply(this,arguments)||this};
l(V3,F);V3.prototype.configureRendererStamper=function(){return{"data.deleteButton":{id:"delete-button",mapping:{buttonRenderer:"yt-button-renderer"}},"data.chip":{id:"chips",mapping:{liveChatHistorySuperChatChipRenderer:"ytd-live-chat-history-super-chat-chip-renderer",liveChatHistoryNewSponsorChipRenderer:"ytd-live-chat-history-new-sponsor-chip-renderer"}}}};
ea.Object.defineProperties(V3.prototype,{hideMessageBlock:{configurable:!0,enumerable:!0,get:function(){return!!this.data&&!this.data.charityName&&!!this.data.chip}}});
var W3=V3;v([H(V.YtRendererBehavior),w("design:type",Object)],W3.prototype,"ytRendererBehavior",void 0);v([H(X),w("design:type",Object)],W3.prototype,"ytRendererstamperBehavior",void 0);v([H(eY),w("design:type",Object)],W3.prototype,"ytdDismissableItemBehavior",void 0);v([I(),w("design:type",Object)],W3.prototype,"data",void 0);v([sl("data"),w("design:type",Boolean),w("design:paramtypes",[])],W3.prototype,"hideMessageBlock",null);W3=v([W({is:"ytd-live-chat-history-entry-renderer"})],W3);var TGa=function(){return F.apply(this,arguments)||this};
l(TGa,F);var X3=TGa;v([H(V.YtRendererBehavior),w("design:type",Object)],X3.prototype,"ytRendererBehavior",void 0);v([I(),w("design:type",Object)],X3.prototype,"data",void 0);X3=v([W({is:"ytd-live-chat-history-new-sponsor-chip-renderer"})],X3);var Y3=function(){return F.apply(this,arguments)||this};
l(Y3,F);Y3.prototype.observeSuperchatChip=function(a){a&&(a={"--yt-live-chat-history-super-chat-chip-renderer-background-color":this.colorFromDecimal(a.backgroundColor),"--yt-live-chat-history-super-chat-chip-renderer-text-color":this.colorFromDecimal(a.textColor)},this.updateStyles(a))};
Y3.prototype.colorFromDecimal=function(a){return tX(Number(a||0))};
var Z3=Y3;Z3.prototype.observeSuperchatChip=Z3.prototype.observeSuperchatChip;v([H(V.YtRendererBehavior),w("design:type",Object)],Z3.prototype,"ytRendererBehavior",void 0);v([I(),w("design:type",Object)],Z3.prototype,"data",void 0);v([rl("data"),w("design:type",Function),w("design:paramtypes",[Object]),w("design:returntype",void 0)],Z3.prototype,"observeSuperchatChip",null);Z3=v([W({is:"ytd-live-chat-history-super-chat-chip-renderer"})],Z3);Polymer({is:"yt-copy-link-renderer",behaviors:[U.YtActionHandlerBehavior,V.YtRendererBehavior],properties:{data:Object,style:{type:String,reflectToAttribute:!0,computed:"computeStyle_(data.style)"}},actionMap:{"yt-share-panel-set-timestamp-action":"handleSetTimestamp_","yt-signal-action-copy-share-url":"handleSignalActionCopyShareUrl_"},ready:function(){this.$.bar.addEventListener("tap",this.handleTap_.bind(this))},
handleSetTimestamp_:function(a){this.data&&this.data.shortUrl&&(this.$["share-url"].value=a.isSet?Bi(this.data.shortUrl,"t",a.timestamp):this.data.shortUrl)},
handleSignalActionCopyShareUrl_:function(){this.copyUrlToClipboard_()},
handleTap_:function(a){this.copyUrlToClipboard_();a.stopPropagation();a.preventDefault()},
copyUrlToClipboard_:function(){this.trackCopyUrl_();window.getSelection().removeAllRanges();this.$["share-url"].select();document.execCommand("copy")},
trackCopyUrl_:function(){var a=qW(this);a&&a.getPlayerPromise().then(function(b){b&&(b=b.getVideoData().video_id)&&gV("COPY_PASTE",b)})},
computeStyle_:function(a){return a?a.toLowerCase().replace(/_/g,"-"):""}});OY("itemSectionRenderer","toggleFormFieldRenderer","ytd-toggle-form-field-renderer");Polymer({is:"ytd-toggle-form-field-renderer",behaviors:[X,V.YtRendererBehavior],properties:{data:Object,hasDescription_:{type:Boolean,reflectToAttribute:!0,computed:"computeHasDescription_(data)"}},stampDom:{"data.footer":{id:"footer-container",mapping:{copyLinkRenderer:"yt-copy-link-renderer"}}},computeHasDescription_:function(a){return a.description&&!a.toggled},
onChange_:function(a){(a=Polymer.dom(a).rootTarget.checked?this.data.toggleOnAction:this.data.toggleOffAction)&&this.sendServiceRequestAction([a])}});OY("itemSectionRenderer","factCheckRenderer","ytd-fact-check-renderer");var $3=function(){return F.apply(this,arguments)||this};
l($3,F);$3.prototype.configureRendererStamper=function(){return{"data.menu":{id:"menu",mapping:{menuRenderer:"ytd-menu-renderer"}}}};
ea.Object.defineProperties($3.prototype,{isExtensive:{configurable:!0,enumerable:!0,get:function(){return this.data&&this.data.style?"FACT_CHECK_RENDERER_STYLE_EXTENSIVE"===this.data.style:!1}}});
var a4=$3;v([H(X),w("design:type",Object)],a4.prototype,"ytRendererstamperBehavior",void 0);v([H(V.YtRendererBehavior),w("design:type",Object)],a4.prototype,"ytRendererBehavior",void 0);v([I(),w("design:type",Object)],a4.prototype,"data",void 0);v([sl("data.style"),w("design:type",Boolean),w("design:paramtypes",[])],a4.prototype,"isExtensive",null);a4=v([W({is:"ytd-fact-check-renderer"})],a4);var b4=function(){return F.apply(this,arguments)||this};
l(b4,F);b4.prototype.getIcon=function(a){return a?"settings:"+a.toLowerCase():null};
var c4=b4;v([H(V.YtRendererBehavior),w("design:type",Object)],c4.prototype,"ytRendererBehavior",void 0);v([I(),w("design:type",Object)],c4.prototype,"data",void 0);c4=v([W({is:"ytd-settings-header-renderer"})],c4);var d4=function(){return F.apply(this,arguments)||this};
l(d4,F);ea.Object.defineProperties(d4.prototype,{label:{configurable:!0,enumerable:!0,get:function(){return this.ytRendererBehavior.getSimpleString(this.data.label)}},
value:{configurable:!0,enumerable:!0,get:function(){if(this.data&&("string"===typeof this.data.stringValue||"number"===typeof this.data.int32Value))return this.data.stringValue?this.data.stringValue:this.data.int32Value}}});
var e4=d4;v([H(V.YtRendererBehavior),w("design:type",Object)],e4.prototype,"ytRendererBehavior",void 0);v([I(),w("design:type",Object)],e4.prototype,"data",void 0);v([sl("data.label"),w("design:type",String),w("design:paramtypes",[])],e4.prototype,"label",null);v([sl("data"),w("design:type",Object),w("design:paramtypes",[])],e4.prototype,"value",null);e4=v([W({is:"ytd-dropdown-item-renderer"})],e4);var f4=function(){var a=F.apply(this,arguments)||this;a.value="";a.noLabelFloat=!1;a.autosize=!1;a.minAutosizeWidth=100;a.autosizeFont="14px Roboto";a.polymer2="Element"in Polymer;return a};
l(f4,F);f=f4.prototype;f.configureRendererStamper=function(){return{"data.entries":{id:"entries",mapping:{dropdownItemRenderer:"ytd-dropdown-item-renderer",privacyDropdownItemRenderer:{component:"ytd-privacy-dropdown-item-renderer",registration:["defer-on-home"]},navigationDropdownItemRenderer:{component:"ytd-navigation-dropdown-item-renderer",registration:["defer-on-all"]}}}}};
f.reset=function(){this.entries.selected=-1;this.entries.forceSynchronousItemUpdate();this.entries.select(this.getSelectedItem())};
f.dataChanged=function(){this.reset()};
f.stopPropagation=function(a){a.stopPropagation()};
f.autoSizeLabel=function(){if(this.autosizeFont&&this.autosize){this.canvas||(this.canvas=document.createElement("canvas"));var a=this.canvas.getContext("2d");a&&(a.font=this.autosizeFont,this.inputEl.style.width=Math.max(this.minAutosizeWidth,Number(a.measureText(this.inputEl.value).width)+24)+"px")}};
f.getSelectedItem=function(){if(!this.data||!this.data.entries)return null;for(var a=0,b=this.data.entries.length;a<b;a++){var c=this.data.entries[a],d;for(d in c)if(c.hasOwnProperty(d)&&c[d].isSelected)return c[d].stringValue?c[d].stringValue:c[d].int32Value}return null};
ea.Object.defineProperties(f4.prototype,{label:{configurable:!0,enumerable:!0,get:function(){if(!this.data||!this.data.entries)return null;if(this.data.label)return this.data.label;for(var a=0,b=this.data.entries.length;a<b;a++){var c=this.data.entries[a],d;for(d in c)if(c.hasOwnProperty(d)&&c[d].isSelected)return this.ytRendererBehavior.getSimpleString(c[d].label)}return null}}});
var g4=f4;g4.prototype.autoSizeLabel=g4.prototype.autoSizeLabel;g4.prototype.stopPropagation=g4.prototype.stopPropagation;g4.prototype.dataChanged=g4.prototype.dataChanged;v([H(V.YtRendererBehavior),w("design:type",Object)],g4.prototype,"ytRendererBehavior",void 0);v([H(X),w("design:type",Object)],g4.prototype,"ytRendererStamperBehavior",void 0);v([I(),w("design:type",Object)],g4.prototype,"data",void 0);v([I({notify:!0}),w("design:type",Object)],g4.prototype,"value",void 0);
v([I(),w("design:type",Object)],g4.prototype,"noLabelFloat",void 0);v([I(),w("design:type",Object)],g4.prototype,"autosize",void 0);v([I(),w("design:type",Object)],g4.prototype,"minAutosizeWidth",void 0);v([I(),w("design:type",Object)],g4.prototype,"autosizeFont",void 0);v([I({reflectToAttribute:!0}),w("design:type",Boolean)],g4.prototype,"polymer2",void 0);v([tl("#entries"),w("design:type",Object)],g4.prototype,"entries",void 0);v([tl("#input"),w("design:type",Object)],g4.prototype,"inputEl",void 0);
v([rl("data"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],g4.prototype,"dataChanged",null);v([ql("iron-overlay-opened"),ql("iron-overlay-closed"),w("design:type",Function),w("design:paramtypes",[CustomEvent]),w("design:returntype",void 0)],g4.prototype,"stopPropagation",null);v([ql("iron-select"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],g4.prototype,"autoSizeLabel",null);
v([sl("data"),w("design:type",Object),w("design:paramtypes",[])],g4.prototype,"label",null);var UGa=g4=v([W({is:"ytd-dropdown-renderer"})],g4);var VGa=function(){return F.apply(this,arguments)||this};
l(VGa,F);var h4=VGa;v([H(V.YtRendererBehavior),w("design:type",Object)],h4.prototype,"ytRendererBehavior",void 0);v([I(),w("design:type",Object)],h4.prototype,"data",void 0);v([I({computed:"getSimpleString(data.label)"}),w("design:type",String)],h4.prototype,"label",void 0);h4=v([W({is:"ytd-navigation-dropdown-item-renderer"})],h4);var WGa=function(){return F.apply(this,arguments)||this};
l(WGa,F);var i4=WGa;v([H(V.YtRendererBehavior),w("design:type",Object)],i4.prototype,"ytRendererBehavior",void 0);v([I(),w("design:type",Object)],i4.prototype,"data",void 0);i4=v([W({is:"ytd-channel-options-renderer"})],i4);var j4=function(){var a=F.apply(this,arguments)||this;a.actionMap={"yt-settings-update-text-command":"handleUpdateTextCommand"};return a};
l(j4,F);j4.prototype.configureRendererStamper=function(){return{"data.connectButton":{id:"connect-button",mapping:{buttonRenderer:"ytd-button-renderer",toggleButtonRenderer:"ytd-toggle-button-renderer"}}}};
j4.prototype.handleUpdateTextCommand=function(a){a.settingsUpdateTextCommand&&this.set("data",a.settingsUpdateTextCommand)};
var k4=j4;v([H(X),w("design:type",Object)],k4.prototype,"ytRendererstamperBehavior",void 0);v([H(U.YtActionHandlerBehavior),w("design:type",Object)],k4.prototype,"ytActionHandlerBehavior",void 0);v([H(V.YtRendererBehavior),w("design:type",Object)],k4.prototype,"ytRendererBehavior",void 0);v([I(),w("design:type",Object)],k4.prototype,"data",void 0);k4=v([W({is:"ytd-connected-app-renderer"})],k4);var l4=function(){var a=F.apply(this,arguments)||this;a.actionMap={"yt-settings-update-checkbox-command":"handleUpdateCheckboxCommand"};return a};
l(l4,F);l4.prototype.onCheckboxChange=function(a){this.data&&(a=Polymer.dom(a).rootTarget.checked?this.data.enableServiceEndpoint:this.data.disableServiceEndpoint)&&this.ytActionSenderBehavior.sendServiceRequestAction([a])};
l4.prototype.handleUpdateCheckboxCommand=function(a){a.settingsUpdateCheckboxCommand&&(this.set("data.disabled",a.settingsUpdateCheckboxCommand.disabled),this.set("data.title",a.settingsUpdateCheckboxCommand.title))};
var m4=l4;v([H(X),w("design:type",Object)],m4.prototype,"ytRendererstamperBehavior",void 0);v([H(V.YtRendererBehavior),w("design:type",Object)],m4.prototype,"ytRendererBehavior",void 0);v([H(U.YtActionHandlerBehavior),w("design:type",Object)],m4.prototype,"ytActionHandlerBehavior",void 0);v([H(T.YtActionSenderBehavior),w("design:type",Object)],m4.prototype,"ytActionSenderBehavior",void 0);v([I(),w("design:type",Object)],m4.prototype,"data",void 0);m4=v([W({is:"ytd-settings-checkbox-renderer"})],m4);var n4=function(){return F.apply(this,arguments)||this};
l(n4,F);
n4.prototype.configureRendererStamper=function(){return{"data.options":{id:"options",mapping:{channelOptionsRenderer:{component:"ytd-channel-options-renderer",noInjection:!0},connectedAppRenderer:{component:"ytd-connected-app-renderer",noInjection:!0},copyLinkRenderer:{component:"yt-copy-link-renderer",noInjection:!0},dropdownRenderer:{component:"ytd-dropdown-renderer",noInjection:!0},settingsCheckboxRenderer:{component:"ytd-settings-checkbox-renderer",noInjection:!0},settingsSwitchRenderer:{component:"ytd-settings-switch-renderer",noInjection:!0}}}}};
var o4=n4;v([H(V.YtRendererBehavior),w("design:type",Object)],o4.prototype,"ytRendererBehavior",void 0);v([H(X),w("design:type",Object)],o4.prototype,"ytRendererstamperBehavior",void 0);v([I(),w("design:type",Object)],o4.prototype,"data",void 0);o4=v([W({is:"ytd-settings-options-renderer"})],o4);var XGa=function(){return F.apply(this,arguments)||this};
l(XGa,F);var p4=XGa;v([H(V.YtRendererBehavior),w("design:type",Object)],p4.prototype,"ytRendererBehavior",void 0);v([I(),w("design:type",Object)],p4.prototype,"data",void 0);p4=v([W({is:"ytd-settings-switch-renderer"})],p4);Polymer({is:"yt-masthead-ad-renderer",properties:{data:Object},behaviors:[gFa],YT_CLOSE_MSG_:"creative2yt_requestClose",handleMessageEvent:function(a){a==this.YT_CLOSE_MSG_&&this.collapseAd()}});Polymer({is:"ytd-video-masthead-ad-renderer",properties:{data:Object,iframeClasses:{type:String,value:""}},behaviors:[jY.YtdGridStateAwareBehavior,U.YtActionHandlerBehavior,gFa,lY.YtdGuideStateAwareBehavior,iY.ComponentBehavior],actionMap:{"yt-dark-mode-toggled-action":"onDarkModeToggledAction_"},created:function(){this.adCreativeWindow_=null},
ready:function(){var a=this.$["collapse-ad"];a&&a.addEventListener("click",this.collapseAd.bind(this))},
attached:function(){A("desktop_polymer_video_masthead_always_use_responsive_iframe")&&this.makeResponsive_()},
handleMessageEvent:function(a,b){if("VideoMasthead"==a.source)switch(a.event){case"ClickToWatch":this.handleClickToWatch_(a);break;case"CloseAd":this.collapseAd();break;case"IsResponsiveMaterialLayout":this.makeResponsive_();this.adCreativeWindow_=b;break;case"EmbeddedVideoMastheadAdNavigate":this.fire("yt-navigate",a.navigationDetails);}},
makeResponsive_:function(){this.iframeClasses="responsive"},
handleClickToWatch_:function(a){if(a.clickThroughUrl){var b=mm(a.clickThroughUrl);b=nd(b.adurl);var c={adpings:km(a.pings)};cS(b,c);a=Ac(a.clickThroughUrl);zU(wc(a))}},
onDarkModeToggledAction_:function(a){this.adCreativeWindow_&&this.adCreativeWindow_.postMessage({event:"ToggleDarkMode",isDarkTheme:a},"*")}});Polymer({is:"ytd-video-masthead-ad-advertiser-info-renderer",behaviors:[Polymer.IronResizableBehavior,U.YtActionHandlerBehavior,V.YtRendererBehavior,X],properties:{data:{type:Object,observer:"dataChanged_"}},actionMap:{"yt-mute-ad-action":"handleMuteAd_"},listeners:{"iron-resize":"onIronResize_"},stampDom:{"data.menu":{id:"menu",mapping:{menuRenderer:{component:"ytd-menu-renderer",params:{icon:"yt-icons:more_vert"}}}}},MIN_PIXEL_WIDTH_TO_SHOW_CHANNEL_THUMBNAIL_:211,MIN_CHANNEL_WIDTH_TO_SHOW_LARGE_BANNER_:638,
SMALL_CHANNEL_BANNER_RATIO_:.273,LARGE_CHANNEL_BANNER_RATIO_:.165,attached:function(){this.updateChannelBanner_()},
dataChanged_:function(){this.updateChannelBanner_()},
updateChannelBanner_:function(){if(this.data&&this.data.channelBanner){var a=LY(this.data.channelBanner.thumbnails,this.clientWidth);a&&(0==a.indexOf("//")&&(a="https:"+a),this.classList.add("channel-banner"),this.updateStyles({"--ytvmh-channel-banner":"url("+a+")"}))}},
handleMuteAd_:function(){if(this.data.menu&&this.data.menu.menuRenderer&&this.data.menu.menuRenderer.items){for(var a=void 0,b=k(this.data.menu.menuRenderer.items),c=b.next();!c.done;c=b.next())if(c=c.value,c.menuNavigationItemRenderer&&c.menuNavigationItemRenderer.navigationEndpoint&&c.menuNavigationItemRenderer.navigationEndpoint.adFeedbackEndpoint){a=c.menuNavigationItemRenderer.navigationEndpoint;break}a&&a.loggingUrls&&a.loggingUrls.forEach(function(d){d.baseUrl&&Zo(d.baseUrl)})}},
onIronResize_:function(){this.clientWidth<this.MIN_PIXEL_WIDTH_TO_SHOW_CHANNEL_THUMBNAIL_?this.classList.add("no-thumbnail"):this.classList.remove("no-thumbnail");var a=this.$$("#banner");a&&(a.style.height=this.clientWidth<this.MIN_CHANNEL_WIDTH_TO_SHOW_LARGE_BANNER_?ej(a.clientWidth*this.SMALL_CHANNEL_BANNER_RATIO_,!0):ej(a.clientWidth*this.LARGE_CHANNEL_BANNER_RATIO_,!0))}});Polymer({is:"ytd-video-masthead-ad-expandable-thumbnail-tile-renderer",properties:{data:Object,expanded:{type:Boolean,observer:"onExpandedChanged_",reflectToAttribute:!0}},behaviors:[U.YtActionHandlerBehavior,T.YtActionSenderBehavior,V.YtRendererBehavior],listeners:{tap:"onTap_",mouseover:"onMouseOver_"},actionMap:{"ytd-video-masthead-expandable-tile-expanding":"onExpandableTileExpanding_","ytd-video-masthead-expandable-tile-lock-and-collapse":"onExpandableTileLockAndCollapse_","ytd-video-masthead-expandable-tile-unlock":"onExpandableTileUnlock_"},
created:function(){this.isLocked_=!1},
maybeExpand_:function(){this.isLocked_||this.expanded||(this.expanded=!0)},
onExpandedChanged_:function(){this.expanded&&this.sendOptionalAction("ytd-video-masthead-expandable-tile-expanding",[this])},
onMouseOver_:function(){this.maybeExpand_()},
onTap_:function(){this.maybeExpand_()},
onExpandableTileExpanding_:function(a){a!=this&&(this.expanded=!1)},
onExpandableTileLockAndCollapse_:function(a){this.isLocked_=!0;a!=this&&(this.expanded=!1)},
onExpandableTileUnlock_:function(){this.isLocked_=!1}});Polymer({is:"ytd-video-masthead-ad-expandable-video-tile-renderer",properties:{data:{type:Object,observer:"dataChanged_"},expanded:{type:Boolean,observer:"onExpandedChanged_",reflectToAttribute:!0}},behaviors:[X,U.YtActionHandlerBehavior,T.YtActionSenderBehavior,V.YtRendererBehavior],listeners:{tap:"onTap_",mouseover:"onMouseOver_","yt-toggle-button":"onYtToggleButton_","yt-navigate":"onYtNavigate_"},stampDom:{"data.muteButton":{id:"mute-button",mapping:{toggleButtonRenderer:"ytd-toggle-button-renderer"}},
"data.replayButton":{id:"replay-button",mapping:{buttonRenderer:"ytd-button-renderer"}}},actionMap:{"ytd-video-masthead-expandable-tile-expanding":"onExpandableTileExpanding_","ytd-video-masthead-expandable-tile-lock-and-collapse":"onExpandableTileLockAndCollapse_","ytd-video-masthead-expandable-tile-unlock":"onExpandableTileUnlock_"},created:function(){this.playerManager_=new FX;this.playbackFinished_=!1},
ready:function(){TDa(this.playerManager_,this.$.player,this.onPlaybackEnded.bind(this));this.$["replay-button"].addEventListener("click",function(){this.data&&this.data.navigationEndpoint&&this.fire("yt-navigate",{endpoint:this.data.navigationEndpoint})}.bind(this))},
onPlaybackEnded:function(){this.classList.remove("video-playing");this.classList.add("video-ended");this.unlockExpandableTiles_();this.playbackFinished_=!0},
attached:function(){this.async(this.maybePlayVideo_.bind(this))},
maybePlayVideo_:function(){this.expanded&&this.isAttached&&this.data&&this.data.videoId&&!this.playbackFinished_&&(this.classList.add("video-playing"),this.lockAndCollapseExpandableTiles_(),this.playerManager_.playVideo())},
dataChanged_:function(){this.data&&(UDa(this.playerManager_,this.data.videoId,this.data.playbackStartMs,this.data.playbackDurationMs),this.maybePlayVideo_())},
getPlayerPromise:function(){return this.playerManager_.getPlayerPromise()},
onYtToggleButton_:function(a){a.detail.toggled?this.playerManager_.mute():this.playerManager_.unMute()},
onYtNavigate_:function(a){var b=VDa(a.detail.endpoint),c=WDa(this.data.clickthroughReportingData);b&&c&&(a.detail.endpoint.watchEndpoint?a.detail.tempData=c:cS(b,c,Be("desktop_polymer_video_masthead_session_tempdata_ttl")))},
maybeExpand_:function(){this.isLocked_||this.expanded||(this.expanded=!0)},
onExpandedChanged_:function(){this.expanded?(this.sendOptionalAction("ytd-video-masthead-expandable-tile-expanding",[this]),this.maybePlayVideo_()):this.playerManager_.stopVideo()},
onMouseOver_:function(){this.maybeExpand_()},
onTap_:function(){this.maybeExpand_()},
onExpandableTileExpanding_:function(a){a!=this&&(this.playerManager_.stopVideo(),this.expanded=!1)},
onExpandableTileLockAndCollapse_:function(a){a!=this&&(this.isLocked_=!0,this.expanded=!1)},
onExpandableTileUnlock_:function(){this.isLocked_=!1},
lockAndCollapseExpandableTiles_:function(){this.sendAction("ytd-video-masthead-expandable-tile-lock-and-collapse",[this])},
unlockExpandableTiles_:function(){this.sendAction("ytd-video-masthead-expandable-tile-unlock")}});var q4=function(){return F.apply(this,arguments)||this};
l(q4,F);q4.prototype.configureRendererStamper=function(){return{"data.menu":{id:"menu",mapping:{menuRenderer:"ytd-menu-renderer"}}}};
var r4=q4;v([H(V.YtRendererBehavior),w("design:type",Object)],r4.prototype,"ytRendererBehavior",void 0);v([H(X),w("design:type",Object)],r4.prototype,"ytRendererstamperBehavior",void 0);v([I(),w("design:type",Object)],r4.prototype,"data",void 0);r4=v([W({is:"ytd-video-masthead-ad-primary-video-overlay-renderer"})],r4);Polymer({is:"ytd-video-masthead-ad-primary-video-renderer",behaviors:[X,V.YtRendererBehavior],properties:{data:{type:Object,observer:"dataChanged_"}},listeners:{"yt-toggle-button":"onYtToggleButton_","yt-navigate":"onYtNavigate_"},stampDom:{"data.muteButton":{id:"mute-button",mapping:{toggleButtonRenderer:"ytd-toggle-button-renderer"}},"data.replayButton":{id:"replay-button",mapping:{buttonRenderer:"ytd-button-renderer"}}},created:function(){this.playerManager_=new FX},
ready:function(){TDa(this.playerManager_,this.$.player,this.onPlaybackEnded.bind(this));this.$["replay-button"].addEventListener("click",function(){this.data&&this.data.navigationEndpoint&&this.fire("yt-navigate",{endpoint:this.data.navigationEndpoint})}.bind(this))},
onPlaybackEnded:function(){this.classList.remove("video-playing");this.classList.add("video-ended")},
dataChanged_:function(){this.data&&(Ka(this.data.videoId)&&(UDa(this.playerManager_,this.data.videoId,this.data.playbackStartMs,this.data.playbackDurationMs),this.playerManager_.playVideo(),this.classList.add("video-playing")),this.data.isWidescreen&&this.$["player-container"].classList.add("widescreen"))},
getPlayerPromise:function(){return this.playerManager_.getPlayerPromise()},
onYtToggleButton_:function(a){a.detail.toggled?this.playerManager_.mute():this.playerManager_.unMute()},
onYtNavigate_:function(a){var b=VDa(a.detail.endpoint),c=WDa(this.data.clickthroughReportingData);b&&c&&(a.detail.endpoint.watchEndpoint?a.detail.tempData=c:cS(b,c,Be("desktop_polymer_video_masthead_session_tempdata_ttl")))}});Polymer({is:"ytd-video-masthead-ad-v3-renderer",behaviors:[Polymer.IronResizableBehavior,YX,jY.YtdGridStateAwareBehavior,U.YtActionHandlerBehavior,V.YtRendererBehavior,X],properties:{data:{type:Object,observer:"dataChanged_"},widescreen:{reflectToAttribute:!0,type:Boolean,computed:"computeWidescreen_(data.primaryVideo)"},expandable:{reflectToAttribute:!0,type:Boolean,computed:"computeExpandable_(data.expandableTiles)"},tiles:{reflectToAttribute:!0,type:Number},collapsed:{reflectToAttribute:!0,type:Boolean,
value:!1}},actionMap:{"yt-mute-ad-action":"handleMuteAd_"},listeners:{"iron-resize":"onIronResize_"},stampDom:{"data.expandableTiles":{id:"expandable-tile-container",mapping:{videoMastheadAdExpandableThumbnailTileRenderer:"ytd-video-masthead-ad-expandable-thumbnail-tile-renderer",videoMastheadAdExpandableVideoTileRenderer:"ytd-video-masthead-ad-expandable-video-tile-renderer"}},"data.showAdRenderer":{id:"show-ad",mapping:{buttonRenderer:"ytd-button-renderer"}}},BASE_GRID_WIDTH_PX_:214,MASTHEAD_PREF_KEY_:"HIDDEN_MASTHEAD_ID",
created:function(){this.impressionResolver_=fw();this.activeViewMeasurementDataResolver_=fw();this.isServerSideContext_=!1},
ready:function(){var a=this;this.$["show-ad"].addEventListener("click",this.expandAd_.bind(this));this.addEventListener("yt-action",function(b){if("yt-service-request"==b.detail.actionName){var c=b.detail.args[1];c.videoMastheadAdMuteCommand&&(a.collapseAd_(c.videoMastheadAdMuteCommand.encryptedMastheadId),b.stopPropagation())}});
this.isServerSideContext_=!this.classList.contains("client-side");this.isServerSideContext_||(this.snapStateRefresh_=!1)},
attached:function(){var a=this;this.async(this.notifyResize);this.impressionResolver_.promise.then(function(b){a.collapsed||(b.forEach(function(c){Zo(c.baseUrl)}),a.data.impressionCommand=void 0)});
this.activeViewMeasurementDataResolver_.promise.then(function(b){a.enableActiveViewMeasurement(b,14)})},
dataChanged_:function(){this.data.impressionCommand&&this.data.impressionCommand.loggingUrls&&this.impressionResolver_.resolve(this.data.impressionCommand.loggingUrls);this.data&&this.data.activeView&&this.activeViewMeasurementDataResolver_.resolve(this.data.activeView);var a=this.get("data.showAdRenderer.buttonRenderer.command.videoMastheadAdMuteCommand");a&&this.restoreCollapsedState_(a.encryptedMastheadId);this.collapsed&&(this.data.primaryVideo&&(this.data.primaryVideo=void 0),this.data.expandableTiles&&(
this.data.expandableTiles=void 0))},
computeWidescreen_:function(a){return!!(a&&a.videoMastheadAdPrimaryVideoRenderer&&a.videoMastheadAdPrimaryVideoRenderer.isWidescreen)},
computeExpandable_:function(a){return!!(a&&0<a.length)},
onIronResize_:function(){this.isServerSideContext_&&!this.snapStateRefresh_&&(this.tiles=Math.ceil(this.clientWidth/this.BASE_GRID_WIDTH_PX_));if(this.expandable){var a=this.$$("#expandable-tile-container :first-child");a&&!a.expanded&&(a.expanded=!0)}},
handleMuteAd_:function(){this.collapseAd_(null)},
restoreCollapsedState_:function(a){this.collapsed=eS.getInstance().get(this.MASTHEAD_PREF_KEY_)==a},
collapseAd_:function(a){if(a){var b=eS.getInstance();b.set(this.MASTHEAD_PREF_KEY_,a);b.save()}this.collapsed=!0},
expandAd_:function(){var a=eS.getInstance();a.set(this.MASTHEAD_PREF_KEY_,!1);a.save();location.reload()}});var YGa=["image/jpeg","image/png"],s4=function(a,b,c,d,e,g,h,m){var n=A("channel_images_use_onepicker");this.minWidth_=a;this.minHeight_=b;this.recommendedWidth_=c;this.recommendedHeight_=d;this.maxFileSize_=e;this.title_=g;this.bannerGalleryTitle_=h;this.cropMode_="ytcb";this.channelId_=m;this.useChannelStorage_=n;a=rEa("yt-banner");this.useChannelStorage_?a.addView(rsa(ssa(new RK("youtube-channel-banner").addUploadMetadata("X-YouTube-ChannelId",this.channelId_),this.maxFileSize_),this.recommendedWidth_,
this.recommendedHeight_).setMimeTypes(YGa.join())):a.addView(rsa(ssa(new RK("youtubebanner").addUploadMetadata("silo_id","19"),this.maxFileSize_),this.recommendedWidth_,this.recommendedHeight_));a.addView(new JJ);a.addView(new JJ().setType("ytbanner").setLabel(this.bannerGalleryTitle_));b=a.setTitle(this.title_).setSize(1E3);b.urlParamMap_.set("thumbs","orig");c=this.minWidth_;d=this.minHeight_;if(isNaN(c)||isNaN(d))throw Error("MinSize - Not a number. ("+c+", "+d+")");b.urlParamMap_.set("minSize",
c+"x"+d);b.urlParamMap_.set("cropMode",this.cropMode_);this.builder_=a;this.picker_=null};
s4.prototype.open=function(){var a=this;return new Yv(function(b,c){a.builder_.setCallback(function(d){"picked"==d.action?b(d):"cancel"==d.action&&c()});
a.picker_&&a.picker_.dispose();a.picker_=a.builder_.build();a.picker_.setVisible(!0)})};
s4.prototype.dispose=function(){this.picker_&&(this.picker_.dispose(),this.picker_=null)};function t4(a,b,c,d){return window.spf?ZGa(a,b,c,void 0===d?!1:d):$Ga(a,b)}
function ZGa(a,b,c,d){var e=aHa(a,b,c);return e.then(bHa,function(g){d&&e.cancel();return cw(g)})}
function aHa(a,b,c){var d=null,e=new Yv(function(g,h){var m={};if(b){m.method=b.method;var n=b.postParams||{};kda(a,b)&&(n[z("XSRF_FIELD_NAME",void 0)]=z("XSRF_TOKEN",void 0));m.postData=xi(n);b.type&&(m.type=b.type);n=b.headers}m.headers=Qm(a,n);A("debug_forward_web_query_parameters")&&(a=Sm(a));m.experimental_headers=m.headers;m.onError=function(p){p.err&&p.xhr&&(p.err.params={url:p.xhr.responseURL,response:p.xhr.responseText.substr(0,64)});h(p.err)};
m.onPartDone=function(p){c&&c.call(null,p.part)};
m.onDone=function(p){var x=u4(p.response,"xsrf_token");si(window.location.href,a)&&x&&re("XSRF_TOKEN",x);if(x=u4(p.response,"service_worker_killswitch"))re("SERVICE_WORKER_KILLSWITCH",x),uEa();g(p.response)};
d=spf.request(a,m)});
A("ignore_empty_xhr")&&jw(e,function(g){g&&g.hasOwnProperty("params")&&!g.params.response||g instanceof Error&&(g.hasOwnProperty("params")&&g.params.response.startsWith("<")?xe(g):we(g))});
A("cancel_pending_navs")&&jw(e,function(){d.abort()});
return e}
function bHa(a){if("multipart"==a.type){var b=a.timing;a=a.parts.reduce(function(c,d){eb(c,d);return c},{});
a.timing=a.timing||{};eb(a.timing,b);a.type="reduced"}return a}
function $Ga(a,b){b=void 0===b?{}:b;var c=null,d=new Yv(function(e,g){b.onFinish=function(h){if(h.readyState==XMLHttpRequest.DONE)if(200==h.status){if("json"!=h.responseType)try{var m=JSON.parse(h.response)}catch(p){m=p}else m=h.response;if(m instanceof Error)g(m);else{var n=u4(m,"xsrf_token");si(window.location.href,a)&&n&&re("XSRF_TOKEN",n);h=h.responseURL;window.performance&&window.performance.getEntriesByName?(n=window.performance.getEntriesByName(h).pop())?h={responseStart:Hm()-(n.responseEnd-
n.responseStart)}:(.01>Math.random()&&(n=Error("No timing found"),n.params=h,xe(n)),h={responseStart:-1}):h={responseStart:0};m.timing=m.timing||{};eb(m.timing,h);e(m)}}else g(Error("HTTP error: "+h.status))};
(c=Vm(a,b))||g(Error("HTTP error: "+c.status))});
A("cancel_pending_navs")&&jw(d,function(){c.abort()});
return d}
function u4(a,b){var c=a[b],d=a.parts;"multipart"==a.type&&d&&(c=(a=d.find(function(e){return b in e}))&&a[b]);
return c}
;var cHa=function(a){this.channelId_=a};
cHa.prototype.upload=function(a){var b="";a.viewToken&&(b=a.viewToken[2].type);var c=a.docs[0];a=c.crop;b={channel_id:this.channelId_,fife_url:c.thumbnails[0].url,photo_id:c.id,is_gallery_image:"ytbanner"==b};a&&(b.crop_top=a.top,b.crop_right=a.right,b.crop_bottom=a.bottom,b.crop_left=a.left);return t4("/channels_profile_ajax?action_update_banner_image=1",{method:"POST",postParams:b})};var v4=function(){return F.apply(this,arguments)||this};
l(v4,F);f=v4.prototype;f.attached=function(){this.hasAttribute("role")||this.setAttribute("role","button");this.hasAttribute("tabindex")||this.setAttribute("tabindex","0")};
f.detached=function(){this.picker&&this.picker.dispose()};
f.dataChanged=function(){this.uploader=this.picker=this.message=null};
f.computeAriaLabel=function(a){return a};
f.onTap=function(){this.message=null;this.picker||(this.picker=new s4(this.data.bannerMinWidth||0,this.data.bannerMinHeight||0,this.data.bannerRecommendedWidth||0,this.data.bannerRecommendedHeight||0,this.data.bannerMaxFileSizeInMegabytes||0,this.data.editorTitle||"",this.data.galleryViewTitle||"",this.data.channelId||""));this.picker.open().then(this.handleBannerPicked.bind(this),Ta)};
f.handleBannerPicked=function(a){this.uploader||(this.uploader=new cHa(this.data.channelId||""));this.message=this.data.uploadingText;this.uploader.upload(a).then(this.handleBannerUploadSucceeded.bind(this),this.handleBannerUploadFailed.bind(this))};
f.handleBannerUploadSucceeded=function(a){a&&a.errors?this.handleBannerUploadFailed(a):(this.fire("yt-banner-updated",a),this.message=null)};
f.handleBannerUploadFailed=function(a){this.message=a&&a.errors&&a.errors.length?a.errors[0]:null};
var w4=v4;w4.prototype.onTap=w4.prototype.onTap;v([H(T.YtActionSenderBehavior),w("design:type",Object)],w4.prototype,"ytActionSenderBehavior",void 0);v([H(Polymer.IronButtonState),w("design:type",Object)],w4.prototype,"ironButtonState",void 0);v([I({observer:"dataChanged"}),w("design:type",Object)],w4.prototype,"data",void 0);v([I({reflectToAttribute:!0,readOnly:!0,computed:"computeAriaLabel(data.buttonLabel)"}),w("design:type",String)],w4.prototype,"ariaLabel",void 0);
v([I(),w("design:type",Object)],w4.prototype,"message",void 0);v([I(),w("design:type",Object)],w4.prototype,"picker",void 0);v([I(),w("design:type",Object)],w4.prototype,"uploader",void 0);v([ql("tap"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],w4.prototype,"onTap",null);w4=v([W({is:"ytd-channel-banner-editor-renderer"})],w4);Polymer({is:"ytd-expandable-tab-renderer",behaviors:[V.YtRendererBehavior,bFa,MY.YtPolymer2AwareBehavior],properties:{data:{type:Object,observer:"dataChanged_"}},ready:function(){this.$.form.addEventListener("submit",this.onSubmit_.bind(this))},
dataChanged_:function(a){a&&a.selected&&(this.showInput=!0)},
closeOnOutsideClickHandler:function(){this.set("data.expandedText","")},
openOnClickHandler:function(){this.$.input.focus()},
onSubmit_:function(a){a.preventDefault();return!1},
submitOnEnterKeyUp_:function(a){if(13===a.keyCode)if(a=this.data.endpoint,A("kevlar_no_url_params")){var b=u.unsafeClone(a);b.commandMetadata&&b.commandMetadata.webCommandMetadata&&b.commandMetadata.webCommandMetadata.url?(b.commandMetadata.webCommandMetadata.url=Gi(b.commandMetadata.webCommandMetadata.url,"query",this.data.expandedText),this.fire("yt-navigate",{endpoint:b})):we(Error("Error: Trying to navigate to an endpoint without url: "+JSON.stringify(a)))}else A("kevlar_no_url_params")?(b=u.unsafeClone(a),
b.webNavigationEndpointData&&b.webNavigationEndpointData.url?(b.webNavigationEndpointData.url=Gi(b.webNavigationEndpointData.url,"query",this.data.expandedText),this.fire("yt-navigate",{endpoint:b})):we(Error("Error: Trying to navigate to an endpoint without url: "+JSON.stringify(a)))):(a.browseEndpoint.query=this.data.expandedText,this.fire("yt-navigate",{endpoint:a,params:{query:this.data.expandedText}}))}});var x4=function(){var a=F.apply(this,arguments)||this;a.ariaLabel=yU("EDIT_AVATAR_LABEL",void 0,"Edit channel icon");return a};
l(x4,F);x4.prototype.attached=function(){this.setAttribute("role","button");this.setAttribute("tabindex","0")};
x4.prototype.onTap=function(){this.data&&this.data.editAvatarServiceEndpoint&&this.ytActionSenderBehavior.sendServiceRequestAction([this.data.editAvatarServiceEndpoint])};
var y4=x4;y4.prototype.onTap=y4.prototype.onTap;v([H(Polymer.IronButtonState),w("design:type",Object)],y4.prototype,"ironButtonState",void 0);v([H(T.YtActionSenderBehavior),w("design:type",Object)],y4.prototype,"ytActionSenderBehavior",void 0);v([I(),w("design:type",Object)],y4.prototype,"data",void 0);v([I({reflectToAttribute:!0}),w("design:type",String)],y4.prototype,"ariaLabel",void 0);
v([ql("tap"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],y4.prototype,"onTap",null);y4=v([W({is:"ytd-channel-avatar-editor"})],y4);Polymer({is:"ytd-c4-tabbed-header-renderer",behaviors:[zFa,U.YtActionHandlerBehavior,X,lY.YtdGuideStateAwareBehavior],actionMap:{"yt-button-refresh-action":"handleButtonRefreshAction_","yt-insert-channel-tab-command":"handleInsertTabCommand_","ytd-refresh-channel-tab-action":"handleRefreshChannelTabAction_","yt-unsubscribe-action":"handleUnsubscribeAction_"},properties:{data:{type:Object,observer:"dataChanged_"},hasChannelArt:{type:Boolean,reflectToAttribute:!0},backgroundColorUpdate:{type:Boolean,
reflectToAttribute:!0,value:A("kevlar_background_color_update")}},observers:["observeLightsourcePalette_(data.headerColorPalette.lightsourceColorPaletteData)"],listeners:{"yt-banner-updated":"onBannerUpdated_"},stampDom:{"data.sponsorButton":{id:"sponsor-button",mapping:{buttonRenderer:"ytd-button-renderer"}},"data.subscribeButton":{id:"subscribe-button",mapping:{buttonRenderer:"ytd-button-renderer",subscribeButtonRenderer:"ytd-subscribe-button-renderer",subscriptionNotificationToggleButtonRenderer:"ytd-subscription-notification-toggle-button-renderer"}},
"data.editChannelButtons":{id:"edit-buttons",mapping:{buttonRenderer:"ytd-button-renderer"}},"data.otherButtons":{id:"other-buttons",mapping:{buttonRenderer:"ytd-button-renderer"}},"data.bannerEditor":{id:"banner-editor",mapping:{channelBannerEditorRenderer:"ytd-channel-banner-editor-renderer"}}},handleButtonRefreshAction_:function(a){a.buttonRefreshAction&&this.set("data.sponsorButton",a.buttonRefreshAction.membershipButton)},
handleInsertTabCommand_:function(a){if(a.insertChannelTabCommand){var b=a.insertChannelTabCommand;b.externalChannelId==this.data.channelId&&(b.tabIdentifier&&this.tabs.some(function(c){return c.tabRenderer&&c.tabRenderer.tabIdentifier==b.tabIdentifier})||this.splice("tabs",b.tabIndex||-1,0,b.tab))}},
handleRefreshChannelTabAction_:function(a){this.selected&&this.tabs[this.selected].tabRenderer.tabIdentifier==a&&this.fire("yt-navigate",{endpoint:this.activeEndpoint})},
attached:function(){this.data&&this.dataChanged_(this.data)},
dataChanged_:function(){var a=this.hasChannelArt;this.hasChannelArt=!1;if(this.data&&this.data.banner){var b=LY(this.data.banner.thumbnails,this.clientWidth);b&&(0==b.indexOf("//")&&(b="https:"+b),this.hasChannelArt=!0,this.updateStyles({"--yt-channel-banner":"url("+b+")"}))}this.hasChannelArt!=a&&this.$.header.fire("iron-resize")},
onBannerUpdated_:function(a,b){a=1<window.devicePixelRatio?b.hq_url:b.url;0==a.indexOf("//")&&(a="https:"+a);this.hasChannelArt=!0;this.updateStyles({"--yt-channel-banner":"url("+a+")"})},
observeLightsourcePalette_:function(a){a&&HY(this,a)},
onSearchNavigate_:function(){this.$.tabs.selected=null},
handleUnsubscribeAction_:function(){this.data&&this.data.sponsorButton&&"STYLE_PRIMARY"==this.data.sponsorButton.buttonRenderer.style&&this.$$("#sponsor-button ytd-button-renderer").set("data.style","STYLE_SUGGESTIVE")}});var z4=function(){return F.apply(this,arguments)||this};
l(z4,F);z4.prototype.configureRendererStamper=function(){return{"data.buttons":{id:"buttons",mapping:{buttonRenderer:"ytd-button-renderer",subscribeButtonRenderer:"ytd-subscribe-button-renderer",subscriptionNotificationToggleButtonRenderer:"ytd-subscription-notification-toggle-button-renderer"}}}};
z4.prototype.dataChanged=function(){if(this.data){var a=this.hasBannerArt;this.hasBannerArt=!1;if(this.data&&this.data.banner){var b=LY(this.data.banner.thumbnails,this.clientWidth);b&&(0===b.indexOf("//")&&(b="https:"+b),this.hasBannerArt=!0,this.updateStyles({"--ytd-interactive-tabbed-header-renderer-banner-url":"url("+b+")"}))}this.hasBannerArt!==a&&this.$.header.fire("iron-resize")}};
var A4=z4;A4.prototype.dataChanged=A4.prototype.dataChanged;v([H(zFa),w("design:type",Object)],A4.prototype,"ytdTabbedHeaderBehavior",void 0);v([H(X),w("design:type",Object)],A4.prototype,"ytRendererstamperBehavior",void 0);v([H(jY.YtdGridStateAwareBehavior),w("design:type",Object)],A4.prototype,"ytdGridStateAwareBehavior",void 0);v([H(lY.YtdGuideStateAwareBehavior),w("design:type",Object)],A4.prototype,"ytdGuideStateAwareBehavior",void 0);
v([H(J0.YtComponentBehavior),w("design:type",Object)],A4.prototype,"componentBehavior",void 0);v([I(),w("design:type",Object)],A4.prototype,"data",void 0);v([I(),w("design:type",Number)],A4.prototype,"selected",void 0);v([I(),w("design:type",Boolean)],A4.prototype,"active",void 0);v([I({reflectToAttribute:!0}),w("design:type",Boolean)],A4.prototype,"hasBannerArt",void 0);v([rl("data"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],A4.prototype,"dataChanged",null);
A4=v([W({is:"ytd-interactive-tabbed-header-renderer"})],A4);var B4=function(){return F.apply(this,arguments)||this};
l(B4,F);
B4.prototype.configureRendererStamper=function(){return{"data.items":{id:"items",mapping:{playlistSidebarPrimaryInfoRenderer:{component:"ytd-playlist-sidebar-primary-info-renderer",noInjection:!0},playlistSidebarSecondaryInfoRenderer:{component:"ytd-playlist-sidebar-secondary-info-renderer",noInjection:!0},playlistSidebarTertiaryInfoRenderer:{component:"ytd-playlist-sidebar-tertiary-info-renderer",noInjection:!0},channelLegalInfoRenderer:{component:"ytd-channel-legal-info-renderer",params:{isCompact:!0},noInjection:!0}}}}};
var C4=B4;v([H(V.YtRendererBehavior),w("design:type",Object)],C4.prototype,"ytRendererBehavior",void 0);v([H(X),w("design:type",Object)],C4.prototype,"ytRendererstamperBehavior",void 0);v([I(),w("design:type",Object)],C4.prototype,"data",void 0);v([I({reflectToAttribute:!0,value:A("kevlar_background_color_update")}),w("design:type",Boolean)],C4.prototype,"backgroundColorUpdate",void 0);C4=v([W({is:"ytd-playlist-sidebar-renderer"})],C4);var D4=function(){var a=F.apply(this,arguments)||this;a.hideCharCounter=!1;a.hideLabel=!1;a.noLabelFloat=!1;return a};
l(D4,F);f=D4.prototype;f.reset=function(a){this.value=a&&this.data?this.data.value=a:"";this.input.invalid=!1;this.input.autoValidate=!1};
f.save=function(){this.data&&this.ytRendererBehavior.sendServiceRequestAction([this.data.onChange])};
f.focusTextInput=function(){this.input.focus()};
f.validate=function(){if(!this.input)return!1;this.input.autoValidate=!0;return this.input.validate()};
f.valueChanged=function(a){this.value=a||""};
f.computeLabel=function(a,b){return b?"":XU(a)};
f.computeAriaLabel=function(a,b){return b?XU(a):""};
f.computeErrorMessage=function(a,b,c,d,e){return!a&&b?c||this.strings.REQUIRED_LABEL:d&&!new RegExp("^"+d+"$").test(a)?pd(XU(e)):null};
f.onTextValueChanged=function(){this.validate()&&this.data&&this.data.key&&this.data.onChange&&this.set(this.data.key,this.input.value,this.data.onChange)};
var E4=D4;E4.prototype.valueChanged=E4.prototype.valueChanged;v([H(V.YtRendererBehavior),w("design:type",Object)],E4.prototype,"ytRendererBehavior",void 0);v([H(MY.YtPolymer2AwareBehavior),w("design:type",Object)],E4.prototype,"ytPolymer2AwareBehavior",void 0);v([I(),w("design:type",Object)],E4.prototype,"data",void 0);v([I({notify:!0}),w("design:type",String)],E4.prototype,"value",void 0);v([I(),w("design:type",String)],E4.prototype,"pattern",void 0);
v([I(),w("design:type",String)],E4.prototype,"errorMessage",void 0);v([I({reflectToAttribute:!0}),w("design:type",String)],E4.prototype,"componentStyle",void 0);v([I(),w("design:type",Object)],E4.prototype,"hideCharCounter",void 0);v([I(),w("design:type",Object)],E4.prototype,"hideLabel",void 0);v([I(),w("design:type",Object)],E4.prototype,"noLabelFloat",void 0);v([I({value:{REQUIRED_LABEL:yU("REQUIRED_LABEL",void 0,"Required")}}),w("design:type",Object)],E4.prototype,"strings",void 0);
v([tl("#input"),w("design:type",Object)],E4.prototype,"input",void 0);v([rl("data.value"),w("design:type",Function),w("design:paramtypes",[String]),w("design:returntype",void 0)],E4.prototype,"valueChanged",null);E4=v([W({is:"ytd-text-input-form-field-renderer"})],E4);Polymer({is:"ytd-inline-form-renderer",behaviors:[G_.YtEventForwardingBehavior,X,U.YtActionHandlerBehavior,MY.YtPolymer2AwareBehavior,V.YtRendererBehavior],properties:{data:Object,isEditing:{type:Boolean,value:!1},style:{type:String,reflectToAttribute:!0,computed:"computeStyle_(data)"}},computeStyle_:function(a){return a.style?a.style:"INLINE_FORM_STYLE_UNKNOWN"},
computeTextDisplayed:function(a,b){if(a)return a;if(b)return b},
onEdit_:function(){this.isEditing=!0;this.$["text-form"].focusTextInput()},
onSave_:function(){if(this.$["text-form"].validate()){this.$["text-form"].save();var a=this.$["text-form"].value;a?this.set("data.textDisplayed",UU(a)):this.data.placeholder&&this.set("data.textDisplayed",this.data.placeholder);this.isEditing=!1}},
onCancel_:function(){var a=XU(this.data.textDisplayed);a==this.data.placeholder?this.$["text-form"].reset(""):this.$["text-form"].reset(a);this.isEditing=!1}});Polymer({is:"ytd-dropdown-form-field-renderer",behaviors:[G_.YtEventForwardingBehavior,X,U.YtActionHandlerBehavior,MY.YtPolymer2AwareBehavior,V.YtRendererBehavior],properties:{data:Object,selectedValue:{type:Number,reflectToAttribute:!0,observer:"selectedValueChanged_"}},created:function(){this.previousSelectValue_=void 0},
attached:function(){this.previousSelectValue_=void 0},
selectedValueChanged_:function(a){-1!==a&&(void 0===this.previousSelectValue_?this.previousSelectValue_=a:this.previousSelectValue_!==a&&this.data.key&&this.data.onChange&&(this.set(this.data.key,a,this.data.onChange),this.sendServiceRequestAction([this.data.onChange])))}});Polymer({is:"ytd-playlist-sidebar-primary-info-renderer",behaviors:[X,U.YtActionHandlerBehavior,V.YtRendererBehavior,J0.YtComponentBehavior],properties:{data:Object,isCustomThumbnail:{type:Boolean,reflectToAttribute:!0,computed:"computeIsCustomThumbnail_(data.thumbnailRenderer)"}},stampDom:{"data.menu":{id:"menu",mapping:{menuRenderer:{component:"ytd-menu-renderer",params:{icon:"yt-icons:more"}}}},"data.playButtons":{id:"play-buttons",mapping:{buttonRenderer:{component:"ytd-button-renderer"},toggleButtonRenderer:{component:"ytd-toggle-button-renderer"}}}},
listeners:{"yt-navigate":"onYtNavigate_"},actionMap:{"yt-update-playlist-action":"onUpdatePlaylistAction_"},computeIsCustomThumbnail_:function(a){return a?!!a.playlistCustomThumbnailRenderer:!1},
onYtNavigate_:function(a,b){if(b&&-1<b.actions.indexOf("shuffle")){a=this.getInterface(SW);var c=b.tempData||{};c.watch_params=this.get("menu.menuRenderer.topLevelButtons[1].buttonRenderer.navigationEndpoint.watchEndpoint.params",this.data);b.tempData=c;a.isShuffleNextPlaylist=!0}},
onUpdatePlaylistAction_:function(a){if(a=a.updatePlaylistAction&&a.updatePlaylistAction.updatedRenderer&&a.updatePlaylistAction.updatedRenderer.playlistSidebarPrimaryInfoRenderer)this.data=a}});var F4=function(){return F.apply(this,arguments)||this};
l(F4,F);F4.prototype.computeOwnerVisibility=function(a){return!(!a.videoOwner&&!a.button)};
F4.prototype.configureRendererStamper=function(){return{"data.videoOwner":{id:"video-owner",mapping:{videoOwnerRenderer:"ytd-video-owner-renderer"}},"data.button":{id:"button",mapping:{buttonRenderer:"ytd-button-renderer",subscribeButtonRenderer:"ytd-subscribe-button-renderer",subscriptionNotificationToggleButtonRenderer:"ytd-subscription-notification-toggle-button-renderer"}}}};
var G4=F4;v([H(V.YtRendererBehavior),w("design:type",Object)],G4.prototype,"ytRendererBehavior",void 0);v([H(X),w("design:type",Object)],G4.prototype,"ytRendererstamperBehavior",void 0);v([I(),w("design:type",Object)],G4.prototype,"data",void 0);G4=v([W({is:"ytd-playlist-sidebar-secondary-info-renderer"})],G4);var H4=function(){return F.apply(this,arguments)||this};
l(H4,F);H4.prototype.configureRendererStamper=function(){return{"data.items":{id:"items",mapping:{gridShowRenderer:"ytd-grid-show-renderer"}}}};
var I4=H4;v([H(V.YtRendererBehavior),w("design:type",Object)],I4.prototype,"ytRendererBehavior",void 0);v([H(X),w("design:type",Object)],I4.prototype,"ytRendererstamperBehavior",void 0);v([I(),w("design:type",Object)],I4.prototype,"data",void 0);I4=v([W({is:"ytd-playlist-sidebar-tertiary-info-renderer"})],I4);Polymer({is:"ytd-channel-legal-info-renderer",behaviors:[XEa,V.YtRendererBehavior],properties:{data:{type:Object,observer:"dataChanged_"},expanded:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"expandedChanged_"},isCompact:{type:Boolean,value:!1,reflectToAttribute:!0},autoScrollEnabled:{type:Boolean,computed:"computeAutoScrollEnabled_(data.autoscroll, expanded)"}},attached:function(){this.scrollTarget=this.$.text},
dataChanged_:function(a){a&&(Polymer.dom(this.$.text.root).innerHTML=XU(a.text||null))},
computeAutoScrollEnabled_:function(a,b){return a&&!b},
expandedChanged_:function(){this.$["expander-icon"].icon="yt-icons:expand-"+(this.expanded?"less":"more")},
toggleOnTap_:function(){this.expanded=!this.expanded}});var J4=function(){return F.apply(this,arguments)||this};
l(J4,F);J4.prototype.configureRendererStamper=function(){return{"data.carousel":{id:"carousel",mapping:{carouselItemRenderer:{component:"ytd-carousel-item-renderer",attributes:{"has-animation":!0}}}},"data.channelDetails":{id:"channel-details",mapping:{topicChannelDetailsRenderer:"ytd-topic-channel-details-renderer"}}}};
J4.prototype.created=function(){this.ytdGridStateAwareBehavior.gridStateAwareSizingElementSelector="ytd-topic-channel-details-renderer"};
J4.prototype.activeChanged=function(a){var b=this.$.carousel;b&&b.firstChild&&(b.firstChild.active=a)};
var K4=J4;v([H(V.YtRendererBehavior),w("design:type",Object)],K4.prototype,"ytRendererBehavior",void 0);v([H(X),w("design:type",Object)],K4.prototype,"ytRendererstamperBehavior",void 0);v([H(jY.YtdGridStateAwareBehavior),w("design:type",cFa)],K4.prototype,"ytdGridStateAwareBehavior",void 0);v([H(lY.YtdGuideStateAwareBehavior),w("design:type",Object)],K4.prototype,"ytdGuideStateAwareBehavior",void 0);v([I(),w("design:type",Object)],K4.prototype,"data",void 0);
v([I({observer:"activeChanged"}),w("design:type",Boolean)],K4.prototype,"active",void 0);K4=v([W({is:"ytd-fashion-destination-header-renderer"})],K4);var L4=function(){return F.apply(this,arguments)||this};
l(L4,F);L4.prototype.configureRendererStamper=function(){return{"data.subscribeButton":{id:"subscribe-button",mapping:{buttonRenderer:"ytd-button-renderer",subscribeButtonRenderer:"ytd-subscribe-button-renderer"}}}};
var M4=L4;v([H(X),w("design:type",Object)],M4.prototype,"ytRendererstamperBehavior",void 0);v([H(V.YtRendererBehavior),w("design:type",Object)],M4.prototype,"ytRendererBehavior",void 0);v([I(),w("design:type",Object)],M4.prototype,"data",void 0);M4=v([W({is:"ytd-topic-channel-details-renderer"})],M4);var N4=function(){return F.apply(this,arguments)||this};
l(N4,F);N4.prototype.configureRendererStamper=function(){return{"data.carousel":{id:"carousel",mapping:{carouselItemRenderer:{component:"ytd-carousel-item-renderer",attributes:{"has-animation":!0}}}},"data.channelDetails":{id:"channel-details",mapping:{topicChannelDetailsRenderer:"ytd-topic-channel-details-renderer"}}}};
N4.prototype.created=function(){this.ytdGridStateAwareBehavior.gridStateAwareSizingElementSelector="ytd-topic-channel-details-renderer"};
N4.prototype.activeChanged=function(a){var b=this.$.carousel;b&&b.firstChild&&(b.firstChild.active=a)};
var O4=N4;v([H(V.YtRendererBehavior),w("design:type",Object)],O4.prototype,"ytRendererBehavior",void 0);v([H(X),w("design:type",Object)],O4.prototype,"ytRendererstamperBehavior",void 0);v([H(jY.YtdGridStateAwareBehavior),w("design:type",cFa)],O4.prototype,"ytdGridStateAwareBehavior",void 0);v([H(lY.YtdGuideStateAwareBehavior),w("design:type",Object)],O4.prototype,"ytdGuideStateAwareBehavior",void 0);v([I(),w("design:type",Object)],O4.prototype,"data",void 0);
v([I({observer:"activeChanged"}),w("design:type",Boolean)],O4.prototype,"active",void 0);O4=v([W({is:"ytd-gaming-destination-header-renderer"})],O4);Polymer({is:"ytd-banner-promo-renderer",behaviors:[V.YtRendererBehavior,lY.YtdGuideStateAwareBehavior],properties:{data:{type:Object,observer:"dataChanged_"}},observers:["observeBasicPalette_(data.colorData.basicColorPaletteData)","observeDataForCounterfactual_(data.isVisible)"],created:function(){this.canvas=null},
dataChanged_:function(a,b){b&&b.style&&this.classList.remove(this.getCssClass_(b.style.styleType));a&&a.style&&this.classList.add(this.getCssClass_(a.style.styleType));a&&a.title&&this.updateTextSizeClass_(a.title)},
getCssClass_:function(a){return a?a.toLowerCase().replace(/_/g,"-"):""},
computeUrlImg_:function(a){return a?LY(a.thumbnails,Number.MAX_VALUE):null},
computeBackgroundImgStyle_:function(a,b){return this.computeUseInlineImg_(a)?null:"background-image: url("+this.computeUrlImg_(b)+")"},
computeLogoHeight_:function(a){if("BANNER_PROMO_STYLE_TYPE_MASTHEAD_V2"==a)return 24},
computeUseInlineImg_:function(a){return"BANNER_PROMO_STYLE_TYPE_MASTHEAD_V2"==a},
sendImpressionEndpoints_:function(a){a.impressionEndpoints&&this.sendServiceRequestAction(a.impressionEndpoints)},
observeBasicPalette_:function(a){a?HY(this,a):HY(this,{})},
observeDataForCounterfactual_:function(a){A("kevlar_banner_cf_extra_logging")&&(a||this.sendImpressionEndpoints_(this.data))},
onDismissTap_:function(){this.classList.add("dismissed")},
updateTextSizeClass_:function(a){if(a){var b="";if(a.simpleText)b=a.simpleText;else if(a.runs)b=a.runs.reduce(function(g,h){return g+(h.text||"")},"");else
return;this.canvas||(this.canvas=document.createElement("canvas"));a=this.canvas.getContext("2d");a.font="42px YT Sans";b=b.split(" ");for(var c=1,d="",e=0;e<b.length;e++)if(d=d?d+(" "+b[e]):b[e],430<a.measureText(d).width&&(c+=1,d=b[e],2<c)){this.toggleClass("compact-title",!0);return}this.toggleClass("compact-title",!1)}}});var P4=function(){return F.apply(this,arguments)||this};
l(P4,F);P4.prototype.configureRendererStamper=function(){return{"data.items":{id:"items",mapping:{compactLinkRenderer:{component:"ytd-compact-link-renderer",noInjection:!0}}}}};
var Q4=P4;v([H(X),w("design:type",Object)],Q4.prototype,"ytRendererstamperBehavior",void 0);v([H(V.YtRendererBehavior),w("design:type",Object)],Q4.prototype,"ytRendererBehavior",void 0);v([I(),w("design:type",Object)],Q4.prototype,"data",void 0);Q4=v([W({is:"ytd-settings-sidebar-renderer"})],Q4);Polymer({is:"ytd-carousel-header-renderer",behaviors:[jY.YtdGridStateAwareBehavior,lY.YtdGuideStateAwareBehavior,V.YtRendererBehavior,X],properties:{data:Object,active:{type:Boolean,observer:"activeChanged_"}},stampDom:{"data.carousel":{id:"carousel",mapping:{carouselItemRenderer:{component:"ytd-carousel-item-renderer",attributes:{"has-animation":!0}}}},"data.channelDetails":{id:"channel-details",mapping:{topicChannelDetailsRenderer:"ytd-topic-channel-details-renderer"}}},created:function(){this.gridStateAwareSizingElementSelector=
"ytd-topic-channel-details-renderer"},
activeChanged_:function(a){var b=this.$.carousel;b&&b.firstChild&&(b.firstChild.active=a)}});var R4=function(){var a=F.apply(this,arguments)||this;a.scriptAnalyticsAdded=!1;return a};
l(R4,F);R4.prototype.dataChanged=function(){this.data&&this.data.analyticsId&&this.sendGoogleAnalyticsPageview(this.data.analyticsId)};
R4.prototype.sendGoogleAnalyticsPageview=function(a){this.scriptAnalyticsAdded||this.appendAnalyticsScript();window.ga=window.ga||function(c){for(var d=[],e=0;e<arguments.length;++e)d[e-0]=arguments[e];(window.ga.q=window.ga.q||[]).push(d)};
var b=window.ga;b("set","page",window.location.pathname);b.l=+new Date;b("set","forceSSL",!0);b("create",a,"'auto'");b("send","pageview")};
R4.prototype.appendAnalyticsScript=function(){this.scriptAnalyticsAdded=!0;var a=vh("SCRIPT");a.name="ga-analytics";var b=dc(Sb("https://www.google-analytics.com/analytics.js"));jd(a,b);a.async=!0;Polymer.dom(this.root).appendChild(a)};
var S4=R4;S4.prototype.dataChanged=S4.prototype.dataChanged;v([I(),w("design:type",Object)],S4.prototype,"data",void 0);v([rl("data"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],S4.prototype,"dataChanged",null);S4=v([W({is:"ytd-channel-metadata-renderer"})],S4);var T4=function(){return F.apply(this,arguments)||this};
l(T4,F);T4.prototype.configureRendererStamper=function(){return{"data.contents":{id:"contents",mapping:{buttonRenderer:{component:"ytd-button-renderer",noInjection:!0},searchBoxRenderer:{component:"ytd-search-box-renderer",noInjection:!0},subFeedSelectorRenderer:{component:"ytd-sub-feed-selector-renderer",noInjection:!0},toggleButtonRenderer:{component:"ytd-toggle-button-renderer",noInjection:!0}}}}};
var U4=T4;v([H(V.YtRendererBehavior),w("design:type",Object)],U4.prototype,"ytRendererBehavior",void 0);v([H(X),w("design:type",Object)],U4.prototype,"ytRendererstamperBehavior",void 0);v([I(),w("design:type",Object)],U4.prototype,"data",void 0);U4=v([W({is:"ytd-browse-feed-actions-renderer"})],U4);var dHa=function(){return F.apply(this,arguments)||this};
l(dHa,F);var V4=dHa;v([H(V.YtRendererBehavior),w("design:type",Object)],V4.prototype,"ytRendererBehavior",void 0);v([I(),w("design:type",Object)],V4.prototype,"data",void 0);V4=v([W({is:"ytd-sub-feed-option-renderer"})],V4);var W4=function(){return F.apply(this,arguments)||this};
l(W4,F);W4.prototype.configureRendererStamper=function(){return{"data.options":{id:"options",mapping:{subFeedOptionRenderer:{component:"ytd-sub-feed-option-renderer",noInjection:!0}}}}};
var X4=W4;v([H(V.YtRendererBehavior),w("design:type",Object)],X4.prototype,"ytRendererBehavior",void 0);v([H(X),w("design:type",Object)],X4.prototype,"ytRendererStamperBehavior",void 0);v([I(),w("design:type",Object)],X4.prototype,"data",void 0);X4=v([W({is:"ytd-sub-feed-selector-renderer"})],X4);var Y4=function(){var a=F.apply(this,arguments)||this;a.boundSubmit=a.submit.bind(a);return a};
l(Y4,F);f=Y4.prototype;f.configureRendererStamper=function(){return{"data.searchButton":{id:"search-button",mapping:{buttonRenderer:{component:"ytd-button-renderer",properties:{"on-tap":"[[boundSubmit]]"}}}},"data.clearButton":{id:"clear-button",mapping:{buttonRenderer:{component:"ytd-button-renderer"}}}}};
f.ready=function(){this.form.addEventListener("submit",this.onSubmit.bind(this))};
f.onSubmit=function(a){a.preventDefault();return!1};
f.toggleClearButton=function(){this.hideClearButton=!this.input.value};
f.submitOnEnterKeyUp=function(a){13===a.keyCode&&this.submit()};
f.submit=function(){var a=this.data.endpoint,b=u.unsafeClone(a);b.commandMetadata&&b.commandMetadata.webCommandMetadata&&b.commandMetadata.webCommandMetadata.url?(b.commandMetadata.webCommandMetadata.url=Gi(b.commandMetadata.webCommandMetadata.url,"query",this.input.value),this.fire("yt-navigate",{endpoint:b})):b.webNavigationEndpointData&&b.webNavigationEndpointData.url?(b.webNavigationEndpointData.url=Gi(b.webNavigationEndpointData.url,"query",this.input.value),this.fire("yt-navigate",{endpoint:b})):
we(Error("Error: Trying to navigate to an endpoint without url: "+JSON.stringify(a)))};
f.getUrl=function(a){return this.get("commandMetadata.webCommandMetadata.url",a)||this.get("webNavigationEndpointData.url",a)};
var Z4=Y4;Z4.prototype.toggleClearButton=Z4.prototype.toggleClearButton;v([H(V.YtRendererBehavior),w("design:type",Object)],Z4.prototype,"ytRendererBehavior",void 0);v([H(X),w("design:type",Object)],Z4.prototype,"ytRendererstamperBehavior",void 0);v([H(MY.YtPolymer2AwareBehavior),w("design:type",Object)],Z4.prototype,"ytPolymer2AwareBehavior",void 0);v([I(),w("design:type",Object)],Z4.prototype,"data",void 0);v([I({reflectToAttribute:!0}),w("design:type",Boolean)],Z4.prototype,"hideClearButton",void 0);
v([I(),w("design:type",Object)],Z4.prototype,"boundSubmit",void 0);v([tl("#form"),w("design:type",HTMLFormElement)],Z4.prototype,"form",void 0);v([tl("#input"),w("design:type",Object)],Z4.prototype,"input",void 0);v([rl("data"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],Z4.prototype,"toggleClearButton",null);Z4=v([W({is:"ytd-search-box-renderer"})],Z4);var $4=function(){return F.apply(this,arguments)||this};
l($4,F);$4.prototype.configureRendererStamper=function(){return{"data.contents":{id:"contents",mapping:{verticalChannelSectionRenderer:{component:"ytd-vertical-channel-section-renderer",noInjection:!0}}}}};
var a5=$4;v([H(V.YtRendererBehavior),w("design:type",Object)],a5.prototype,"ytRendererBehavior",void 0);v([H(X),w("design:type",Object)],a5.prototype,"ytRendererstamperBehavior",void 0);v([I(),w("design:type",Object)],a5.prototype,"data",void 0);a5=v([W({is:"ytd-browse-secondary-contents-renderer"})],a5);var b5=function(){return F.apply(this,arguments)||this};
l(b5,F);b5.prototype.configureRendererStamper=function(){return{"data.subscribeButton":{id:"subscribe",mapping:{subscribeButtonRenderer:"ytd-subscribe-button-renderer",buttonRenderer:"ytd-button-renderer"}}}};
var c5=b5;v([H(V.YtRendererBehavior),w("design:type",Object)],c5.prototype,"ytRendererBehavior",void 0);v([H(X),w("design:type",Object)],c5.prototype,"ytRendererstamperBehavior",void 0);v([I(),w("design:type",Object)],c5.prototype,"data",void 0);c5=v([W({is:"ytd-mini-channel-renderer"})],c5);var d5=function(){return F.apply(this,arguments)||this};
l(d5,F);d5.prototype.configureRendererStamper=function(){return{"data.items":{id:"items",mapping:{miniChannelRenderer:"ytd-mini-channel-renderer"}}}};
var e5=d5;v([H(V.YtRendererBehavior),w("design:type",Object)],e5.prototype,"ytRendererBehavior",void 0);v([H(X),w("design:type",Object)],e5.prototype,"ytRendererstamperBehavior",void 0);v([I(),w("design:type",Object)],e5.prototype,"data",void 0);e5=v([W({is:"ytd-vertical-channel-section-renderer"})],e5);var f5=function(){return F.apply(this,arguments)||this};
l(f5,F);f5.prototype.getNextContinuation=function(){return{continuationType:"sectionListContinuation"}};
f5.prototype.configureRendererStamper=function(){return{reorderedContents:{id:"contents",mapping:{richItemRenderer:"ytd-rich-item-renderer",richSectionRenderer:"ytd-rich-section-renderer",itemSectionRenderer:{matcher:function(a){return a&&a.contents&&a.contents.length&&a.contents[0].shelfRenderer&&a.contents[0].shelfRenderer.content&&a.contents[0].shelfRenderer.content.expandedShelfContentsRenderer?"ytd-rich-item-renderer":"ytd-rich-section-renderer"}}}},
"data.continuations":{id:"continuations",mapping:{nextContinuationData:{component:"yt-next-continuation",noInjection:!0}}}}};
var g5=f5;v([H(X),w("design:type",Object)],g5.prototype,"ytRendererstamperBehavior",void 0);v([H(V.YtRendererBehavior),w("design:type",Object)],g5.prototype,"ytRendererBehavior",void 0);v([H(Polymer.IronResizableBehavior),w("design:type",Object)],g5.prototype,"ironResizableBehavior",void 0);v([H(r0),w("design:type",Object)],g5.prototype,"ytNextContinuationBehavior",void 0);v([H(),w("design:type",yFa)],g5.prototype,"ytdRichGridBehavior",void 0);v([I(),w("design:type",Object)],g5.prototype,"data",void 0);
g5=v([W({is:"ytd-rich-grid-renderer"})],g5);var h5=function(){return F.apply(this,arguments)||this};
l(h5,F);f=h5.prototype;
f.configureRendererStamper=function(){return{"data.menu":{id:"menu",mapping:{menuRenderer:{component:"ytd-menu-renderer",params:{noInkOnDropdownButton:!0}}},initialRenderPriority:A("defer_menus")?0:void 0,waitForSignal:"eocs"},"data.buttons":{id:"buttons",mapping:{toggleButtonRenderer:"ytd-toggle-button-renderer"}},dismissedRenderer:{id:"dismissed-content",mapping:{notificationMultiActionRenderer:{component:"ytd-notification-multi-action-renderer",registration:["defer-on-home"]},notificationTextRenderer:{component:"ytd-notification-text-renderer",
registration:["defer-on-home"]}}}}};
f.getMetadata=function(a){var b=[];a.shortViewCountText&&b.push(this.ytRendererBehavior.getSimpleString(a.shortViewCountText));a.publishedTimeText&&b.push(this.ytRendererBehavior.getSimpleString(a.publishedTimeText));if(a.upcomingEventData&&a.upcomingEventData.upcomingEventText){var c=this.ytRendererBehavior.getSimpleString(a.upcomingEventData.upcomingEventText);b.push(sS(c,Number(a.upcomingEventData.startTime)))}return b};
f.onDetailsTap=function(a){var b=this.data&&this.data.navigationEndpoint;b&&!GZ(Polymer.dom(a).path,this,["A","BUTTON"])&&this.fire("yt-navigate",{endpoint:b})};
f.isPlaylistRenderer=function(a){return a&&!!a.playlistId};
f.isLongByline=function(a,b){return!(!a||!b||!a.longBylineText)};
var i5=h5;v([H(V.YtRendererBehavior),w("design:type",Object)],i5.prototype,"ytRendererBehavior",void 0);v([H(X),w("design:type",Object)],i5.prototype,"ytRendererstamperBehavior",void 0);v([H(eY),w("design:type",Object)],i5.prototype,"ytdDismissableItemBehavior",void 0);v([H(rY),w("design:type",Object)],i5.prototype,"ytdLockupBehavior",void 0);v([H(sY.YtdMouseDownPrefetchableBehavior),w("design:type",Object)],i5.prototype,"ytdMouseDownPrefetchableBehavior",void 0);
v([I(),w("design:type",Object)],i5.prototype,"data",void 0);v([I(),w("design:type",Boolean)],i5.prototype,"noEndpoints",void 0);v([I({reflectToAttribute:!0,value:function(){return A("rich_grid_item_two_line_metadata")}}),
w("design:type",Boolean)],i5.prototype,"multiline",void 0);v([I({computed:"isPlaylistRenderer(data)"}),w("design:type",Boolean)],i5.prototype,"isPlaylist",void 0);v([I({computed:"isLongByline(data, isPlaylist)"}),w("design:type",Boolean)],i5.prototype,"longByline",void 0);i5=v([W({is:"ytd-rich-grid-video-renderer"})],i5);var j5=function(){var a=F.apply(this,arguments)||this;a.actionMap={"ytd-change-rich-layout-style":"handleRichLayoutStyleChange"};return a};
l(j5,F);j5.prototype.configureRendererStamper=function(){return{"data.content":{id:"content",mapping:{compactPromotedItemRenderer:"ytd-compact-promoted-item-renderer",gridChannelRenderer:"ytd-grid-channel-renderer",gridPlaylistRenderer:"ytd-grid-playlist-renderer",gridMovieRenderer:"ytd-grid-movie-renderer",postRenderer:{component:"ytd-post-renderer",params:{isRichGrid_:!0}},richGridVideoRenderer:"ytd-rich-grid-video-renderer",videoRenderer:"ytd-rich-grid-video-renderer"}}}};
j5.prototype.attached=function(){this.actionHandlerBehavior.actionMap=this.actionMap;this.fire("yt-rich-grid-request-layout",this.layoutStyle)};
j5.prototype.onDataChanged=function(a){var b=this.get("data.contents.0.shelfRenderer.content.expandedShelfContentsRenderer.items.0");b&&(b.videoRenderer&&(b.videoRenderer.owner={title:this.get("shortBylineText.runs.0.text",b.videoRenderer),thumbnail:this.get("channelThumbnailSupportedRenderers.channelThumbnailWithLinkRenderer.thumbnail",b.videoRenderer),navigationEndpoint:this.get("shortBylineText.runs.0.navigationEndpoint",b.videoRenderer)}),a.content=b)};
j5.prototype.handleRichLayoutStyleChange=function(a){a&&a!==this.layoutStyle&&(this.layoutStyle=a)};
var k5=j5;k5.prototype.onDataChanged=k5.prototype.onDataChanged;v([H(X),w("design:type",Object)],k5.prototype,"ytRendererstamperBehavior",void 0);v([H(V.YtRendererBehavior),w("design:type",Object)],k5.prototype,"ytRendererBehavior",void 0);v([H(U.YtActionHandlerBehavior),w("design:type",Object)],k5.prototype,"actionHandlerBehavior",void 0);v([I(),w("design:type",Object)],k5.prototype,"data",void 0);v([I({reflectToAttribute:!0,value:"third"}),w("design:type",String)],k5.prototype,"layoutStyle",void 0);
v([rl("data"),w("design:type",Function),w("design:paramtypes",[Object]),w("design:returntype",void 0)],k5.prototype,"onDataChanged",null);k5=v([W({is:"ytd-rich-item-renderer"})],k5);var l5=function(){return F.apply(this,arguments)||this};
l(l5,F);l5.prototype.configureRendererStamper=function(){return{"data.content":{id:"content",mapping:{inlineSurveyRenderer:"ytd-inline-survey-renderer",primetimePromoRenderer:"ytd-primetime-promo-renderer",richShelfRenderer:"ytd-rich-shelf-renderer"}},"data.contents":{id:"contents",mapping:{inlineSurveyRenderer:"ytd-inline-survey-renderer",primetimePromoRenderer:"ytd-primetime-promo-renderer",shelfRenderer:"ytd-rich-shelf-renderer"}}}};
var m5=l5;v([H(X),w("design:type",Object)],m5.prototype,"ytRendererstamperBehavior",void 0);v([H(V.YtRendererBehavior),w("design:type",Object)],m5.prototype,"ytRendererBehavior",void 0);v([I(),w("design:type",Object)],m5.prototype,"data",void 0);m5=v([W({is:"ytd-rich-section-renderer"})],m5);var n5=function(){var a=F.apply(this,arguments)||this;a.lastVisibleIndex=0;a.actionMap={"ytd-change-rich-layout-style":"updateItemVisibility"};return a};
l(n5,F);f=n5.prototype;
f.configureRendererStamper=function(){return{"data.contents":{id:"contents",mapping:{richItemRenderer:"ytd-rich-item-renderer",expandedShelfContentsRenderer:"ytd-expanded-shelf-contents-renderer",horizontalMovieListRenderer:{component:"yt-horizontal-list-renderer",params:{thumbnailHeight:302}}}},"data.menu":{id:"menu",mapping:{menuRenderer:{component:"ytd-menu-renderer",attributes:{condensed:!0,icon:"yt-icons:more"}}}},dismissedRenderer:{id:"dismissed",mapping:{messageRenderer:{component:"ytd-message-renderer",registration:["defer-on-home"]},
notificationMultiActionRenderer:{component:"ytd-notification-multi-action-renderer",registration:["defer-on-home"]}}}}};
f.attached=function(){this.actionHandlerBehavior.actionMap=this.actionMap;this.updateItemVisibility()};
f.updateItemVisibility=function(){var a=this,b=Math.min(Math.floor(this.clientWidth/336),6),c=Polymer.dom(this.root).querySelectorAll("ytd-rich-item-renderer");c.forEach(function(d,e){d.hidden=a.isExpanded?!1:e>b-1});
c=c.length<=b;!this.isToggleHidden&&c&&this.isExpanded&&(this.isExpanded=!1,this.notifyPath("data.expandShelfButton.toggleButtonRenderer.isToggled"),this.set("data.expandShelfButton.toggleButtonRenderer.isToggled",!1));this.isToggleHidden=c};
f.onDataChange=function(){var a=this,b=this.get("contents.0.horizontalListRenderer",this.data)||this.get("content.horizontalListRenderer",this.data)||this.get("content.horizontalMovieListRenderer",this.data)||this.get("content.gridRenderer",this.data);b&&this.data&&(this.data.contents=b.items.map(function(c){if(!c.gridVideoRenderer&&!c.gridRadioRenderer)return{richItemRenderer:{content:[c]}};c={richGridVideoRenderer:c.gridVideoRenderer?c.gridVideoRenderer:c.gridRadioRenderer};c.richGridVideoRenderer.owner=
{title:a.get("shortBylineText.runs.0.text",c.richGridVideoRenderer),thumbnail:c.richGridVideoRenderer.channelThumbnail,navigationEndpoint:a.get("shortBylineText.runs.0.navigationEndpoint",c.richGridVideoRenderer)};return{richItemRenderer:{content:[c]}}}),Polymer.RenderStatus.afterNextRender(this,function(){a.updateItemVisibility()}));
this.set("data.expandShelfButton",{toggleButtonRenderer:{isToggled:!1,isDisabled:!1,defaultIcon:{iconType:"EXPAND"},toggledIcon:{iconType:"COLLAPSE"},toggledStyle:{styleType:"STYLE_DEFAULT_ACTIVE"},style:{styleType:"STYLE_GREY_TEXT"}}})};
f.onToggleShelfTap=function(){this.isExpanded=!this.isExpanded;this.updateItemVisibility()};
var o5=n5;o5.prototype.onDataChange=o5.prototype.onDataChange;v([H(X),w("design:type",Object)],o5.prototype,"ytRendererstamperBehavior",void 0);v([H(V.YtRendererBehavior),w("design:type",Object)],o5.prototype,"ytRendererBehavior",void 0);v([H(eY),w("design:type",Object)],o5.prototype,"ytdDismissableItemBehavior",void 0);v([H(U.YtActionHandlerBehavior),w("design:type",Object)],o5.prototype,"actionHandlerBehavior",void 0);v([I(),w("design:type",Object)],o5.prototype,"data",void 0);
v([I(),w("design:type",Object)],o5.prototype,"lastVisibleIndex",void 0);v([I({reflectToAttribute:!0,value:!1}),w("design:type",Boolean)],o5.prototype,"isExpanded",void 0);v([I({reflectToAttribute:!0,value:!1}),w("design:type",Boolean)],o5.prototype,"isToggleHidden",void 0);v([rl("data"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],o5.prototype,"onDataChange",null);o5=v([W({is:"ytd-rich-shelf-renderer"})],o5);var p5=function(){var a=F.apply(this,arguments)||this;a.actionMap={"yt-dark-mode-toggled-action":"handleDarkModeToggledAction"};return a};
l(p5,F);p5.prototype.attached=function(){this.isDarkTheme=document.documentElement.hasAttribute("dark");this.actionHandlerBehavior.actionMap=this.actionMap};
p5.prototype.handleDarkModeToggledAction=function(a){this.isDarkTheme=a};
p5.prototype.computeHeaderLogoThumbnail=function(a,b){if(a)return b?a.darkLogo:a.lightLogo};
var q5=p5;v([H(U.YtActionHandlerBehavior),w("design:type",Object)],q5.prototype,"actionHandlerBehavior",void 0);v([H(V.YtRendererBehavior),w("design:type",Object)],q5.prototype,"ytRendererBehavior",void 0);v([I(),w("design:type",Object)],q5.prototype,"data",void 0);v([I({computed:"computeHeaderLogoThumbnail(data,isDarkTheme)"}),w("design:type",Object)],q5.prototype,"themeLogo",void 0);v([I(),w("design:type",Boolean)],q5.prototype,"isDarkTheme",void 0);
q5=v([W({is:"ytd-primetime-promo-header-renderer"})],q5);OY("itemSectionRenderer","primetimePromoRenderer","ytd-primetime-promo-renderer");Polymer({is:"ytd-primetime-promo-renderer",behaviors:[Polymer.IronResizableBehavior,V.YtRendererBehavior,X,eY],properties:{data:{type:Object},isRichGrid:{type:Boolean,reflectToAttribute:!0,value:function(){return A("rich_grid")}}},
stampDom:{"data.contents":{id:"contents",mapping:{primetimePromoPanelRenderer:"ytd-primetime-promo-panel-renderer",horizontalListRenderer:{component:"yt-horizontal-list-renderer",params:{useFloorScrolling:!0}}}},"data.header":{id:"header",mapping:{primetimePromoHeaderRenderer:"ytd-primetime-promo-header-renderer"}},"data.actionButton":{id:"action-button",mapping:{buttonRenderer:"ytd-button-renderer"}},"data.dismissButton":{id:"dismiss-button",mapping:{buttonRenderer:"ytd-button-renderer"}}}});var r5=function(){return F.apply(this,arguments)||this};
l(r5,F);r5.prototype.configureRendererStamper=function(){return{"data.items":{id:"items",mapping:{profileColumnStatsRenderer:{component:"ytd-profile-column-stats-renderer",noInjection:!0},profileColumnUserInfoRenderer:{component:"ytd-profile-column-user-info-renderer",noInjection:!0}}}}};
var s5=r5;v([H(V.YtRendererBehavior),w("design:type",Object)],s5.prototype,"ytRendererBehavior",void 0);v([H(X),w("design:type",Object)],s5.prototype,"ytRendererstamperBehavior",void 0);v([I(),w("design:type",Object)],s5.prototype,"data",void 0);s5=v([W({is:"ytd-profile-column-renderer"})],s5);var eHa=function(){return F.apply(this,arguments)||this};
l(eHa,F);var t5=eHa;v([H(V.YtRendererBehavior),w("design:type",Object)],t5.prototype,"ytRendererBehavior",void 0);v([I(),w("design:type",Object)],t5.prototype,"data",void 0);t5=v([W({is:"ytd-profile-column-stats-entry-renderer"})],t5);var u5=function(){return F.apply(this,arguments)||this};
l(u5,F);u5.prototype.configureRendererStamper=function(){return{"data.items":{id:"items",mapping:{profileColumnStatsEntryRenderer:{component:"ytd-profile-column-stats-entry-renderer",noInjection:!0}}}}};
var v5=u5;v([H(X),w("design:type",Object)],v5.prototype,"ytRendererstamperBehavior",void 0);v([H(V.YtRendererBehavior),w("design:type",Object)],v5.prototype,"ytRendererBehavior",void 0);v([I(),w("design:type",Object)],v5.prototype,"data",void 0);v5=v([W({is:"ytd-profile-column-stats-renderer"})],v5);var fHa=function(){return F.apply(this,arguments)||this};
l(fHa,F);var w5=fHa;v([H(V.YtRendererBehavior),w("design:type",Object)],w5.prototype,"ytRendererBehavior",void 0);v([I(),w("design:type",Object)],w5.prototype,"data",void 0);w5=v([W({is:"ytd-profile-column-user-info-renderer"})],w5);var gHa=function(){return F.apply(this,arguments)||this};
l(gHa,F);var x5=gHa;v([H(V.YtRendererBehavior),w("design:type",Object)],x5.prototype,"kevlarBehaviors",void 0);v([I(),w("design:type",Object)],x5.prototype,"data",void 0);x5=v([W({is:"ytd-channel-age-gate-renderer"})],x5);var hHa=function(){return F.apply(this,arguments)||this};
l(hHa,F);var y5=hHa;v([H(V.YtRendererBehavior),w("design:type",Object)],y5.prototype,"ytRendererBehavior",void 0);v([I(),w("design:type",Object)],y5.prototype,"data",void 0);y5=v([W({is:"ytd-page-introduction-renderer"})],y5);var z5=function(){return F.apply(this,arguments)||this};
l(z5,F);z5.prototype.configureRendererStamper=function(){return{"data.reportHistorySectionRenderers":{id:"items",mapping:{videoReportRenderer:"ytd-video-report-renderer"}}}};
var A5=z5;v([H(V.YtRendererBehavior),w("design:type",Object)],A5.prototype,"ytRendererBehavior",void 0);v([H(X),w("design:type",Object)],A5.prototype,"ytRendererstamperBehavior",void 0);v([I(),w("design:type",Object)],A5.prototype,"data",void 0);A5=v([W({is:"ytd-report-history-section-renderer"})],A5);var iHa=function(){return F.apply(this,arguments)||this};
l(iHa,F);var B5=iHa;v([H(V.YtRendererBehavior),w("design:type",Object)],B5.prototype,"ytRendererBehavior",void 0);v([I(),w("design:type",Object)],B5.prototype,"data",void 0);B5=v([W({is:"ytd-report-description-renderer"})],B5);var C5=function(){return F.apply(this,arguments)||this};
l(C5,F);C5.prototype.configureRendererStamper=function(){return{"data.description":{id:"description",mapping:{reportDescriptionRenderer:"ytd-report-description-renderer"}}}};
var D5=C5;v([H(X),w("design:type",Object)],D5.prototype,"ytRendererstamperBehavior",void 0);v([H(V.YtRendererBehavior),w("design:type",Object)],D5.prototype,"ytRendererBehavior",void 0);v([I(),w("design:type",Object)],D5.prototype,"data",void 0);D5=v([W({is:"ytd-video-report-renderer"})],D5);var jHa=function(){return F.apply(this,arguments)||this};
l(jHa,F);var E5=jHa;v([H(V.YtRendererBehavior),w("design:type",Object)],E5.prototype,"ytRendererBehavior",void 0);v([I(),w("design:type",Object)],E5.prototype,"data",void 0);E5=v([W({is:"ytd-channel-list-sub-menu-avatar-renderer"})],E5);var F5=function(){return F.apply(this,arguments)||this};
l(F5,F);F5.prototype.configureRendererStamper=function(){return{"data.contents":{id:"contents",mapping:{channelListSubMenuAvatarRenderer:"ytd-channel-list-sub-menu-avatar-renderer"}}}};
var G5=F5;v([H(X),w("design:type",Object)],G5.prototype,"ytRendererstamperBehavior",void 0);v([I(),w("design:type",Object)],G5.prototype,"data",void 0);v([I({reflectToAttribute:!0}),w("design:type",String)],G5.prototype,"aligment",void 0);G5=v([W({is:"ytd-channel-list-sub-menu-renderer"})],G5);var H5=function(){return F.apply(this,arguments)||this};
l(H5,F);H5.prototype.configureRendererStamper=function(){return{"data.playAllButton":{id:"play-all",mapping:{buttonRenderer:"ytd-button-renderer"}},"data.sortSetting":{id:"sort-menu",mapping:{sortFilterSubMenuRenderer:{component:"yt-sort-filter-sub-menu-renderer",params:{isRightAligned:!0}}}}}};
var I5=H5;v([H(V.YtRendererBehavior),w("design:type",Object)],I5.prototype,"ytRendererBehavior",void 0);v([H(X),w("design:type",Object)],I5.prototype,"ytRendererstamperBehavior",void 0);v([I(),w("design:type",Object)],I5.prototype,"data",void 0);I5=v([W({is:"ytd-channel-sub-menu-renderer"})],I5);var J5=function(){return F.apply(this,arguments)||this};
l(J5,F);J5.prototype.configureRendererStamper=function(){return{"data.buttons":{id:"buttons",mapping:{menuRenderer:"ytd-menu-renderer"}},"data.viewChannelButton":{id:"view-channel-button",mapping:{buttonRenderer:{component:"ytd-button-renderer",params:{alignByText:!0}}}}}};
var K5=J5;v([H(V.YtRendererBehavior),w("design:type",Object)],K5.prototype,"ytRendererBehavior",void 0);v([H(X),w("design:type",Object)],K5.prototype,"ytRendererstamperBehavior",void 0);v([I(),w("design:type",Object)],K5.prototype,"data",void 0);K5=v([W({is:"ytd-feed-channel-filter-header-renderer"})],K5);var L5=function(){var a=F.apply(this,arguments)||this;a.actionMap={"yt-dark-mode-toggled-action":"onDarkModeToggledAction"};return a};
l(L5,F);L5.prototype.attached=function(){this.ytActionHandlerBehavior.actionMap=this.actionMap;this.isDarkTheme=document.documentElement.hasAttribute("dark")};
L5.prototype.computeBannerImageUrl=function(a,b){if(void 0!==a){var c=a.thumbnail.thumbnails;b&&(c=a.thumbnailDark.thumbnails);this.bannerImageUrl=(a=LY(c,24,void 0,"height"))?a:void 0}};
L5.prototype.onDarkModeToggledAction=function(a){this.isDarkTheme=a};
L5.prototype.computeHasText=function(a){return!!a};
var M5=L5;M5.prototype.computeHasText=M5.prototype.computeHasText;M5.prototype.computeBannerImageUrl=M5.prototype.computeBannerImageUrl;v([H(U.YtActionHandlerBehavior),w("design:type",Object)],M5.prototype,"ytActionHandlerBehavior",void 0);v([H(U.YtActionHandlerBehavior),w("design:type",Object)],M5.prototype,"actionHandlerBehavior",void 0);v([H(V.YtRendererBehavior),w("design:type",Object)],M5.prototype,"ytRendererBehavior",void 0);v([I(),w("design:type",Object)],M5.prototype,"data",void 0);
v([I(),w("design:type",Boolean)],M5.prototype,"isDarkTheme",void 0);v([I(),w("design:type",String)],M5.prototype,"bannerImageUrl",void 0);v([I({reflectToAttribute:!0,computed:"computeHasText(data.text)"}),w("design:type",Boolean)],M5.prototype,"hasText",void 0);v([rl("data","isDarkTheme"),w("design:type",Function),w("design:paramtypes",[Object,Boolean]),w("design:returntype",void 0)],M5.prototype,"computeBannerImageUrl",null);
v([rl("data.text"),w("design:type",Function),w("design:paramtypes",[Object]),w("design:returntype",void 0)],M5.prototype,"computeHasText",null);M5=v([W({is:"ytd-backstage-prefilled-post-dialog-header-renderer"})],M5);var kHa=function(){return F.apply(this,arguments)||this};
l(kHa,F);var N5=kHa;v([H(V.YtRendererBehavior),w("design:type",Object)],N5.prototype,"ytRendererBehavior",void 0);v([I(),w("design:type",Object)],N5.prototype,"data",void 0);N5=v([W({is:"ytd-backstage-zero-state-renderer"})],N5);Polymer({is:"ytd-comment-simplebox-renderer",behaviors:[X,V.YtRendererBehavior,U.YtActionHandlerBehavior],properties:{data:{type:Object,observer:"dataChanged_"},isOpen:{type:Boolean,value:!1},commentDialog_:{type:Object,value:null},enableCreationBox:{type:Boolean,reflectToAttribute:!0}},listeners:{"yt-commentbox-dismiss":"onYtCommentboxDismiss_"},actionMap:{"yt-create-comment-action":"onCreateCommentAction_"},stampDom:{"data.imageButton":{id:"image-button",mapping:{buttonRenderer:"ytd-button-renderer"}},
commentDialog_:{id:"comment-dialog",mapping:{commentDialogRenderer:{component:"ytd-comment-dialog-renderer",properties:{zeroStepFooterText:"[[data.zeroStep.zeroStepChannelCreationRenderer.footerText]]"}}}}},ready:function(){var a=this.$["placeholder-area"],b=this.onOpen_.bind(this);a.addEventListener("tap",b);a.addEventListener("keypress",b)},
attached:function(){this.enableCreationBox=A("kevlar_comments_creation_box")},
dataChanged_:function(a){this.commentDialog_=null;this.isOpen=!1;a.botguardVariables&&(re("COMMENTS_BG_P",a.botguardVariables.program),re("COMMENTS_BG_I",a.botguardVariables.interpreterScript),re("COMMENTS_BG_IU",a.botguardVariables.interpreterUrl))},
onOpen_:function(a){a.stopPropagation();"keypress"==a.type&&13!=a.keyCode&&32!=a.keyCode||!this.data||(this.data.prepareAccountEndpoint?this.fire("yt-navigate",{endpoint:this.data.prepareAccountEndpoint}):(this.commentDialog_||(this.commentDialog_={commentDialogRenderer:this.computeCommentDialog_(this.data)}),this.isOpen=!0,this.$["comment-dialog"].firstElementChild.focus()))},
onYtCommentboxDismiss_:function(a){a.stopPropagation();this.isOpen=!1},
onCreateCommentAction_:function(a){this.get("createCommentAction.contents",a)&&(this.isOpen=!1)},
computeCommentDialog_:function(a){return{placeholderText:a.placeholderText,authorThumbnail:a.authorThumbnail,submitButton:a.submitButton,imageButton:a.imageButton,cancelButton:a.cancelButton,emojiButton:a.emojiButton,emojis:a.emojis,emojiPicker:a.emojiPicker,unicodeEmojisUrl:a.unicodeEmojisUrl}}});Polymer({is:"ytd-comments-header-renderer",behaviors:[V.YtRendererBehavior,X],properties:{data:Object,isBackstage:{type:Boolean,computed:"computeIsBackstage_(data.isBackstageContent)",reflectToAttribute:!0},backstagePostDialog_:{type:Object,readOnly:!0,computed:"computeBackstagePostDialog_(data)"}},observers:["observePrefilledBackstagePostDialog_(data.actions)"],listeners:{"yt-commentbox-dismiss":"onYtCommentboxDismiss_","yt-rendererstamper-finished":"onStampFinished_"},stampDom:{"data.createRenderer":{id:"simple-box",
mapping:{commentSimpleboxRenderer:"ytd-comment-simplebox-renderer"}},backstagePostDialog_:{id:"backstage-post-dialog",mapping:{backstagePostDialogRenderer:{component:"ytd-backstage-post-dialog-renderer"}},events:!0},"data.sortMenu":{id:"sort-menu",mapping:{sortFilterSubMenuRenderer:"yt-sort-filter-sub-menu-renderer"}},"data.alerts":{id:"alert",mapping:{alertWithButtonRenderer:"ytd-alert-with-button-renderer"},renderPriority:0,waitForSignal:"eocs"},"data.zeroStateMessage":{id:"zero-state-message",
mapping:{backstageZeroStateRenderer:"ytd-backstage-zero-state-renderer"}},"data.prefilledCreateDialogHeaderMessage":{id:"prefilled-dialog-header",mapping:{backstagePrefilledPostDialogHeaderRenderer:"ytd-backstage-prefilled-post-dialog-header-renderer"}}},created:function(){this.hasFinishedStamping_=!1},
attached:function(){this.hasActionsChange_&&this.observePrefilledBackstagePostDialog_(this.data.actions)},
onStampFinished_:function(){this.hasFinishedStamping_=!0;this.hasActionsChange_&&this.observePrefilledBackstagePostDialog_(this.data.actions)},
observePrefilledBackstagePostDialog_:function(a){if(this.hasFinishedStamping_){if(this.hasActionsChange_=!1,this.getPrefilledBackstagePostDialog_(a)){this.$["prefilled-dialog-header"].hidden=!1;var b=this.$["backstage-post-dialog"].firstElementChild;b&&Polymer.RenderStatus.afterNextRender(this,function(){b.focus();b.openDialog&&b.openDialog()}.bind(this))}}else this.hasActionsChange_=!0},
computeIsBackstage_:function(a){return a},
onYtCommentboxDismiss_:function(){this.$["prefilled-dialog-header"].hidden=!0;this.removePrefilledDialog_(this.data)},
removePrefilledDialog_:function(a){if(a.actions){for(var b=a.actions.length-1;0<=b;b--){var c=a.actions[b];c.createBackstagePostDialogEndpoint&&c.createBackstagePostDialogEndpoint.dialog&&delete a.actions[b]}this.set("data",void 0);this.set("data",a)}},
getPrefilledBackstagePostDialog_:function(a){if(a)for(var b=0;b<a.length;b++){var c=a[b];if(c&&c.createBackstagePostDialogEndpoint&&c.createBackstagePostDialogEndpoint.dialog)return c.createBackstagePostDialogEndpoint.dialog}return null},
computeBackstagePostDialog_:function(a){return a&&(this.getPrefilledBackstagePostDialog_(a.actions)||a.createRenderer)}});var O5=function(){return F.apply(this,arguments)||this};
l(O5,F);O5.prototype.attached=function(){this.classList.add("use-ellipsis")};
O5.prototype.onYtNavigate=function(a,b){var c=this;b.endpoint===this.data.navigationEndpoint&&this.get("endpoint.watchEndpoint.continuePlayback",b)&&(a.stopPropagation(),sW(this).getPlayerPromise().then(function(d){if(0===d.getPlayerState()&&c.data.secondaryNavigationEndpoint)var e=c.data.secondaryNavigationEndpoint;else e=Object.assign({},b.endpoint),e.commandMetadata&&e.commandMetadata.webCommandMetadata&&(d={t:Math.floor(d.getCurrentTime())},e.commandMetadata.webCommandMetadata.url=Ai(e.commandMetadata.webCommandMetadata.url,
d));c.fire("yt-navigate",{endpoint:e})}))};
var P5=O5;P5.prototype.onYtNavigate=P5.prototype.onYtNavigate;v([H(V.YtRendererBehavior),w("design:type",Object)],P5.prototype,"ytRendererBehavior",void 0);v([H(GY.YtEndpointBehavior),w("design:type",Object)],P5.prototype,"ytEndpointBehavior",void 0);v([I(),w("design:type",Object)],P5.prototype,"data",void 0);v([ql("yt-navigate"),w("design:type",Function),w("design:paramtypes",[CustomEvent,Object]),w("design:returntype",void 0)],P5.prototype,"onYtNavigate",null);
P5=v([W({is:"ytd-compact-radio-renderer"})],P5);OY("itemSectionRenderer","counterfactualRenderer","ytd-counterfactual-renderer");var lHa=function(){return F.apply(this,arguments)||this};
l(lHa,F);var Q5=lHa;v([H(V.YtRendererBehavior),w("design:type",Object)],Q5.prototype,"ytRendererBehavior",void 0);v([I(),w("design:type",Object)],Q5.prototype,"data",void 0);Q5=v([W({is:"ytd-counterfactual-renderer"})],Q5);var mHa=function(){return F.apply(this,arguments)||this};
l(mHa,F);var R5=mHa;v([H(V.YtRendererBehavior),w("design:type",Object)],R5.prototype,"ytRendererBehavior",void 0);v([I(),w("design:type",Object)],R5.prototype,"data",void 0);R5=v([W({is:"ytd-item-section-header-renderer"})],R5);var S5=function(){return F.apply(this,arguments)||this};
l(S5,F);S5.prototype.configureRendererStamper=function(){return{"data.filterMenu":{id:"filter-menu",mapping:{sortFilterSubMenuRenderer:{component:"yt-sort-filter-sub-menu-renderer",params:{isRightAligned:!0}}}}}};
var T5=S5;v([H(X),w("design:type",Object)],T5.prototype,"ytRendererstamperBehavior",void 0);v([H(V.YtRendererBehavior),w("design:type",Object)],T5.prototype,"ytRendererBehavior",void 0);v([I(),w("design:type",Object)],T5.prototype,"data",void 0);T5=v([W({is:"ytd-sort-filter-header-renderer"})],T5);OY("sharingItemSection","itemSectionRenderer","ytd-item-section-renderer");
Polymer({is:"ytd-item-section-renderer",behaviors:[U.YtActionHandlerBehavior,V.YtRendererBehavior,X,FY,r0],listeners:{"yt-dismissable-item-dismissed":"onYtDismissableItemDismissedChange_","yt-dismissable-item-undismissed":"onYtDismissableItemDismissedChange_","yt-load-reload-continuation":"onLoadReloadContinuation_","yt-retrieve-location":"onRetrieveLocation_"},properties:{data:{type:Object,notify:!0,observer:"dataChanged_"},autoFill:{type:Boolean,value:!0},continuationDisablePrescanVisibility:Boolean,
isReloading_:Boolean,isSearch:{type:Boolean,value:!1},useHeightHack:{type:Boolean,reflectToAttribute:!0,computed:"computeUseHeightHack_(isSearch)"},showButton_:{type:Boolean,computed:"computeShowButton_(data.sectionIdentifier, firstCommentsLoaded_)"},firstCommentsLoaded_:Boolean,isSearchDova:{type:Boolean},itemDismissed:{type:Boolean,reflectToAttribute:!0,readOnly:!0}},itemsPath:"data.contents",actionMap:{"yt-item-section-continuation-action":"handleYtItemSectionContinuation_","yt-item-section-replace-action":"handleYtItemSectionReplace_"},
stampDom:{"data.header":{id:"header",mapping:{commentsHeaderRenderer:{component:"ytd-comments-header-renderer",registration:["defer-on-home"]},sortFilterHeaderRenderer:{component:"ytd-sort-filter-header-renderer",registration:["defer-on-home"]},itemSectionHeaderRenderer:{component:"ytd-item-section-header-renderer",registration:["defer-on-home"]}}},shownItems:{id:"contents",mapping:{backgroundPromoRenderer:{component:"ytd-background-promo-renderer",registration:["defer-on-home"]},backstagePostThreadRenderer:{component:"ytd-backstage-post-thread-renderer",
registration:["defer-on-home"]},buttonRenderer:"ytd-button-renderer",cardItemContainerRenderer:{component:"yt-card-item-container-renderer",registration:["defer-on-home"]},cardItemRenderer:{component:"yt-card-item-renderer",registration:["defer-on-home"]},carouselItemRenderer:"ytd-carousel-item-renderer",channelAboutFullMetadataRenderer:{component:"ytd-channel-about-metadata-renderer",registration:["defer-on-home"]},channelCustomGadgetRenderer:{component:"yt-channel-custom-gadget-renderer",registration:["defer-on-home"]},
channelFeaturedContentRenderer:{component:"ytd-channel-featured-content-renderer",registration:["defer-on-home"]},channelRenderer:{component:"ytd-channel-renderer",registration:["defer-on-home"]},channelVideoPlayerRenderer:{component:"ytd-channel-video-player-renderer",registration:["defer-on-home"]},clarificationRenderer:"ytd-clarification-renderer",commentHistoryBlockHeaderRenderer:{component:"ytd-comment-history-block-header-renderer",registration:["defer-on-home"]},commentHistoryEntryRenderer:{component:"ytd-comment-history-entry-renderer",
registration:["defer-on-home"]},commentThreadRenderer:{component:"ytd-comment-thread-renderer",registration:["defer-on-home"]},compactVideoRenderer:{component:"ytd-compact-video-renderer",registration:["defer-on-home"]},compactRadioRenderer:{component:"ytd-compact-radio-renderer",registration:["defer-on-home"]},connectedAppRenderer:{component:"ytd-connected-app-renderer",registration:["defer-on-home"]},counterfactualRenderer:"ytd-counterfactual-renderer",crisisHealthRenderer:{component:"ytd-crisis-health-renderer",
registration:["defer-on-home"]},didYouMeanRenderer:{component:"yt-did-you-mean-renderer",registration:["defer-on-home"]},emergencyOneboxRenderer:{component:"ytd-emergency-onebox-renderer",registration:["defer-on-home"]},exploratoryResultsRenderer:{component:"ytd-exploratory-results-renderer",registration:["defer-on-home"]},factCheckRenderer:{component:"ytd-fact-check-renderer",registration:["defer-on-home"]},faqSectionRenderer:{component:"yt-faq-section-renderer",registration:["defer-on-home"]},feedbackElicitationSingleQuestionRenderer:"ytd-feedback-elicitation-single-question-renderer",
feedEntryRenderer:{component:"ytd-feed-entry-renderer",registration:["defer-on-home"]},gridRenderer:"ytd-grid-renderer",horizontalCardListRenderer:"ytd-horizontal-card-list-renderer",includingResultsForRenderer:{component:"yt-including-results-for-renderer",registration:["defer-on-home"]},inlineSurveyRenderer:"ytd-inline-survey-renderer",labsEditRenderer:{component:"ytd-labs-edit-renderer",registration:["defer-on-all"]},labsHeaderRenderer:{component:"ytd-labs-header-renderer",registration:["defer-on-all"]},
labsItemRenderer:{component:"ytd-labs-item-renderer",registration:["defer-on-all"]},liveChatHistoryEntryRenderer:{component:"ytd-live-chat-history-entry-renderer",registration:["defer-on-all"]},messageRenderer:"ytd-message-renderer",movieRenderer:{component:"ytd-movie-renderer",registration:["defer-on-home"]},musicPassFeatureInfoRenderer:{component:"yt-music-pass-feature-info-renderer",registration:["defer-on-home"]},newspaperRenderer:"ytd-newspaper-renderer",noResultsFoundShowingResultsForRenderer:{component:"yt-no-results-found-showing-results-for-renderer",
registration:["defer-on-home"]},notificationRenderer:"ytd-notification-renderer",offerItemExpandedRenderer:{component:"yt-offer-item-expanded-renderer",registration:["defer-on-home"]},offerItemRenderer:{component:"yt-offer-item-renderer",registration:["defer-on-home"]},offerItemUpsellRenderer:{component:"yt-offer-item-upsell-renderer",registration:["defer-on-home"]},playlistRenderer:{component:"ytd-playlist-renderer",registration:["defer-on-home"]},pageIntroductionRenderer:{component:"ytd-settings-header-renderer",
registration:["defer-on-home"]},playlistSegmentRenderer:{component:"ytd-playlist-segment-renderer",registration:["defer-on-home"]},playlistShowMetadataRenderer:{component:"ytd-playlist-show-metadata-renderer",registration:["defer-on-home"]},playlistVideoListRenderer:{component:"ytd-playlist-video-list-renderer",registration:["defer-on-home"]},promotedSparklesTextSearchRenderer:{component:"ytd-promoted-sparkles-text-search-renderer",registration:["defer-on-home"]},purchaseItemRenderer:{component:"ytd-purchase-item-renderer",
registration:["defer-on-home"]},radioRenderer:{component:"ytd-radio-renderer",registration:["defer-on-home"]},redCancelSurveyRenderer:"ytd-red-cancel-survey-renderer",redCarpetShelfRenderer:"ytd-red-carpet-shelf-renderer",resultsWithoutQuotesRenderer:{component:"yt-results-without-quotes-renderer",registration:["defer-on-home"]},searchHistoryQueryRenderer:{component:"ytd-search-history-query-renderer",registration:["defer-on-home"]},searchNoResultsRenderer:{component:"yt-search-no-results-renderer",
registration:["defer-on-home"]},searchPyvRenderer:{component:"ytd-search-pyv-renderer",registration:["defer-on-home"]},settingsOptionsRenderer:{component:"ytd-settings-options-renderer",registration:["defer-on-home"]},shelfRenderer:"ytd-shelf-renderer",showingResultsForRenderer:{component:"yt-showing-results-for-renderer",registration:["defer-on-home"]},showRenderer:{component:"ytd-show-renderer",registration:["defer-on-home"]},simpleTextSectionRenderer:{component:"ytd-simple-text-section-renderer",
registration:["defer-on-home"]},subscriptionProductHeaderRenderer:{component:"yt-subscription-product-header-renderer",registration:["defer-on-home"]},subscriptionProductRenderer:{component:"yt-subscription-product-renderer",registration:["defer-on-home"]},subscriptionProductUpsellOfferRenderer:{component:"yt-subscription-product-upsell-offer-renderer",registration:["defer-on-home"]},toggleFormFieldRenderer:{component:"ytd-toggle-form-field-renderer",registration:["defer-on-home"]},unlimitedManageSubscriptionPageRenderer:{component:"yt-unlimited-manage-subscription-page-renderer",
registration:["defer-on-home"]},unlimitedPageFeatureInfoRenderer:{component:"ytd-unlimited-page-feature-info-renderer",registration:["defer-on-home"]},unlimitedPageHeaderRenderer:{component:"yt-unlimited-page-header-renderer",registration:["defer-on-home"]},unlimitedUserNotificationRenderer:{component:"yt-unlimited-user-notification-renderer",registration:["defer-on-home"]},videoRenderer:"ytd-video-renderer",webAnswerRenderer:{component:"ytd-web-answer-renderer",registration:["defer-on-home"]},ypcOffersListRenderer:"yt-ypc-offers-list-renderer",
redeemCodeRenderer:{component:"ytd-redeem-code-renderer",registration:["defer-on-home"]},primetimePromoRenderer:"ytd-primetime-promo-renderer"}},"data.continuations":{id:"continuations",mapping:{nextContinuationData:{component:"yt-next-continuation",properties:{showButton:"[[showButton_]]",disablePrescanVisibility:"[[continuationDisablePrescanVisibility]]"}},reloadContinuationData:{component:"yt-reload-continuation"}},renderPriority:A("kevlar_low_priority_continuation")?0:void 0,usePageScheduler:A("kevlar_low_priority_continuation")}},
created:function(){this.cachedViewportHeight_=z("initialInnerHeight",void 0)||window.innerHeight;Polymer.Element&&Oe&&A("polymer2_aggressive_batching")&&(this.initialCount=20,this.minChunkSize=12)},
get nonDeferredItemCount(){if(this.isSearchDova)return Math.ceil((this.cachedViewportHeight_-130)/150)},set nonDeferredItemCount(a){},nextContinuation:{continuationType:"itemSectionContinuation",usePost:!0},onRetrieveLocation_:function(a,b){this.containsComments_()&&(this.firstCommentsLoaded_=b.hasComments=!0)},
containsComments_:function(){return"comment-item-section"===this.get("data.sectionIdentifier")},
onLoadReloadContinuation_:function(a,b){a.stopPropagation();this.isReloading_=!0;a={locationRetrieved:function(c){var d=this.getInterface(BW);c=b(c);d.postData(c).then(this.onReloadContinuationData_.bind(this))}.bind(this)};
this.fire("yt-retrieve-location",a)},
onReloadContinuationData_:function(a){if(a=this.get("response.continuationContents.itemSectionContinuation",a)||this.get("response.contents.itemSectionRenderer",a)||this.get("response.continuationContents.sectionListContinuation.contents.0.itemSectionRenderer",a)||this.get("response.continuationContents.relatedChipsContinuation.continuation.watchNextSecondaryResultsRenderer",a))this.set("data.contents",a.contents||a.results),a.header&&this.set("data.header",a.header),this.set("data.continuations",
a.continuations||[]);this.isReloading_=!1},
computeContentsClass_:function(a){return a?"reloading":""},
computeShowButton_:function(){return this.firstCommentsLoaded_&&this.containsComments_()&&A("kevlar_disable_comments_auto_load")},
dataChanged_:function(){this.firstCommentsLoaded_=!1},
onYtDismissableItemDismissedChange_:function(a){this._setItemDismissed("yt-dismissable-item-dismissed"==a.type)},
triggerContinuations:function(){for(var a=this.$.continuations.children,b=0;b<a.length;b++)a[b].trigger()},
triggerInitialContinuations:function(){for(var a=this.$.continuations.children,b=0;b<a.length;b++)a[b].triggerIfNotPreviouslyTriggered()},
handleYtItemSectionContinuation_:function(a,b){b&&this.data.sectionIdentifier!=b||(this.set("data.continuations",[a]),this.triggerContinuations())},
handleYtItemSectionReplace_:function(a,b){b&&this.data.sectionIdentifier!=b||(this.set("data.contents",a),this.set("data.continuations",[]))},
computeUseHeightHack_:function(a){return a&&!A("kevlar_disable_height_hack")}});var U5=function(){return F.apply(this,arguments)||this};
l(U5,F);f=U5.prototype;f.concatLatLng=function(a,b){return a+","+b};
f.concatViewports=function(a){if(!a)return"";var b="";a.forEach(function(c){c.lat&&c.lng&&(b+=c.lat+","+c.lng+"|")});
return b.slice(0,-1)};
f.computeMapsUrl=function(a,b,c,d,e){if(!(a&&b&&c&&e&&d))return"";a={center:this.concatLatLng(a,b),visible:this.concatViewports(c),size:e+"x"+d,markers:"color:red|"+this.concatLatLng(a,b),key:"AIzaSyCs1my5Q2eCGoyfRDDCkd4yxplienmWEDc"};return"//maps.googleapis.com/maps/api/staticmap?"+km(a)};
f.computeMapsUrlNoWidth=function(a,b,c,d){return this.computeMapsUrl(a,b,c,d,screen.width)};
f.computeThumbnailDetailsWithNewURL=function(a){if(a){var b=this.$["background-img"].offsetWidth;a.thumbnails.forEach(function(c){var d=c.url,e=d.lastIndexOf("=");-1!==e&&(c.url=d.substring(0,e)+"=w"+b)});
return a}};
var V5=U5;v([H(V.YtRendererBehavior),w("design:type",Object)],V5.prototype,"ytRendererBehavior",void 0);v([I(),w("design:type",Object)],V5.prototype,"data",void 0);V5=v([W({is:"ytd-geo-search-details-renderer"})],V5);var nHa=function(){return F.apply(this,arguments)||this};
l(nHa,F);var W5=nHa;v([H(V.YtRendererBehavior),w("design:type",Object)],W5.prototype,"ytRendererBehavior",void 0);v([I(),w("design:type",Object)],W5.prototype,"data",void 0);W5=v([W({is:"ytd-search-filter-group-renderer"})],W5);var X5=function(){return F.apply(this,arguments)||this};
l(X5,F);X5.prototype.onDataChanged=function(a,b){b&&(b=this.getFilterClass(b.status))&&this.classList.remove(b);(a=this.getFilterClass(a.status))&&this.classList.add(a);"selected"===a?this.$.endpoint.setAttribute("aria-selected","true"):this.$.endpoint.removeAttribute("aria-selected");"disabled"===a?this.$.endpoint.setAttribute("aria-disabled","true"):this.$.endpoint.removeAttribute("aria-disabled")};
X5.prototype.getFilterClass=function(a){switch(a){case"FILTER_STATUS_SELECTED":return"selected";case"FILTER_STATUS_DISABLED":return"disabled";}};
var Y5=X5;v([H(V.YtRendererBehavior),w("design:type",Object)],Y5.prototype,"ytRendererBehavior",void 0);v([I({observer:"onDataChanged"}),w("design:type",Object)],Y5.prototype,"data",void 0);Y5=v([W({is:"ytd-search-filter-renderer"})],Y5);Polymer({is:"ytd-search-sub-menu-renderer",properties:{data:{type:Object,observer:"dataChanged_"},renderCollapsibleMenu_:Boolean,isCollapsed_:Boolean},behaviors:[V.YtRendererBehavior,X],stampDom:{"data.detailedSearchRenderer":{id:"detailsContainer",mapping:{geoSearchDetailsRenderer:{component:"ytd-geo-search-details-renderer"}}}},toggleFilters_:function(){this.renderCollapsibleMenu_||(this.renderCollapsibleMenu_=!0,Polymer.dom.flush());this.isCollapsed_=!this.isCollapsed_},
dataChanged_:function(){this.isCollapsed_=!0}});var Z5=function(){return F.apply(this,arguments)||this};
l(Z5,F);Z5.prototype.computeStyle=function(a){return a?a.toLowerCase().replace(/_/g,"-"):""};
var $5=Z5;v([H(V.YtRendererBehavior),w("design:type",Object)],$5.prototype,"ytRendererBehavior",void 0);v([I(),w("design:type",Object)],$5.prototype,"data",void 0);v([I({reflectToAttribute:!0,computed:"computeStyle(data.style)"}),w("design:type",String)],$5.prototype,"headerStyle",void 0);$5=v([W({is:"ytd-text-header-renderer"})],$5);var a6=function(){return F.apply(this,arguments)||this};
l(a6,F);a6.prototype.configureRendererStamper=function(){return{"data.actionButton":{id:"action-button",mapping:{buttonRenderer:{component:"ytd-button-renderer"}}},"data.secondaryActionButton":{id:"secondary-action-button",mapping:{buttonRenderer:{component:"ytd-button-renderer",attributes:{"dialog-dismiss":!0}}}}}};
var b6=a6;v([H(V.YtRendererBehavior),w("design:type",Object)],b6.prototype,"ytRendererBehavior",void 0);v([H(X),w("design:type",Object)],b6.prototype,"ytRendererstamperBehavior",void 0);v([I(),w("design:type",Object)],b6.prototype,"data",void 0);b6=v([W({is:"ytd-sponsorships-alert-renderer"})],b6);var c6=function(){return F.apply(this,arguments)||this};
l(c6,F);f=c6.prototype;f.configureRendererStamper=function(){return{"data.expandableItems":{id:"content-container",mapping:{sponsorshipsPerksRenderer:{component:"ytd-sponsorships-perks-renderer"},sponsorshipsTierRenderer:{component:"ytd-sponsorships-tier-renderer"}}}}};
f.getExpansionIcon=function(a){return a?"yt-icons:arrow_drop_up":"yt-icons:arrow_drop_down"};
f.onToggleExpand=function(){this.data.expandableItems&&this.set("expanded",!this.get("expanded"))};
f.computeMessageContainerStyle=function(a){return a.messageContainerStyle?a.messageContainerStyle.split("MESSAGE_CONTAINER_")[1].replace(/_/g,"-").toLowerCase():"style-unspecified"};
f.isSinglePerk=function(a){return!!a.messageContainerStyle&&("MESSAGE_CONTAINER_STYLE_SINGLE_PERK"===a.messageContainerStyle||"MESSAGE_CONTAINER_STYLE_SINGLE_PERK_FIRST"===a.messageContainerStyle)};
f.onExpandedChanged=function(){var a=this;this.expanded&&this.querySelectorAll("yt-img-shadow").forEach(function(b){b.onShow()});
Polymer.RenderStatus.afterNextRender(this,function(){a.fire("yt-refit")})};
f.onDataChanged=function(){this.get("data.startExpanded")&&(this.expanded=!0)};
var d6=c6;v([H(V.YtRendererBehavior),w("design:type",Object)],d6.prototype,"ytRendererBehavior",void 0);v([H(X),w("design:type",Object)],d6.prototype,"ytRendererstamperBehavior",void 0);v([I({observer:"onDataChanged"}),w("design:type",Object)],d6.prototype,"data",void 0);v([I({observer:"onExpandedChanged",value:!1}),w("design:type",Boolean)],d6.prototype,"expanded",void 0);d6=v([W({is:"ytd-sponsorships-expandable-message-renderer"})],d6);var e6=function(){var a=F.apply(this,arguments)||this;a.expanded=!0;return a};
l(e6,F);e6.prototype.getBadgeRowClass=function(a,b,c){this.querySelectorAll("yt-img-shadow").forEach(function(d){d.onShow()});
a=a.selected;return c?-1!==a?a===b?"badge-line badge-selected":"badge-line badge-not-selected":"badge-line":(void 0!==a?a:0)===b?"badge-line":"badge-hidden"};
var f6=e6;v([H(V.YtRendererBehavior),w("design:type",Object)],f6.prototype,"ytRendererBehavior",void 0);v([I(),w("design:type",Object)],f6.prototype,"data",void 0);v([I(),w("design:type",Object)],f6.prototype,"expanded",void 0);f6=v([W({is:"ytd-sponsorships-loyalty-badges-renderer"})],f6);var g6=function(){var a=F.apply(this,arguments)||this;a.expanded=!0;return a};
l(g6,F);g6.prototype.getContainerClasses=function(a,b){a=a?"expanded":"collapsed";b&&(a+=" item");return a};
var h6=g6;v([H(V.YtRendererBehavior),w("design:type",Object)],h6.prototype,"ytRendererBehavior",void 0);v([I(),w("design:type",Object)],h6.prototype,"data",void 0);v([I(),w("design:type",Object)],h6.prototype,"expanded",void 0);h6=v([W({is:"ytd-sponsorships-perk-renderer"})],h6);var oHa=function(){var a=F.apply(this,arguments)||this;a.expanded=!0;return a};
l(oHa,F);var i6=oHa;v([H(V.YtRendererBehavior),w("design:type",Object)],i6.prototype,"ytRendererBehavior",void 0);v([I(),w("design:type",Object)],i6.prototype,"data",void 0);v([I(),w("design:type",Object)],i6.prototype,"expanded",void 0);i6=v([W({is:"ytd-sponsorships-perks-renderer"})],i6);Polymer({is:"ytd-sponsorships-heading-renderer",behaviors:[X,V.YtRendererBehavior],properties:{data:{type:Object,observer:"onDataChanged_"}},stampDom:{"data.endButton":{id:"end-button",mapping:{buttonRenderer:{component:"ytd-button-renderer"}}},"data.bottomButton":{id:"bottom-button",mapping:{buttonRenderer:{component:"ytd-button-renderer"}}}},onDataChanged_:function(){this.get("data.endButton.buttonRenderer.text")&&this.get("data.endButton.buttonRenderer.icon")&&(this.data.endButton.buttonRenderer.iconPosition=
"BUTTON_ICON_POSITION_TYPE_RIGHT_OF_TEXT")}});var pHa=function(){return F.apply(this,arguments)||this};
l(pHa,F);var j6=pHa;v([I(),w("design:type",Object)],j6.prototype,"data",void 0);v([H(V.YtRendererBehavior),w("design:type",Object)],j6.prototype,"ytRendererBehavior",void 0);j6=v([W({is:"ytd-sponsorships-links-renderer"})],j6);var k6=function(){return F.apply(this,arguments)||this};
l(k6,F);k6.prototype.onToggleExpand=function(){this.data&&this.data.expandableItems&&this.set("expanded",!this.get("expanded"))};
k6.prototype.getExpansionIcon=function(a){return a?"yt-icons:arrow_drop_up":"yt-icons:arrow_drop_down"};
k6.prototype.getTileClasses=function(a){return a?"tile expandable-tile":"tile"};
k6.prototype.getButtonDisabled=function(a){return a?void 0:""};
var l6=k6;v([H(V.YtRendererBehavior),w("design:type",Object)],l6.prototype,"ytRendererBehavior",void 0);v([I(),w("design:type",Object)],l6.prototype,"data",void 0);v([I({value:!1}),w("design:type",Boolean)],l6.prototype,"expanded",void 0);l6=v([W({is:"ytd-sponsorships-list-tile-renderer"})],l6);var m6=function(){return F.apply(this,arguments)||this};
l(m6,F);
m6.prototype.configureRendererStamper=function(){return{"data.content":{id:"content",mapping:{sponsorshipsTierRenderer:{component:"ytd-sponsorships-tier-renderer"},sponsorshipsHeadingRenderer:{component:"ytd-sponsorships-heading-renderer"},sponsorshipsListTileRenderer:{component:"ytd-sponsorships-list-tile-renderer"},sponsorshipsExpandableMessageRenderer:{component:"ytd-sponsorships-expandable-message-renderer"}}},"data.sidebar":{id:"sidebar",mapping:{sponsorshipsHeadingRenderer:{component:"ytd-sponsorships-heading-renderer"},sponsorshipsLinksRenderer:{component:"ytd-sponsorships-links-renderer"},
sponsorshipsListTileRenderer:{component:"ytd-sponsorships-list-tile-renderer"}}},"data.alert":{id:"alert-renderer",mapping:{sponsorshipsAlertRenderer:{component:"ytd-sponsorships-alert-renderer"}}}}};
var n6=m6;v([H(V.YtRendererBehavior),w("design:type",Object)],n6.prototype,"ytRendererBehavior",void 0);v([H(X),w("design:type",Object)],n6.prototype,"ytRendererstamperBehavior",void 0);v([I(),w("design:type",Object)],n6.prototype,"data",void 0);n6=v([W({is:"ytd-sponsorships-management-renderer"})],n6);var o6=function(){return F.apply(this,arguments)||this};
l(o6,F);f=o6.prototype;f.configureRendererStamper=function(){return{"data.purchaseButton":{id:"purchase-button",mapping:{buttonRenderer:{component:"yt-button-renderer"}}},"data.expandableMessage":{id:"expandable-message",mapping:{sponsorshipsExpandableMessageRenderer:{component:"ytd-sponsorships-expandable-message-renderer"}}}}};
f.expansionCTA=function(a,b){return a&&(b?a.collapseCallToAction:a.expansionCallToAction)};
f.getExpansionIcon=function(a){return a?"arrow_drop_up":"arrow_drop_down"};
f.expansionCallToActionTap=function(){var a=this;this.expanded=!this.expanded;Polymer.RenderStatus.afterNextRender(this,function(){a.fire("yt-refit")})};
f.onDataChanged=function(){this.expanded=!this.get("data.expansionCallToAction")};
f.computeDisplayTitle=function(a){return!(!a||"show"!==this.titledisplaystatus)};
var p6=o6;v([H(V.YtRendererBehavior),w("design:type",Object)],p6.prototype,"ytRendererBehavior",void 0);v([H(X),w("design:type",Object)],p6.prototype,"ytRendererstamperBehavior",void 0);v([I({observer:"onDataChanged"}),w("design:type",Object)],p6.prototype,"data",void 0);v([I({value:!1}),w("design:type",Boolean)],p6.prototype,"expanded",void 0);v([I({reflectToAttribute:!0,value:"show"}),w("design:type",String)],p6.prototype,"titledisplaystatus",void 0);
v([I({computed:"computeDisplayTitle(data.title)"}),w("design:type",Boolean)],p6.prototype,"displayTitle",void 0);p6=v([W({is:"ytd-sponsorships-tier-renderer"})],p6);Polymer({is:"ytd-backstage-items",behaviors:[V.YtRendererBehavior,U.YtActionHandlerBehavior,T.YtActionSenderBehavior],properties:{data:{type:Object},enableImprovedCommunityTab:{type:Boolean,value:A("enable_post_renderer_for_kevlar_community_tab")}},actionMap:{"yt-add-backstage-comment-action":"addBackstageCommentAction_","yt-add-backstage-post-action":"addBackstagePostAction_","yt-add-backstage-reply-action":"addBackstageReplyAction_","yt-ban-author-action":"banAuthorAction_","yt-hide-reported-comment-action":"hideReportedCommentAction_",
"yt-remove-comment-action":"removeCommentAction_","yt-replace-backstage-comment-action":"replaceBackstageCommentAction_","yt-replace-backstage-post-action":"replaceBackstagePostAction_","yt-replace-backstage-reply-action":"replaceBackstageReplyAction_"},addBackstagePostAction_:function(a){if(a=this.get("addBackstagePostAction.renderer.backstagePostThreadRenderer",a))this.get("header.commentsHeaderRenderer.zeroStateMessage.backstageZeroStateRenderer",this.data)&&this.set("data.header.commentsHeaderRenderer.zeroStateMessage",
{}),this.get("data.contents")?this.splice("data.contents",0,0,{backstagePostThreadRenderer:a}):this.set("data.contents",[{backstagePostThreadRenderer:a}])},
addBackstageCommentAction_:function(a){var b=this.get("addBackstageCommentAction.parentId",a);a=this.get("addBackstageCommentAction.renderer.commentThreadRenderer",a);b&&a&&(b=this.postIdToIndex_(b),0>b||(b="data.contents."+b+".backstagePostThreadRenderer.comments",this.get(b)&&(this.get(b+".backstageCommentsRenderer.contents")&&this.push(b+".backstageCommentsRenderer.contents",{commentThreadRenderer:a}),this.get(b+".backstageCommentsRenderer.teaserContents")?this.push(b+".backstageCommentsRenderer.teaserContents",
{commentThreadRenderer:a}):this.set(b+".backstageCommentsRenderer.teaserContents",[{commentThreadRenderer:a}]))))},
addBackstageReplyAction_:function(a){var b=this.get("addBackstageReplyAction.parentId",a);a=this.get("addBackstageReplyAction.renderer.commentRenderer",a);b&&a&&this.setCreatorReply_(b,a)},
banAuthorAction_:function(a){var b=this.get("banAuthorAction.commentId",a);b&&(a=this.get("banAuthorAction.parentCommentId",a)||this.getParentPostId_(b),this.remove_(b,a))},
hideReportedCommentAction_:function(a){var b=this.get("hideReportedCommentAction.commentId",a);b&&((a=this.get("hideReportedCommentAction.parentCommentId",a))||(a=this.getParentPostId_(b)),this.remove_(b,a))},
replaceBackstageCommentAction_:function(a){var b=this.get("replaceBackstageCommentAction.commentId",a),c=this.get("replaceBackstageCommentAction.parentId",a);a=this.get("replaceBackstageCommentAction.renderer.commentThreadRenderer",a);if(b&&c&&a&&(c=this.postIdToIndex_(c),!(0>c))){var d=this.commentIdToIndex_(b,c,!1);if(0<=d){var e=this.get("data.contents."+c+".backstagePostThreadRenderer.comments.backstageCommentsRenderer.contents."+d+".commentThreadRenderer.replies.commentRepliesRenderer");e&&(a.replies=
{commentRepliesRenderer:e});this.splice("data.contents."+c+".backstagePostThreadRenderer.comments.backstageCommentsRenderer.contents",d,1,{commentThreadRenderer:a})}b=this.commentIdToIndex_(b,c,!0);if(0<=b){if(e=this.get("data.contents."+c+".backstagePostThreadRenderer.comments.backstageCommentsRenderer.teaserContents."+b+".commentThreadRenderer.replies.commentRepliesRenderer"))a.replies={commentRepliesRenderer:e};this.splice("data.contents."+c+".backstagePostThreadRenderer.comments.backstageCommentsRenderer.teaserContents",
b,1,{commentThreadRenderer:a})}}},
replaceBackstagePostAction_:function(a){var b=this.get("replaceBackstagePostAction.itemId",a);this.enableImprovedCommunityTab?(a=this.get("replaceBackstagePostAction.renderer.postRenderer",a),b&&a&&(b=this.postIdToIndex_(b),0>b||this.set("data.contents."+b+".backstagePostThreadRenderer.post",{postRenderer:a}))):(a=this.get("replaceBackstagePostAction.renderer.backstagePostRenderer",a),b&&a&&(b=this.postIdToIndex_(b),0>b||this.set("data.contents."+b+".backstagePostThreadRenderer.post",{backstagePostRenderer:a})))},
replaceBackstageReplyAction_:function(a){var b=this.get("replaceBackstageReplyAction.replyId",a),c=this.get("replaceBackstageReplyAction.parentId",a);a=this.get("replaceBackstageReplyAction.renderer.commentRenderer",a);b&&a&&c&&this.setCreatorReply_(c,a)},
removeCommentAction_:function(a){var b=this.get("removeCommentAction.commentId",a);if(b){var c=this.get("removeCommentAction.parentCommentId",a);c&&this.get("removeCommentAction.isCreatorReply",a)?this.setCreatorReply_(c,void 0):(c||(c=this.getParentPostId_(b)),this.remove_(b,c))}},
setCreatorReply_:function(a,b){var c=this.getParentPostId_(a);if(c&&(c=this.postIdToIndex_(c),!(0>c))){var d=this.commentIdToIndex_(a,c,!1);if(0<=d){var e="data.contents."+c+".backstagePostThreadRenderer.comments.backstageCommentsRenderer.contents."+d;d=e+".commentThreadRenderer.comment.commentRenderer.containsCreatorReply";e+=".commentThreadRenderer.replies";void 0==b?(this.set(e,{}),this.set(d,!1)):(this.set(e,{commentRepliesRenderer:{teaserContents:[{commentRenderer:b}]}}),this.set(e+".commentRepliesRenderer.teaserContents.0.commentRenderer.isCreatorReply",
!0),this.set(d,!0))}a=this.commentIdToIndex_(a,c,!0);0<=a&&(c="data.contents."+c+".backstagePostThreadRenderer.comments.backstageCommentsRenderer.teaserContents."+a,a=c+".commentThreadRenderer.comment.commentRenderer.containsCreatorReply",c+=".commentThreadRenderer.replies",void 0==b?(this.set(c,{}),this.set(a,!1)):(this.set(c,{commentRepliesRenderer:{teaserContents:[{commentRenderer:b}]}}),this.set(a,!0)))}},
remove_:function(a,b){if(b){if(b=this.postIdToIndex_(b),!(0>b)){var c=this.commentIdToIndex_(a,b,!1);0<=c&&this.splice("data.contents."+b+".backstagePostThreadRenderer.comments.backstageCommentsRenderer.contents",c,1);c=this.commentIdToIndex_(a,b,!0);0<=c&&this.splice("data.contents."+b+".backstagePostThreadRenderer.comments.backstageCommentsRenderer.teaserContents",c,1);b=this.enableImprovedCommunityTab?"data.contents."+b+".backstagePostThreadRenderer.post.postRenderer":"data.contents."+b+".backstagePostThreadRenderer.post.backstagePostRenderer";
c=b+".backstageAttachment.pollRenderer.votedCommentId";this.get(c)==a&&(this.set(c,null),this.set(b+".backstageAttachment.pollRenderer.commentDelete",null))}}else b=this.postIdToIndex_(a),0>b||this.splice("data.contents",b,1)},
postIdToIndex_:function(a){for(var b=0;b<this.data.contents.length;b++)if((this.enableImprovedCommunityTab?this.get("backstagePostThreadRenderer.post.postRenderer.postId",this.data.contents[b]):this.get("backstagePostThreadRenderer.post.backstagePostRenderer.postId",this.data.contents[b]))===a)return b;return-1},
commentIdToIndex_:function(a,b,c){if(0>b)return-1;b=this.data&&this.data.contents&&this.data.contents[b]&&this.data.contents[b].backstagePostThreadRenderer&&this.data.contents[b].backstagePostThreadRenderer.comments&&this.data.contents[b].backstagePostThreadRenderer.comments.backstageCommentsRenderer;return(c=c?b.teaserContents:b.contents)&&c.length?tb(c,function(d){return d.commentThreadRenderer.comment.commentRenderer.commentId==a}):-1},
getParentPostId_:function(a){a=a.split(".");if(a[1])return a[0]}});Polymer({is:"ytd-comments",behaviors:[O0,V.YtRendererBehavior,U.YtActionHandlerBehavior,T.YtActionSenderBehavior],properties:{data:{type:Object,observer:"dataChanged_"},isBackstage:{type:Boolean,computed:"computeIsBackstage_(data)",reflectToAttribute:!0},disablePrescanVisibility:{type:Boolean,value:!0},canScheduleJobs:{type:Boolean,value:!0},canShowDefaultSpinner_:{type:Boolean,computed:"computeCanShowDefaultSpinner_(data, canScheduleJobs)"}},actionMap:{"yt-ban-author-action":"banAuthorAction_","yt-create-comment-action":"createCommentAction_",
"yt-create-comment-reply-action":"createCommentReplyAction_","yt-hide-reported-comment-action":"hideReportedCommentAction_","yt-pin-comment-action":"pinCommentAction_","yt-remove-comment-action":"removeCommentAction_","yt-unpin-comment-action":"unpinCommentAction_","yt-update-comment-action":"updateCommentAction_","yt-update-comment-reply-action":"updateCommentReplyAction_"},listeners:{"yt-retrieve-location":"onRetrieveLocation_"},observers:["contentsChanged_(data.contents.*)","headerChanged_(data.header)"],
created:function(){this.cachedCommentIds_=new Set;this.RenderingPriority={RENDERING_PRIORITY_UNKNOWN:0,RENDERING_PRIORITY_PINNED_COMMENT:10,RENDERING_PRIORITY_LINKED_COMMENT:20,RENDERING_PRIORITY_COMMUNITY_GUIDELINES_BELOW_HEADER:80,RENDERING_PRIORITY_COMMENT_HEADER:100};this.initCommentsCsi_();this.player=null;this.PLAYER_EVENTS_=new Map;this.PLAYER_EVENTS_.set("onVideoProgress",this.onVideoProgress_.bind(this))},
attached:function(){this.maybeGetAndSetPlayer_()},
maybeGetAndSetPlayer_:function(){var a=qW(this);a&&a.getPlayerPromise().then(this.playerApiReady_.bind(this))},
playerApiReady_:function(a){this.setPlayer_(a)},
setPlayer_:function(a){this.player_&&this.unlistenFromPlayerEvents(this.player_,this.PLAYER_EVENTS_);(this.player_=a)&&this.listenToPlayerEvents(a,this.PLAYER_EVENTS_)},
detached:function(){this.setPlayer_(null)},
onVideoProgress_:function(){var a=this,b=Be("prefetch_comments_ms_after_video");0<b&&setTimeout(function(){return a.loadComments()},b);
A("prefetch_comments_idle_job")&&En(function(){return a.loadComments()});
this.setPlayer_(null)},
dataChanged_:function(){this.cachedCommentIds_.clear();this.player_||this.maybeGetAndSetPlayer_()},
contentsChanged_:function(a){if(a&&a.value)if("data.contents"===a.path){a=a.value;for(var b=0,c=a.length;b<c;b++){var d=this.get("commentThreadRenderer.comment.commentRenderer.commentId",a[b]);d&&this.cachedCommentIds_.add(d)}this.tickForCommentsTimer_("cml");this.fire("yt-comments-loaded")}else"data.contents.splices"===a.path&&a.value.indexSplices.forEach(function(e){e.removed.forEach(function(m){(m=this.get("commentThreadRenderer.comment.commentRenderer.commentId",m))&&this.cachedCommentIds_.delete(m)},
this);
for(var g=0;g<e.addedCount;g++){var h=this.get("commentThreadRenderer.comment.commentRenderer.commentId",e.object[e.index+g]);h&&this.cachedCommentIds_.add(h)}},this)},
headerChanged_:function(a){a&&this.tickForCommentsTimer_("cmhl")},
initCommentsCsi_:function(){fq("c","wn_comments");Tp("wn_comments");Bp("wn_comments").useGel=!0;re("wn_commentsTIMING_AFT_KEYS",["cmv"]);re("wn_commentsTIMING_ACTION","wn_comments");$p("c",void 0,"wn_comments");aq("wn_comments");cq(!0,"wn_comments");dq(!1,"wn_comments");var a=Wo();a&&pq("csn",a,"wn_comments");this.tickForCommentsTimer_("cmi")},
createCommentAction_:function(a){if(a=this.get("createCommentAction.contents.commentThreadRenderer",a))!this.isBackstage&&this.get("header.commentsHeaderRenderer.createRenderer.commentSimpleboxRenderer.zeroStep.zeroStepChannelCreationRenderer",this.data)&&this.set("data.header.commentsHeaderRenderer.createRenderer.commentSimpleboxRenderer.zeroStep",{}),this.isBackstage&&this.get("header.commentsHeaderRenderer.zeroStateMessage.backstageZeroStateRenderer",this.data)&&this.set("data.header.commentsHeaderRenderer.zeroStateMessage",
{}),this.insert_(a)},
doReplyInsert_:function(a,b,c){if(A("enable_reply_threading_on_web")&&0<=c){var d=this.get(a+"."+c);b.commentRenderer.threadNestingLevel=d.commentRenderer.threadNestingLevel+1;c=this.getReplyThreadEndIndex_(a,c);this.splice(a,c,0,b)}else this.push(a,b)},
getRepliesPath_:function(a){return"data.contents."+a+".commentThreadRenderer.replies"},
getRepliesContentsPath_:function(a,b){a=this.getRepliesPath_(a);return b?a+".commentRepliesRenderer.teaserContents":a+".commentRepliesRenderer.contents"},
createCommentReplyAction_:function(a){var b=this.get("createCommentReplyAction.parentCommentId",a),c=this.get("createCommentReplyAction.contents",a);if(c)if(this.get("createCommentReplyAction.isCreatorReply",a))this.setCreatorReply_(b,c);else if(b=this.commentIdToIndex_(b),!(0>b)){var d=this.getRepliesPath_(b);if(this.get(d)){a=this.get("createCommentReplyAction.replyToCommentId",a);var e=this.getRepliesContentsPath_(b,!1);this.get(e)&&(d=this.replyIdToIndex_(a,b,!1),this.doReplyInsert_(e,c,d));e=
this.getRepliesContentsPath_(b,!0);this.get(e)?(d=this.replyIdToIndex_(a,b,!0),(!a||0<=d)&&this.doReplyInsert_(e,c,d)):this.set(e,[c])}else this.set(d,{commentRepliesRenderer:{teaserContents:[c]}})}},
setCreatorReply_:function(a,b){var c=this.getParentCommentId_(a.replace("#","."));if(c&&(c=this.commentIdToIndex_(c),!(0>c))){var d=this.replyIdToIndex_(a,c,!1);0<=d&&(d=this.getRepliesContentsPath_(c,!1)+("."+d+".commentRenderer"),this.set(d+".creatorReply",b),this.set(d+".containsCreatorReply",!!this.get("commentRenderer",b)));a=this.replyIdToIndex_(a,c,!0);0<=a&&(a=this.getRepliesContentsPath_(c,!0)+("."+a+".commentRenderer"),this.set(a+".creatorReply",b),this.set(a+".containsCreatorReply",!!this.get("commentRenderer",
b)))}},
hideReportedCommentAction_:function(a){var b=this.get("hideReportedCommentAction.commentId",a);b&&(a=this.get("hideReportedCommentAction.parentCommentId",a),b=b.replace("#","."),a||(a=this.getParentCommentId_(b)),this.remove_(b,a))},
getParentCommentId_:function(a){a=a.split(".");if(a[1])return a[0]},
removeCommentAction_:function(a){var b=this.get("removeCommentAction.commentId",a);b&&(this.get("removeCommentAction.isCreatorReply",a)?(a=this.get("removeCommentAction.parentCommentId",a),this.setCreatorReply_(a,{})):(a=this.get("removeCommentAction.parentCommentId",a),b=b.replace("#","."),a||(a=this.getParentCommentId_(b)),this.remove_(b,a)))},
pinCommentAction_:function(a){var b=this.get("pinCommentAction.commentId",a);b&&(a=this.get("pinCommentAction.actionResult.update.commentThreadRenderer",a))&&(this.remove_(b),this.insert_(a,!0))},
unpinCommentAction_:function(a){var b=this.get("unpinCommentAction.commentId",a);b&&(a=this.get("unpinCommentAction.actionResult.update.commentThreadRenderer",a))&&(this.remove_(b),this.insert_(a))},
updateCommentAction_:function(a){var b=this.get("updateCommentAction.commentId",a);a=this.get("updateCommentAction.contents",a);b&&a&&this.update_(b,a)},
updateCommentReplyAction_:function(a){var b=this.get("updateCommentReplyAction.commentId",a),c=this.get("updateCommentReplyAction.contents",a);b&&c&&(this.get("updateCommentReplyAction.isCreatorReply",a)?(a=this.get("updateCommentReplyAction.parentCommentId",a),this.setCreatorReply_(a,c)):(b=b.replace("#","."),a=this.getParentCommentId_(b),this.update_(b,c,a)))},
banAuthorAction_:function(a){var b=this.get("banAuthorAction.commentId",a);b&&(a=this.get("banAuthorAction.parentCommentId",a),b=b.replace("#","."),a||(a=this.getParentCommentId_(b)),this.remove_(b,a))},
commentIdToIndex_:function(a){if(!a||!this.cachedCommentIds_.has(a))return-1;for(var b=0,c=this.data.contents.length;b<c;b++)if(this.get("commentThreadRenderer.comment.commentRenderer.commentId",this.data.contents[b])===a)return b;return-1},
insert_:function(a,b){if(0==this.cachedCommentIds_.size)this.set("data.contents",[{commentThreadRenderer:a}]);else for(var c=0,d=this.data.contents.length;c<d;c++){var e=this.data.contents[c].commentThreadRenderer;if(this.RenderingPriority[a.renderingPriority]>=this.RenderingPriority[e.renderingPriority]){b&&this.RenderingPriority[a.renderingPriority]==this.RenderingPriority[e.renderingPriority]?this.splice("data.contents",c,1,{commentThreadRenderer:a}):this.splice("data.contents",c,0,{commentThreadRenderer:a});
break}}},
getReplyThreadEndIndex_:function(a,b){a=this.get(a);var c=b+1;if(void 0===a)return c;for(b=a[b];c<a.length&&a[c].commentRenderer.threadNestingLevel>b.commentRenderer.threadNestingLevel;)c++;return c},
doReplyRemove_:function(a,b,c){a=this.replyIdToIndex_(a,b,c);0>a||(b=this.getRepliesContentsPath_(b,c),c=a+1,A("enable_reply_threading_on_web")&&(c=this.getReplyThreadEndIndex_(b,a)),this.splice(b,a,c-a))},
remove_:function(a,b){b=this.commentIdToIndex_(b);0>b?(b=this.commentIdToIndex_(a),0>b||this.splice("data.contents",b,1)):(this.doReplyRemove_(a,b,!1),this.doReplyRemove_(a,b,!0),0>b||(b="data.contents."+b+".commentThreadRenderer.comment.commentRenderer",this.get(b+".backstageAttachment.pollRenderer.votedCommentId")==a&&(this.set(b+".backstageAttachment.pollRenderer.votedCommentId",null),this.set(b+".backstageAttachment.pollRenderer.commentDelete",null))))},
replyIdToIndex_:function(a,b,c){if(0>b)return-1;b=this.getRepliesContentsPath_(b,c);b=this.get(b);if(!b||!b.length)return-1;c=0;for(var d=b.length;c<d;c++)if(this.get("commentRenderer.commentId",b[c])===a)return c;return-1},
doReplyUpdate_:function(a,b,c,d){a=this.replyIdToIndex_(a,b,d);if(!(0>a)){b=this.getRepliesContentsPath_(b,d);if(d=this.get(b+"."+a+".commentRenderer.creatorReply"))c.commentRenderer.creatorReply=d;c.commentRenderer.threadNestingLevel=this.get(b)[a].commentRenderer.threadNestingLevel;this.splice(b,a,1,c)}},
update_:function(a,b,c){var d=this.commentIdToIndex_(c);!c||0>d?(d=this.commentIdToIndex_(a),0>d||this.set("data.contents."+d+".commentThreadRenderer.comment",b)):(this.doReplyUpdate_(a,d,b,!1),this.doReplyUpdate_(a,d,b,!0))},
computeIsBackstage_:function(a){return!!this.get("header.commentsHeaderRenderer.isBackstageContent",a)},
computeCanShowDefaultSpinner_:function(a,b){return A("kevlar_show_comments_spinner_earlier")&&b?(b=this.getInterface(vV))&&b.isOnWatch&&b.isOnWatch()?!(a&&(a.contents||a.header||a.continuations)):!1:!1},
onRetrieveLocation_:function(a,b){b&&b.hasComments&&this.tickForCommentsTimer_("lss")},
tickForCommentsTimer_:function(a){iq(a,void 0,"wn_comments")},
loadComments:function(){Be("prefetch_comments_ms_after_video")||A("prefetch_comments_idle_job")?this.$.sections.triggerInitialContinuations():this.$.sections.triggerContinuations()}});Polymer({is:"yt-header-with-back-renderer",behaviors:[V.YtRendererBehavior,X],properties:{data:Object},stampDom:{"data.imageRenderer":{id:"image-renderer",mapping:{themedImageRenderer:{component:"yt-themed-image-renderer",params:{fit:!0}}}}},onBackIconTap_:function(){window.history.back()}});Polymer({is:"ytd-section-list-renderer",behaviors:[V.YtRendererBehavior,X,FY,r0],properties:{data:Object,initialCount:{type:Number,value:2},autoFill:{type:Boolean,value:!0},hasSortFilter:{type:Boolean,reflectToAttribute:!0,computed:"computeHasSortFilter_(data.subMenu)"},isSearch:{type:Boolean,value:!1},pageSubtype:{type:String,reflectToAttribute:!0}},itemsPath:"data.contents",stampDom:{"data.header":{id:"header",mapping:{feedChannelFilterHeaderRenderer:{component:"ytd-feed-channel-filter-header-renderer",
registration:["defer-on-all"],noInjection:!0},textHeaderRenderer:{component:"ytd-text-header-renderer",registration:["defer-on-all"],noInjection:!0},richListHeaderRenderer:{component:"ytd-rich-list-header-renderer",registration:["defer-on-all"],noInjection:!0},headerWithBackRenderer:{component:"yt-header-with-back-renderer",registration:["defer-on-all"],noInjection:!0}}},"data.subMenu":{id:"sub-menu",mapping:{searchSubMenuRenderer:{component:"ytd-search-sub-menu-renderer",registration:["defer-on-home"],
noInjection:!0},channelSubMenuRenderer:{component:"ytd-channel-sub-menu-renderer",registration:["defer-on-home"],noInjection:!0},channelListSubMenuRenderer:{component:"ytd-channel-list-sub-menu-renderer",registration:["defer-on-home"],noInjection:!0},sortFilterSubMenuRenderer:{component:"yt-sort-filter-sub-menu-renderer",registration:["defer-on-home"],noInjection:!0}}},shownItems:{id:"contents",mapping:{itemSectionRenderer:{matcher:function(a){switch(a.sectionIdentifier){case"comment-item-section":return"ytd-comments";
case"backstage-item-section":return"ytd-backstage-items";default:return"ytd-item-section-renderer";}},
properties:{isSearchDova:"[[isSearchDova]]",isSearch:"[[isSearch]]"},noInjection:!0},channelAgeGateRenderer:{component:"ytd-channel-age-gate-renderer",registration:["defer-on-home"],noInjection:!0},pageIntroductionRenderer:{component:"ytd-page-introduction-renderer",registration:["defer-on-home"],noInjection:!0},reportHistorySectionRenderer:{component:"ytd-report-history-section-renderer",registration:["defer-on-home"],noInjection:!0},sponsorshipsManagementRenderer:{component:"ytd-sponsorships-management-renderer",
registration:["defer-on-home"],noInjection:!0}}},"data.continuations":{id:"continuations",mapping:{nextContinuationData:{component:"yt-next-continuation",noInjection:!0}},renderPriority:A("kevlar_low_priority_continuation")?0:void 0,usePageScheduler:A("kevlar_low_priority_continuation")}},nextContinuation:{continuationType:"sectionListContinuation"},replacePrimaryContent:function(a){this.set("data.contents",a)},
computeHasSortFilter_:function(a){return!!a&&!!a.sortFilterSubMenuRenderer}});Polymer({is:"ytd-two-column-browse-results-renderer",behaviors:[jY.YtdGridStateAwareBehavior,X,U.YtActionHandlerBehavior,V.YtRendererBehavior],listeners:{"yt-retrieve-location":"onRetrieveLocation_","yt-service-request-sent":"onYtServiceRequestSent_","yt-service-request-completed":"onYtServiceRequestCompleted_"},properties:{data:{type:Object},content_:{type:Object,computed:"computeDisplayedContent_(data)"},initialCount:{type:Number,value:function(){return 1024<window.outerHeight?3:2}},
pageSubtype:{type:String,reflectToAttribute:!0},isRichGrid:{type:Boolean,computed:"computeRichGridValue_()"}},getPath_:function(a,b){var c="data.tabs.#"+b+".";a.tabs[b].tabRenderer?c+="tabRenderer.":a.tabs[b].expandableTabRenderer&&(c+="expandableTabRenderer.");return c+"content.sectionListRenderer"},
computeDisplayedContent_:function(a){this.unlinkPaths("content_");if(a&&a.tabs)for(var b=a.tabs.length,c=0;c<b;c++){var d=a.tabs[c].tabRenderer||a.tabs[c].expandableTabRenderer;if(d.selected&&d.content)return this.linkPaths("content_",this.getPath_(a,c)),d.content}return null},
stampDom:{content_:{id:"primary",mapping:{sectionListRenderer:{matcher:function(){return this.isRichGrid?"ytd-rich-grid-renderer":"ytd-section-list-renderer"},
properties:{initialCount:"[[initialCount]]",pageSubtype:"[[pageSubtype]]"}}}},"data.secondaryContents":{id:"secondary",mapping:{browseFeedActionsRenderer:{component:"ytd-browse-feed-actions-renderer",registration:["defer-on-home"],noInjection:!0},browseSecondaryContentsRenderer:{component:"ytd-browse-secondary-contents-renderer",noInjection:!0},profileColumnRenderer:{component:"ytd-profile-column-renderer",noInjection:!0}}}},onRetrieveLocation_:function(a,b){b.locationRetrieved(b.hasComments?"/comment_service_ajax?action_get_comments=1&pbj=1":
"/browse_ajax",void 0);a.stopPropagation()},
onYtServiceRequestSent_:function(a,b){this.handleServiceRequestActions_(b)},
onYtServiceRequestCompleted_:function(a,b){this.handleServiceRequestActions_(b)},
handleServiceRequestActions_:function(a){var b=this;(a=a.actions)&&a.forEach(function(c){c.replaceFeedContentAction&&b.$$("ytd-section-list-renderer").replacePrimaryContent(c.replaceFeedContentAction.items)})},
computeRichGridValue_:function(){return A("rich_grid")&&"/"===window.location.pathname}});Polymer({is:"yt-alert-with-actions-renderer",behaviors:[X,V.YtRendererBehavior],properties:{data:Object,alertStyle:{type:String,reflectToAttribute:!0,computed:"computeAlertStyle_(data.alertType.type)"},dismissBoundButtonTap_:{type:Function,value:function(){return this.dismissButtonTap_.bind(this)}},
acceptBoundButtonTap_:{type:Function,value:function(){return this.acceptButtonTap_.bind(this)}}},
stampDom:{"data.dismissButton":{id:"dismiss-button",mapping:{buttonRenderer:{component:"yt-button-renderer",properties:{"on-tap":"[[dismissBoundButtonTap_]]"}}}},"data.actionButtons":{id:"action-buttons",mapping:{buttonRenderer:{component:"yt-button-renderer",properties:{"on-tap":"[[acceptBoundButtonTap_]]"}}}}},observers:["onIsVisibleChanged_(data.isVisible)"],created:function(){this.closeOnDismissButton_=new Set;this.closeOnDismissButton_.add("ALERT_WITH_ACTIONS_DISMISS_STRATEGY_UNKNOWN");this.closeOnDismissButton_.add("ALERT_WITH_ACTIONS_DISMISS_STRATEGY_ON_LINK_TAP");
this.closeOnDismissButton_.add("ALERT_WITH_ACTIONS_DISMISS_STRATEGY_ONLY_DISMISS_BUTTON_TAP");this.closeOnAcceptButton_=new Set;this.closeOnAcceptButton_.add("ALERT_WITH_ACTIONS_DISMISS_STRATEGY_UNKNOWN");this.closeOnAcceptButton_.add("ALERT_WITH_ACTIONS_DISMISS_STRATEGY_ON_LINK_TAP");this.closeOnAcceptButton_.add("ALERT_WITH_ACTIONS_DISMISS_STRATEGY_ONLY_ACTION_BUTTON_TAP")},
dismissButtonTap_:function(){this.set("data.isVisible",!this.closeOnDismissButton_.has(this.data.dismissStrategy||"ALERT_WITH_ACTIONS_DISMISS_STRATEGY_UNKNOWN"))},
acceptButtonTap_:function(){this.set("data.isVisible",!this.closeOnAcceptButton_.has(this.data.dismissStrategy||"ALERT_WITH_ACTIONS_DISMISS_STRATEGY_UNKNOWN"))},
computeAlertStyle_:function(a){return a},
onIsVisibleChanged_:function(a){this.hidden=!a}});Polymer({is:"ytd-browse",behaviors:[dY,X,T.YtActionSenderBehavior,V.YtRendererBehavior,MY.YtPageBehavior,lY.YtdGuideStateAwareBehavior],properties:{data:{type:Object,observer:"dataChanged_"},mastheadAdData:Object,alertBannerData_:{type:Object,readOnly:!0,computed:"computeAlertBannerData_(data.alerts)"},requiresPlayer:Boolean,pageSubtype:{type:String,reflectToAttribute:!0},richGrid_:{type:Boolean,value:function(){return A("rich_grid")},
reflectToAttribute:!0},backgroundColorUpdate:{type:Boolean,reflectToAttribute:!0,value:A("kevlar_background_color_update")}},listeners:{"yt-player-requested":"onPlayerRequested_","yt-player-attached":"onPlayerAttached_","yt-player-detached":"onPlayerDetached_"},observers:["activeChanged_(active)","tabsChanged_(data.contents.twoColumnBrowseResultsRenderer.tabs)"],monitorScroll:!0,stampDom:{mastheadAdData:{id:"masthead-ad",mapping:{bannerPromoRenderer:{component:"ytd-banner-promo-renderer",noInjection:!0},
mastheadAdRenderer:{component:"yt-masthead-ad-renderer",noInjection:!0},videoMastheadAdRenderer:{component:"ytd-video-masthead-ad-renderer",noInjection:!0},videoMastheadAdV3Renderer:{component:"ytd-video-masthead-ad-v3-renderer",noInjection:!0}},reuseComponents:!1},alertBannerData_:{id:"alert-banner",mapping:{alertWithActionsRenderer:{component:"yt-alert-with-actions-renderer",noInjection:!0}}},"data.alerts":{id:"alerts",mapping:{alertRenderer:{component:"yt-alert-renderer",registration:["defer-on-home"],
noInjection:!0},unlimitedUserNotificationRenderer:{component:"yt-unlimited-user-notification-renderer",registration:["defer-on-home"],noInjection:!0},alertWithButtonRenderer:{component:"ytd-alert-with-button-renderer",registration:["defer-on-home"],noInjection:!0}},initialRenderPriority:3,waitForSignal:"eocs"},"data.survey":{id:"survey",mapping:{surveyTriggerRenderer:{component:"ytd-survey-trigger-renderer",noInjection:!0}},initialRenderPriority:3,waitForSignal:"eocs"},"data.metadata":{id:"metadata",
mapping:{channelMetadataRenderer:{component:"ytd-channel-metadata-renderer",registration:["defer-on-home"],noInjection:!0}}},"data.header":{id:"header",mapping:{c4TabbedHeaderRenderer:{component:"ytd-c4-tabbed-header-renderer",registration:["defer-on-home"],properties:{active:"[[active]]",tabs:"[[data.contents.twoColumnBrowseResultsRenderer.tabs]]"},noInjection:!0},interactiveTabbedHeaderRenderer:{component:"ytd-interactive-tabbed-header-renderer",registration:["defer-on-home"],properties:{active:"[[active]]",
tabs:"[[data.contents.twoColumnBrowseResultsRenderer.tabs]]"},noInjection:!0},carouselHeaderRenderer:{component:"ytd-carousel-header-renderer",registration:["defer-on-home"],properties:{active:"[[active]]",tabs:"[[data.contents.twoColumnBrowseResultsRenderer.tabs]]"},noInjection:!0},fashionDestinationHeaderRenderer:{component:"ytd-fashion-destination-header-renderer",registration:["defer-on-home"],properties:{active:"[[active]]",tabs:"[[data.contents.twoColumnBrowseResultsRenderer.tabs]]"},noInjection:!0},
gamingDestinationHeaderRenderer:{component:"ytd-gaming-destination-header-renderer",registration:["defer-on-home"],properties:{active:"[[active]]",tabs:"[[data.contents.twoColumnBrowseResultsRenderer.tabs]]"},noInjection:!0}}}},created:function(){A("kevlar_use_ytd_player")||A("kevlar_ytd_player_container")?this.player_=null:this.playerInfo_=null;this.HOME_PAGE_SKELETON_ENABLED_=A("kevlar_home_skeleton");this.skeletonHidden_=!1;window.addEventListener("message",this.onMessage_.bind(this));this.pageDisposeJobs=
[this.disposeMastheadAd_.bind(this)]},
activeChanged_:function(a){var b=this.$.header;b&&b.firstChild&&(b.firstChild.active=a)},
tabsChanged_:function(a){var b=this.$.header;b&&b.firstChild&&(b.firstChild.tabs=a)},
hideSkeleton_:function(){this.skeletonHidden_=!0;var a=document.querySelector("#home-page-skeleton");a&&(rq("hgcr"),Dh(a))},
getMastheadAd_:function(){return this.$&&this.$["masthead-ad"].firstChild},
onMessage_:function(a){var b=this.getMastheadAd_();this.active&&b&&Lda(function(){"function"==typeof b.handleMessageEvent&&b.handleMessageEvent(a.data,a.source)})},
loadPage_:function(a){this.initCsi_();a&&(this.data=a);this.updateTitle_(this.data);this.updateAdditionalFont_(this.data);this.setMastheadAd_(this.data)},
getTitle_:function(a){return"home"==this.pageSubtype?"":this.get("microformat.microformatDataRenderer.title",a)?this.get("microformat.microformatDataRenderer.title",a):this.get("header.c4TabbedHeaderRenderer.title",a)?this.get("header.c4TabbedHeaderRenderer.title",a):this.get("header.feedTabbedHeaderRenderer.title",a)?XU(this.get("header.feedTabbedHeaderRenderer.title",a)):this.get("header.interactiveTabbedHeaderRenderer.title",a)?this.get("header.interactiveTabbedHeaderRenderer.title",a):""},
updateTitle_:function(a){this.fire("yt-update-title",this.getTitle_(a))},
updateAdditionalFont_:function(a){var b=new YDa;a=this.get("responseContext.webResponseContextExtensionData.webFontData.fontFamilies",a);var c=document.head.querySelectorAll("link[name=www-webfont]");c[0]&&Dh(c[0]);a&&0<a.length&&0<a.length&&sp(b.deferedLoadFont_,b.addFont_.bind(b,a))},
initCsi_:function(){Vp(this.pageSubtype||"browse",["ol"]);pq("psc",this.pageCount)},
getPlayerContainer:function(){return this.playerInfo_?this.playerInfo_.container:null},
getPlayer:function(){return this.player_},
onPlayerRequested_:function(a,b){this.playerInfo_=b;this.requiresPlayer=!0},
onPlayerAttached_:function(a,b){this.player_=b},
onPlayerDetached_:function(){A("kevlar_use_ytd_player")||A("kevlar_ytd_player_container")?this.player_=null:this.requiresPlayer=!1},
getServiceTrackingParams:function(){return this.data.responseContext.serviceTrackingParams},
setMastheadAd_:function(a){a&&a.mastheadAd&&(this.mastheadAdData=void 0);this.mastheadAdData=a&&a.mastheadAd},
dataChanged_:function(a){a.onResponseReceivedActions&&a.onResponseReceivedActions.length&&this.sendInnerTubeActions(a.onResponseReceivedActions,this);var b=this.get("onResponseReceivedEndpoints",a);b&&this.sendServiceRequestAction(b);this.HOME_PAGE_SKELETON_ENABLED_&&!this.skeletonHidden_&&(A("kevlar_home_skeleton_hide_later")?a.filler||this.hideSkeleton_():this.hideSkeleton_())},
disposeMastheadAd_:function(){this.mastheadAdData=void 0},
computeAlertBannerData_:function(a){return a&&a.find(function(b){return!!b.alertWithActionsRenderer})}});var qHa=function(){return F.apply(this,arguments)||this};
l(qHa,F);var rHa=qHa;rHa=v([W({is:"ytd-search-items"})],rHa);var q6,r6=function(){return F.apply(this,arguments)||this};
l(r6,F);r6.prototype.configureRendererStamper=function(){return{"data.content.closeButton":{id:"menu",mapping:{menuRenderer:"ytd-menu-renderer"}},"data.content.ctaButton":{id:"call-to-action",mapping:{buttonRenderer:"ytd-button-renderer"}}}};
r6.prototype.dataChanged=function(){this.data&&this.data.content&&this.data.clickLocationTargets&&this.data.content.navigationEndpoint&&(this.data.adBadge||this.set("data.adBadge",q6.DEFAULT_AD_BADGE_RENDERER),this.sendImpression(),this.ytSparklesClickLocationBehavior.configureClickTargets("root-container",this.data.clickLocationTargets,q6.CLICK_LOCATION_ID_MAP))};
r6.prototype.onTap=function(a){var b=this.data&&this.data.content&&this.data.content.navigationEndpoint;b&&this.ytSparklesClickLocationBehavior.handleClick(b,a)};
r6.prototype.sendImpression=function(){if(this.data&&this.data.content)for(var a=k(this.data.content.impressionEndpoints||[]),b=a.next();!b.done;b=a.next()){b=k(b.value.loggingUrls||[]);for(var c=b.next();!c.done;c=b.next())c=c.value,c.baseUrl&&Zo(c.baseUrl)}};
var s6=q6=r6;q6.prototype.onTap=q6.prototype.onTap;q6.prototype.dataChanged=q6.prototype.dataChanged;s6.CLICK_LOCATION_ID_MAP=new Map([["PROMOTED_SPARKLES_CLICK_LOCATION_TITLE","title"],["PROMOTED_SPARKLES_CLICK_LOCATION_DESCRIPTION","description"],["PROMOTED_SPARKLES_CLICK_LOCATION_AD_BADGE","ad-badge"],["PROMOTED_SPARKLES_CLICK_LOCATION_TEXT_AD_WEBSITE","display-url"],["PROMOTED_SPARKLES_CLICK_LOCATION_BACKGROUND","root-container"]]);
s6.DEFAULT_AD_BADGE_RENDERER={metadataBadgeRenderer:{label:yU("AD_BADGE_TEXT",void 0,"Ad"),style:"BADGE_STYLE_TYPE_AD"}};v([H(X),w("design:type",Object)],s6.prototype,"ytRendererstamperBehavior",void 0);v([H(V.YtRendererBehavior),w("design:type",Object)],s6.prototype,"ytRendererBehavior",void 0);
v([H({YtSparklesClickLocationBehavior:{clickTargetMap:null,containerId:null,handleClick:function(a,b){var c=this.getClickTarget_(b);c&&this.isClickAllowed_(c)&&(b.preventDefault(),a=(0,u.unsafeClone)(a),b=this.getRelativeClickXy_(b),this.expandEndpointUrlMacros_(a,{NX:b[0],NY:b[1],NB:c.code}),this.fire("yt-navigate",{endpoint:a}))},
getClickTarget_:function(a){if(!this.clickTargetMap)return null;a=Polymer.dom(a).path||[];a=k(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;if(b===this.$.menu)break;if(b=this.clickTargetMap.get(b.id))return b}return null},
getRelativeClickXy_:function(a){var b=this.$[this.containerId].getBoundingClientRect(),c=Math.round(a.detail.x-b.left);a=Math.round(a.detail.y-b.top);return 0>c||0>a?[null,null]:[c,a]},
expandEndpointUrlMacros_:function(a,b){for(var c=k(a.loggingUrls||[]),d=c.next();!d.done;d=c.next())d=d.value,d.baseUrl&&(d.baseUrl=xE(d.baseUrl,b));a.urlEndpoint&&a.urlEndpoint.url&&(a.urlEndpoint.url=xE(a.urlEndpoint.url,b));a.commandMetadata&&a.commandMetadata.webCommandMetadata&&a.commandMetadata.webCommandMetadata.url&&(a.commandMetadata.webCommandMetadata.url=xE(a.commandMetadata.webCommandMetadata.url,b))},
configureClickTargets:function(a,b,c){this.containerId=a;this.clickTargetMap=new Map;a=k(b);for(b=a.next();!b.done;b=a.next())if(b=b.value,b.location){var d=c.get(b.location);d&&(this.toggleClass("yt-simple-endpoint",this.isClickAllowed_(b),this.$[d]),this.clickTargetMap.set(d,b))}},
isClickAllowed_:function(a){return"PROMOTED_SPARKLES_CLICK_BEHAVIOR_TYPE_OPEN_AD"===a.behaviorType}}}.YtSparklesClickLocationBehavior),
w("design:type",Object)],s6.prototype,"ytSparklesClickLocationBehavior",void 0);v([I(),w("design:type",Object)],s6.prototype,"data",void 0);v([rl("data"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],s6.prototype,"dataChanged",null);v([ql("tap"),w("design:type",Function),w("design:paramtypes",[CustomEvent]),w("design:returntype",void 0)],s6.prototype,"onTap",null);s6=q6=v([W({is:"ytd-promoted-sparkles-text-search-renderer"})],s6);Polymer({is:"ytd-web-answer-renderer",behaviors:[X,V.YtRendererBehavior],properties:{data:Object,bottomIcon_:{type:String,computed:"computeIcon_(data.bottomIcon)"},enableBlueBottomLink:{type:Boolean,computed:"computeBlueBottomLink_(data.blueBottomLink)",reflectToAttribute:!0}},computeBlueBottomLink_:function(a){return a},
stampDom:{"data.menu":{id:"menu",mapping:{menuRenderer:"ytd-menu-renderer"}}}});var t6=function(){var a=F.apply(this,arguments)||this;a.actionMap={"yt-show-search-contents-command":"onYtShowSearchContentsCommand"};return a};
l(t6,F);f=t6.prototype;f.configureRendererStamper=function(){return{"data.survey":{id:"survey",mapping:{surveyTriggerRenderer:{component:"ytd-survey-trigger-renderer",noInjection:!0}},initialRenderPriority:3,waitForSignal:kp(ip.getInstance(),["aa","eocs"])}}};
f.attached=function(){this.actionHandlerBehavior.actionMap=this.actionMap};
f.loadPage=function(a){this.initCsi();a&&(this.data=a,re("REFINEMENTS_TUPLE",["FromSearchResponse",a.refinements||[]]),wm(this));this.updateTitle()};
f.dataChanged=function(a){a.onResponseReceivedCommands&&a.onResponseReceivedCommands.length&&this.ytActionSenderBehavior.sendInnerTubeActions(a.onResponseReceivedCommands,this)};
f.initCsi=function(){Vp("results",["ol"]);pq("psc",this.ytPageBehavior.pageCount)};
f.updateTitle=function(){var a=Ei(window.location.href,"q");a||(a=Ei(window.location.href,"search_query"));this.fire("yt-update-title",a||"")};
f.onYtShowSearchContentsCommand=function(){this.set("data.hideContents",!1)};
var u6=t6;v([H(KGa),w("design:type",Object)],u6.prototype,"ytPageBehavior",void 0);v([H(U.YtActionHandlerBehavior),w("design:type",Object)],u6.prototype,"actionHandlerBehavior",void 0);v([H(T.YtActionSenderBehavior),w("design:type",Object)],u6.prototype,"ytActionSenderBehavior",void 0);v([H(V.YtRendererBehavior),w("design:type",Object)],u6.prototype,"ytRendererBehavior",void 0);v([H(X),w("design:type",Object)],u6.prototype,"ytRendererstamperBehavior",void 0);
v([I({observer:"dataChanged"}),w("design:type",Object)],u6.prototype,"data",void 0);v([I({reflectToAttribute:!0,value:function(){return A("kevlar_center_search_results")}}),
w("design:type",Boolean)],u6.prototype,"centerResults",void 0);v([I({value:!0}),w("design:type",Boolean)],u6.prototype,"monitorScroll",void 0);u6=v([W({is:"ytd-search"})],u6);Polymer({is:"ytd-page-continuation",behaviors:[V.YtRendererBehavior,X],properties:{data:Object},stampDom:{"data.pages":{id:"pages",mapping:{buttonRenderer:"ytd-button-renderer"}}}});var v6=function(){var a=F.apply(this,arguments)||this;a.selected=0;return a};
l(v6,F);v6.prototype.dataChanged=function(){this.selected=0};
var w6=v6;w6.prototype.dataChanged=w6.prototype.dataChanged;v([H(V.YtRendererBehavior),w("design:type",Object)],w6.prototype,"ytRendererBehavior",void 0);v([I(),w("design:type",Object)],w6.prototype,"data",void 0);v([I(),w("design:type",Object)],w6.prototype,"selected",void 0);v([rl("data"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],w6.prototype,"dataChanged",null);w6=v([W({is:"ytd-artist-watch-card-renderer"})],w6);var sHa=function(){return F.apply(this,arguments)||this};
l(sHa,F);var x6=sHa;v([H(V.YtRendererBehavior),w("design:type",Object)],x6.prototype,"ytRendererBehavior",void 0);v([I(),w("design:type",Object)],x6.prototype,"data",void 0);x6=v([W({is:"ytd-watch-card-album-list-renderer"})],x6);var y6=function(){return F.apply(this,arguments)||this};
l(y6,F);y6.prototype.onLeftThumbnailChanged=function(){this.data&&this.data.leftThumbnail&&(this.sectionLeft.style.backgroundImage="url("+LY(this.data.leftThumbnail.thumbnails,216)+")")};
var z6=y6;z6.prototype.onLeftThumbnailChanged=z6.prototype.onLeftThumbnailChanged;v([H(V.YtRendererBehavior),w("design:type",Object)],z6.prototype,"ytRendererBehavior",void 0);v([I(),w("design:type",Object)],z6.prototype,"data",void 0);v([tl("#section-left"),w("design:type",HTMLElement)],z6.prototype,"sectionLeft",void 0);v([rl("data.leftThumbnail"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],z6.prototype,"onLeftThumbnailChanged",null);
z6=v([W({is:"ytd-watch-card-collage-renderer"})],z6);var A6=function(){var a=F.apply(this,arguments)||this;a.crop=!1;return a};
l(A6,F);A6.prototype.computeImageUrl=function(a){return a?LY(a.thumbnails,385):null};
var B6=A6;v([H(V.YtRendererBehavior),w("design:type",Object)],B6.prototype,"ytRendererBehavior",void 0);v([I(),w("design:type",Object)],B6.prototype,"data",void 0);v([I(),w("design:type",Object)],B6.prototype,"crop",void 0);B6=v([W({is:"ytd-watch-card-single-image-renderer"})],B6);var tHa=function(){return F.apply(this,arguments)||this};
l(tHa,F);var C6=tHa;v([H(V.YtRendererBehavior),w("design:type",Object)],C6.prototype,"ytRendererBehavior",void 0);v([I(),w("design:type",Object)],C6.prototype,"data",void 0);C6=v([W({is:"ytd-watch-card-video-list-renderer"})],C6);Polymer({is:"ytd-generic-watch-card",behaviors:[V.YtRendererBehavior],properties:{title:Object,navigationEndpoint:Object,labels:Object,badges:{type:Object,value:null},standaloneBadge:{type:Object,value:null},callToAction:Object,lists:Object,relatedData:Object,selected:{type:Number,value:0},crop:{type:Boolean,value:!1},headerStyle:{type:String,reflectToAttribute:!0}},shouldScrollTabs_:function(a){return 2<a.length},
onPageSelect_:function(){var a=this.getInterface(mW);a&&a.markDirty()}});var uHa=function(){return F.apply(this,arguments)||this};
l(uHa,F);var D6=uHa;v([H(V.YtRendererBehavior),w("design:type",Object)],D6.prototype,"ytRendererBehavior",void 0);v([I(),w("design:type",Object)],D6.prototype,"data",void 0);D6=v([W({is:"ytd-show-watch-card-renderer"})],D6);var E6=function(){return F.apply(this,arguments)||this};
l(E6,F);
E6.prototype.configureRendererStamper=function(){return{"data.header":{id:"header",mapping:{watchCardRichHeaderRenderer:{component:"ytd-watch-card-rich-header-renderer",noInjection:!0}}},"data.callToAction":{id:"hero",mapping:{watchCardHeroVideoRenderer:{component:"ytd-watch-card-hero-video-renderer",noInjection:!0},watchCardHeroOneVsOneEventRenderer:{component:"ytd-watch-card-hero-one-vs-one-event-renderer",noInjection:!0}}},"data.sections":{id:"sections",mapping:{watchCardSectionDropdownRenderer:{component:"ytd-watch-card-section-dropdown-renderer",noInjection:!0},
watchCardSectionSequenceRenderer:{component:"ytd-watch-card-section-sequence-renderer",noInjection:!0}}}}};
var F6=E6;v([H(X),w("design:type",Object)],F6.prototype,"ytRendererstamperBehavior",void 0);v([H(V.YtRendererBehavior),w("design:type",Object)],F6.prototype,"ytRendererBehavior",void 0);v([I(),w("design:type",Object)],F6.prototype,"data",void 0);F6=v([W({is:"ytd-universal-watch-card-renderer"})],F6);var vHa=function(){return F.apply(this,arguments)||this};
l(vHa,F);var G6=vHa;v([H(V.YtRendererBehavior),w("design:type",Object)],G6.prototype,"ytRendererBehavior",void 0);v([I(),w("design:type",Object)],G6.prototype,"data",void 0);G6=v([W({is:"ytd-watch-card-hero-one-vs-one-event-renderer"})],G6);var wHa=function(){return F.apply(this,arguments)||this};
l(wHa,F);var H6=wHa;v([H(V.YtRendererBehavior),w("design:type",Object)],H6.prototype,"ytRendererBehavior",void 0);v([I(),w("design:type",Object)],H6.prototype,"data",void 0);H6=v([W({is:"ytd-watch-card-one-vs-one-event"})],H6);var xHa=function(){return F.apply(this,arguments)||this};
l(xHa,F);var I6=xHa;v([H(V.YtRendererBehavior),w("design:type",Object)],I6.prototype,"ytRendererBehavior",void 0);v([I(),w("design:type",Object)],I6.prototype,"data",void 0);I6=v([W({is:"ytd-banner-and-box-hero-image-renderer"})],I6);var J6=function(){return F.apply(this,arguments)||this};
l(J6,F);ea.Object.defineProperties(J6.prototype,{buttonColor:{configurable:!0,enumerable:!0,get:function(){return this.data&&this.data.style?this.data.style.replace("CALL_TO_ACTION_BUTTON_RENDERER_STYLE_",""):"RED"}}});
var K6=J6;v([H(V.YtRendererBehavior),w("design:type",Object)],K6.prototype,"ytRendererBehavior",void 0);v([I(),w("design:type",Object)],K6.prototype,"data",void 0);v([I({type:String,reflectToAttribute:!0}),sl("data.style"),w("design:type",Object),w("design:paramtypes",[])],K6.prototype,"buttonColor",null);K6=v([W({is:"ytd-call-to-action-button-renderer"})],K6);var L6=function(){return F.apply(this,arguments)||this};
l(L6,F);L6.prototype.onLeftThumbnailChanged=function(){this.data&&this.data.leftThumbnail&&(this.$["section-left"].style.backgroundImage="url("+LY(this.data.leftThumbnail.thumbnails,216)+")")};
var M6=L6;M6.prototype.onLeftThumbnailChanged=M6.prototype.onLeftThumbnailChanged;v([H(V.YtRendererBehavior),w("design:type",Object)],M6.prototype,"ytRendererBehavior",void 0);v([I(),w("design:type",Object)],M6.prototype,"data",void 0);v([rl("data.leftThumbnail"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],M6.prototype,"onLeftThumbnailChanged",null);M6=v([W({is:"ytd-collage-hero-image-renderer"})],M6);var N6=function(){return F.apply(this,arguments)||this};
l(N6,F);N6.prototype.computeStyle=function(a){return a};
var O6=N6;v([H(V.YtRendererBehavior),w("design:type",Object)],O6.prototype,"ytRendererBehavior",void 0);v([I(),w("design:type",Object)],O6.prototype,"data",void 0);v([I({reflectToAttribute:!0,computed:"computeStyle(data.style)"}),w("design:type",String)],O6.prototype,"componentStyle",void 0);O6=v([W({is:"ytd-single-hero-image-renderer"})],O6);var P6=function(){return F.apply(this,arguments)||this};
l(P6,F);f=P6.prototype;
f.configureRendererStamper=function(){return{"data.heroImage":{id:"hero-image",mapping:{bannerAndBoxHeroImageRenderer:"ytd-banner-and-box-hero-image-renderer",singleHeroImageRenderer:"ytd-single-hero-image-renderer",collageHeroImageRenderer:"ytd-collage-hero-image-renderer"}},"data.callToActionButton":{id:"call-to-action-button",mapping:{callToActionButtonRenderer:"ytd-call-to-action-button-renderer"}},"data.reminderButton":{id:"reminder-button",mapping:{toggleButtonRenderer:"ytd-toggle-button-renderer"}},"data.thumbnailOverlays":{id:"overlays",
mapping:{thumbnailOverlayPlaybackStatusRenderer:"ytd-thumbnail-overlay-playback-status-renderer",thumbnailOverlayHoverTextRenderer:"ytd-thumbnail-overlay-hover-text-renderer",thumbnailOverlayResumePlaybackRenderer:"ytd-thumbnail-overlay-resume-playback-renderer",thumbnailOverlaySidePanelRenderer:{component:"ytd-thumbnail-overlay-side-panel-renderer",properties:{width:"[[thumbnailOverlaySidePanelWidth_]]",bottomPanel:"[[bottomSidePanel]]"}},thumbnailOverlayTimeStatusRenderer:"ytd-thumbnail-overlay-time-status-renderer",
thumbnailOverlayToggleButtonRenderer:{component:"ytd-thumbnail-overlay-toggle-button-renderer",properties:{disableTooltips:"[[disableTooltips]]"}}},initialRenderPriority:A("defer_overlays")?0:void 0,waitForSignal:"eocs"}}};
f.computeSubtitle=function(a){if(this.data){var b;if(this.data.upcomingEventData){a=XU(a.subtitle);var c=Number(this.data.upcomingEventData.startTime);isNaN(c)||(b=UU(sS(a,c)))}else b=a.subtitle;return b}};
f.onHeroTap=function(a){a.preventDefault();var b=this.data&&this.data.navigationEndpoint;b&&!GZ(Polymer.dom(a).path||[],this,["YTD-TOGGLE-BUTTON-RENDERER"])&&this.fire("yt-navigate",{endpoint:b})};
f.computeHeroTabIndex=function(a){return a&&a.simpleText?-1:0};
f.computeHeroRole=function(a){return a&&a.simpleText?"":"link"};
f.computeIsReminderButtonPresent=function(a){return!(!a||!a.reminderButton)};
f.computeHideBottomItems=function(a){return!(this.computeIsReminderButtonPresent(a)||a.subtitle)};
var Q6=P6;v([H(V.YtRendererBehavior),w("design:type",Object)],Q6.prototype,"ytRendererBehavior",void 0);v([H(X),w("design:type",Object)],Q6.prototype,"ytRendererstamperBehavior",void 0);v([I(),w("design:type",Object)],Q6.prototype,"data",void 0);v([I({computed:"computeSubtitle(data)"}),w("design:type",String)],Q6.prototype,"subtitle",void 0);v([I({computed:"computeIsReminderButtonPresent(data)",reflectToAttribute:!0}),w("design:type",Boolean)],Q6.prototype,"isReminderButtonPresent",void 0);
v([I({computed:"computeHideBottomItems(data)",reflectToAttribute:!0}),w("design:type",Boolean)],Q6.prototype,"hideBottomItems",void 0);Q6=v([W({is:"ytd-watch-card-hero-video-renderer"})],Q6);MY.YtSwatchBehavior={_noAccessors:!0,properties:{swatch:{type:Object,observer:"updateStylesOnSwatchChanged_"}},created:function(){this.LIGHT_TEXT_COLOR_=[255,255,255];this.DARK_TEXT_COLOR_=[17,17,17,.6];this.LIGHTENED_DARK_TEXT_COLOR_=[17,17,17,.4];this.RGB_MASK_=16777215;this.RED_MASK_=16711680;this.GREEN_MASK_=65280;this.BLUE_MASK_=255;this.baseColor_="#fff";this.isHighContrastBlack_=!1;Polymer.RenderStatus.afterNextRender(this,function(){if(null==wX){var a=ah(),b=a.getDocument(),c=a.createElement("div");
c.style.backgroundColor="rgb(1, 2, 3)";a.appendChild(b.body,c);b=bj(c,"backgroundColor");b=b.replace(/ /g,"");wX="rgb(0,0,0)"===b?"black":"rgb(255,255,255)"===b?"white":null;a.removeNode(c)}(this.isHighContrastBlack_="black"==wX)&&this.setSwatch("#000")});
this.DEFAULT_MODE_BASE_COLOR="#fff";this.THEATER_MODE_BASE_COLOR="#232323";this.DEFAULT_DOCUMENT_BACKGROUND_COLOR="#fff";this.DARKMODE_DOCUMENT_BACKGROUND_COLOR="#131313"},
rgbStyle_:function(a){return 3==a.length?"rgb("+a.join(",")+")":"rgba("+a.join(",")+")"},
resetSwatch:function(){this.setSwatch("#fff")},
isAppDarkTheme_:function(){return document.documentElement.hasAttribute("dark")},
setSwatchWithArgb:function(a){a&=this.RGB_MASK_;var b=[(a&this.RED_MASK_)>>16,(a&this.GREEN_MASK_)>>8,a&this.BLUE_MASK_];a&&this.setSwatch(ZK(b))},
getCurrentSwatch:function(){return this.baseColor_},
setSwatch:function(a){this.isHighContrastBlack_&&(a="#000");if(this.baseColor_!=a){var b=a;if(!Dsa.test(b))throw Error("'"+b+"' is not a valid hex color");4==b.length&&(b=b.replace(Csa,"#$1$1$2$2$3$3"));b=b.toLowerCase();b=parseInt(b.substr(1),16);b=[b>>16,b>>8&255,b&255];var c=[0,0,0];var d=Ug(.1,0,1);d=[Math.round(b[0]+d*(c[0]-b[0])),Math.round(b[1]+d*(c[1]-b[1])),Math.round(b[2]+d*(c[2]-b[2]))];var e=this.isTextLightColor_(b),g="#ffffff"===ZK(b);c=this.DARK_TEXT_COLOR_;g?c=this.LIGHTENED_DARK_TEXT_COLOR_:
e&&(c=this.LIGHT_TEXT_COLOR_);e=g?"":this.rgbStyle_(c);g=g?"":this.rgbStyle_(this.LIGHT_TEXT_COLOR_);var h=$K(136,136,136);this.set("swatch",{baseColor:a,iconColor:h,inputText:this.pickInputTextColor_(b),logoOverrideColor:g,primary:this.rgbStyle_(b),primaryDarker:this.rgbStyle_(d),textColor:this.rgbStyle_(c),textImportantColor:e,textboxBg:this.pickTextboxBgColor_(b)});this.fire("yt-swatch-changed",this.swatch)}},
isTextLightColor_:function(a){return .5>(.299*a[0]+.587*a[1]+.114*a[2])/255},
pickInputTextColor_:function(a){return"#ffffff"==ZK(a)?$K(17,17,17):"#232323"==ZK(a)?$K(255,255,255):$K(17,17,17)},
pickTextboxBgColor_:function(a){return"#ffffff"==ZK(a)?$K(255,255,255):"#232323"==ZK(a)?$K(19,19,19):$K(255,255,255)},
applySwatchToElement:function(a,b){a&&b&&b.baseColor!=a.baseColor_&&(a.baseColor_=b.baseColor,a.updateStyles({"--yt-swatch-primary":this.swatch.primary,"--yt-swatch-primary-darker":this.swatch.primaryDarker,"--yt-swatch-text":this.swatch.textColor,"--yt-swatch-important-text":this.swatch.textImportantColor,"--yt-swatch-input-text":this.swatch.inputText,"--yt-swatch-textbox-bg":this.swatch.textboxBg,"--yt-swatch-logo-override":this.swatch.logoOverrideColor,"--yt-swatch-icon-color":this.swatch.iconColor}))},
updateStylesOnSwatchChanged_:function(a){this.applySwatchToElement(this,a)}};var R6=function(){var a=F.apply(this,arguments)||this;a.actionMap={"yt-dark-mode-toggled-action":"onDarkModeToggledAction"};return a};
l(R6,F);f=R6.prototype;f.configureRendererStamper=function(){return{"data.callToActionButton":{id:"call-to-action-button",mapping:{buttonRenderer:"ytd-button-renderer",subscribeButtonRenderer:"ytd-subscribe-button-renderer",subscriptionNotificationToggleButtonRenderer:"ytd-subscription-notification-toggle-button-renderer"}}}};
f.attached=function(){this.ytActionHandlerBehavior.actionMap=this.actionMap};
f.observeColorSupportedDatas=function(){this.onDarkModeToggledAction(this.ytSwatchBehavior.isAppDarkTheme_())};
f.onDarkModeToggledAction=function(a){var b=this.data.colorSupportedDatas;a&&this.data.darkThemeColorSupportedDatas&&(b=this.data.darkThemeColorSupportedDatas);b&&b.basicColorPaletteData&&HY(this,b.basicColorPaletteData)};
f.computeTitleBadges=function(a){return a?[a]:[]};
f.computeHeaderStyle=function(a){return a?a.replace("WATCH_CARD_RICH_HEADER_RENDERER_STYLE_","").toLowerCase():""};
f.computeAvatarHeight=function(a){return"WATCH_CARD_RICH_HEADER_RENDERER_STYLE_LEFT_AVATAR"===a?72:48};
var S6=R6;S6.prototype.observeColorSupportedDatas=S6.prototype.observeColorSupportedDatas;v([H(U.YtActionHandlerBehavior),w("design:type",Object)],S6.prototype,"ytActionHandlerBehavior",void 0);v([H(V.YtRendererBehavior),w("design:type",Object)],S6.prototype,"ytRendererBehavior",void 0);v([H(X),w("design:type",Object)],S6.prototype,"ytRendererstamperBehavior",void 0);v([H(MY.YtSwatchBehavior),w("design:type",Object)],S6.prototype,"ytSwatchBehavior",void 0);
v([I(),w("design:type",Object)],S6.prototype,"data",void 0);v([I({computed:"computeTitleBadges(data.titleBadge)"}),w("design:type",Array)],S6.prototype,"titleBadges",void 0);v([I({reflectToAttribute:!0,computed:"computeHeaderStyle(data.style)"}),w("design:type",String)],S6.prototype,"headerStyle",void 0);v([rl("data.colorSupportedDatas"),w("design:type",Function),w("design:paramtypes",[Object]),w("design:returntype",void 0)],S6.prototype,"observeColorSupportedDatas",null);
S6=v([W({is:"ytd-watch-card-rich-header-renderer"})],S6);var T6=function(){return F.apply(this,arguments)||this};
l(T6,F);T6.prototype.configureRendererStamper=function(){return{"data.items":{id:"items",mapping:{watchCardCompactVideoRenderer:{component:"ytd-watch-card-compact-video-renderer",noInjection:!0},watchCardOneVsOneEventCompactVideoRenderer:{component:"ytd-watch-card-one-vs-one-event-compact-video-renderer",noInjection:!0}}}}};
var U6=T6;v([H(X),w("design:type",Object)],U6.prototype,"ytRendererStamperBehavior",void 0);v([H(V.YtRendererBehavior),w("design:type",Object)],U6.prototype,"ytRendererBehavior",void 0);v([I(),w("design:type",Object)],U6.prototype,"data",void 0);U6=v([W({is:"ytd-vertical-watch-card-list-renderer"})],U6);var V6=function(){return F.apply(this,arguments)||this};
l(V6,F);V6.prototype.onMetadataTap=function(a){var b=this.data&&this.data.navigationEndpoint;b&&!GZ(Polymer.dom(a).path,this,["A".toString()])&&this.fire("yt-navigate",{endpoint:b})};
ea.Object.defineProperties(V6.prototype,{isCondensed:{configurable:!0,enumerable:!0,get:function(){return this.data&&this.data.style?"WATCH_CARD_COMPACT_VIDEO_RENDERER_STYLE_CONDENSED"===this.data.style:!1}},
subtitle:{configurable:!0,enumerable:!0,get:function(){if(this.data){var a;if(this.data.upcomingEventData){var b=XU(this.data.subtitle),c=Number(this.data.upcomingEventData.startTime);isNaN(c)||(a=UU(sS(b,c)))}else a=this.data.subtitle;return a}}}});
var W6=V6;v([H(V.YtRendererBehavior),w("design:type",Object)],W6.prototype,"ytRendererBehavior",void 0);v([I(),w("design:type",Object)],W6.prototype,"data",void 0);v([I({reflectToAttribute:!0}),sl("data.style"),w("design:type",Boolean),w("design:paramtypes",[])],W6.prototype,"isCondensed",null);v([I({reflectToAttribute:!0}),sl("data"),w("design:type",Object),w("design:paramtypes",[])],W6.prototype,"subtitle",null);W6=v([W({is:"ytd-watch-card-compact-video-renderer"})],W6);var yHa=function(){return F.apply(this,arguments)||this};
l(yHa,F);var X6=yHa;v([H(V.YtRendererBehavior),w("design:type",Object)],X6.prototype,"ytRendererBehavior",void 0);v([I(),w("design:type",Object)],X6.prototype,"data",void 0);X6=v([W({is:"ytd-watch-card-one-vs-one-event-compact-video-renderer"})],X6);var Y6=function(){return F.apply(this,arguments)||this};
l(Y6,F);f=Y6.prototype;f.configureRendererStamper=function(){return{"data.lists":{id:"lists",mapping:{verticalWatchCardListRenderer:"ytd-vertical-watch-card-list-renderer"}}}};
f.dataChanged=function(a){this.currentSeasonIndex=a&&a.dropdownDefaultSelectedIndex||0;this.lists.select(this.currentSeasonIndex);this.label=this.getUppercaseSimpleString(a.dropdownTitles[this.currentSeasonIndex])};
f.computeEpisodesInfo=function(a,b,c){if(void 0!==a&&b.length===a.length)return a[c]};
f.onSeasonSelect=function(){this.ytRendererBehavior.markDirty()};
f.currentSeasonIndexChanged=function(){this.data&&this.data.dropdownTitles&&(this.label=this.getUppercaseSimpleString(this.data.dropdownTitles[this.currentSeasonIndex]))};
f.onLabelClick=function(){this.ariaExpanded="true"};
f.onIronOverlayClosed=function(){this.ariaExpanded="false"};
f.getUppercaseSimpleString=function(a){return this.ytRendererBehavior.getSimpleString(a).toUpperCase()};
var Z6=Y6;Z6.prototype.onIronOverlayClosed=Z6.prototype.onIronOverlayClosed;v([H(V.YtRendererBehavior),w("design:type",Object)],Z6.prototype,"ytRendererBehavior",void 0);v([H(X),w("design:type",Object)],Z6.prototype,"ytRendererstamperBehavior",void 0);v([H(MY.YtPolymer2AwareBehavior),w("design:type",Object)],Z6.prototype,"ytPolymer2AwareBehavior",void 0);v([I({observer:"dataChanged"}),w("design:type",Object)],Z6.prototype,"data",void 0);v([I(),w("design:type",String)],Z6.prototype,"label",void 0);
v([I({observer:"currentSeasonIndexChanged",value:0}),w("design:type",Number)],Z6.prototype,"currentSeasonIndex",void 0);v([I({computed:"computeEpisodesInfo(data.dropdownSubtitles,data.dropdownTitles,currentSeasonIndex)"}),w("design:type",Object)],Z6.prototype,"episodesInfo",void 0);v([I({value:"false"}),w("design:type",String)],Z6.prototype,"ariaExpanded",void 0);v([tl("#lists"),w("design:type",Object)],Z6.prototype,"lists",void 0);
v([ql("iron-overlay-closed"),w("design:type",Function),w("design:paramtypes",[Event]),w("design:returntype",void 0)],Z6.prototype,"onIronOverlayClosed",null);Z6=v([W({is:"ytd-watch-card-section-dropdown-renderer"})],Z6);var $6=function(){return F.apply(this,arguments)||this};
l($6,F);$6.prototype.configureRendererStamper=function(){return{"data.lists":{id:"lists",mapping:{verticalWatchCardListRenderer:{component:"ytd-vertical-watch-card-list-renderer",noInjection:!0},horizontalCardListRenderer:{component:"ytd-horizontal-card-list-renderer",noInjection:!0}}}}};
var a7=$6;v([H(X),w("design:type",Object)],a7.prototype,"ytRendererstamperBehavior",void 0);v([H(V.YtRendererBehavior),w("design:type",Object)],a7.prototype,"ytRendererBehavior",void 0);v([I(),w("design:type",Object)],a7.prototype,"data",void 0);a7=v([W({is:"ytd-watch-card-section-sequence-renderer"})],a7);var zHa=function(){return F.apply(this,arguments)||this};
l(zHa,F);var b7=zHa;v([H(V.YtRendererBehavior),w("design:type",Object)],b7.prototype,"ytRendererBehavior",void 0);v([I(),w("design:type",Object)],b7.prototype,"data",void 0);b7=v([W({is:"ytd-video-game-watch-card-renderer"})],b7);var c7=function(){return F.apply(this,arguments)||this};
l(c7,F);c7.prototype.createArray=function(a){return a?[a]:null};
var d7=c7;v([H(V.YtRendererBehavior),w("design:type",Object)],d7.prototype,"ytRendererBehavior",void 0);v([I(),w("design:type",Object)],d7.prototype,"data",void 0);d7=v([W({is:"ytd-watch-card-renderer"})],d7);var e7=function(){return F.apply(this,arguments)||this};
l(e7,F);e7.prototype.configureRendererStamper=function(){return{"data.contents":{id:"contents",mapping:{artistWatchCardRenderer:"ytd-artist-watch-card-renderer",watchCardRenderer:"ytd-watch-card-renderer",showWatchCardRenderer:"ytd-show-watch-card-renderer",videoGameWatchCardRenderer:"ytd-video-game-watch-card-renderer",universalWatchCardRenderer:"ytd-universal-watch-card-renderer"}}}};
e7.prototype.setCsi=function(){if(this.data&&this.data.contents){var a=this.configureRendererStamper()["data.contents"];if(a)for(var b=0;b<this.data.contents.length;b++){var c=this.data.contents[b];if(!c)break;for(var d in c)a.mapping[d]&&(c=a.mapping[d].split("-"),pq("ssr",1<c.length?c[1]:"unknown"))}}};
var f7=e7;f7.prototype.setCsi=f7.prototype.setCsi;v([H(X),w("design:type",Object)],f7.prototype,"ytRendererstamperBehavior",void 0);v([H(V.YtRendererBehavior),w("design:type",Object)],f7.prototype,"ytRendererBehavior",void 0);v([I(),w("design:type",Object)],f7.prototype,"data",void 0);v([rl("data"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],f7.prototype,"setCsi",null);f7=v([W({is:"ytd-secondary-search-container-renderer"})],f7);Polymer({is:"ytd-two-column-search-results-renderer",behaviors:[X,V.YtRendererBehavior,lY.YtdGuideStateAwareBehavior],properties:{active:{type:Boolean,observer:"activeChanged_"},data:Object,renderSecondarySearchContainer_:{type:Boolean,value:!1},showSecondaryColumn_:{type:Boolean,computed:"computeShowSecondaryColumn_(renderSecondarySearchContainer_, data)"},isSearch:{type:Boolean,value:!1},isSearchDova:{type:Boolean,value:A("dova_on_search")},centerResults:{type:Boolean,reflectToAttribute:!0}},observers:["persistentGuideChanged_(guidePersistentAndVisible)"],
listeners:{"yt-retrieve-location":"onRetrieveLocation_"},stampDom:{"data.continuations":{id:"continuations",mapping:{pageContinuationData:"ytd-page-continuation"}}},created:function(){this.SECONDARY_MIN_WIDTH_=1090;this.boundStampSecondarySearchContainerIfFits_=this.stampSecondarySearchContainerIfFits_.bind(this);re("REMAINING_DOVA_DEFERRED_CHUNKS",1)},
computeShowSecondaryColumn_:function(a,b){return!!(b&&b.secondaryContents&&a)},
activeChanged_:function(a){a&&!this.renderSecondarySearchContainer_?(this.listen(window,"resize","debounceStampSecondarySearchContainerIfFits_"),this.async(this.debounceStampSecondarySearchContainerIfFits_.bind(this))):a||this.unlisten(window,"resize","debounceStampSecondarySearchContainerIfFits_")},
persistentGuideChanged_:function(){this.active&&!this.renderSecondarySearchContainer_&&this.debounceStampSecondarySearchContainerIfFits_()},
stampSecondarySearchContainerIfFits_:function(){!this.renderSecondarySearchContainer_&&window.innerWidth>=this.SECONDARY_MIN_WIDTH_&&(this.renderSecondarySearchContainer_=!0)},
debounceStampSecondarySearchContainerIfFits_:function(){this.debounce("stampSecondarySearchContainerIfFits_",this.boundStampSecondarySearchContainerIfFits_)},
onRetrieveLocation_:function(a,b){b.locationRetrieved(location.pathname+location.search+"&pbj=1",void 0);a.stopPropagation()}});var g7=function(){var a=F.apply(this,arguments)||this;a.stateData=-1;a.state="QUEUE_TO_PLAY_RENDERER_STATE_UNSPECIFIED";a.isLoading=!0;a.startGameTimer=new rw(1E3);a.expirationDurationMs=0;a.isQueueToPlayLoading=!1;a.actionMap={"yt-queue-to-play-command":"handleQueueToPlayCommand"};return a};
l(g7,F);f=g7.prototype;f.cloudcast=function(){var a=this,b=this.data&&this.data.clientJsUrl,c=this.data&&this.data.cloudcastEndpoint;b?c?this.loadClientJs(b).then(function(d){a.client=d.client.init(c,"",z("SESSION_INDEX"));a.client.startPollingQueueState(a.videoId,function(e,g){a.pollingResponseHandler(e,g)})}):bn(Error("Cloudcast endpoint was not provided")):bn(Error("Queue to play script URL was not provided"))};
f.pollingResponseHandler=function(a,b){this.client&&(this.stateData=void 0===b?-1:b,this.state=this.queueStateToRendererState(a,b),this.isLoading=!1,a===window.cloudcast.client.ClientQueueState.READY_TO_PLAY?this.startGameTimer.enabled||"number"!==typeof b||(this.expirationDurationMs=b,this.startGameTimer.start()):this.startGameTimer.stop(),a===window.cloudcast.client.ClientQueueState.CANNOT_JOIN&&this.client.stopPollingQueueState())};
f.loadClientJs=function(a){return new Promise(function(b,c){var d=!1;Ia(window.cloudcast)?b(window.cloudcast):(window.cloudcastLoaded=function(){d=!0;ak(function(){b(window.cloudcast)})},QR(a),setTimeout(function(){d||c("Reached timeout when loading queue to play library.")},5E3))})};
f.joinQueue=function(a){a.joinQueue(this.videoId).then(null,function(b){bn(Error("There was an unexpected error when attempting to join the queue: "+b))})};
f.leaveQueue=function(a){a.leaveQueue(this.videoId).then(null,function(b){bn(Error("There was an unexpected error when attempting to leave the queue: "+b))})};
f.launchGame=function(a){var b=this;a.playGame(this.videoId).then(function(c){kd(b.playerEndpoint+"/"+c)},function(c){bn(Error("There was an unexpected error when attempting to launch the game: "+c))})};
f.queueStateToRendererState=function(a,b){var c=window.cloudcast.client.ClientQueueState,d=window.cloudcast.client.ClientResolvableIssue;switch(a){case c.CANNOT_JOIN:return"QUEUE_TO_PLAY_RENDERER_STATE_CANNOT_JOIN";case c.ELIGIBLE:return"QUEUE_TO_PLAY_RENDERER_STATE_ELIGIBLE";case c.IN_QUEUE:return"QUEUE_TO_PLAY_RENDERER_STATE_IN_QUEUE";case c.READY_TO_PLAY:return"QUEUE_TO_PLAY_RENDERER_STATE_READY_TO_PLAY";case c.PLAYING:return"QUEUE_TO_PLAY_RENDERER_STATE_PLAYING";case c.RESOLVABLE_ISSUES:if(Array.isArray(b))switch(b[0]){case d.LOGIN_REQUIRED:return"QUEUE_TO_PLAY_RENDERER_STATE_NOT_LOGGED_IN";
case d.ACCOUNT_REQUIRED:return"QUEUE_TO_PLAY_RENDERER_STATE_NO_ACCOUNT";case d.PURCHASE_REQUIRED:return"QUEUE_TO_PLAY_RENDERER_STATE_PURCHASE_REQUIRED";case d.SPONSORSHIP_REQUIRED:return"QUEUE_TO_PLAY_RENDERER_STATE_SPONSORSHIP_REQUIRED";case d.PLAYABILITY_REQUIRED:return"QUEUE_TO_PLAY_RENDERER_STATE_CHECK_PLAYABILITY";}return"QUEUE_TO_PLAY_RENDERER_STATE_UNSPECIFIED";default:return"QUEUE_TO_PLAY_RENDERER_STATE_UNSPECIFIED";}};
f.handleQueueToPlayCommand=function(){if(this.client)switch(this.isLoading=!0,this.state){case"QUEUE_TO_PLAY_RENDERER_STATE_ELIGIBLE":this.joinQueue(this.client);break;case"QUEUE_TO_PLAY_RENDERER_STATE_IN_QUEUE":this.leaveQueue(this.client);break;case"QUEUE_TO_PLAY_RENDERER_STATE_READY_TO_PLAY":this.launchGame(this.client);break;default:bn(Error("Unhandled button action: "+this.state));}else bn(Error("Client is not yet initialized, but there was an button triggered."))};
f.attached=function(){var a=this;this.startGameTimerListenerKey||(this.startGameTimerListenerKey=Hv(this.startGameTimer,"tick",function(){0>=a.expirationDurationMs?a.startGameTimer.stop():a.expirationDurationMs-=1E3}))};
f.detached=function(){this.client?(this.isLoading=!1,this.client.stopPollingQueueState(),this.startGameTimerListenerKey&&(this.startGameTimer.stop(),Nv(this.startGameTimerListenerKey),this.startGameTimerListenerKey=null)):bn(Error("Client is not yet initialized, but there was detached."))};
f.fillStateRenderer=function(a,b){if(-1===b||Array.isArray(b))return a;a=u.unsafeClone(a);var c=this.getStateRendererButtonText(a),d=a.title,e=XU(c),g=XU(d);if("number"===typeof b)b=Math.floor(this.expirationDurationMs/1E3),c&&"QUEUE_TO_PLAY_RENDERER_STATE_READY_TO_PLAY"===a.state&&(delete c.runs,c.simpleText=e.replace("$time_left",String(b))),d&&(delete d.runs,d.simpleText=g.replace("$time_remaining",String(b)));else switch(a.state){case"QUEUE_TO_PLAY_RENDERER_STATE_ELIGIBLE":c&&(delete c.runs,
c.simpleText=e.replace("$num_in_queue",""+b.length));break;case"QUEUE_TO_PLAY_RENDERER_STATE_IN_QUEUE":d&&(delete d.runs,d.simpleText=g.replace("$place_in_queue",""+b.position).replace("$num_in_queue",""+b.length));}return a};
f.getStateRendererButtonText=function(a){if(a.button&&a.button.buttonRenderer&&a.button.buttonRenderer.text)return a.button.buttonRenderer.text};
f.configureRendererStamper=function(){return{button:{id:"button",mapping:{buttonRenderer:{component:"ytd-button-renderer"}}}}};
ea.Object.defineProperties(g7.prototype,{videoId:{configurable:!0,enumerable:!0,get:function(){return this.data&&this.data.videoId||""}},
playerEndpoint:{configurable:!0,enumerable:!0,get:function(){return this.data&&this.data.playerEndpoint||""}},
stateRenderer:{configurable:!0,enumerable:!0,get:function(){if(this.data&&this.data.states)for(var a=k(this.data.states),b=a.next();!b.done;b=a.next())if(b=b.value,b.queueToPlayRendererStateRenderer&&b.queueToPlayRendererStateRenderer.state===this.state)return a=b.queueToPlayRendererStateRenderer,-1!==this.stateData?this.fillStateRenderer(a,this.stateData):a}},
button:{configurable:!0,enumerable:!0,get:function(){if(this.stateRenderer&&this.stateRenderer.button)return this.stateRenderer.button}}});
var h7=g7;h7.prototype.cloudcast=h7.prototype.cloudcast;v([H(V.YtRendererBehavior),w("design:type",Object)],h7.prototype,"ytRendererBehavior",void 0);v([H(X),w("design:type",Object)],h7.prototype,"ytRendererstamperBehavior",void 0);v([H([U.YtActionHandlerBehavior]),w("design:type",Object)],h7.prototype,"actionHandlerBehavior",void 0);v([I(),w("design:type",Object)],h7.prototype,"data",void 0);v([I(),w("design:type",Object)],h7.prototype,"stateData",void 0);
v([I(),w("design:type",String)],h7.prototype,"state",void 0);v([I(),w("design:type",Object)],h7.prototype,"isLoading",void 0);v([sl("data"),w("design:type",String),w("design:paramtypes",[])],h7.prototype,"videoId",null);v([sl("data"),w("design:type",String),w("design:paramtypes",[])],h7.prototype,"playerEndpoint",null);v([sl("data","state","stateData","expirationDurationMs"),w("design:type",Object),w("design:paramtypes",[])],h7.prototype,"stateRenderer",null);
v([sl("stateRenderer"),w("design:type",Object),w("design:paramtypes",[])],h7.prototype,"button",null);v([rl("data.clientJsUrl","data.cloudcastEndpoint"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],h7.prototype,"cloudcast",null);h7=v([W({is:"ytd-queue-to-play-renderer"})],h7);var i7=function(){return F.apply(this,arguments)||this};
l(i7,F);i7.prototype.configureRendererStamper=function(){return{"data.menu":{id:"menu",mapping:{menuRenderer:{component:"ytd-menu-renderer",params:{noInkOnDropdownButton:!0}}}},"data.buttons":{id:"buttons",mapping:{toggleButtonRenderer:"ytd-toggle-button-renderer"}},dismissedRenderer:{id:"dismissed",mapping:{notificationTextRenderer:"ytd-notification-text-renderer"}}}};
var j7=i7;v([H(V.YtRendererBehavior),w("design:type",Object)],j7.prototype,"ytRendererBehavior",void 0);v([H(X),w("design:type",Object)],j7.prototype,"ytRendererstamperBehavior",void 0);v([H(eY),w("design:type",Object)],j7.prototype,"ytdDismissableItemBehavior",void 0);v([H(rY),w("design:type",Object)],j7.prototype,"ytdLockupBehavior",void 0);v([H(sY.YtdMouseDownPrefetchableBehavior),w("design:type",Object)],j7.prototype,"ytdMouseDownPrefetchableBehavior",void 0);
v([I(),w("design:type",Object)],j7.prototype,"data",void 0);j7=v([W({is:"ytd-compact-playlist-renderer"})],j7);var k7=function(){return F.apply(this,arguments)||this};
l(k7,F);k7.prototype.attached=function(){this.adBadgeText=yU("AD_BADGE_TEXT",void 0,"Ad")};
k7.prototype.configureRendererStamper=function(){return{"data.menu":{id:"menu",mapping:{menuRenderer:"ytd-menu-renderer"}}}};
k7.prototype.onTap=function(){this.data&&this.data.navigationEndpoint&&this.data.adPlaybackContextParams&&Jya(this.data.navigationEndpoint,this.data.adPlaybackContextParams)};
k7.prototype.dataChanged=function(){this.data&&ap(this.data.impressionUrls||[])};
var l7=k7;l7.prototype.dataChanged=l7.prototype.dataChanged;l7.prototype.onTap=l7.prototype.onTap;v([H(X),w("design:type",Object)],l7.prototype,"ytRendererstamperBehavior",void 0);v([H(V.YtRendererBehavior),w("design:type",Object)],l7.prototype,"ytRendererBehavior",void 0);v([I(),w("design:type",Object)],l7.prototype,"data",void 0);v([I(),w("design:type",String)],l7.prototype,"adBadgeText",void 0);
v([ql("tap"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],l7.prototype,"onTap",null);v([rl("data"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],l7.prototype,"dataChanged",null);l7=v([W({is:"ytd-compact-promoted-video-renderer"})],l7);var m7=function(){var a=F.apply(this,arguments)||this;a.actionMap={"yt-open-popup-action":"handleOpenPopupAction"};return a};
l(m7,F);f=m7.prototype;f.attached=function(){this.adBadgeText=yU("AD_BADGE_TEXT",void 0,"Ad")};
f.configureRendererStamper=function(){return{"data.menu":{id:"menu",mapping:{menuRenderer:"ytd-menu-renderer"}},"data.actionButton":{id:"action-button",mapping:{buttonRenderer:"ytd-button-renderer"}}}};
f.dataChanged=function(){this.data&&this.data.impressionCommands&&(this.data.activeView&&this.ytdActiveViewBehavior.enableActiveViewMeasurement(this.data.activeView,16),this.data.impressionCommands.forEach(function(a){a=k(a.loggingUrls||[]);for(var b=a.next();!b.done;b=a.next())b=b.value,b.baseUrl&&Zo(b.baseUrl)}))};
f.onTap=function(a){this.data&&this.data.navigationEndpoint&&(a.preventDefault(),this.fire("yt-navigate",{endpoint:this.data.navigationEndpoint}))};
f.handleOpenPopupAction=function(a){this.get("openPopupAction.popup.adFeedbackRenderer",a)&&(this.collapsed=!0)};
var n7=m7;n7.prototype.dataChanged=n7.prototype.dataChanged;v([H(X),w("design:type",Object)],n7.prototype,"ytRendererstamperBehavior",void 0);v([H(V.YtRendererBehavior),w("design:type",Object)],n7.prototype,"ytRendererBehavior",void 0);v([H(YX),w("design:type",Object)],n7.prototype,"ytdActiveViewBehavior",void 0);v([H([U.YtActionHandlerBehavior]),w("design:type",Object)],n7.prototype,"actionHandlerBehavior",void 0);v([I(),w("design:type",Object)],n7.prototype,"data",void 0);
v([I(),w("design:type",String)],n7.prototype,"adBadgeText",void 0);v([I({reflectToAttribute:!0}),w("design:type",Boolean)],n7.prototype,"collapsed",void 0);v([rl("data"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],n7.prototype,"dataChanged",null);n7=v([W({is:"ytd-promoted-sparkles-web-renderer"})],n7);var o7=function(){return F.apply(this,arguments)||this};
l(o7,F);o7.prototype.configureRendererStamper=function(){return{"data.menu":{id:"menu",mapping:{menuRenderer:{component:"ytd-menu-renderer",params:{noInkOnDropdownButton:!0}}}},dismissedRenderer:{id:"dismissed",mapping:{notificationMultiActionRenderer:"ytd-notification-multi-action-renderer"}}}};
var p7=o7;v([H(eY),w("design:type",Object)],p7.prototype,"ytdDismissableItemBehavior",void 0);v([H(X),w("design:type",Object)],p7.prototype,"ytRendererstamperBehavior",void 0);v([H(V.YtRendererBehavior),w("design:type",Object)],p7.prototype,"ytRendererBehavior",void 0);v([I(),w("design:type",Object)],p7.prototype,"data",void 0);p7=v([W({is:"ytd-compact-movie-renderer"})],p7);var q7=function(){return F.apply(this,arguments)||this};
l(q7,F);q7.prototype.configureRendererStamper=function(){return{"data.actionButton":{id:"action-button",mapping:{buttonRenderer:{component:"ytd-button-renderer"}}}}};
var r7=q7;v([H(V.YtRendererBehavior),w("design:type",Object)],r7.prototype,"ytRendererBehavior",void 0);v([H(X),w("design:type",Object)],r7.prototype,"ytRendererstamperBehavior",void 0);v([I(),w("design:type",Object)],r7.prototype,"data",void 0);r7=v([W({is:"ytd-compact-tvfilm-entry-point-renderer"})],r7);var s7=function(){var a=F.apply(this,arguments)||this;a.badges=[{textBadge:{label:UU("CC")}}];return a};
l(s7,F);f=s7.prototype;f.configureRendererStamper=function(){return{"data.storefrontEntryPoint":{id:"storefront-entry-point",mapping:{compactTvfilmEntryPointRenderer:"ytd-compact-tvfilm-entry-point-renderer"}}}};
f.dataChanged=function(){var a=this.get("data.offerButton.buttonRenderer.serviceEndpoint");a&&a.commandMetadata&&a.commandMetadata.webHandleServiceEndpointExtension&&a.commandMetadata.webHandleServiceEndpointExtension.fireAutomatically?this.actionSenderBehavior.sendServiceRequestAction([a]):a&&a.webHandleServiceEndpointExtension&&a.webHandleServiceEndpointExtension.fireAutomatically&&this.actionSenderBehavior.sendServiceRequestAction([a])};
f.isEmptyContent=function(a){return this.isStorefrontEntryPointEmpty(a)&&this.shouldHideOfferModule(a)};
f.isStorefrontEntryPointEmpty=function(a){return!a||!a.storefrontEntryPoint};
f.shouldHideOfferModule=function(a){return!!a.hideVideoDetails};
f.isOfferModuleNavigationInactive=function(a){return!a.navigationEndpoint&&!a.serviceEndpoint};
f.maybeNavigateWithServiceEndpoint=function(){this.data&&this.data.navigationEndpoint||this.data&&this.data.serviceEndpoint&&this.actionSenderBehavior.sendServiceRequestAction([this.data.serviceEndpoint])};
var t7=s7;v([H(V.YtRendererBehavior),w("design:type",Object)],t7.prototype,"ytRendererBehavior",void 0);v([H(X),w("design:type",Object)],t7.prototype,"ytRendererstamperBehavior",void 0);v([H(T.YtActionSenderBehavior),w("design:type",Object)],t7.prototype,"actionSenderBehavior",void 0);v([I({observer:"dataChanged"}),w("design:type",Object)],t7.prototype,"data",void 0);v([I({reflectToAttribute:!0,computed:"isEmptyContent(data)"}),w("design:type",Boolean)],t7.prototype,"hidden",void 0);v([I({value:function(){return A("kevlar_watch_color_update")},
reflectToAttribute:!0}),w("design:type",Boolean)],t7.prototype,"watchColorUpdate",void 0);v([I(),w("design:type",Object)],t7.prototype,"badges",void 0);t7=v([W({is:"ytd-movie-offer-module-renderer"})],t7);var AHa=function(){return F.apply(this,arguments)||this};
l(AHa,F);var u7=AHa;v([H(V.YtRendererBehavior),w("design:type",Object)],u7.prototype,"ytRendererBehavior",void 0);v([I(),w("design:type",Object)],u7.prototype,"data",void 0);u7=v([W({is:"ytd-offer-review-renderer"})],u7);var v7=function(){var a=F.apply(this,arguments)||this;a.actionMap={"yt-autonav-state-changed-action":"onYtAutonavStateChangedAction"};return a};
l(v7,F);f=v7.prototype;f.configureRendererStamper=function(){return{"data.contents":{id:"contents",mapping:{compactVideoRenderer:"ytd-compact-video-renderer"}}}};
f.attached=function(){this.actionHandlerBehavior.actionMap=this.actionMap;var a=hV.getInstance().getState();this.toggle.checked=1!==a};
f.onQueueIsEmptyChanged=function(a,b){this.queueIsEmpty=b;a=this.contents.children;(a=a.length&&a[a.length-1])&&"ytd-compact-video-renderer"===a.is&&(a.queued=this.queueIsEmpty)};
f.onToggleChanged=function(){var a=this.toggle.checked?2:1;hV.getInstance().setState(a)};
f.onYtAutonavStateChangedAction=function(a){this.toggle.checked=1!==a};
var w7=v7;w7.prototype.onQueueIsEmptyChanged=w7.prototype.onQueueIsEmptyChanged;v([H(U.YtActionHandlerBehavior),w("design:type",Object)],w7.prototype,"actionHandlerBehavior",void 0);v([H(V.YtRendererBehavior),w("design:type",Object)],w7.prototype,"ytRendererBehavior",void 0);v([H(X),w("design:type",Object)],w7.prototype,"ytRendererstamperBehavior",void 0);v([I(),w("design:type",Object)],w7.prototype,"data",void 0);
v([I({reflectToAttribute:!0}),w("design:type",Boolean)],w7.prototype,"maskAsVideo",void 0);v([I({value:function(){return A("kevlar_fixie_watch_layout")},
reflectToAttribute:!0}),w("design:type",Boolean)],w7.prototype,"fixie",void 0);v([I({reflectToAttribute:!0,value:!0}),w("design:type",Boolean)],w7.prototype,"queueIsEmpty",void 0);v([tl("#contents"),w("design:type",SGa)],w7.prototype,"contents",void 0);v([tl("#toggle"),w("design:type",Object)],w7.prototype,"toggle",void 0);v([ql("yt-queue-is-empty-changed"),w("design:type",Function),w("design:paramtypes",[CustomEvent,Boolean]),w("design:returntype",void 0)],w7.prototype,"onQueueIsEmptyChanged",null);
w7=v([W({is:"ytd-compact-autoplay-renderer"})],w7);var x7=function(){var a=F.apply(this,arguments)||this;a.actionMap={"yt-hide-unlimited-offer-module":"handleHideAction"};return a};
l(x7,F);f=x7.prototype;f.dataChanged=function(){this.hidden=!1};
f.attached=function(){this.actionHandlerBehavior.actionMap=this.actionMap};
f.configureRendererStamper=function(){return{"data.storefrontEntryPoint":{id:"storefront-entry-point",mapping:{compactTvfilmEntryPointRenderer:"ytd-compact-tvfilm-entry-point-renderer"}}}};
f.onThumbnailTap=function(a){this.data&&this.data.serviceEndpoint&&(this.actionSenderBehavior.sendServiceRequestAction([this.data.serviceEndpoint]),a.stopPropagation())};
f.handleHideAction=function(){this.data&&this.data.suppressIfCompanionAds&&(this.hidden=!0)};
var y7=x7;y7.prototype.dataChanged=y7.prototype.dataChanged;v([H(X),w("design:type",Object)],y7.prototype,"ytRendererstamperBehavior",void 0);v([H(V.YtRendererBehavior),w("design:type",Object)],y7.prototype,"rendererBehaviors",void 0);v([H(T.YtActionSenderBehavior),w("design:type",Object)],y7.prototype,"actionSenderBehavior",void 0);v([H([U.YtActionHandlerBehavior]),w("design:type",Object)],y7.prototype,"actionHandlerBehavior",void 0);v([I(),w("design:type",Object)],y7.prototype,"data",void 0);
v([rl("data"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],y7.prototype,"dataChanged",null);y7=v([W({is:"ytd-unlimited-offer-module-renderer"})],y7);Polymer({is:"yt-chip-cloud-chip-renderer",properties:{data:Object,chipStyle:{type:String,computed:"computeChipStyle_(data.style.styleType)",reflectToAttribute:!0},selected:{type:Boolean,value:!1,reflectToAttribute:!0}},hostAttributes:{role:"button",tabindex:0},behaviors:[T.YtActionSenderBehavior],listeners:{tap:"onTap_"},computeChipStyle_:function(a){return a?a:"STYLE_DEFAULT"},
onTap_:function(){if(!this.selected){var a=Wo(),b=this.get("data.trackingParams");a&&b&&Co(a,go(b),void 0);(a=this.get("data.navigationEndpoint.relatedChipCommand"))&&this.sendAction("yt-related-chip-command",[a,this])}}});Polymer({is:"yt-chip-cloud-renderer",properties:{data:{type:Object,observer:"dataChanged_"},selected:{type:Number,value:0}},behaviors:[X,U.YtActionHandlerBehavior],stampDom:{"data.chips":{id:"chips",mapping:{chipCloudChipRenderer:{component:"yt-chip-cloud-chip-renderer"}}}},actionMap:{"yt-related-chip-command":"handleRelatedChipCommand_"},dataChanged_:function(){this.selected=0},
handleRelatedChipCommand_:function(a,b){a=this.$.chips.indexOf(b);-1!=a&&this.$.chips.selectIndex(a)}});Polymer({is:"yt-related-chip-cloud-renderer",properties:{data:Object},behaviors:[X,U.YtActionHandlerBehavior,T.YtActionSenderBehavior],stampDom:{"data.content":{id:"content",mapping:{chipCloudRenderer:{component:"yt-chip-cloud-renderer"}}}},actionMap:{"yt-related-chip-command":"handleRelatedChipCommand_"},handleRelatedChipCommand_:function(a){a.contents?this.sendAction("yt-item-section-replace-action",[a.contents,a.targetSectionIdentifier]):this.sendAction("yt-item-section-continuation-action",[a.continuationData,
a.targetSectionIdentifier])}});Polymer({is:"ytd-watch-next-secondary-results-renderer",behaviors:[U.YtActionHandlerBehavior,V.YtRendererBehavior,X,FY,r0],properties:{data:{type:Object,observer:"dataChanged_"},playerData:{type:Object},autoFill:{type:Boolean,value:!0},targetFramerate:{type:Number,value:60},hideAutoplay:{type:Boolean,observer:"hideAutoplayChanged_"},shownItems:{type:Array,notify:!0},fixie_:{type:Boolean,value:function(){return A("kevlar_fixie_watch_layout")},
reflectToAttribute:!0},hideUnlimitedOfferModule_:{type:Boolean,computed:"computeHideUnlimitedOfferModule_(data, playerData)",observer:"hideUnlimitedOfferModuleChanged_"},isQueueExperiment_:{type:Boolean,value:function(){return A("kevlar_add_to_queue_option")},
reflectToAttribute:!0},showMoreButton:{type:Boolean,value:!1},showButton_:{type:Boolean,computed:"computeShowButton_(showMoreButton, data.results)",observer:"showButtonChanged_"}},itemsPath:"data.results",stampDom:{"data.offerModule":{id:"offer-module",mapping:{movieOfferModuleRenderer:"ytd-movie-offer-module-renderer",episodeOfferModuleRenderer:"ytd-movie-offer-module-renderer",liveOfferModuleRenderer:"ytd-movie-offer-module-renderer",channelOfferModuleRenderer:"ytd-movie-offer-module-renderer",
unlimitedOfferModuleRenderer:{component:"ytd-unlimited-offer-module-renderer",properties:{hidden:"[[hideUnlimitedOfferModule_]]"}},queueToPlayRenderer:"ytd-queue-to-play-renderer"}},shownItems:{id:"items",mapping:{compactAutoplayRenderer:{component:"ytd-compact-autoplay-renderer",properties:{maskAsVideo:"[[hideAutoplay]]"}},compactMovieRenderer:"ytd-compact-movie-renderer",compactVideoRenderer:"ytd-compact-video-renderer",compactPromotedVideoRenderer:"ytd-compact-promoted-video-renderer",compactRadioRenderer:"ytd-compact-radio-renderer",
compactPlaylistRenderer:"ytd-compact-playlist-renderer",promotedSparklesWebRenderer:"ytd-promoted-sparkles-web-renderer",relatedChipCloudRenderer:"yt-related-chip-cloud-renderer",itemSectionRenderer:"ytd-item-section-renderer"}},"data.continuations":{id:"continuations",mapping:{nextContinuationData:{component:"yt-next-continuation",properties:{showButton:"[[showButton_]]"}}},renderPriority:0}},actionMap:{"yt-pyv-logging-ready":"logPyvAdTagUrls_","yt-pyv-renderers-ready":"insertPyvRenderers_"},nextContinuation:{continuationType:"watchNextSecondaryResultsContinuation",
contentsArray:"data.results",continuationsArray:"data.continuations",responseContentsKey:"results",requestPath:"/related_ajax"},observers:["resultsChanged_(data.results.*)"],created:function(){Polymer.Element&&Oe&&A("polymer2_aggressive_batching")?(this.initialCount=12,this.minChunkSize=8):this.initialCount=1},
ready:function(){var a;A("kevlar_watch_skeleton")&&(a={"--yt-img-shadow-placeholder-color":"var(--yt-thumbnail-placeholder-color)","--yt-img-shadow-min-height":"100%","--yt-img-shadow-min-width":"100%"});a&&this.updateStyles(a);this.showButton_&&this.$.items.setAttribute("aria-live","polite")},
resultsChanged_:function(){if(this.data&&this.data.results){for(var a=this.data.results,b=null,c=null,d=0;d<a.length;d++)a[d].relatedChipCloudRenderer?b=a[d].relatedChipCloudRenderer:a[d].itemSectionRenderer&&(c=a[d].itemSectionRenderer);if(b&&c)for(this.set("data.continuations",[]),a=b.content.chipCloudRenderer.chips,b=0;b<a.length;b++)if(d=this.get("chipCloudChipRenderer.navigationEndpoint.relatedChipCommand",a[b]),d.loadCached||!d.contents){d.contents=c.contents;break}}},
hideAutoplayChanged_:function(){if(this.$&&this.$.items){var a=this.$.items.querySelector("ytd-compact-autoplay-renderer");a&&(a.maskAsVideo=this.hideAutoplay)}},
logPyvAdTagUrls_:function(a){if(!A("disable_legacy_pyv_for_web")&&A("enable_pyv_ad_tag_diff_logging")&&this.data&&this.data.results){var b=tb(this.data.results,function(c){return!!c.compactPromotedVideoRenderer&&!!c.compactPromotedVideoRenderer.debugAdTag});
-1!=b?(co("adsClientStateChange",{comparePyvAdTagInfo:{pyvAdTagUrlFromPlayer:a,pyvAdTagUrlFromWatchNext:this.data.results[b].compactPromotedVideoRenderer.debugAdTag}}),this.splice("data.results",b,1)):a&&co("adsClientStateChange",{comparePyvAdTagInfo:{pyvAdTagUrlFromPlayer:a}})}},
insertPyvRenderers_:function(a){if(!A("disable_legacy_pyv_for_web")&&this.data&&this.data.results){var b=tb(this.data.results,function(d){return!d.compactPromotedVideoRenderer&&!d.compactAutoplayRenderer}),c=-1==b?0:b;
a.forEach(function(d){d={compactPromotedVideoRenderer:d};this.splice("data.results",c++,0,d)},this)}},
dataChanged_:function(a){var b=this;if(a&&a.results){rb(a.results,function(e){return!!e.compactPromotedVideoRenderer})&&!A("disable_forced_discovery_ad_removal_on_web")&&this.set("data.results",nb(a.results,function(e){return A("disable_debug_ad_tag_renderer_removal_on_web")?!!e.compactPromotedVideoRenderer&&!!e.compactPromotedVideoRenderer.debugAdTag:!e.compactPromotedVideoRenderer}));
var c=lW.getInstance().maybeGetEduPopup();if(c&&a.results&&2<a.results.length&&a.results[2].compactVideoRenderer){var d=this.get("menu.menuRenderer.items",a.results[2].compactVideoRenderer);d&&0<d.length&&d.find(function(e){return(e=b.get("menuConditionalServiceItemRenderer.visibilityCondition.showIf",e))&&"VISIBILITY_CONDITION_TYPE_QUEUEABLE"==e})&&(a.results[2].compactVideoRenderer.hintActions=c)}}},
computeHideUnlimitedOfferModule_:function(a,b){return A("enable_yto_window")&&a&&a.offerModule&&b&&a.offerModule.unlimitedOfferModuleRenderer&&a.offerModule.unlimitedOfferModuleRenderer.suppressIfCompanionAds&&this.hasCompanionAds_(b)?!0:!1},
hideUnlimitedOfferModuleChanged_:function(){var a=this.$$("ytd-unlimited-offer-module-renderer");a&&(a.hidden=this.hideUnlimitedOfferModule_)},
hasCompanionAds_:function(a){a=this.get("adPlacements",a)||[];for(var b=0;b<a.length;b++)if(this.get("adPlacementRenderer.renderer.actionCompanionAdRenderer",a[b]))return!0;return!1},
computeShowButton_:function(a,b){b=void 0===b||0===b.length;return a||b},
showButtonChanged_:function(){var a=this.$$("yt-next-continuation");a&&(a.showButton=this.showButton_)}});Polymer({is:"ytd-pla-shelf-renderer",behaviors:[iY.ComponentBehavior,O0,U.YtActionHandlerBehavior,V.YtRendererBehavior,c2.YtMacroReplacementBehavior],properties:{data:{type:Object,computed:"getRenderer_(model)"},active:{type:Boolean,observer:"activeChanged_"},macros:{type:Object,computed:"getMacros_(model)"},model:Object},actionMap:{"ytd-watch-player-data-changed":"cleanUpData_"},created:function(){this.updateDataJobId_=0;this.player_=null},
attached:function(){this.updatePlayerListener_()},
detached:function(){this.updatePlayerListener_()},
activeChanged_:function(){this.updatePlayerListener_()},
updatePlayerListener_:function(){if(this.active&&this.isAttached&&!this.player_){var a=this.retrieveCachedPlaShelfData_();a&&this.updateData_(a);if(A("kevlar_js_fixes")){if(a=qW(this),!a){xe(Error("Missing PlayerManager"));return}}else a=sW(this);A("kevlar_js_fixes")&&!a?xe(Error("Missing PlayerManager")):a.getPlayerPromise().then(function(b){this.listenToPlayerEvent(b,"onPlaShelfInfoCardsReady",this.updateData_);this.player_=b}.bind(this))}else this.player_&&(this.unlistenFromPlayerEvent(this.player_,
"onPlaShelfInfoCardsReady",this.updateData_),this.player_=null)},
getRenderer_:function(a){return a.renderer||{}},
getMacros_:function(a){return a.macros||{}},
retrieveCachedPlaShelfData_:function(){var a=Sa("yt.www.ads.eventcache.getLastPlaShelfData");return a&&a()},
onToggleTap_:function(){this.collapsed_=!this.collapsed_;this.$$("#expand-icon")&&(this.collapsed_?this.$$("#expand-icon").icon="yt-icons:expand-more":this.$$("#expand-icon").icon="yt-icons:expand-less")},
updateData_:function(a){Dn.cancelJob(this.updateDataJobId_);this.updateDataJobId_=En(function(){this.model=a}.bind(this),0);
this.collapsed_=!1;this.$$("#expand-icon")&&(this.$$("#expand-icon").icon="yt-icons:expand-less")},
cleanUpData_:function(){this.model={}}});var z7=function(){var a=F.apply(this,arguments)||this;a.actionMap={"yt-transcript-player-seek":"onYtTranscriptPlayerSeek"};return a};
l(z7,F);f=z7.prototype;f.configureRendererStamper=function(){return{"data.transcriptRenderer":{id:"transcript",mapping:{transcriptRenderer:"ytd-transcript-renderer"}}}};
f.attached=function(){this.actionHandlerBehavior.actionMap=this.actionMap};
f.detached=function(){this.stopPollingPlayerTime()};
f.close=function(){this.data=null;this.stopPollingPlayerTime()};
f.open=function(a){this.data=a;this.player&&this.stopPollingPlayerTime();this.startPollingPlayerTime()};
f.onLoadReloadContinuation=function(a){this.ytActionSenderBehavior.sendServiceRequestAction([{clickTrackingParams:a.target.data.clickTrackingParams,getTranscriptEndpoint:{params:a.target.data.continuation}}])};
f.startPollingPlayerTime=function(){var a=this;sW(this).getPlayerPromise().then(function(b){a.player=b;a.playerPollJobId=Fn(Dn,a.getPlayerVideoProgress.bind(a),1E3)})};
f.getPlayerVideoProgress=function(){Dn.cancelJob(this.playerPollJobId);if(this.player){var a=this.player.getCurrentTime();this.ytActionSenderBehavior.sendAction("yt-player-time-changed",[a])}this.playerPollJobId=Fn(Dn,this.getPlayerVideoProgress.bind(this),1E3)};
f.stopPollingPlayerTime=function(){this.player=null;Dn.cancelJob(this.playerPollJobId)};
f.onYtTranscriptPlayerSeek=function(a){this.player&&this.player.seekTo(a,!0)};
var A7=z7;A7.prototype.onLoadReloadContinuation=A7.prototype.onLoadReloadContinuation;v([H(X),w("design:type",Object)],A7.prototype,"ytRendererstamperBehavior",void 0);v([H(O0),w("design:type",P0)],A7.prototype,"ytPlayerListenerBehavior",void 0);v([H(U.YtActionHandlerBehavior),w("design:type",Object)],A7.prototype,"actionHandlerBehavior",void 0);v([H(V.YtRendererBehavior),w("design:type",Object)],A7.prototype,"ytRendererBehavior",void 0);
v([H(T.YtActionSenderBehavior),w("design:type",Object)],A7.prototype,"ytActionSenderBehavior",void 0);v([H(J0.YtComponentBehavior),w("design:type",Object)],A7.prototype,"componentBehavior",void 0);v([I(),w("design:type",Object)],A7.prototype,"data",void 0);v([I(),w("design:type",Object)],A7.prototype,"playerPollJobId",void 0);v([I(),w("design:type",Object)],A7.prototype,"player",void 0);
v([ql("yt-load-reload-continuation"),w("design:type",Function),w("design:paramtypes",[CustomEvent]),w("design:returntype",void 0)],A7.prototype,"onLoadReloadContinuation",null);A7=v([W({is:"ytd-transcript-loader"})],A7);var B7=function(){};
B7.prototype.showFeedbackDialog=function(){};
B7.prototype.showFeedbackDialog=B7.prototype.showFeedbackDialog;B7.prototype.showHelpDialog=function(){};
B7.prototype.showHelpDialog=B7.prototype.showHelpDialog;Polymer({is:"ytd-live-chat-frame",properties:{data:Object,currentPageUrl:{type:String,value:""},baseUrl:{type:String,computed:"computeBaseUrl_(currentPageUrl, data)"},url:{type:String,computed:"liveChatPageUrl_(baseUrl, collapsed, data)",observer:"urlChanged_"},isHiddenByUser:{type:Boolean,value:null},hidden:{type:Boolean,value:!1,reflectToAttribute:!0,computed:"isHidden_(collapsed, data)"},collapsed:{type:Boolean,reflectToAttribute:!0,computed:"isCollapsed_(data, isHiddenByUser)"},watchColorUpdate_:{type:Boolean,
reflectToAttribute:!0,value:function(){return A("kevlar_watch_color_update")}}},
behaviors:[O0,X,U.YtActionHandlerBehavior,V.YtRendererBehavior],listeners:{"yt-toggle-button":"onYtToggleButton_"},actionMap:{"yt-set-live-chat-collapsed-state-action":"setCollapsedState_","yt-dark-mode-toggled-action":"onDarkModeToggledAction_","yt-dark-theme-action":"onDarkThemeAction_","yt-light-theme-action":"onLightThemeAction_"},stampDom:{"data.liveChatRenderer.showHideButton":{id:"show-hide-button",mapping:{toggleButtonRenderer:{component:"ytd-toggle-button-renderer",params:{noink:!0}}}}},
created:function(){this.handleIframeEventListener_=this.handleIframeEvent_.bind(this);this.handleKeyboardEventListener_=this.handleKeyboardEvent_.bind(this);this.isListeningForPlayerProgress_=!1;this.PLAYER_EVENTS_=new Map;this.PLAYER_EVENTS_.set("onVideoProgress",this.playerProgressHandler_);this.PLAYER_EVENTS_.set("onAdStart",this.playerAdStartHandler_);this.PLAYER_EVENTS_.set("onAdEnd",this.playerAdEndHandler_);this.PLAYER_EVENTS_.set("onStateChange",this.playerStateChangeHandler_);this.player_=
null;this.isFrameReady_=!1},
attached:function(){window.addEventListener("message",this.handleIframeEventListener_);window.addEventListener("keydown",this.handleKeyboardEventListener_);window.addEventListener("keyup",this.handleKeyboardEventListener_);this.currentPageUrl=window.location.href;this.setupPlayerProgressRelay_()},
detached:function(){window.removeEventListener("message",this.handleIframeEventListener_);window.removeEventListener("keydown",this.handleKeyboardEventListener_);window.removeEventListener("keyup",this.handleKeyboardEventListener_);this.currentPageUrl="";this.isListeningForPlayerProgress_=!1;this.setPlayer_(null);if(!A("kevlar_use_ytd_player")){var a=sW(this);this.unlisten(a,"yt-player-released","disconnectFromPlayer_")}this.isFrameReady_=!1},
computeBaseUrl_:function(a){var b="/live_chat";this.isChatReplay_()&&(b="/live_chat_replay");return ix(hx(gx(px(a),b),null),"").toString()},
dataChanged_:function(){this.isHiddenByUser=null},
urlChanged_:function(){if(void 0!==this.url){this.isFrameReady_=!this.isChatReplay_();var a=this.url;if(this.isChatReplay_()&&this.player_){var b=Math.floor(1E3*this.player_.getProgressState().current);a=Xw(px(a),"playerOffsetMs",b.toString()).toString()}b=this.$.chatframe;try{b.contentDocument.location.replace(a)}catch(c){b.src=a}}},
handleIframeEvent_:function(a){if(a&&ec(this.baseUrl,a.origin)&&a.source==this.$.chatframe.contentWindow&&$a(a.data))if(a.data["yt-iframed-buyflow-launcher"])this.handleBuyflowMessages_(a);else if(a.data["yt-iframed-player-progress-relay"])this.handleChatFrameReady_();else if(a.data["yt-show-feedback-dialog"]){var b=this.getInterface(B7);if(b){var c=a.ports;a=a.data["yt-show-feedback-dialog"];b.showFeedbackDialog(a.customProductData,a.feedbackContent,c&&c.length?function(){c[0].postMessage({})}:void 0,
a.bucket)}}else a.data["yt-show-survey"]?this.fire("yt-show-survey",a.data["yt-show-survey"]):a.data["yt-purchase-membership"]?this.sendServiceRequestAction([a.data["yt-purchase-membership"]]):a.data["yt-user-activity"]?Pn():a.data["yt-attach-live-chat-cold-load-tracking-params"]&&(a=a.data["yt-attach-live-chat-cold-load-tracking-params"],this.attachColdLoadVeTrackingParams_(a.trackingParams))},
attachColdLoadVeTrackingParams_:function(a){a=go(a);var b=Wo(),c=Sa("liveChatRenderer.trackingParams",this.data);b&&c&&CS(b,go(c),a)},
handleBuyflowMessages_:function(a){var b=a.data["yt-iframed-buyflow-launcher"].encryptedPurchaseParams,c=a.data["yt-iframed-buyflow-launcher"].serializedTransactionFlowLoggingParams;NEa(TX.getInstance(),b.replace(/-/g,"+").replace(/_/g,"/"),function(d){a.ports[0].postMessage({success:!0,buyFlowResponse:d})},void 0,function(d){a.ports[0].postMessage({success:!1,
error:d&&d.message||"Buyflow rejected without error."})},void 0,void 0,function(){a.ports[0].postMessage({closed:!0})},c)},
setupPlayerProgressRelay_:function(){if(!this.isListeningForPlayerProgress_){var a=sW(this);a.getPlayerPromise().then(this.playerApiReady_.bind(this));A("kevlar_use_ytd_player")||this.listen(a,"yt-player-released","disconnectFromPlayer_");this.isListeningForPlayerProgress_=!0}},
handleChatFrameReady_:function(){this.isFrameReady_=!0;this.player_&&1==this.player_.getAdState()&&this.postToContentWindow_({"yt-player-ad-start":""})},
playerApiReady_:function(a){this.setPlayer_(a)},
playerProgressHandler_:function(){var a=this.player_.getProgressState();this.postToContentWindow_({"yt-player-video-progress":a.current})},
playerAdStartHandler_:function(a){this.postToContentWindow_({"yt-player-ad-start":a})},
playerAdEndHandler_:function(){this.postToContentWindow_({"yt-player-ad-end":!0})},
playerStateChangeHandler_:function(a){this.postToContentWindow_({"yt-player-state-change":a})},
disconnectFromPlayer_:function(){this.setPlayer_(null)},
setPlayer_:function(a){this.player_&&this.unlistenFromPlayerEvents(this.player_,this.PLAYER_EVENTS_);a&&(this.player_=a,this.listenToPlayerEvents(a,this.PLAYER_EVENTS_),this.fire("player-api-ready"))},
liveChatPageUrl_:function(a,b,c){return!c||b?"about:blank":c.liveChatRenderer?(b=px(this.currentPageUrl).queryData_,rfa(b),a=px(a),b.add("continuation",c.liveChatRenderer.continuations[0].reloadContinuationData.continuation),hx(a,b),a.toString()):""},
isCollapsed_:function(a,b){return null!==b?b:a&&a.conversationBarRenderer&&a.conversationBarRenderer.availabilityMessage?!0:a&&a.liveChatRenderer?"LIVE_CHAT_DISPLAY_STATE_COLLAPSED"==a.liveChatRenderer.initialDisplayState:!1},
isHidden_:function(a,b){var c=b&&b.conversationBarRenderer&&b.conversationBarRenderer.availabilityMessage,d=b&&b.liveChatRenderer&&b.liveChatRenderer.showHideButton;return!a||c||d?b&&b.liveChatRenderer&&b.liveChatRenderer.initialDisplayState?"LIVE_CHAT_DISPLAY_STATE_HIDDEN"==b.liveChatRenderer.initialDisplayState:!1:!0},
setCollapsedState_:function(a){a.setLiveChatCollapsedStateAction&&(this.isHiddenByUser=!!a.setLiveChatCollapsedStateAction.collapsed)},
onYtToggleButton_:function(){this.isHiddenByUser=!this.collapsed},
onDarkModeToggledAction_:function(a){this.sendDarkThemePostMessage_(a)},
onDarkThemeAction_:function(){this.sendDarkThemePostMessage_(!0)},
onLightThemeAction_:function(){this.sendDarkThemePostMessage_(!1)},
sendDarkThemePostMessage_:function(a){this.postToContentWindow_({"yt-live-chat-set-dark-theme":a})},
handleKeyboardEvent_:function(a){u.containsValue(ZDa,a.keyCode)&&this.postToContentWindow_({"yt-live-chat-keyboard-event":{eventType:a.type,keyCode:a.keyCode}})},
isChatReplay_:function(){return!!(this.data&&this.data.liveChatRenderer&&this.data.liveChatRenderer.isReplay)},
postToContentWindow_:function(a){if(this.isFrameReady_){var b=window.location.protocol+"//"+window.location.host;if(this.$.chatframe.contentWindow)try{this.$.chatframe.contentWindow.postMessage(a,b)}catch(c){bn(c)}else a=Error("Tried posting a message to an iframe with no content window. Message: "+JSON.stringify(a)),bn(a,"WARNING")}}});var BHa=function(){return F.apply(this,arguments)||this};
l(BHa,F);var C7=BHa;v([H(V.YtRendererBehavior),w("design:type",Object)],C7.prototype,"ytRendererBehavior",void 0);v([I(),w("design:type",Object)],C7.prototype,"data",void 0);C7=v([W({is:"ytd-playlist-panel-segment-header-renderer"})],C7);var D7=function(){return F.apply(this,arguments)||this};
l(D7,F);D7.prototype.configureRendererStamper=function(){return{data:{id:"content",mapping:{playlistPanelVideoRenderer:{component:"ytd-playlist-panel-video-renderer",noInjection:!0},playlistPanelSegmentHeaderRenderer:{component:"ytd-playlist-panel-segment-header-renderer",params:{thumbnailWidth:90},noInjection:!0}}}}};
var E7=D7;v([H(X),w("design:type",Object)],E7.prototype,"ytRendererstamperBehavior",void 0);v([H(U.YtActionHandlerBehavior),w("design:type",Object)],E7.prototype,"ytActionHandlerBehavior",void 0);v([I(),w("design:type",Object)],E7.prototype,"data",void 0);E7=v([W({is:"ytd-playlist-panel-supported-items"})],E7);Polymer({is:"ytd-playlist-panel-video-renderer",behaviors:[sY.YtdMouseDownPrefetchableBehavior,X,V.YtRendererBehavior,rY],properties:{data:Object,selected:{type:Boolean,computed:"computeSelected_(data)",reflectToAttribute:!0},largerPlaylistThumbs_:{type:Boolean,value:function(){return A("kevlar_larger_playlist_thumbnails")},
reflectToAttribute:!0},thumbnailWidth_:{type:Number,value:function(){return A("kevlar_larger_playlist_thumbnails")?128:100}},
canReorder:{type:Boolean,reflectToAttribute:!0},watchColorUpdate_:{type:Boolean,reflectToAttribute:!0,value:function(){return A("kevlar_watch_color_update")}}},
listeners:{"yt-service-request-sent":"onYtServiceRequestSent_"},stampDom:{"data.menu":{id:"menu",mapping:{menuRenderer:{component:"ytd-menu-renderer",params:{buttonTooltipPosition:"left"}}}}},computeEditableClass_:function(a){return a&&a.menu?"editable":""},
computeSelected_:function(a){return a.selected},
onYtServiceRequestSent_:function(a,b){b.endpoint&&this.isHideEnclosingAction_(b.endpoint)&&TV(QV(),this.data.videoId)},
isHideEnclosingAction_:function(a){return!!this.get("feedbackEndpoint.uiActions.hideEnclosingContainer",a)}});MY.YtPlaylistPanelBehavior=[V.YtRendererBehavior,{_noAccessors:!0,properties:{loopOn:Boolean,shuffleOn:Boolean},listeners:{"yt-toggle-button":"onYtToggleButton_"},onYtToggleButton_:function(a){a=a.detail;void 0!=a.actions.loop&&(this.loopOn=a.actions.loop);void 0!=a.actions.shuffle&&(this.shuffleOn=a.actions.shuffle)},
setMenuData_:function(a){if(!a||!a.playlistButtons||a.isInfinite)return null;for(var b=a.playlistButtons.menuRenderer.topLevelButtons,c=b.length,d=0;d<c;d++)if(b[d].toggleButtonRenderer){var e=b[d].toggleButtonRenderer;"LOOP"==e.defaultIcon.iconType&&this.loopOn?e.isToggled=this.loopOn:"SHUFFLE"==e.defaultIcon.iconType&&this.shuffleOn&&(e.isToggled=this.shuffleOn)}return a.playlistButtons}}];Polymer({is:"ytd-playlist-panel-renderer",behaviors:[Polymer.IronResizableBehavior,V.YtRendererBehavior,X,U.YtActionHandlerBehavior,MY.YtPlaylistPanelBehavior,tY.YtTaskEmitterBehavior,oGa],properties:{data:{type:Object,observer:"dataChanged_"},menuRendererData:{type:Object,computed:"setMenuData_(data)"},hideHeaderText:{type:Boolean,value:!1,reflectToAttribute:!0},fixie:{type:Boolean,reflectToAttribute:!0},collapsible:{type:Boolean,reflectToAttribute:!0,computed:"computeCollapsible_(hideHeaderText)"},
collapsed:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"collapseChanged_"},hidden:{type:Boolean,reflectToAttribute:!0,observer:"hiddenChanged_"},hasPlaylistButtons:{type:Boolean,reflectToAttribute:!0,computed:"computeHasPlaylistButtons_(data)"},hasSeparateSaveButton:{type:Boolean,reflectToAttribute:!0,computed:"computeHasSeparateSaveButton_(data)"},hasToolbar_:{type:Boolean,reflectToAttribute:!0,computed:"computeHasToolbarButton_(data, menuRendererData)"},playlistType_:{type:String,reflectToAttribute:!0,
computed:"computePlaylistType_(data)"},isHovered:{type:Boolean,value:!1},jsPanelHeight_:{type:Boolean,value:function(){return A("kevlar_watch_js_panel_height")},
reflectToAttribute:!0},scrollMargin:{type:Number,value:56},canReorder_:{type:Boolean,computed:"computeCanReorder_(data)"},showRecoveryUi_:{type:Boolean,value:!1,computed:"computeShowRecoveryUi_(data.showRecoveryUi)",reflectToAttribute:!0},expandIcon_:{type:Object,computed:"computeExpandIcon_(collapsed, showRecoveryUi_)"},watchColorUpdate_:{type:Boolean,reflectToAttribute:!0,value:function(){return A("kevlar_watch_color_update")}}},
stampDom:{menuRendererData:{id:"playlist-action-menu",mapping:{menuRenderer:"ytd-menu-renderer"}},"data.menu":{id:"overflow-menu",mapping:{menuRenderer:{component:"ytd-menu-renderer",params:{icon:"yt-icons:more"}}}},"data.contents":{id:"items",events:!0,mapping:{playlistPanelVideoRenderer:{component:"ytd-playlist-panel-video-renderer",attributes:{id:"playlist-items"},properties:{canReorder:"[[canReorder_]]"}},playlistPanelSegmentHeaderRenderer:{component:"ytd-playlist-panel-segment-header-renderer",
params:{thumbnailWidth:90}}}},"data.saveButton":{id:"save-button",mapping:{toggleButtonRenderer:"ytd-toggle-button-renderer"}},"data.topRowButtons":{id:"top-row-buttons",mapping:{buttonRenderer:"ytd-button-renderer"}}},listeners:{"yt-rendererstamper-finished":"onRenderStamperFinished_",mouseenter:"onMouseEnter_",mouseleave:"onMouseLeave_"},created:function(){this.currentIndex_=void 0},
onMouseEnter_:function(){this.isHovered=!0},
onMouseLeave_:function(){this.isHovered=!1},
computeCollapsible_:function(a){return a?!1:A("kevlar_playlist_collapsible")},
computeHasPlaylistButtons_:function(a){return!(!a||!a.playlistButtons)},
computeHasSeparateSaveButton_:function(a){return!(!a||!a.saveButton)},
computeHasToolbarButton_:function(a,b){return!(!a||!(b||a.saveButton||a.menu))},
computePlaylistType_:function(a){if(a&&a.playlistId)return a.playlistId.substring(0,4)},
computeCanReorder_:function(a){return a?a.playlistId&&KV(a.playlistId,a)&&A("kevlar_allow_queue_reorder")?!0:!!a.isEditable&&!a.isInfinite&&!!A("kevlar_allow_playlist_reorder"):!1},
attached:function(){this.getInterface(SW).setPlaylistComponent(this);vS(this)},
detached:function(){wS(this)},
computeExpandIcon_:function(a,b){return a||b?"yt-icons:expand":"yt-icons:collapse"},
computeIndexMessage_:function(a,b){return a+1+" / "+b},
onRenderStamperFinished_:function(){if(this.scrollForStampDom_){var a=!0;this.isHovered&&A("kevlar_no_autoscroll_on_playlist_hover")&&(a=!1);if(this.collapsed||this.hidden)a=!1;a&&this.scrollToCurrentVideo_();this.scrollForStampDom_=!1;this.data&&(this.currentIndex_=this.data.currentIndex)}this.canReorder_&&this.startDragDrop_(this.$.items,this.$.items)},
collapseChanged_:function(){this.collapsed||(Hn(this.getTaskManager(),this.scrollToCurrentVideo_.bind(this)),this.markDirty())},
hiddenChanged_:function(){this.hidden||Hn(this.getTaskManager(),this.scrollToCurrentVideo_.bind(this))},
scrollToCurrentVideo_:function(){var a=this.$.items;if(a)if(a.style["padding-bottom"]="","TLPP"===this.playlistType_){var b=a.querySelector("ytd-playlist-panel-segment-header-renderer");if(b){var c=a.querySelectorAll("ytd-playlist-panel-video-renderer:not([hidden])");if(c){var d=c[c.length-1];b=b.getBoundingClientRect();c=a.getBoundingClientRect();d=d.getBoundingClientRect().bottom-b.top;d=c.height-d;0<d&&(a.style["padding-bottom"]=d+"px");a.scrollTop+=b.top-c.top-8}}}else{var e=this.$.items.querySelector("ytd-playlist-panel-video-renderer[selected]");
if(e){b=(a=e.parentElement||nh(document))||nh(document);d=hj(e);var g=hj(b),h=Aj(b);b==nh(document)?(c=d.x-b.scrollLeft,d=d.y-b.scrollTop,Ne&&!af(10)&&(c+=h.left,d+=h.top)):(c=d.x-g.x-h.left,d=d.y-g.y-h.top);e=nj(e);h=b.clientHeight-e.height;g=b.scrollLeft;var m=b.scrollTop;g+=c-(b.clientWidth-e.width)/2;b=new Wg(g,m+(d-h/2));a.scrollLeft=b.x;a.scrollTop=b.y}}},
getSpliceIndexForPlaylist_:function(a){for(var b=void 0,c=0,d=this.data.contents.length;c<d;c++){var e=this.get("playlistPanelVideoRenderer.navigationEndpoint.watchEndpoint.index",this.data.contents[c]);e&&(e==a?b=c:e>a&&this.updateIndex_(c))}return b},
getSpliceIndexForMix_:function(a){for(var b=0,c=this.data.contents.length;b<c;b++){var d=this.get("playlistPanelVideoRenderer.videoId",this.data.contents[b]);if(d&&d==a)return b}},
dataChanged_:function(){this.scrollForStampDom_=this.currentIndex_!=this.data.currentIndex},
onToggleClick_:function(){this.playlistLiked=!this.playlistLiked},
onScroll_:function(){this.markDirty()},
updateIndex_:function(a){var b=this.get("playlistPanelVideoRenderer.indexText.runs.0.text",this.data.contents[a]);b&&((b=parseInt(b,10))?this.set("data.contents."+a+".playlistPanelVideoRenderer.indexText.runs.0.text",b-1):this.set("data.currentIndex",this.data.currentIndex-1))},
onToggleExpanded_:function(a){this.collapsible&&"A"!=Polymer.dom(a).rootTarget.tagName&&!["ytd-menu-renderer","ytd-toggle-button-renderer"].includes(Polymer.dom(a).localTarget.tagName.toLowerCase())&&(this.data&&this.data.showRecoveryUi&&this.data.recoveryCommands?(this.sendInnerTubeActions(this.data.recoveryCommands,this),this.collapsed=!1):this.collapsed=!this.collapsed)},
handleDrop:function(a){var b=a.currDragItem;a=b.data.playlistSetVideoId;b=lb(b.parentNode.childNodes,b);var c=void 0;0<b&&(c=this.data.contents[b-1].playlistPanelVideoRenderer.playlistSetVideoId);b=QV();b.responsePlaylistData&&b.responsePlaylistData.contents&&(a=LV(a,b.responsePlaylistData),c=c?LV(c,b.responsePlaylistData)+1:0,b.responsePlaylistData=u.unsafeClone(b.responsePlaylistData),Kb(b.responsePlaylistData.contents,a,c),b.queueProxy&&b.queueProxy.moveVideo(a,c),RV(b,SV(b,b.response?b.response.autoplayRenderer:
void 0)))},
computeShowRecoveryUi_:function(a){return A("kevlar_frontend_queue_recover")?a:!1}});var F7=function(){var a=F.apply(this,arguments)||this;a.storageKey="speedyg";a.activationThreshold=216E5;a.cacheExpiration=2592E3;return a};
l(F7,F);f=F7.prototype;f.activateSpeedygPromo=function(){var a=kT(this.storageKey)||{};a={lastActivation:a.lastActivation,suppressed:a.suppressed};a.lastActivation?fb()-Number(new Date(a.lastActivation))>this.activationThreshold?this.activate(a.suppressed):this.updateSuppressedCount(a):this.activate(0)};
f.activate=function(){this.$&&(this.updateActivationTime(),this.notification.open())};
f.updateSuppressedCount=function(a){a.suppressed++;this.storeData({lastActivation:a.lastActivation,suppressed:a.suppressed})};
f.updateActivationTime=function(){var a={lastActivation:fb(),suppressed:0};this.storeData(a)};
f.storeData=function(a){jT(this.storageKey,a,this.cacheExpiration)};
f.closePromo=function(){this.notification.close()};
var G7=F7;v([I(),w("design:type",Object)],G7.prototype,"data",void 0);v([I(),w("design:type",Object)],G7.prototype,"storageKey",void 0);v([I(),w("design:type",Object)],G7.prototype,"activationThreshold",void 0);v([I(),w("design:type",Object)],G7.prototype,"cacheExpiration",void 0);v([tl("#notification"),w("design:type",Object)],G7.prototype,"notification",void 0);G7=v([W({is:"ytd-video-quality-promo-renderer"})],G7);Polymer({is:"yt-notification-action-renderer",behaviors:[V.YtRendererBehavior,G_.YtEventForwardingBehavior],properties:{data:Object},open:function(){this.$.toast.open()},
close:function(){this.$.toast.close()},
setVerticalOffset:function(a){this.$.toast.verticalOffset=a;this.$.toast.fit()},
computeButtonClass_:function(a){return a?"toast-button":""},
computeText_:function(a){return XU(a)}});Polymer({is:"yt-player-error-message-renderer",behaviors:[X,V.YtRendererBehavior],properties:{data:Object,icon_:{type:String,computed:"computeIcon_(data.icon)"}},stampDom:{"data.proceedButton":{id:"button",mapping:{buttonRenderer:"yt-button-renderer"}}},computeIcon_:function(a){return a?"yt-icons:"+a.iconType.toLowerCase():"error_outline"}});Polymer({is:"yt-player-kav-renderer",behaviors:[X,V.YtRendererBehavior],properties:{data:Object,icon_:{type:String,computed:"computeIcon_(data.icon)"}},stampDom:{"data.proceedButton":{id:"button",mapping:{buttonRenderer:"yt-button-renderer"}}},computeIcon_:function(a){return a?"yt-icons:"+a.iconType.toLowerCase():"error_outline"}});Polymer({is:"yt-playability-error-supported-renderers",behaviors:[V.YtRendererBehavior,X],properties:{data:Object,status:String},stampDom:{data:{id:"container",mapping:{playerErrorMessageRenderer:"yt-player-error-message-renderer",playerKavRenderer:"yt-player-kav-renderer"}}}});Polymer({is:"ytd-watch-fixie",behaviors:[XX.YtdWatchBehavior],properties:{secondarySectionExpanded_:{type:Boolean,reflectToAttribute:!0},metadataExpanded_:{type:Boolean,reflectToAttribute:!0}},listeners:{"yt-metadata-expanded":"onYtMetadataExpanded_","yt-comments-loaded":"onYtCommentsLoaded_"},created:function(){this.waitingForTransitionEnd_=!1;this.animatePeekingCommentJob_=this.updateCommentsHeaderVisibilityJob_=0;this.pageDisposeJobs=this.pageDisposeJobs||[];this.pageDisposeJobs.push(this.resetFixieState_.bind(this))},
ready:function(){this.listen(this.$["secondary-scroll"],"scroll","onColumnScroll_");this.listen(this.$.comments,"scroll","onColumnScroll_")},
attached:function(){var a=this,b,c;return Ca(function(d){if(1==d.nextAddress)return b=rW(a),ta(d,b.getPlayerPromise(),2);c=d.yieldResult;c.setUseFastSizingOnWatch(!1);ua(d)})},
detached:function(){this.waitingForTransitionEnd_&&(this.unlisten(this.$["comments-container"],"transitionend","onCommentsContainerTransitionEnd_"),this.waitingForTransitionEnd_=!1)},
onColumnScroll_:function(a){this.markDirty();Polymer.dom(a).rootTarget!=this.$["secondary-scroll"]||this.updateCommentsHeaderVisibilityJob_||(this.updateCommentsHeaderVisibilityJob_=Fn(Dn,this.updateCommentsHeaderVisibility_.bind(this)))},
updateCommentsHeaderVisibility_:function(){this.updateCommentsHeaderVisibilityJob_=0;var a=this.$["secondary-scroll"];this.toggleClass("hidden",a.scrollTop+a.offsetHeight>this.$.comments.offsetTop,this.$["comments-header"])},
onCommentsExpandTap_:function(){var a=this.$["comments-container"];this.secondarySectionExpanded_?(this.listen(a,"transitionend","onCommentsContainerTransitionEnd_"),a.classList.remove("expanded"),this.$["comments-header-icon"].icon="yt-icons:collapse"):(a.classList.add("detached"),Hn(Dn,function(){a.classList.add("animate");a.classList.add("expanded");this.$["comments-header-icon"].icon="yt-icons:expand";this.markDirty()}.bind(this)));
this.secondarySectionExpanded_=!this.secondarySectionExpanded_},
onCommentsContainerTransitionEnd_:function(a){var b=this.$["comments-container"];Polymer.dom(a).rootTarget==b&&(this.unlisten(b,"transitionend","onCommentsContainerTransitionEnd_"),this.waitingForTransitionEnd_=!1,b.classList.remove("animate"),b.classList.remove("detached"))},
onYtMetadataExpanded_:function(a){this.metadataExpanded_=a.detail;this.schedulePlayerSizeUpdate_()},
resetFixieState_:function(){this.$["meta-contents"].firstChild.collapse();if(this.secondarySectionExpanded_)this.onCommentsExpandTap_();Dn.cancelJob(this.animatePeekingCommentJob_);this.peekingCommentData_=void 0;this.$["peeking-comment"].hidden=!0;this.$["comments-header"].classList.remove("animate");this.$["comments-header"].classList.add("no-peeking");this.updateStyles({"--ytd-watch-fixie-peeking-comment-height":"0px"})},
onYtCommentsLoaded_:function(){this.notifyPath("comments.header.commentsHeaderRenderer.commentsCount");if(A("kevlar_fixie_watch_peeking_comments")){var a=this.get("data.contents.0.commentThreadRenderer.comment.commentRenderer",this.$.comments);a&&(this.peekingCommentData_=a,this.$["peeking-comment"].hidden=!1,this.updateStyles({"--ytd-watch-fixie-peeking-comment-height":this.$["peeking-comment"].offsetHeight+"px"}),this.animatePeekingCommentJob_=Fn(Dn,function(){this.$["comments-header"].classList.add("animate");
this.$["comments-header"].classList.remove("no-peeking");this.animatePeekingCommentJob_=0}.bind(this)))}}});Polymer({is:"ytd-watch-flexy",behaviors:[XX.YtdWatchBehavior],properties:{flexy_:{type:Boolean,reflectToAttribute:!0,value:function(){return!A("kevlar_watch_snap_sizing")}},
snap_:{type:Boolean,reflectToAttribute:!0,value:function(){return A("kevlar_watch_snap_sizing")}}},
ready:function(){var a=this.onColumnScroll_.bind(this);this.$.primary.addEventListener("scroll",a);this.$.secondary.addEventListener("scroll",a)},
onColumnScroll_:function(){this.markDirty()}});MY.YtPageManagerBehavior={_noAccessors:!0,properties:{data:Object},getCurrentData:function(){return this.data},
getCurrentPage:function(){},
getPageOffset:function(a){return a.getScrollTop()},
setPageOffset:function(a,b){a.setScrollTop(b)},
setPageOffsetForNavigation:function(a){this.fire("yt-navigate-set-page-offset",{page:a,offset:0})}};Polymer({is:"ytd-page-manager",behaviors:[V.YtRendererBehavior,U.YtActionHandlerBehavior,MY.YtPageManagerBehavior],provides:vV,actionMap:{"player-update-pre":"prePlayerUpdate_","yt-get-page-offset":"getPageOffset","yt-set-page-offset":"setPageOffset","yt-pause-active-page-context":"pauseActiveContext_","yt-prepare-page-dispose":"preparePageDispose_","yt-stop-old-player":"onYtStopOldPlayer_"},listeners:{"yt-page-manager-navigate-start":"onYtPageManagerNavigateStart_"},factoryImpl:function(){},
created:function(){this.pageNameToElement_=new Map;this.currentPage_=void 0;this.renderLoadingStateJobId_=0;this.elementPoolPopulator_=Kq.getInstance();this.updatePageDataJobId_=0;this.contextSwitcher_=new xCa;this.pageDisposeJobsets_=new WeakMap},
attached:function(){this.fire("attached");var a=this.getInterface(BW);a&&(this.contextSwitcher_.networkService_=a)},
getPageSubTypeFromUrl_:function(a){if(a){var b=mi(ni(5,a));if("/"==b)return"home";if(["/fashion","/channel/UCrpQ4p1Ql_hG8rKXIKM1MOQ","/channel/UCTApTkbpcqiLL39WUlne4ig","/channel/UCW5PCzG3KQvbOX4zc3KY0lQ"].some(function(c){return 0==b.indexOf(c)}))return"fashion";
if(0==b.indexOf("/channel/")||0==b.indexOf("/user/"))return"channel";if("/playlist"==b||0==b.indexOf("/playlist/")||"/view_play_list"==b||0==b.indexOf("/view_play_list/"))return"playlist";if("/feed/history"==b||0==b.indexOf("/feed/history/"))return"history";if("/new"==b)return"labs";if("/feed/subscriptions"==b)return"subscriptions";if(0==b.indexOf("/feed/subscriptions/"))return"filteredsubscriptions"}},
getPageSubTypeFromEndpoint_:function(a){var b;(a=this.get("commandMetadata.webCommandMetadata.url",a)||this.get("webNavigationEndpointData.url",a))&&(b=this.getPageSubTypeFromUrl_(a));return b},
getPageTypeFromData_:function(a){if(!a)return"browse";var b=a.page,c=a.url,d=this.get("response.responseContext.webResponseContextExtensionData.pageTheme",a);d?b=d.toLowerCase().replace(/_/g,"-"):"watch"!=b&&("browse"==b&&this.get("response.sidebar",a)&&this.get("response.sidebar.settingsSidebarRenderer",a)?b="account-settings":"browse"==b&&this.get("response.metadata.channelMetadataRenderer",a)?b="channel":c&&(b=this.getPageSubTypeFromUrl_(c)||b));return b},
doesWatchPageHavePlaylist_:function(a){var b;if(b=A("kevlar_add_to_queue_option"))b=!!QV().queueProxy;a=!!this.get("response.currentVideoEndpoint.watchEndpoint.playlistId",a);return b||a},
pauseActiveContext_:function(){var a=this.contextSwitcher_;a.activeContext_&&a.activeContext_.pause()},
getPageElementForType_:function(a){var b=this.pageNameToElement_.get(a);if(!b){switch(a){case"watch":var c=A("kevlar_fixie_watch_layout")?Gq("ytd-watch-fixie"):Gq("ytd-watch-flexy");break;case"search":c=Gq("ytd-search",this);break;case"channel":c=Gq("ytd-browse",this);c.pageSubtype="channels";break;case"playlist":c=Gq("ytd-browse",this);c.pageSubtype=c.pageSubtype=a;break;case"home":c=Gq("ytd-browse",this);c.pageSubtype="home";break;case"browse":c=Gq("ytd-browse",this);break;case"red":c=Gq("ytd-browse",
this);c.pageSubtype="red";break;case"red-originals-home":c=Gq("ytd-browse",this);c.pageSubtype="red-originals-home";break;case"account-settings":c=Gq("ytd-browse",this);c.pageSubtype="account-settings";break;case"history":c=Gq("ytd-browse",this);c.pageSubtype="history";break;case"labs":c=Gq("ytd-browse",this);c.pageSubtype="labs";break;case"subscriptions":case"filteredsubscriptions":c=Gq("ytd-browse",this);c.pageSubtype=a;break;case"memberships-and-purchases":c=Gq("ytd-browse",this);c.pageSubtype=
"memberships-and-purchases";break;case"ypc-offers":c=Gq("ytd-browse",this);c.pageSubtype="ypc-offers";break;case"fashion":c=Gq("ytd-browse",this),c.pageSubtype="fashion";}pq("pc",1);b=c;this.pageNameToElement_.set(a,b)}return b},
attachPage_:function(a){a.isAttached||Polymer.dom(this.root).appendChild(a)},
setActivePage_:function(a){if(a!=this.currentPage_){var b=this.currentPage_;b&&(b.hidden=!0,b.active=!1,b.removeAttribute("role"));this.currentPage_=a;b&&this.fire("yt-page-type-changed",{oldPageType:b.is,newPageType:a.is});a.hidden=!1;this.attachPage_(a);a.active=!0;a.setAttribute("role","main");b&&this.setPageOffsetForNavigation(a,0)}},
updatePageData:function(a){var b=this,c=this.data;this.updatePageDataJobId_&&Dn.cancelJob(this.updatePageDataJobId_);this.data=a;return new Yv(function(d){var e=function(){a.filler?b.performDataUpdate_(a,c):FDa(function(){b.performDataUpdate_(a,c)});
d()};
se("ASYNC_WATCH")&&a&&"watch"==a.page?b.updatePageDataJobId_=Gn(Dn,e):e()})},
performDataUpdate_:function(a,b){this.sendAction("yt-close-all-popups-action",[["ytd-conversation-section-renderer"]]);kq("pdl");var c=!a.filler;c&&rq("lps");var d=this.getPageTypeFromData_(a),e=this.getPageElementForType_(d);c&&fea(this.elementPoolPopulator_,d);c&&!this.renderLoadingStateJobId_&&this.setActivePage_(e);if(e){var g="watch"==d;A("kevlar_flush_jobs_before_setting_player_response")&&this.flushPageDisposeJobset_(e);g&&(e.playerData=a.playerResponse);A("kevlar_prefetch")&&this.preparePrefetchRequest_(a,
e,c,g);NV&&(g?("watch"!=this.getPageTypeFromData_(b)&&this.sendAction("yt-cache-miniplayer-page-action",[b]),this.sendSingletonAction("yt-deactivate-miniplayer-action")):"watch"==this.getPageTypeFromData_(b)&&this.doesWatchPageHavePlaylist_(b)&&(xV.getInstance().playlistWatchPageActivation=!0,this.activateMiniplayer(b)));this.getInterface(EY).ignoreNextScroll();A("kevlar_flush_jobs_before_setting_player_response")||this.flushPageDisposeJobset_(e);c?(b=typeof e.loadPage,"function"==b?(e.pageContext=
yCa(this.contextSwitcher_,e,e.data!=a.response),e.loadPage(a.response)):we(Error("b/38014653 "+[d,e.is,e.nodeName,b].join("; "))),rq("pdl")):(e.hidden=!0,a.response.filler=!0,e.data=a.response,this.attachPage_(e));this.fire("yt-page-data-updated",{pageType:d})}En(function(){if(A("kevlar_nitrate_driven_tooltips")){var h=pCa.getInstance();if(a){var m=nCa(a),n=oCa(a);a:{if(a.playerResponse){var p=a.playerResponse;if(p.auxiliaryUi&&p.auxiliaryUi.messageRenderers&&p.auxiliaryUi.messageRenderers.upsellDialogRenderer){p=
p.auxiliaryUi.messageRenderers.upsellDialogRenderer;break a}}else if(a.response&&(p=a.response)&&p.overlay&&p.overlay.upsellDialogRenderer){p=p.overlay.upsellDialogRenderer;break a}p=void 0}p?new uW(p,e).enqueue():(m&&(h.pendingMealbarPromo_&&h.pendingMealbarPromo_.cancel(),h.pendingMealbarPromo_=new tW(m,e),h.pendingMealbarPromo_.enqueue()),n&&new wW(n,nW.getInstance()).enqueue())}}else zCa(a,e)})},
preparePrefetchRequest_:function(a,b,c,d){var e=this,g,h,m,n,p,x,y;return Ca(function(B){if(1==B.nextAddress)return!c||!d||A("kevlar_disable_background_prefetch")&&0==Yp()?B.return():(g=rW(b,!0))?ta(B,g.getPlayerPromise(),2):B.return();h=B.yieldResult;m=e.get("response.responseContext.webResponseContextExtensionData",a);n=e.getInterface(BW);if(!n||!m)return B.return();p=e.get("response.contents.twoColumnWatchNextResults.autoplay.autoplay",a);x=e.getInterface(SW);y=eX.getInstance();$Ca(y,m,h,n,x,p);
ua(B)})},
movePlayerToWatch:function(a){var b=this,c,d,e;return Ca(function(g){c=b.getPageElementForType_("watch");d=a;A("kevlar_use_ytd_player")||(d=rW(c,!0));e=c.getPlayerContainer();d.appendTo(e);ua(g)})},
getPlayerFromWatch:function(){var a=this.getPageElementForType_("watch");return rW(a,!0)},
activateMiniplayer:function(a){var b=G3(a.response),c=rW(this.getPageElementForType_("watch"));this.sendSingletonAction("yt-activate-miniplayer-action",[c,b,a])},
prePlayerUpdate_:function(a){if("watch"==a){var b=this.getPageElementForType_("watch");this.renderLoadingStateJobId_?(Dn.cancelJob(this.renderLoadingStateJobId_),this.renderLoadingStateJobId_=0,this.renderPageLoadingState_(a)):this.setActivePage_(b)}},
getCurrentPage:function(){return this.currentPage_},
isOnWatch:function(){return!!this.currentPage_&&["ytd-watch-flexy","ytd-watch-fixie"].includes(this.currentPage_.is)},
preparePage:function(a,b){try{b&&(a=this.getPageSubTypeFromEndpoint_(b)||a);if("watch"!=a){var c=this.elementPoolPopulator_;b=a;b!=c.targetPage_&&-1<c.pendingPages_.indexOf(b)&&(c.targetPage_&&(c.pendingPages_.unshift(c.targetPage_),c.abort()),Nq(c,b),Lq(c,b))}var d=this.getPageElementForType_(a);d.isAttached||d==this.currentPage_||(d.hidden=!0,this.attachPage_(d));if(!d.data){var e=this.get("response",z("FILLER_DATA",{})[a]);e&&(d.data=e)}d.fire("yt-page-navigate-start",{bubbles:!1,_useCache:!0})}catch(g){xe(g)}},
lazyPrepareCriticalPages:function(a,b){a=this.getPageSubTypeFromEndpoint_(b)||a;"watch"!=a&&En(this.preparePage.bind(this,"watch"))},
renderPageLoadingState_:function(a,b){this.preparePage(a,b);var c=this.getPageElementForType_(a);c.loadingData&&(c.loadingData.endpoint=b);c.loading=!0;this.setActivePage_(c);"watch"==a&&this.fire("yt-guide-close")},
onYtPageManagerNavigateStart_:function(a,b){A("kevlar_use_page_data_will_update")&&this.currentPage_&&b&&this.data&&(a=this.getPageSubTypeFromEndpoint_(b.endpoint)||b.pageType,this.getPageTypeFromData_(this.data)==a&&this.currentPage_.fire("yt-page-data-will-update",{bubbles:!1}));if("watch"==b.pageType&&this.data&&"watch"!=this.data.page){this.renderLoadingStateJobId_&&Dn.cancelJob(this.renderLoadingStateJobId_);NV&&!A("kevlar_miniplayer_jank_killswitch")&&this.sendSingletonAction("yt-deactivate-miniplayer-action");
var c=this.data;this.renderLoadingStateJobId_=Hn(Dn,function(){if(this.data!=c){var d=this.getPageElementForType_(b.pageType);this.setActivePage_(d)}else this.renderPageLoadingState_(b.pageType,b.endpoint);this.renderLoadingStateJobId_=0}.bind(this),150)}},
preparePageDispose_:function(){if(this.currentPage_&&Array.isArray(this.currentPage_.pageDisposeJobs)&&0!=this.currentPage_.pageDisposeJobs.length){var a=new qp(1);this.currentPage_.pageDisposeJobs.forEach(function(b){sp(a,b)});
this.pageDisposeJobsets_.set(this.currentPage_,a)}},
flushPageDisposeJobset_:function(a){var b=this.pageDisposeJobsets_.get(a);b&&(tp(b,10),b.processSignal_(),this.pageDisposeJobsets_.delete(a))},
onYtStopOldPlayer_:function(a,b){b=void 0===b?!1:b;if(this.data){var c=this.getPageTypeFromData_(this.data);var d=this.getPageElementForType_(c);d=rW(d,!0)}if(d){a=this.getPageTypeFromData_(a);var e=this.getPageElementForType_(a);e=rW(e,!0);A("kevlar_use_ytd_player")&&d==e||!A("kevlar_use_ytd_player")&&"watch"==a&&"watch"==c?b&&!A("kevlar_disable_preemptive_player_reset")&&d.resetForNewPlayback():NV&&"watch"==c&&"watch"!=a&&(!oBa()||this.doesWatchPageHavePlaylist_(this.data))||!A("kevlar_use_ytd_player")&&
e||d.stop()}}});Polymer({is:"yt-player-manager",provides:uV,behaviors:[MY.YtPlayerManagerBehavior,MY.YtPlayerBehavior],factoryImpl:function(){},
ready:function(){Na("yt.abuse.player.botguardInitialized",zya,void 0);Na("yt.abuse.player.invokeBotguard",Aya,void 0);Na("yt.abuse.dclkstatus.checkDclkStatus",tya,void 0);Na("yt.player.exports.navigate",GAa,void 0);Na("yt.util.activity.init",On,void 0);Na("yt.util.activity.getTimeSinceActive",Rn,void 0);Na("yt.util.activity.setTimestamp",Pn,void 0)}});var H7=function(){return F.apply(this,arguments)||this};
l(H7,F);H7.prototype.configureRendererStamper=function(){return{buttons:{id:"buttons",mapping:{buttonRenderer:{component:"ytd-button-renderer",noInjection:!0}}}}};
H7.prototype.open=function(a,b){this.message=a;this.buttons=b};
var I7=H7;v([H(J0.YtComponentBehavior),w("design:type",Object)],I7.prototype,"componentBehavior",void 0);v([H(X),w("design:type",Object)],I7.prototype,"ytRendererstamperBehavior",void 0);v([I(),w("design:type",String)],I7.prototype,"message",void 0);v([I(),w("design:type",Array)],I7.prototype,"buttons",void 0);I7=v([W({is:"ytd-miniplayer-action"})],I7);var J7=function(){var a=F.apply(this,arguments)||this;a.duration=2500;return a};
l(J7,F);f=J7.prototype;f.configureRendererStamper=function(){return{button:{id:"button",mapping:{buttonRenderer:{component:"ytd-button-renderer",noInjection:!0}}}}};
f.created=function(){Polymer.IronA11yAnnouncer.requestAvailability()};
f.ready=function(){A("kevlar_frontend_video_list_undo")&&this.addEventListener("yt-service-request-sent",this.onServiceRequestSent.bind(this))};
f.open=function(a,b){this.data=a;this.label=b;this.opened=!0;this.closed=!1;this.fire("iron-announce",{text:this.label+" "+this.componentBehavior.getSimpleString(a.title)});this.async(this.close,this.duration)};
f.close=function(){this.closed=!0};
f.onServiceRequestSent=function(a){if(a=a.detail.actions)for(var b=0;b<a.length;b++){var c=a[b];c&&"ACTION_REMOVE_VIDEO_BY_VIDEO_ID"===c.action&&c.removedVideoId&&this.handleRemoveFromPlaylistCommand(c.removedVideoId)}};
f.handleRemoveFromPlaylistCommand=function(a){TV(QV(),a)};
ea.Object.defineProperties(J7.prototype,{button:{configurable:!0,enumerable:!0,get:function(){if(this.data&&A("kevlar_frontend_video_list_undo"))return{buttonRenderer:{text:UU(yU("UNDO",void 0,"Undo")),style:"STYLE_BLUE_TEXT",serviceEndpoint:{playlistEditEndpoint:{actions:[{action:"ACTION_REMOVE_VIDEO_BY_VIDEO_ID",removedVideoId:this.data.videoId}]}}}}}}});
var K7=J7;v([H(J0.YtComponentBehavior),w("design:type",Object)],K7.prototype,"componentBehavior",void 0);v([H(X),w("design:type",Object)],K7.prototype,"ytRendererstamperBehavior",void 0);v([I(),w("design:type",Object)],K7.prototype,"data",void 0);v([I(),w("design:type",String)],K7.prototype,"label",void 0);v([I({reflectToAttribute:!0}),w("design:type",Boolean)],K7.prototype,"opened",void 0);v([I({reflectToAttribute:!0}),w("design:type",Boolean)],K7.prototype,"closed",void 0);
v([I(),w("design:type",Object)],K7.prototype,"duration",void 0);v([sl("data"),w("design:type",Object),w("design:paramtypes",[])],K7.prototype,"button",null);K7=v([W({is:"ytd-miniplayer-toast"})],K7);Polymer({is:"ytd-miniplayer",behaviors:[O0,U.YtActionHandlerBehavior,V.YtRendererBehavior],screenLayer:3,properties:{data:Object,active:{type:Boolean,value:!1,reflectToAttribute:!0},hasNoData:{type:Boolean,value:!1,reflectToAttribute:!0},enabled:{type:Boolean,value:!1,reflectToAttribute:!0},expanded:{type:Boolean,value:!1,reflectToAttribute:!0},disabledState:{type:Boolean,value:!1},externalPlaylistData_:{type:Object,value:{}},playlistData:{type:Object,computed:"computePlaylistData_(data.playlistData, externalPlaylistData_)"},
hasPlaylistData:{type:Boolean,value:!1,reflectToAttribute:!0,computed:"computeHasPlaylistData_(playlistData)"},showRecoveryUi:{type:Boolean,value:!1,reflectToAttribute:!0}},actionMap:{"yt-activate-miniplayer-action":"activate_","yt-cache-miniplayer-page-action":"onCacheMiniplayerPageAction_","yt-shortcut-close-miniplayer":"onShortcutCloseMiniplayer_","yt-close-miniplayer-action":"onCloseMiniplayer_","yt-collapse-miniplayer-action":"onYtCollapseMiniplayerAction_","yt-deactivate-miniplayer-action":"deactivate_",
"yt-expand-watch-page-action":"handleExpandWatchPageAction_","yt-get-miniplayer-component-action":"getMiniplayerComponent_","yt-miniplayer-active":"isMiniplayerActive_","yt-miniplayer-load-endpoint":"loadEndpoint_","yt-sync-with-remote-video":"syncWithRemoteVideo_","yt-miniplayer-toast-action":"handleMiniplayerToastAction_","yt-miniplayer-update-header-action":"updateHeader_","yt-miniplayer-show-recovery-ui-command":"handleMiniplayerShowRecoveryUiCommand_"},created:function(){this.closeVe_=this.expandVe_=
this.player_=this.watchResponse_=null;this.disabledInitialStateIsPlaying_=!1;this.PLAYER_EVENTS_=new Map;this.PLAYER_EVENTS_.set("onPlayVideo",this.onPlayerPlayVideo_);this.PLAYER_EVENTS_.set("onCloseMiniplayer",this.onPlayerCloseMiniplayer_);this.PLAYER_EVENTS_.set("onExpandMiniplayer",this.handleExpandWatchPageAction_);this.playerElement_=null},
detached:function(){this.unlisten(this,"transitionend","resizePlaylist_")},
onCacheMiniplayerPageAction_:function(a){this.backgroundPageData_=a},
onYtCollapseMiniplayerAction_:function(){this.backgroundPageData_?this.fire("yt-navigate-cache",{url:this.backgroundPageData_.url,endpoint:this.backgroundPageData_.endpoint,data:this.backgroundPageData_}):this.sendAction("yt-navigate-home-action")},
activate_:function(a,b,c){var d=this,e,g,h,m,n;return Ca(function(p){if(1==p.nextAddress){if(oBa())return p.return();d.showRecoveryUi=!1;c&&A("kevlar_add_to_queue_option")&&(d.hasNoData=!1);d.enabled||(d.enabled=!0);d.active=!0;d.expanded=!1;d.data=b;d.watchResponse_=c;A("kevlar_miniplayer_set_element_early")&&(d.playerElement_=a,A("kevlar_prepare_player_on_miniplayer_activation")&&a.preparePlayer(a));xV.getInstance().miniplayerButtonActivation=!1;xV.getInstance().userActivation=!1;xV.getInstance().playlistWatchPageActivation=
!1;xV.getInstance().lockupActivation=!1;d.logMiniplayer_();g=e=d.getInterface(SW);A("kevlar_frontend_video_list_actions")?(e.setPlaylistComponent(d.$.playlist),d.listen(g,"yt-navigate","onPlaylistYtNavigate_"),d.listen(g,"yt-playlist-data-updated","onYtPlaylistDataUpdated_"),d.onYtPlaylistDataUpdated_()):d.data&&d.data.playlistData&&(h=d.getInterface(SW),h.setPlaylistComponent(d.$.playlist),d.listen(g,"yt-navigate","onPlaylistYtNavigate_"));(m=A("kevlar_js_fixes"))&&a.appendTo(d.$["player-container"]);
return ta(p,a.getPlayerPromise(),2)}n=p.yieldResult;n.setMinimized(!0);m||a.appendTo(d.$["player-container"]);n.setSizeStyle(!1,!0);d.listenToPlayerEvents(n,d.PLAYER_EVENTS_);d.player_=n;A("kevlar_miniplayer_set_element_early")||(d.playerElement_=a);xV.getInstance().playerContainer=d.$["player-container"];d.sendOptionalAction("yt-miniplayer-endpoint-changed");d.handleMiniplayerPlaybackState_();ua(p)})},
deactivate_:function(){var a=this,b,c,d,e,g,h;return Ca(function(m){if(1==m.nextAddress){a.showRecoveryUi&&(a.showRecoveryUi=!1,a.onCloseMiniplayer_());if(!a.active)return m.return();b=a.getPlayerElement();return ta(m,b.getPlayerPromise(),2)}if(3!=m.nextAddress)return c=m.yieldResult,c.setMinimized(!1),e=d=a.getInterface(SW),A("kevlar_frontend_video_list_actions")?(a.unlisten(e,"yt-navigate","onPlaylistYtNavigate_"),a.unlisten(e,"yt-playlist-data-updated","onYtPlaylistDataUpdated_")):a.data.playlistData&&
a.unlisten(e,"yt-navigate","onPlaylistYtNavigate_"),g=a.getInterface(vV),h=b,A("kevlar_use_ytd_player")||(h=a.$["player-container"].firstElementChild),ta(m,g.movePlayerToWatch(h),3);a.active=!1;a.data=void 0;a.watchResponse_=null;a.player_&&a.unlistenFromPlayerEvents(a.player_,a.PLAYER_EVENTS_);xV.getInstance().currentEndpoint=null;a.sendOptionalAction("yt-miniplayer-endpoint-changed");a.playerElement_=null;xV.getInstance().playerContainer=null;a.disabledState=!1;ua(m)})},
getPlayerElement:function(){return this.playerElement_?this.playerElement_:this.$["player-container"].firstElementChild},
handleExpandWatchPageAction_:function(){this.onMetadataTap_()},
onMetadataTap_:function(){this.watchResponse_&&this.data&&this.data.watchEndpoint?(this.watchResponse_&&this.watchResponse_.csn&&this.expandVe_&&Co(this.watchResponse_.csn,this.expandVe_,void 0),this.fire("yt-navigate-cache",{url:this.watchResponse_.url,endpoint:this.data.watchEndpoint,data:this.watchResponse_,miniplayer:!0})):A("kevlar_frontend_video_list_actions")&&this.data&&this.data.watchEndpoint&&this.fire("yt-navigate",{endpoint:this.data.watchEndpoint})},
onMetadataKeydown_:function(a){if(13==a.keyCode||32==a.keyCode)this.onMetadataTap_()},
onDisabledTap_:function(){this.disabledInitialStateIsPlaying_&&this.player_.playVideo();this.onMetadataTap_();this.disabledState=!1},
onPlaylistExpandTap_:function(a){if(this.hasPlaylistData){a=Polymer.dom(a).path||[];a=k(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;if(b==this)break;if(b.classList&&b.classList.contains("miniplayer-title"))return}this.expanded||(this.listen(this,"transitionend","resizePlaylist_"),this.markDirty());this.expanded=!this.expanded}},
resizePlaylist_:function(){var a=this.$.playlist.querySelector("iron-list");a&&a.notifyResize();this.unlisten(this,"transitionend","resizePlaylist_")},
getExpandIcon_:function(a){return a?"miniplayer:keyboard-arrow-down":"miniplayer:keyboard-arrow-up"},
syncWithRemoteVideo_:function(a,b){var c=this,d,e,g,h,m;return Ca(function(n){if(1==n.nextAddress){d=c.getInterface(vV);if(!c.active&&d.isOnWatch())return n.return();e={videoId:a};b&&(e.playlistId=b);g={watchEndpoint:e};h=c.getInterface(BW);return ta(n,h.requestDataForEndpoint(g),2)}m=n.yieldResult;c.handleWatchDataResponse_(m);ua(n)})},
handleWatchDataResponse_:function(a,b){var c=this,d,e,g,h,m,n,p,x,y;return Ca(function(B){if(1==B.nextAddress){if(!a)return B.return();A("kevlar_add_to_queue_option")&&(c.hasNoData=!1);c.watchResponse_=a;c.logMiniplayer_();return c.active?ta(B,c.getPlayerElement().getPlayerPromise(),3):(d=c.getInterface(vV),d.activateMiniplayer(a),e=c.getPlayerElement(),(g=A("kevlar_js_fixes"))&&!e?(c.deactivate_(),xe(Error("getPlayerElement missing"))):e.update(a.player),B.jumpTo(2))}2!=B.nextAddress&&(h=u.getValueByKeys.apply(u,
[a].concat(ka(EV))),(m=u.getValueByKeys.apply(u,[a].concat(ka(FV))))&&h&&(n=c.getInterface(SW),n.setAutoplayRenderer(h)),h&&(x=(p=!hS(eS.getInstance(),140))?2:1,c.player_.setAutonavState(x)),b||(y=G3(a.response),c.set("data",y)));c.handleMiniplayerPlaybackState_(b);ua(B)})},
onPlayerPlayVideo_:function(a){var b=this,c;return Ca(function(d){c={watchEndpoint:{videoId:a.videoId},commandMetadata:{webCommandMetadata:{url:Gi("/watch","v",a.videoId),webPageType:"WEB_PAGE_TYPE_WATCH",rootVe:3832}}};a.listId&&(c.watchEndpoint.playlistId=a.listId,c.commandMetadata.webCommandMetadata.url=Gi(c.commandMetadata.webCommandMetadata.url,"list",a.listId));a.sessionData&&(a.sessionData.itct&&(c.clickTrackingParams=a.sessionData.itct),cS(c.commandMetadata.webCommandMetadata.url,a.sessionData));
b.loadEndpoint_(c);ua(d)})},
loadEndpoint_:function(a,b){var c=this,d,e,g,h,m;return Ca(function(n){if(1==n.nextAddress)return xV.getInstance().currentEndpoint=a,c.sendOptionalAction("yt-miniplayer-endpoint-changed"),d=c.getInterface(BW),e=c.getInterface(vV),g={clientParams:{miniplayer:!0,autoSaveToQueue:!b}},h=new VV(c.getPlayerElement.bind(c),e,g),ta(n,d.requestDataForEndpoint(a,{pbj:"miniplayer"},function(p){p.playlistData||(c.expanded=!1);if(b&&A("kevlar_add_to_queue_option")){var x=c.get("player.args.player_response",p);
if(x){x=JSON.parse(x);var y=c.get("playerConfig.playbackStartConfig",x)||{};y.startPaused=!0;c.set("playerConfig.playbackStartConfig",y,x);c.set("player.args.player_response",JSON.stringify(x),p)}}h.processChunk({endpoint:a,data:p})}),2);
m=n.yieldResult;c.handleWatchDataResponse_(m,b);ua(n)})},
onCloseMiniplayer_:function(){this.showRecoveryUi?this.showRecoveryUi=!1:A("kevlar_abandon_on_stop")?this.getPlayerElement().stop():this.player_.stopVideo();this.watchResponse_&&this.watchResponse_.csn&&this.closeVe_&&Co(this.watchResponse_.csn,this.closeVe_,void 0);A("kevlar_add_to_queue_option")&&(this.hasNoData=!0);this.sendAction("yt-deactivate-miniplayer-action")},
onPlayerCloseMiniplayer_:function(){if(A("kevlar_frontend_video_list_actions"))QV().closeMiniplayer(this);else this.onCloseMiniplayer_()},
onShortcutCloseMiniplayer_:function(){if(A("kevlar_frontend_video_list_actions"))QV().closeMiniplayer(this);else this.onCloseMiniplayer_()},
isMiniplayerActive_:function(){return this.active},
getMiniplayerComponent_:function(){return this},
getScreenLayer:function(){return this.screenLayer},
logMiniplayer_:function(){if(this.watchResponse_){var a=this.screenLayer;A("persistent_miniplayer")||Xo(this.watchResponse_.csn,this.watchResponse_.rootVe,a);var b=this.get("playerResponse.trackingParams",this.watchResponse_),c=Wo(a);a=Vo(a);b&&c&&a&&(b=go(b),CS(c,a,b),this.expandVe_=ho(35989),this.closeVe_=ho(34699),xo(bo,c,b,[this.expandVe_,this.closeVe_]),DS(c,[this.expandVe_,this.closeVe_]))}},
onPlaylistYtNavigate_:function(a,b){var c=this,d,e,g,h,m,n;return Ca(function(p){if(1==p.nextAddress){if(!b.endpoint.watchEndpoint)return p.return();xV.getInstance().currentEndpoint=b.endpoint;c.sendOptionalAction("yt-miniplayer-endpoint-changed");a.stopPropagation();(d=c.get("endpoint.commandMetadata.webCommandMetadata.url",b)||c.get("endpoint.webNavigationEndpointData.url",b))&&b.tempData&&!u.isEmpty(b.tempData)&&cS(d,b.tempData);e=c.getInterface(BW);g=c.getInterface(vV);h={clientParams:{miniplayer:!0,
autoSaveToQueue:!1}};m=new VV(c.getPlayerElement.bind(c),g,h);return ta(p,e.requestDataForEndpoint(b.endpoint,{pbj:"miniplayer"},function(x){m.processChunk({endpoint:b.endpoint,data:x})}),2)}n=p.yieldResult;
c.handleWatchDataResponse_(n);ua(p)})},
handleMiniplayerPlaybackState_:function(){var a=this.get("playerResponse.playabilityStatus.miniplayer.miniplayerRenderer",this.watchResponse_);a&&"PLAYBACK_MODE_PAUSED_ONLY"==a.playbackMode&&(this.disabledState=!0,a.minimizedEndpoint&&this.sendServiceRequestAction([a.minimizedEndpoint]),this.player_&&(a=this.player_.getPlayerState(),(this.disabledInitialStateIsPlaying_=-1==a||1==a||3==a)&&this.player_.pauseVideo()))},
computePlaylistData_:function(a,b){return A("kevlar_frontend_video_list_actions")?(b&&b.contents?(a=LBa(b),this.updateHeader_(a?a.title:void 0,KBa(XU(b.titleText),b.currentIndex,b.totalVideos),void 0)):this.watchResponse_&&(a=G3(this.watchResponse_.response,!0),this.updateHeader_(a.miniplayerTitle,a.miniplayerSubtitle,a.watchEndpoint)),b):a},
computeHasPlaylistData_:function(){return!!this.playlistData&&!!this.playlistData.contents},
onYtPlaylistDataUpdated_:function(){this.externalPlaylistData_=this.getInterface(SW).getPlaylistData()||{}},
handleMiniplayerToastAction_:function(a,b){this.$.toast.open(a,b)},
updateHeader_:function(a,b,c){this.data||(this.data={miniplayerTitle:{simpleText:""},miniplayerSubtitle:{simpleText:""},playlistData:null});a&&this.set("data.miniplayerTitle",a);b&&this.set("data.miniplayerSubtitle",b);c&&this.set("data.watchEndpoint",c)},
handleMiniplayerShowRecoveryUiCommand_:function(a,b){this.$.action&&this.$.action.open&&(this.$.action.open(a,b),this.showRecoveryUi=!0)}});MY.YtConditionalRendererBehaviorImpl_={_noAccessors:!0,properties:{hidden:{type:Boolean,reflectToAttribute:!0}},observers:["updateHidden_(data, isAttached)"],updateHidden_:function(a,b){this.hidden=!this.shouldShow_(a,b)},
shouldShow_:function(a,b){return b?a&&a.supportedDatas&&a.supportedDatas.rendererVisibilityConditionData&&a.supportedDatas.rendererVisibilityConditionData.showIf?this.isVisibilityConditionSatisfied_(a.supportedDatas.rendererVisibilityConditionData.showIf):a&&a.visibilityCondition&&a.visibilityCondition.showIf?this.isVisibilityConditionSatisfied_(a.visibilityCondition.showIf):a&&a.visibilityConditionType?this.isLegacyVisibilityConditionSatisfied_(a.visibilityConditionType):!0:!1},
isVisibilityConditionSatisfied_:function(a){switch(a){case"VISIBILITY_CONDITION_TYPE_MDX_CONNECTED":return this.isMdxConnected_();case"VISIBILITY_CONDITION_TYPE_MDX_DISCONNECTED":return!this.isMdxConnected_();case"VISIBILITY_CONDITION_TYPE_QUEUEABLE":return this.isQueueable_();default:return!1;}},
isLegacyVisibilityConditionSatisfied_:function(a){switch(a){case"MDX_CONNECTED":return this.isMdxConnected_();default:return!1;}},
isMdxConnected_:function(){var a=this.sendAction("yt-get-mdx-status");return 1==a.length&&a[0].connected},
isQueueable_:function(){var a={};this.fire("yt-request-is-in-queued-item",a);return!a.queued}};
MY.YtConditionalRendererBehavior=[V.YtRendererBehavior,MY.YtConditionalRendererBehaviorImpl_];var L7=function(){return F.apply(this,arguments)||this};
l(L7,F);f=L7.prototype;f.ready=function(){this.listen(this,"tap","onEndpointTapExtra")};
f.attached=function(){this.hasAttribute("role")||this.setAttribute("role","menuitem")};
f.onFocus=function(){this.$$("paper-item").focus()};
f.onEndpointTapExtra=function(a){this.fire("iron-activate");var b=this.data.navigationEndpoint;b&&b.userFeedbackEndpoint&&(a.stopPropagation(),this.ytActionSenderBehavior.sendInnerTubeActions([b],this))};
f.computeIcon=function(a){return a&&a.iconType?gY(a.iconType):""};
f.computeHasSeparator=function(){return!(!this.data||!this.data.hasSeparator)};
f.computeIconHidden=function(){return this.useIcons?!1:!this.icon};
f.forceUpdateStylesOnLegacyBrowsers=function(){A("kevlar_legacy_browsers")&&this.updateStyles()};
var M7=L7;M7.prototype.forceUpdateStylesOnLegacyBrowsers=M7.prototype.forceUpdateStylesOnLegacyBrowsers;M7.prototype.onFocus=M7.prototype.onFocus;v([H(T.YtActionSenderBehavior),w("design:type",Object)],M7.prototype,"ytActionSenderBehavior",void 0);v([H(dY),w("design:type",Object)],M7.prototype,"ytdOpenPopupBehavior",void 0);v([H(MY.YtConditionalRendererBehavior),w("design:type",Object)],M7.prototype,"ytConditionalRendererBehavior",void 0);
v([H(GY.YtEndpointBehavior),w("design:type",Object)],M7.prototype,"ytEndpointBehavior",void 0);v([I(),w("design:type",Object)],M7.prototype,"data",void 0);v([I({computed:"computeIcon(data.icon)",value:""}),w("design:type",String)],M7.prototype,"icon",void 0);v([I({reflectToAttribute:!0,value:!1}),w("design:type",Boolean)],M7.prototype,"useIcons",void 0);v([I({reflectToAttribute:!0}),w("design:type",Boolean)],M7.prototype,"menuRefresh",void 0);
v([I({computed:"computeHasSeparator(data.hasSeparator)",reflectToAttribute:!0}),w("design:type",Boolean)],M7.prototype,"hasSeparator",void 0);v([ql("focus"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],M7.prototype,"onFocus",null);v([rl("useIcons","menuRefresh","hasSeparator"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],M7.prototype,"forceUpdateStylesOnLegacyBrowsers",null);
M7=v([W({is:"ytd-menu-navigation-item-renderer"})],M7);Polymer({is:"ytd-menu-service-item-renderer",hostAttributes:{role:"menuitem"},behaviors:[dY,T.YtActionSenderBehavior,MY.YtConditionalRendererBehavior],properties:{data:Object,icon_:{type:String,computed:"computeIcon_(data.icon)",value:""},useIcons:{type:Boolean,reflectToAttribute:!0,value:!1},menuRefresh:{type:Boolean,reflectToAttribute:!0},hasSeparator_:{type:Boolean,computed:"computeHasSeparator_(data.hasSeparator)",reflectToAttribute:!0},isSelected:{type:Boolean,computed:"computeIsSelected_(data.isSelected)",
reflectToAttribute:!0}},listeners:{tap:"onTap_",focus:"onFocus_"},observers:["forceUpdateStylesOnLegacyBrowsers_(useIcons, menuRefresh, hasSeparator_)"],onFocus_:function(){this.$$("paper-item").focus()},
onTap_:function(){this.sendOptionalAction("yt-menu-service-item-selected-action",[this.data]);var a=this.data.serviceEndpoint;a&&this.sendServiceRequestAction([a])},
computeIcon_:function(a){return a&&a.iconType?gY(a.iconType):""},
computeIconHidden_:function(){return this.useIcons?!1:!this.icon_},
computeHasSeparator_:function(){return!(!this.data||!this.data.hasSeparator)},
forceUpdateStylesOnLegacyBrowsers_:function(){A("kevlar_legacy_browsers")&&this.updateStyles()},
computeIsSelected_:function(){return!(!this.data||!this.data.isSelected)}});var N7=function(){return F.apply(this,arguments)||this};
l(N7,F);f=N7.prototype;f.attached=function(){this.hasAttribute("dialog")||this.setAttribute("dialog","true")};
f.onDataChanged=function(){var a=this;Polymer.RenderStatus.afterNextRender(this,function(){a.postbox.openDialog();a.focus();a.fire("yt-refit")})};
f.focus=function(){this.postbox.focus()};
f.closePopup=function(){this.ytActionSenderBehavior.sendAction("yt-close-popup-action")};
f.onYtCommentboxDismiss=function(){this.closePopup()};
var O7=N7;O7.prototype.onYtCommentboxDismiss=O7.prototype.onYtCommentboxDismiss;v([H(V.YtRendererBehavior),w("design:type",Object)],O7.prototype,"ytRendererBehavior",void 0);v([H(T.YtActionSenderBehavior),w("design:type",Object)],O7.prototype,"ytActionSenderBehavior",void 0);v([I({observer:"onDataChanged"}),w("design:type",Object)],O7.prototype,"data",void 0);v([I({value:function(){return yU("SBOX_INAPPROPRIATE_CANCEL")}}),
w("design:type",String)],O7.prototype,"closeButtonAriaLabel",void 0);v([tl("#postbox"),w("design:type",Object)],O7.prototype,"postbox",void 0);v([ql("yt-commentbox-dismiss"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],O7.prototype,"onYtCommentboxDismiss",null);O7=v([W({is:"ytd-backstage-post-dialog-popup-renderer"})],O7);var P7=function(){var a=F.apply(this,arguments)||this;a.actionMap={"yt-share-panel-reset-action":"onReset","yt-share-panel-select-contact-action":"onSelectContact"};return a};
l(P7,F);P7.prototype.attached=function(){this.actionHandlerBehavior.actionMap=this.actionMap};
P7.prototype.ready=function(){this.hidden=!0};
P7.prototype.onReset=function(){this.selectionCount=0;this.hidden=!0};
P7.prototype.onSelectContact=function(a){a.isGroup||(this.selectionCount+=a.serialization?1:-1,this.hidden=2>this.selectionCount)};
var Q7=P7;v([H(U.YtActionHandlerBehavior),w("design:type",Object)],Q7.prototype,"actionHandlerBehavior",void 0);v([H(V.YtRendererBehavior),w("design:type",Object)],Q7.prototype,"ytRendererBehavior",void 0);v([I(),w("design:type",Object)],Q7.prototype,"data",void 0);v([I({value:0}),w("design:type",Number)],Q7.prototype,"selectionCount",void 0);Q7=v([W({is:"ytd-confirm-multi-recipient-share-dialogue-renderer"})],Q7);var R7=function(){var a=F.apply(this,arguments)||this;a.actionMap={"yt-share-panel-reset-action":"onReset"};return a};
l(R7,F);R7.prototype.attached=function(){this.ytActionHandlerBehavior.actionMap=this.actionMap};
R7.prototype.configureRendererStamper=function(){return{"data.contacts":{id:"contents",mapping:{enrolledContactRenderer:{component:"ytd-enrolled-contact-renderer",attributes:{role:"checkbox"}},suggestedContactRenderer:{component:"ytd-suggested-contact-renderer",attributes:{role:"checkbox"}}}}}};
R7.prototype.onDataChanged=function(){this.data&&this.data.selectMessageRenderer&&this.data.selectMessageRenderer.contactSelectMessageRenderer&&this.ytActionSenderBehavior.sendAction("yt-share-panel-set-select-message-renderer-action",[this.data.selectMessageRenderer.contactSelectMessageRenderer])};
R7.prototype.onReset=function(){for(var a=this.$.contents.getElementsByClassName("selected"),b=a.length-1;0<=b;b--)a[b].classList.toggle("selected")};
var S7=R7;v([H(U.YtActionHandlerBehavior),w("design:type",Object)],S7.prototype,"ytActionHandlerBehavior",void 0);v([H(T.YtActionSenderBehavior),w("design:type",Object)],S7.prototype,"ytActionSenderBehavior",void 0);v([H(V.YtRendererBehavior),w("design:type",Object)],S7.prototype,"ytRendererBehavior",void 0);v([H(X),w("design:type",Object)],S7.prototype,"ytRendererstamperBehavior",void 0);v([I({observer:"onDataChanged"}),w("design:type",Object)],S7.prototype,"data",void 0);
S7=v([W({is:"ytd-contact-section-renderer"})],S7);var T7=function(){return F.apply(this,arguments)||this};
l(T7,F);T7.prototype.onDataChanged=function(){if(this.thumbnail)this.thumbnail.onShow()};
T7.prototype.onFocus=function(){"none"===this.getComputedStyleValue("pointer-events")?this.setAttribute("aria-disabled","true"):this.removeAttribute("aria-disabled")};
T7.prototype.onTap=function(a){if(this.classList.contains("selected")||this.ytActionSenderBehavior.sendSingletonAction("yt-share-panel-can-select-contact-action"))a&&a.detail&&(a.detail.x||a.detail.y)&&this.$.target.blur(),(a=this.classList.toggle("selected"))?this.setAttribute("aria-checked","true"):this.removeAttribute("aria-checked"),a={name:this.componentTitle,id:this.data.contactId,isGroup:!1,isSuggested:!1,serialization:a?this.data.serializedContactInvitee:null,undoFn:this.onTap.bind(this)},
this.ytActionSenderBehavior.sendAction("yt-share-panel-select-contact-action",[a])};
var U7=T7;v([H(T.YtActionSenderBehavior),w("design:type",Object)],U7.prototype,"ytActionSenderBehavior",void 0);v([H(V.YtRendererBehavior),w("design:type",Object)],U7.prototype,"ytRendererBehavior",void 0);v([I({observer:"onDataChanged"}),w("design:type",Object)],U7.prototype,"data",void 0);v([I({reflectToAttribute:!0,computed:"getSimpleString(data.name)"}),w("design:type",String)],U7.prototype,"componentTitle",void 0);v([tl("#thumbnail"),w("design:type",Object)],U7.prototype,"thumbnail",void 0);
U7=v([W({is:"ytd-enrolled-contact-renderer"})],U7);var V7=function(){return F.apply(this,arguments)||this};
l(V7,F);V7.prototype.onDataChanged=function(){if(this.thumbnail)this.thumbnail.onShow()};
V7.prototype.onFocus=function(){"none"===this.getComputedStyleValue("pointer-events")?this.setAttribute("aria-disabled","true"):this.removeAttribute("aria-disabled")};
V7.prototype.onTap=function(a){if(this.classList.contains("selected")||this.ytActionSenderBehavior.sendSingletonAction("yt-share-panel-can-select-contact-action"))a&&a.detail&&(a.detail.x||a.detail.y)&&this.$.target.blur(),(a=this.classList.toggle("selected"))?this.setAttribute("aria-checked","true"):this.removeAttribute("aria-checked"),a={name:this.componentTitle,id:this.data.contactId,isGroup:!1,isSuggested:!0,serialization:a?this.data.serializedSuggestedContact:null,undoFn:this.onTap.bind(this)},
this.ytActionSenderBehavior.sendAction("yt-share-panel-select-contact-action",[a])};
var W7=V7;v([H(T.YtActionSenderBehavior),w("design:type",Object)],W7.prototype,"ytActionSenderBehavior",void 0);v([H(V.YtRendererBehavior),w("design:type",Object)],W7.prototype,"ytRendererBehavior",void 0);v([I({observer:"onDataChanged"}),w("design:type",Object)],W7.prototype,"data",void 0);v([I({reflectToAttribute:!0,computed:"getSimpleString(data.name)"}),w("design:type",String)],W7.prototype,"componentTitle",void 0);v([tl("#thumbnail"),w("design:type",Object)],W7.prototype,"thumbnail",void 0);
W7=v([W({is:"ytd-suggested-contact-renderer"})],W7);var X7=function(){return F.apply(this,arguments)||this};
l(X7,F);X7.prototype.configureRendererStamper=function(){return{"data.recentShares":{id:"contents",mapping:{enrolledContactRenderer:{component:"ytd-enrolled-contact-renderer",attributes:{role:"checkbox"}},sharingGroupRenderer:{component:"ytd-sharing-group-renderer",attributes:{role:"checkbox"}}}}}};
X7.prototype.attached=function(){this.actionHandlerBehavior.actionMap={"yt-share-panel-reset-action":"onReset"}};
X7.prototype.onReset=function(){for(var a=this.$.contents.getElementsByClassName("selected"),b=a.length-1;0<=b;b--)a[b].classList.toggle("selected")};
var Y7=X7;v([H(U.YtActionHandlerBehavior),w("design:type",Object)],Y7.prototype,"actionHandlerBehavior",void 0);v([H(V.YtRendererBehavior),w("design:type",Object)],Y7.prototype,"ytRendererBehavior",void 0);v([H(X),w("design:type",Object)],Y7.prototype,"ytRendererstamperBehavior",void 0);v([I(),w("design:type",Object)],Y7.prototype,"data",void 0);Y7=v([W({is:"ytd-recent-shares-section-renderer"})],Y7);var Z7=function(){return F.apply(this,arguments)||this};
l(Z7,F);Z7.prototype.onFocus=function(){"none"===this.getComputedStyleValue("pointer-events")?this.setAttribute("aria-disabled","true"):this.removeAttribute("aria-disabled")};
Z7.prototype.onTap=function(a){if(this.classList.contains("selected")||this.ytActionSenderBehavior.sendSingletonAction("yt-share-panel-can-select-group-action"))a&&a.detail&&(a.detail.x||a.detail.y)&&this.$.target.blur(),(a=this.classList.toggle("selected"))?this.setAttribute("aria-checked","true"):this.removeAttribute("aria-checked"),a={name:this.componentTitle,id:this.data.conversationId,isGroup:!0,isSuggested:!1,serialization:a?this.data.serializedConnectionGroup:null,undoFn:this.onTap.bind(this)},
this.ytActionSenderBehavior.sendAction("yt-share-panel-select-contact-action",[a])};
var $7=Z7;v([H(T.YtActionSenderBehavior),w("design:type",Object)],$7.prototype,"ytActionSenderBehavior",void 0);v([H(V.YtRendererBehavior),w("design:type",Object)],$7.prototype,"ytRendererBehavior",void 0);v([I(),w("design:type",Object)],$7.prototype,"data",void 0);v([I({reflectToAttribute:!0,computed:"getSimpleString(data.title)"}),w("design:type",String)],$7.prototype,"componentTitle",void 0);$7=v([W({is:"ytd-sharing-group-renderer"})],$7);Polymer({is:"ytd-connection-section-renderer",actionMap:{"yt-share-panel-can-select-contact-action":"canSelectContact_","yt-share-panel-can-select-group-action":"canSelectGroup_","yt-share-panel-filter-contacts-action":"onFilterContacts_","yt-share-panel-reset-action":"onReset_","yt-share-panel-select-contact-action":"onSelectContact_"},behaviors:[X,U.YtActionHandlerBehavior,V.YtRendererBehavior],listeners:{wheel:"onScrollWheel_"},properties:{data:{type:Object,observer:"onDataChanged_"},filter:{type:String,
value:""},progressiveFilteredContacts:{type:Array,value:[]},selectedContactCount:{type:Number,value:0,notify:!0,observer:"onContactCountChanged_"},selectedGroupCount:{type:Number,value:0,notify:!0,observer:"onGroupCountChanged_"}},stampDom:{"data.contents":{id:"contents",mapping:{contactSectionRenderer:"ytd-contact-section-renderer",recentSharesSectionRenderer:"ytd-recent-shares-section-renderer"}}},HALF_PAGE_SIZE_:230,PAGE_SCROLL_SPEED_:9,getChildren_:function(){if(this.data&&this.$.contents&&this.$.contents.children){var a=
Polymer.dom(this.$.contents).children;return a?Array.from(a):[]}},
onDataChanged_:function(){if(this.data&&this.data.contents){for(var a=0,b=0;b<this.data.contents.length;b++){var c=this.data.contents[b];c.recentSharesSectionRenderer?a+=c.recentSharesSectionRenderer.recentShares.length:c.contactSectionRenderer&&(a+=c.contactSectionRenderer.contacts.length)}this.$["scroll-button-back"].hidden=!0;this.$["scroll-button-forward"].hidden=6>=a}},
onScrollBack_:function(){this.smoothScrollByOnePage_(!1)},
onScrollForward_:function(){this.smoothScrollByOnePage_(!0)},
onScrollWheel_:function(a){a.stopPropagation();a.preventDefault();this.$.list.scrollLeft+=Math.abs(a.deltaX)>Math.abs(a.deltaY)?a.deltaX:a.deltaY;this.updateScrollButtons_()},
onContactCountChanged_:function(){var a=this.getChildren_();if(a){var b=0<this.selectedContactCount,c=this.selectedContactCount>=this.data.maxSelectableContacts;a.forEach(function(d){d.classList.toggle("contact-selected",b);d.classList.toggle("max-selected",c)})}},
onGroupCountChanged_:function(){var a=this.getChildren_();if(a){var b=0<this.selectedGroupCount;a.forEach(function(c){c.classList.toggle("group-selected",b);c.classList.toggle("max-selected",b)})}},
canSelectContact_:function(){return this.selectedContactCount<this.data.maxSelectableContacts&&0==this.selectedGroupCount},
canSelectGroup_:function(){return 0==this.selectedContactCount&&0==this.selectedGroupCount},
onReset_:function(){this.selectedGroupCount=this.selectedContactCount=0;this.onFilterContacts_({filter:""});this.$.list&&(this.$.list.scrollLeft=0,this.updateScrollButtons_())},
onSelectContact_:function(a){a.isGroup?this.selectedGroupCount+=a.serialization?1:-1:this.selectedContactCount+=a.serialization?1:-1},
onFilterContacts_:function(a){var b=this.getChildren_();if(b){var c=this.filter.toLowerCase(),d=a.filter.toLowerCase();if(d!=c){b.forEach(function(x){x.classList.toggle("no-title",0<d.length)});
if(0==this.progressiveFilteredContacts.length){var e=[];b.forEach(function(x){x=(x=Polymer.dom(x.$.contents).children)?Array.from(x):[];x.forEach(function(y){e.push(y)})});
this.progressiveFilteredContacts.push(e)}var g;for(g=0;g<c.length&&!(g>=d.length||c.charAt(g)!=d.charAt(g));g++);var h=this.progressiveFilteredContacts[g];for(c=0;c<h.length;c++)h[c].hidden=!1;this.progressiveFilteredContacts.splice(g+1);for(c=g+1;c<=d.length;c++){g=" "+d.substring(0,c);for(var m=[],n=0;n<h.length;n++){var p=h[n];-1!=(" "+p.componentTitle.toLowerCase()).indexOf(g)?m.push(p):p.hidden=!0}this.progressiveFilteredContacts.push(m);h=m}b.forEach(function(x){x.classList.toggle("no-title",
0==x.clientWidth)});
this.updateScrollButtons_();this.filter=a.filter}}},
smoothScrollByOnePage_:function(a){var b=this.$.list,c=b.scrollLeft,d=this.HALF_PAGE_SIZE_*(a?1:-1),e=this.HALF_PAGE_SIZE_,g=this.PAGE_SCROLL_SPEED_,h=this.updateScrollButtons_.bind(this),m=0,n;(function x(){m+=g;n=m/e*2;b.scrollLeft=c+d*(1>n?n*n:-n*n+4*n-2);m<e?window.requestAnimationFrame(x):h()})()},
updateScrollButtons_:function(){var a=this.$.list.scrollLeft,b=this.$.list.scrollWidth-this.$.list.clientWidth;this.$["scroll-button-back"].hidden=0>=a;this.$["scroll-button-forward"].hidden=a>=b}});var a8=function(){return F.apply(this,arguments)||this};
l(a8,F);a8.prototype.contactNameChanged=function(a){this.$.name.title=a;this.$.name.textContent=a};
a8.prototype.dataChanged=function(){this.contactId=this.data.id;this.contactName=this.data.name};
a8.prototype.handleUnselect=function(a){"unselect"===a.target.id&&this.data&&this.data.undoFn&&this.data.undoFn()};
var b8=a8;b8.prototype.handleUnselect=b8.prototype.handleUnselect;b8.prototype.dataChanged=b8.prototype.dataChanged;v([H(V.YtRendererBehavior),w("design:type",Object)],b8.prototype,"ytRendererBehavior",void 0);v([I(),w("design:type",Object)],b8.prototype,"data",void 0);v([I(),w("design:type",String)],b8.prototype,"contactId",void 0);v([I({observer:"contactNameChanged"}),w("design:type",String)],b8.prototype,"contactName",void 0);
v([rl("data"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],b8.prototype,"dataChanged",null);v([ql("tap"),w("design:type",Function),w("design:paramtypes",[Event]),w("design:returntype",void 0)],b8.prototype,"handleUnselect",null);b8=v([W({is:"ytd-contact-chip"})],b8);var c8=function(){var a=F.apply(this,arguments)||this;a.actionMap={"yt-share-panel-reset-action":"onReset","yt-share-panel-select-contact-action":"onSelectContact"};return a};
l(c8,F);f=c8.prototype;f.attached=function(){this.actionHandlerBehavior.actionMap=this.actionMap};
f.onInput=function(){this.actionSenderBehavior.sendAction("yt-share-panel-filter-contacts-action",[{filter:this.searchInput.value||""}])};
f.onKeydown=function(a){13===a.keyCode&&a.preventDefault()};
f.onReset=function(){this.searchInput.value="";this.searchInput.hidden=!1;this.chips.innerHTML=""};
f.onSelectContact=function(a){if(a.serialization){var b=document.createElement("ytd-contact-chip");b.data=a;Polymer.dom(this.chips).appendChild(b);this.searchInput.value="";this.onInput(new Event("input"));this.searchInput.hidden=a.isGroup}else{b=this.chips.children;for(var c=0;c<b.length;c++){var d=b[c];if(d.contactId===a.id){this.chips.removeChild(d);break}}this.searchInput.hidden=!1}this.searchInput.placeholder=0<this.chips.children.length?this.componentBehavior.getSimpleString(this.data.addMorePlaceholder):
this.componentBehavior.getSimpleString(this.data.searchPlaceholder);this.$["search-input-box"].scrollTop=this.$["search-input-box"].scrollHeight};
var d8=c8;d8.prototype.onKeydown=d8.prototype.onKeydown;v([H(U.YtActionHandlerBehavior),w("design:type",Object)],d8.prototype,"actionHandlerBehavior",void 0);v([H(V.YtRendererBehavior),w("design:type",Object)],d8.prototype,"ytRendererBehavior",void 0);v([H(T.YtActionSenderBehavior),w("design:type",Object)],d8.prototype,"actionSenderBehavior",void 0);v([H(J0.YtComponentBehavior),w("design:type",Object)],d8.prototype,"componentBehavior",void 0);v([I(),w("design:type",Object)],d8.prototype,"data",void 0);
v([tl("#search-input"),w("design:type",Object)],d8.prototype,"searchInput",void 0);v([tl("#chips"),w("design:type",HTMLDivElement)],d8.prototype,"chips",void 0);v([ql("keydown"),w("design:type",Function),w("design:paramtypes",[KeyboardEvent]),w("design:returntype",void 0)],d8.prototype,"onKeydown",null);d8=v([W({is:"ytd-contact-search-renderer"})],d8);var e8=function(){var a=F.apply(this,arguments)||this;a.actionMap={"yt-share-panel-reset-action":"onReset","yt-share-panel-select-contact-action":"onSelectContact","yt-share-panel-set-select-message-renderer-action":"onSetSelectMessage","yt-conversation-invite-contact-selected":"onSelectContactAddParticipant","yt-conversation-invite-contact-undo-selected":"undoSelectContactAddParticipant"};return a};
l(e8,F);f=e8.prototype;f.attached=function(){this.ytActionHandlerBehavior.actionMap=this.actionMap};
f.onDataChanged=function(){this.data&&this.data.singleText&&(this.text.text=this.data.singleText)};
f.onReset=function(){this.selectedEnrolledCount=this.selectedSuggestedCount=0;this.hidden=!0};
f.onSelectContactAddParticipant=function(a){this.data?(a.isSuggested?this.selectedSuggestedCount+=a.isSelected?1:-1:this.selectedEnrolledCount+=a.isSelected?1:-1,a=!1,this.selectedSuggestedCount&&this.selectedEnrolledCount?this.text.text=this.data.mixedText:1<this.selectedSuggestedCount?this.text.text=this.data.manyText:1===this.selectedSuggestedCount?this.text.text=this.data.singleText:a=!0,this.hidden=a):this.hidden=!0};
f.undoSelectContactAddParticipant=function(a){a.isSelected=!1;this.onSelectContactAddParticipant(a)};
f.onSelectContact=function(a){!this.data||a.isGroup?this.hidden=!0:(a.isSuggested?this.selectedSuggestedCount+=a.serialization?1:-1:this.selectedEnrolledCount+=a.serialization?1:-1,a=!1,this.selectedSuggestedCount&&this.selectedEnrolledCount?this.text.text=this.data.mixedText:1<this.selectedSuggestedCount?this.text.text=this.data.manyText:1===this.selectedSuggestedCount?this.text.text=this.data.singleText:a=!0,this.hidden=a)};
f.onSetSelectMessage=function(a){this.data=a};
var f8=e8;v([H(U.YtActionHandlerBehavior),w("design:type",Object)],f8.prototype,"ytActionHandlerBehavior",void 0);v([I({observer:"onDataChanged"}),w("design:type",Object)],f8.prototype,"data",void 0);v([I({value:0}),w("design:type",Number)],f8.prototype,"selectedEnrolledCount",void 0);v([I({value:0}),w("design:type",Number)],f8.prototype,"selectedSuggestedCount",void 0);v([tl("#text"),w("design:type",Object)],f8.prototype,"text",void 0);f8=v([W({is:"ytd-contact-select-message-renderer"})],f8);Polymer({is:"ytd-message-input-section-v15-renderer",actionMap:{"yt-share-panel-reset-action":"onReset_","yt-share-panel-select-contact-action":"onSelectContact_"},behaviors:[X,U.YtActionHandlerBehavior,T.YtActionSenderBehavior,J0.YtComponentBehavior,V.YtRendererBehavior],properties:{data:{type:Object,observer:"onDataChanged_"},selectedContacts:{type:Object,value:{}},selectedSuggested:{type:Object,value:{}},selectedGroupId:{type:String,value:null},selectedGroupSerialization:{type:String,value:null},
sendEndpoint_:Object,boundOnTapSendButton_:{type:Function,value:function(){return this.onTapSendButton_.bind(this)}}},
listeners:{input:"onInput_",keydown:"onKeydown_"},stampDom:{"data.sendButton":{id:"send-button",mapping:{buttonRenderer:{component:"ytd-button-renderer",properties:{"on-tap":"[[boundOnTapSendButton_]]"}}}}},getTextareaPlaceholder:function(a){return A("kevlar_legacy_browsers")?"":this.getSimpleString(a)},
onInput_:function(){var a=this.$["message-input"];this.initScrollHeight_||(this.expandedScrollHeight_=0,this.initScrollHeight_=a.scrollHeight);!a.classList.contains("expanded")&&a.scrollHeight>this.initScrollHeight_?(a.classList.add("expanded"),this.expandedScrollHeight_=a.scrollHeight):a.classList.contains("expanded")&&a.scrollHeight<this.expandedScrollHeight_&&a.classList.remove("expanded")},
onKeydown_:function(a){if(13==a.keyCode&&!a.shiftKey)this.onTapSendButton_(new Event("click"))},
onTapMessageInputBox_:function(a){"text"!=a.target.id&&"button"!=a.target.id&&this.$["message-input"].focus()},
onDataChanged_:function(){this.data&&(this.sendEndpoint_=this.get("sendButton.buttonRenderer.serviceEndpoint",this.data))&&delete this.data.sendButton.buttonRenderer.serviceEndpoint},
onReset_:function(){this.selectedGroupSerialization=this.selectedGroupId=null;this.selectedContacts={};this.selectedSuggested={};this.$["message-input"].value=null},
onSelectContact_:function(a){a.isGroup?a.serialization?(this.selectedGroupId=a.id,this.selectedGroupSerialization=a.serialization):this.selectedGroupSerialization=this.selectedGroupId=null:a.isSuggested?a.serialization?this.selectedSuggested[a.id]=a.serialization:delete this.selectedSuggested[a.id]:a.serialization?this.selectedContacts[a.id]=a.serialization:delete this.selectedContacts[a.id]},
onTapSendButton_:function(){if((this.selectedGroupId||Object.keys(this.selectedContacts).length||Object.keys(this.selectedSuggested).length)&&this.sendEndpoint_){var a={};a.message_input=this.$["message-input"].value||"";if(this.selectedGroupId)a.selected_group=this.selectedGroupSerialization;else{if(Object.keys(this.selectedContacts).length){var b=[],c;for(c in this.selectedContacts)b.push(this.selectedContacts[c]);a.selected_contacts=b.join(",")}if(Object.keys(this.selectedSuggested).length){b=
[];for(c in this.selectedSuggested)b.push(this.selectedSuggested[c]);a.selected_suggested=b.join(",")}}this.sendServiceRequestAction([this.sendEndpoint_,a]);this.sendAction("yt-share-panel-reset-action")}}});var CHa=function(){return F.apply(this,arguments)||this};
l(CHa,F);var g8=CHa;v([H(V.YtRendererBehavior),w("design:type",Object)],g8.prototype,"ytRendererBehavior",void 0);v([I(),w("design:type",Object)],g8.prototype,"data",void 0);g8=v([W({is:"ytd-sender-id-section-renderer"})],g8);var h8=function(){return F.apply(this,arguments)||this};
l(h8,F);h8.prototype.closePopup=function(){this.ytActionSenderBehavior.sendAction("yt-close-popup-action")};
var i8=h8;v([H(V.YtRendererBehavior),w("design:type",Object)],i8.prototype,"ytRendererBehavior",void 0);v([H(T.YtActionSenderBehavior),w("design:type",Object)],i8.prototype,"ytActionSenderBehavior",void 0);v([I(),w("design:type",Object)],i8.prototype,"data",void 0);i8=v([wY({is:"yt-community-post-section-renderer",noInjection:!0})],i8);var j8=function(){return F.apply(this,arguments)||this};
l(j8,F);j8.prototype.configureRendererStamper=function(){return{"data.title":{id:"title",mapping:{sharePanelTitleV15Renderer:"yt-share-panel-title-v15-renderer"}},"data.communityPost":{id:"community-post",mapping:{communityPostSectionRenderer:"yt-community-post-section-renderer"}}}};
var k8=j8;v([H(T.YtActionSenderBehavior),w("design:type",Object)],k8.prototype,"ytActionSenderBehavior",void 0);v([H(V.YtRendererBehavior),w("design:type",Object)],k8.prototype,"ytRendererBehavior",void 0);v([H(X),w("design:type",Object)],k8.prototype,"ytRendererstamperBehavior",void 0);v([I(),w("design:type",Object)],k8.prototype,"data",void 0);k8=v([wY({is:"yt-share-panel-header-renderer",noInjection:!0,notifyObserversOnUndefined:!1})],k8);var DHa=function(){return F.apply(this,arguments)||this};
l(DHa,F);var l8=DHa;v([H(V.YtRendererBehavior),w("design:type",Object)],l8.prototype,"ytRendererBehavior",void 0);v([I(),w("design:type",Object)],l8.prototype,"data",void 0);l8=v([wY({is:"yt-share-panel-title-v15-renderer",noInjection:!0})],l8);Polymer({is:"yt-start-at-renderer",actionMap:{"yt-open-popup-action":"onOpen_"},behaviors:[U.YtActionHandlerBehavior,T.YtActionSenderBehavior,MY.YtPolymer2AwareBehavior,V.YtRendererBehavior],properties:{data:Object,isStartAtChecked_:{type:Boolean,value:!1,notify:!0},currentTimeSecs_:Number},attached:function(){this.onOpen_()},
updateTimeSecs_:function(a){this.currentTimeSecs_=a;this.$["start-at-timestamp"].value=this.getTimeString_()},
getTimeString_:function(){var a=this.currentTimeSecs_+"",b=Math.floor(a/3600),c=Math.floor(a%3600%60);return(0<b?b+":":"")+wd(Math.floor(a%3600/60),0<b?2:1)+":"+wd(c,2)},
getTimeParam_:function(){return xEa(this.getTimeString_())},
onChangeStartAtCheckbox_:function(){this.$["start-at-timestamp"].disabled=!this.isStartAtChecked_;this.setTimestamp_()},
onChangeStartAtTimestamp_:function(){for(var a=this.$["start-at-timestamp"].value.split(":"),b=0,c=1,d=a.length-1;0<=d;d--)b+=Number(a[d])*c,c*=60;this.updateTimeSecs_(b);this.setTimestamp_()},
onOpen_:function(){this.updateTimeSecs_(0);this.isStartAtChecked_=!1;var a=qW(this);a&&a.getPlayerPromise().then(function(b){b=b.getCurrentTime();this.updateTimeSecs_(b)}.bind(this))},
setTimestamp_:function(){var a=Math.floor(this.currentTimeSecs_);this.sendAction("yt-share-panel-set-timestamp-action",[{isSet:this.isStartAtChecked_&&!!a,timestamp:a||""}])}});var m8=function(){return F.apply(this,arguments)||this};
l(m8,F);m8.prototype.onTap=function(a){a&&a.detail&&(a.detail.x||a.detail.y)&&this.$.target.blur();this.data.serviceEndpoint?this.actionSenderBehavior.sendServiceRequestAction([this.data.serviceEndpoint]):this.data.navigationEndpoint&&this.fire("yt-navigate",{endpoint:this.data.navigationEndpoint})};
ea.Object.defineProperties(m8.prototype,{title:{configurable:!0,enumerable:!0,get:function(){return this.ytRendererBehavior.getSimpleString(this.data.title)}},
icon:{configurable:!0,enumerable:!0,get:function(){return"socialNetworksRound:"+this.data.serviceName.toLowerCase()}}});
var n8=m8;n8.prototype.onTap=n8.prototype.onTap;v([H(V.YtRendererBehavior),w("design:type",Object)],n8.prototype,"ytRendererBehavior",void 0);v([H(T.YtActionSenderBehavior),w("design:type",Object)],n8.prototype,"actionSenderBehavior",void 0);v([I(),w("design:type",Object)],n8.prototype,"data",void 0);v([sl("data.title"),w("design:type",Object),w("design:paramtypes",[])],n8.prototype,"title",null);v([sl("data.serviceName"),w("design:type",String),w("design:paramtypes",[])],n8.prototype,"icon",null);
v([ql("tap"),w("design:type",Function),w("design:paramtypes",[CustomEvent]),w("design:returntype",void 0)],n8.prototype,"onTap",null);n8=v([wY({is:"yt-share-target-renderer",notifyObserversOnUndefined:!1,noInjection:!0})],n8);Polymer({is:"yt-third-party-share-target-section-renderer",actionMap:{"yt-share-panel-reset-action":"onReset_"},behaviors:[X,U.YtActionHandlerBehavior,V.YtRendererBehavior],listeners:{wheel:"onScrollWheel_"},properties:{data:{type:Object,observer:"onDataChanged_"}},stampDom:{"data.shareTargets":{id:"contents",mapping:{shareTargetRenderer:{component:"yt-share-target-renderer",attributes:{role:"option"}}}}},SHARE_TARGET_WIDTH_:70,SHARE_TARGET_MARGIN_RIGHT_:8,PAGE_SCROLL_SPEED_:9,onDataChanged_:function(){this.data&&
this.data.shareTargets&&(this.$["scroll-button-back"].hidden=!0,this.$["scroll-button-forward"].hidden=6>=this.data.shareTargets.length)},
onReset_:function(){this.$.list&&(aK(this.$.list,yra(this.$.list)),this.updateScrollButtons_())},
onScrollBack_:function(){this.smoothScrollByOnePage_(!1)},
onScrollForward_:function(){this.smoothScrollByOnePage_(!0)},
onScrollWheel_:function(a){a.stopPropagation();a.preventDefault();var b=$J(this.$.list);aK(this.$.list,b+(Math.abs(a.deltaX)>Math.abs(a.deltaY)?a.deltaX:a.deltaY));this.updateScrollButtons_()},
smoothScrollByOnePage_:function(a){var b=this.$.list,c=(Math.floor(b.clientWidth/this.SHARE_TARGET_WIDTH_)*(this.SHARE_TARGET_WIDTH_+this.SHARE_TARGET_MARGIN_RIGHT_)-this.SHARE_TARGET_MARGIN_RIGHT_)/2,d=$J(b),e=c*(a?1:-1),g=this.PAGE_SCROLL_SPEED_,h=this.updateScrollButtons_.bind(this),m=0,n;(function x(){m+=g;n=m/c*2;aK(b,d+e*(1>n?n*n:-n*n+4*n-2));m<c?window.requestAnimationFrame(x):h()})()},
updateScrollButtons_:function(){var a=$J(this.$.list),b=this.$.list.scrollWidth-this.$.list.clientWidth;this.$["scroll-button-back"].hidden=0>=a;this.$["scroll-button-forward"].hidden=a>=b}});Polymer({is:"yt-third-party-network-section-renderer",behaviors:[V.YtRendererBehavior,X],properties:{data:Object},stampDom:{"data.shareTargetContainer":{id:"share-targets",mapping:{thirdPartyShareTargetSectionRenderer:"yt-third-party-share-target-section-renderer"}},"data.copyLinkContainer":{id:"copy-link",mapping:{copyLinkRenderer:"yt-copy-link-renderer"}},"data.startAtContainer":{id:"start-at",mapping:{startAtRenderer:"yt-start-at-renderer"}}}});Polymer({is:"ytd-unified-share-panel-renderer",actionMap:{"yt-share-panel-reset-action":"onReset_","yt-share-panel-select-contact-action":"onSelectContact_"},behaviors:[X,U.YtActionHandlerBehavior,T.YtActionSenderBehavior,V.YtRendererBehavior],listeners:{"yt-popup-closed":"onPopupClosed_"},properties:{data:{type:Object,observer:"onDataChanged_"},closeButtonAriaLabel:{type:String,value:yU("SBOX_INAPPROPRIATE_CANCEL")},selectedCount:{type:Number,value:0,notify:!0,observer:"onCountChanged_"},ENABLED_FOR_CONTACTS_CLASS_:{type:Array,
value:["enabled-for-contacts"]}},stampDom:{"data.contents":{id:"contents",mapping:{connectionSection:{component:"ytd-connection-section-renderer",classListBinding:"[[ENABLED_FOR_CONTACTS_CLASS_]]"},senderIdSectionRenderer:"ytd-sender-id-section-renderer",thirdPartyNetworkSection:"yt-third-party-network-section-renderer"}},"data.search":{id:"search",mapping:{contactSearchRenderer:"ytd-contact-search-renderer"}},"data.confirmMultiRecipientShareDialogueRenderer":{id:"messages",mapping:{confirmDialogRenderer:"ytd-confirm-multi-recipient-share-dialogue-renderer"}}},
onCountChanged_:function(){var a=0<this.selectedCount;this.$.contents&&this.$.contents.children&&Array.from(Polymer.dom(this.$.contents).children).forEach(function(b){b.classList.contains(this.ENABLED_FOR_CONTACTS_CLASS_[0])||(b.hidden=a)}.bind(this));
this.$["message-input-section"].hidden=!a;this.$["contact-select-message"].hidden=!a;this.$.messages.hidden=!a},
onDataChanged_:function(){if(this.data&&this.data.contents){for(var a=!1,b=0;b<this.data.contents.length;b++){var c=this.data.contents[b].connectionSection;if(c){for(b=0;b<c.contents.length;b++){var d=c.contents[b],e=d.recentSharesSectionRenderer;d=d.contactSectionRenderer;if(e&&e.recentShares.length||d&&d.contacts.length){a=!0;break}}break}}a?this.removeAttribute("links-only"):this.setAttribute("links-only",!0);this.toggleAttribute("can-post",this.hasCommunityPostRenderer_());Polymer.RenderStatus.afterNextRender(this,
function(){this.fire("yt-refit")})}},
hasCommunityPostRenderer_:function(){return!!this.data&&!!this.data.header&&!!this.data.header.sharePanelHeaderRenderer&&!!this.data.header.sharePanelHeaderRenderer.communityPost&&!!this.data.header.sharePanelHeaderRenderer.communityPost.communityPostSectionRenderer},
onPopupClosed_:function(){this.sendAction("yt-share-panel-reset-action")},
onReset_:function(){this.selectedCount=0;this.sendAction("yt-close-popup-action",["ytd-unified-share-panel-renderer"])},
onSelectContact_:function(a){a.serialization?this.selectedCount++:this.selectedCount--},
onTapClose_:function(){this.sendAction("yt-close-popup-action",["ytd-unified-share-panel-renderer"])}});var o8=function(){return F.apply(this,arguments)||this};
l(o8,F);o8.prototype.attached=function(){this.setAttribute("modal","true")};
var p8=o8;v([I(),w("design:type",Object)],p8.prototype,"data",void 0);v([H(V.YtRendererBehavior),w("design:type",Object)],p8.prototype,"ytRendererBehavior",void 0);v([H(G_.YtEventForwardingBehavior),w("design:type",Object)],p8.prototype,"ytEventForwardingBehavior",void 0);p8=v([W({is:"ytd-modal-with-title-and-button-renderer"})],p8);var q8=function(a){hb.call(this,a)};
t(q8,hb);var EHa=function(a){hb.call(this,a)};
t(EHa,q8);var FHa=function(a){hb.call(this,a)};
t(FHa,q8);var r8=function(){return F.apply(this,arguments)||this};
l(r8,F);r8.prototype.onTap=function(){var a=!1,b=this.get("serviceEndpoint.selectActiveIdentityEndpoint.supportedTokens",this.data);b&&b.forEach(function(c){c.accountSigninToken&&(a=!0,zU(c.accountSigninToken.signinUrl,void 0,void 0,window.top))});
a||we(new EHa("Did not handle account switch tap. No token."))};
var s8=r8;s8.prototype.onTap=s8.prototype.onTap;v([H(V.YtRendererBehavior),w("design:type",Object)],s8.prototype,"ytRendererBehavior",void 0);v([I(),w("design:type",Object)],s8.prototype,"data",void 0);v([ql("tap"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],s8.prototype,"onTap",null);s8=v([W({is:"ytd-account-item-renderer"})],s8);var GHa=function(){return F.apply(this,arguments)||this};
l(GHa,F);var t8=GHa;v([H(V.YtRendererBehavior),w("design:type",Object)],t8.prototype,"ytRendererBehavior",void 0);v([I(),w("design:type",Object)],t8.prototype,"data",void 0);v([I({notify:!0}),w("design:type",String)],t8.prototype,"page",void 0);t8=v([W({is:"ytd-account-item-section-header-renderer"})],t8);var u8=function(){return F.apply(this,arguments)||this};
l(u8,F);u8.prototype.configureRendererStamper=function(){return{"data.contents":{id:"contents",mapping:{accountItem:"ytd-account-item-renderer",compactLinkRenderer:"ytd-compact-link-renderer"}}}};
var v8=u8;v([H(V.YtRendererBehavior),w("design:type",Object)],v8.prototype,"ytRendererBehavior",void 0);v([H(X),w("design:type",Object)],v8.prototype,"ytRendererstamperBehavior",void 0);v([I(),w("design:type",Object)],v8.prototype,"data",void 0);v8=v([W({is:"ytd-account-item-section-renderer"})],v8);var w8=function(){return F.apply(this,arguments)||this};
l(w8,F);w8.prototype.configureRendererStamper=function(){return{"data.contents":{id:"contents",mapping:{accountItemSectionRenderer:"ytd-account-item-section-renderer",compactLinkRenderer:{component:"ytd-compact-link-renderer",params:{componentStyle:"disclaimer"}}}}}};
var x8=w8;v([H(V.YtRendererBehavior),w("design:type",Object)],x8.prototype,"ytRendererBehavior",void 0);v([H(X),w("design:type",Object)],x8.prototype,"ytRendererstamperBehavior",void 0);v([I(),w("design:type",Object)],x8.prototype,"data",void 0);v([I({notify:!0}),w("design:type",String)],x8.prototype,"page",void 0);x8=v([W({is:"ytd-account-section-list-renderer"})],x8);var y8=function(){return F.apply(this,arguments)||this};
l(y8,F);y8.prototype.dataChanged=function(){if(this.data)this.avatar.onShow()};
var z8=y8;z8.prototype.dataChanged=z8.prototype.dataChanged;v([H(V.YtRendererBehavior),w("design:type",Object)],z8.prototype,"ytRendererBehavior",void 0);v([H(T.YtActionSenderBehavior),w("design:type",Object)],z8.prototype,"ytActionSenderBehavior",void 0);v([I(),w("design:type",Object)],z8.prototype,"data",void 0);v([tl("#avatar"),w("design:type",Object)],z8.prototype,"avatar",void 0);
v([rl("data"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],z8.prototype,"dataChanged",null);z8=v([W({is:"ytd-active-account-header-renderer"})],z8);var A8=function(){return F.apply(this,arguments)||this};
l(A8,F);A8.prototype.configureRendererStamper=function(){return{"data.buttons":{id:"buttons",mapping:{buttonRenderer:"ytd-button-renderer"}}}};
A8.prototype.onBackTap=function(){this.fire("yt-menu-back-tapped")};
var B8=A8;v([H(V.YtRendererBehavior),w("design:type",Object)],B8.prototype,"ytRendererBehavior",void 0);v([H(X),w("design:type",Object)],B8.prototype,"ytRendererstamperBehavior",void 0);v([I(),w("design:type",Object)],B8.prototype,"data",void 0);B8=v([W({is:"ytd-simple-menu-header-renderer"})],B8);var C8=function(){return F.apply(this,arguments)||this};
l(C8,F);C8.prototype.onTap=function(){this.ytRendererBehavior.sendServiceRequestAction([this.data.addConnectionButton.buttonRenderer.navigationEndpoint])};
var D8=C8;D8.prototype.onTap=D8.prototype.onTap;v([H(T.YtActionSenderBehavior),w("design:type",Object)],D8.prototype,"ytActionSenderBehavior",void 0);v([H(V.YtRendererBehavior),w("design:type",Object)],D8.prototype,"ytRendererBehavior",void 0);v([I(),w("design:type",Object)],D8.prototype,"data",void 0);v([ql("tap"),w("design:type",Function),w("design:paramtypes",[Event]),w("design:returntype",void 0)],D8.prototype,"onTap",null);D8=v([W({is:"ytd-add-connection-renderer"})],D8);Polymer({is:"ytd-connection-renderer",behaviors:[X,T.YtActionSenderBehavior,V.YtRendererBehavior],properties:{data:{type:Object,observer:"onDataChanged_"}},stampDom:{"data.menu":{id:"menu",mapping:{menuRenderer:{component:"ytd-menu-renderer",params:{noInkOnDropdownButton:!0}}}}},onDataChanged_:function(){if(this.$.avatar)this.$.avatar.onShow();this.classList.add("c"+this.data.connectionId)},
onTapOpenConversation_:function(){this.data.sendShareToContactsEndpoint&&this.sendServiceRequestAction([this.data.sendShareToContactsEndpoint])}});var HHa=function(){return F.apply(this,arguments)||this};
l(HHa,F);var E8=HHa;v([H(V.YtRendererBehavior),w("design:type",Object)],E8.prototype,"ytRendererBehavior",void 0);v([I(),w("design:type",Object)],E8.prototype,"data",void 0);E8=v([W({is:"ytd-contacts-list-header-renderer"})],E8);var F8=function(){var a=F.apply(this,arguments)||this;a.actionMap={"yt-update-contact-invite-status-command":"handleToggleInvite","yt-remove-contact-action":"handleRemoveContact","yt-show-invite-url-action":"handleInviteShown"};return a};
l(F8,F);f=F8.prototype;f.configureRendererStamper=function(){return{"data.header":{id:"header",mapping:{contactsListHeaderRenderer:"ytd-contacts-list-header-renderer"}},"data.contents":{id:"contents",mapping:{addConnectionRenderer:"ytd-add-connection-renderer",connectionRenderer:"ytd-connection-renderer",suggestedConnectionRenderer:"ytd-suggested-connection-renderer",copyConnectionInviteUrlRenderer:"ytd-copy-connection-invite-url-renderer"}}}};
f.attached=function(){this.actionHandlerBehavior.actionMap=this.actionMap};
f.handleToggleInvite=function(a){if(a&&a.updateContactInviteStatusCommand&&(a=a.updateContactInviteStatusCommand,a.contactId&&void 0!==a.invited)){var b=this.getElementsByClassName("c"+a.contactId);b&&b.length&&b[0].classList.toggle("invited",a.invited)}};
f.handleRemoveContact=function(a){a&&a.removeContactAction&&a.removeContactAction.contactId&&(a=this.getElementsByClassName("c"+a.removeContactAction.contactId))&&a.length&&a[0].classList.add("removed")};
f.handleInviteShown=function(a){var b=cb(this.data),c=b.contents;c.some(function(d){return!!d.addConnectionRenderer})&&(c=c.filter(function(d){return!d.addConnectionRenderer}),c.splice(0,0,a.showInviteUrlAction.inviteUrlRenderer),b.contents=c,this.data=b)};
var G8=F8;v([H(U.YtActionHandlerBehavior),w("design:type",Object)],G8.prototype,"actionHandlerBehavior",void 0);v([H(V.YtRendererBehavior),w("design:type",Object)],G8.prototype,"ytRendererBehavior",void 0);v([H(X),w("design:type",Object)],G8.prototype,"ytRendererstamperBehavior",void 0);v([I(),w("design:type",Object)],G8.prototype,"data",void 0);G8=v([W({is:"ytd-contacts-list-renderer"})],G8);var H8=function(){var a=F.apply(this,arguments)||this;a.actionMap={"yt-signal-action-copy-connection-invite-url":"onCopyConnectionInviteUrl"};return a};
l(H8,F);H8.prototype.ready=function(){this.shareUrl.addEventListener("tap",this.onTapShareUrl.bind(this))};
H8.prototype.onCopyConnectionInviteUrl=function(){this.shareUrl.select();document.execCommand("copy")};
H8.prototype.onTapShareUrl=function(){this.shareUrl.select()};
var I8=H8;v([H(V.YtRendererBehavior),w("design:type",Object)],I8.prototype,"ytRendererBehavior",void 0);v([H(U.YtActionHandlerBehavior),w("design:type",Object)],I8.prototype,"ytActionHandlerBehavior",void 0);v([I(),w("design:type",Object)],I8.prototype,"data",void 0);v([tl("#share-url"),w("design:type",HTMLInputElement)],I8.prototype,"shareUrl",void 0);I8=v([W({is:"ytd-copy-connection-invite-url-renderer"})],I8);var J8=function(){return F.apply(this,arguments)||this};
l(J8,F);J8.prototype.configureRendererStamper=function(){return{"data.menu":{id:"menu",mapping:{menuRenderer:{component:"ytd-menu-renderer",params:{icon:"yt-icons:more_vert",noInkOnDropdownButton:!0},noInjection:!0}}}}};
J8.prototype.onDataChanged=function(){if(this.data){if(this.avatar)this.avatar.onShow();this.classList.toggle("invited",!!this.data.invited);this.classList.add("c"+this.data.connectionId)}};
var K8=J8;K8.prototype.onDataChanged=K8.prototype.onDataChanged;v([H(V.YtRendererBehavior),w("design:type",Object)],K8.prototype,"ytRendererBehavior",void 0);v([H(X),w("design:type",Object)],K8.prototype,"ytRendererstamperBehavior",void 0);v([I(),w("design:type",Object)],K8.prototype,"data",void 0);v([tl("#avatar"),w("design:type",Object)],K8.prototype,"avatar",void 0);v([rl("data"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],K8.prototype,"onDataChanged",null);
K8=v([W({is:"ytd-suggested-connection-renderer"})],K8);var IHa=function(){return F.apply(this,arguments)||this};
l(IHa,F);var L8=IHa;v([H(V.YtRendererBehavior),w("design:type",Object)],L8.prototype,"ytRendererBehavior",void 0);v([I(),w("design:type",Object)],L8.prototype,"data",void 0);L8=v([W({is:"ytd-comment-video-thumbnail-header-renderer"})],L8);OY("multiPageMenuSectionItems","toggleItemRenderer","ytd-toggle-item-renderer");Polymer({is:"ytd-toggle-item-renderer",behaviors:[V.YtRendererBehavior],properties:{data:Object,enabled:{type:Boolean,computed:"isEnabled_(data)"}},onChange_:function(a){(a=Polymer.dom(a).rootTarget.checked?this.data.toggleOnActions:this.data.toggleOffActions)&&this.sendInnerTubeActions(a,this)},
isEnabled_:function(){return!!this.data.toggleOnActions||!!this.data.toggleOffActions}});Polymer({is:"yt-multi-page-menu-section-renderer",behaviors:[V.YtRendererBehavior,X,U.YtActionHandlerBehavior,T.YtActionSenderBehavior],listeners:{"yt-service-request-completed":"onServiceRequestCompleted_","yt-remove-conversation-switcher-invite-item":"removeConversation_"},properties:{data:Object,hasAccountSettings:{type:Boolean,reflectToAttribute:!0,computed:"computeHasAccountSettings_(data)"},backgroundColorUpdate:{type:Boolean,reflectToAttribute:!0,value:A("kevlar_background_color_update")}},
actionMap:{"yt-broadcast-user-invalidation-action":"updateMenu_","yt-hide-enclosing-action":"handleHideEnclosingAction_","yt-remove-conversation-action":"removeConversationItem_","yt-update-chat-menu-action":"updateAndMergeChatItems_"},stampDom:{"data.items":{id:"items",mapping:PY("multiPageMenuSectionItems")},data:{id:"settings",mapping:PY("multiPageMenuSectionSettings")}},computeHasAccountSettings_:function(a){return!!this.get("webMultiPageMenuSectionRendererExtension",a)},
handleHideEnclosingAction_:function(a){if(this.data&&this.data.items)for(var b=0;b<this.data.items.length;b++){var c=this.data.items[b].notificationRenderer;if(c&&c.notificationId==a.hideEnclosingAction.notificationId){this.splice("data.items",b,1);this.sendAction("yt-close-popup-action",["ytd-menu-popup-renderer"]);this.maybeHideNotificationSection_();break}}},
maybeHideNotificationSection_:function(){this.data&&this.data.items&&0==this.data.items.length&&this.toggleAttribute("hidden",!0)},
updateMenu_:function(a){if(this.parentComponent.isPopUpOpen&&this.data&&this.data.continuations&&a&&!a.doNotRefreshInbox){for(a=0;a<this.data.continuations.length;a++)if(this.data.continuations[a].invalidationContinuationData){var b=this.data.continuations[a].invalidationContinuationData.continuation;break}a=u.clone(this.data.continuationUpdateEndpoint);a.continuation=b;a.click_tracking_params=this.data.trackingParams;this.sendServiceRequestAction([a])}},
onServiceRequestCompleted_:function(a,b){if(this.data&&(a=b.actions)){b=0;for(var c=a.length;b<c;b++){var d=a[b];if(!d.appendContinuationItemsAction)break;var e="CONTINUATION_TARGET_NOTIFICATION_MENU"==d.appendContinuationItemsAction.target||"CONTINUATION_TARGET_CONVERSATION_MENU"==d.appendContinuationItemsAction.target;d.appendContinuationItemsAction&&e&&d.appendContinuationItemsAction.continuationItems&&this.data.items&&(e=this.data.items.length-1,this.data.items[e].continuationItemRenderer&&this.splice.apply(this,
["data.items",e,1].concat(d.appendContinuationItemsAction.continuationItems)))}}},
updateAndMergeChatItems_:function(a){if(this.data&&this.data.items){var b={},c=this.data.items,d=c.some(function(h){return!!h.conversationSwitcherInviteItemRenderer}),e=c.some(function(h){return!!h.conversationSwitcherItemRenderer});
if(d||e){var g;c[c.length-1].continuationItemRenderer&&(g=c.pop());c=c.filter(function(h){return!h.conversationSwitcherInviteItemRenderer});
for(e=0;e<c.length;e++)d=c[e].conversationSwitcherItemRenderer,Ia(d)&&(b[d.conversationId]=c[e]);c=a.updateChatMenuAction.items;for(e=0;e<c.length;e++)d=c[e].conversationSwitcherItemRenderer,b[d.conversationId]=c[e];b=u.getValues(b);b.sort(function(h,m){return m.conversationSwitcherItemRenderer.lastPostTimestamp-h.conversationSwitcherItemRenderer.lastPostTimestamp});
Ia(g)&&b.push(g);a.updateChatMenuAction.inviteItems&&0<a.updateChatMenuAction.inviteItems.length&&(b=a.updateChatMenuAction.inviteItems.concat(b));this.set("data.items",b)}}},
removeConversation_:function(a){var b=a.detail;a=this.data.items.filter(function(c){c=c.conversationSwitcherInviteItemRenderer;return!(c&&c.connectionId===b.connectionId)});
this.set("data.items",a)},
removeConversationItem_:function(a){if(this.data&&this.data.items){var b=tb(this.data.items,function(c){return c.conversationSwitcherItemRenderer?c.conversationSwitcherItemRenderer.conversationId==a.removeConversationAction.conversationId:!1});
-1!=b&&this.splice("data.items",b,1)}}});Polymer({is:"ytd-multi-page-menu-renderer",behaviors:[V.YtRendererBehavior,U.YtActionHandlerBehavior,G_.YtEventForwardingBehavior,X],listeners:{"yt-account-settings-covered-changed":"onAccountSettingsCoveredChanged_","yt-menu-back-tapped":"onMenuBackTap_","yt-navigate":"onYtNavigate_","yt-retrieve-location":"onRetrieveLocation_","yt-service-request-completed":"onServiceRequestSentOrCompleted_","yt-service-request-sent":"onServiceRequestSentOrCompleted_","yt-submenu-closed":"onSubmenuClosed_","yt-popup-closed":"onPopupClosed_",
"yt-popup-opened":"onPopupOpened_"},actionMap:{"yt-check-conversation-inbox-open-action":"handleCheckConversationInboxOpenAction_"},screenLayer:2,properties:{data:{type:Object,observer:"dataChanged_"},covered:Boolean,menuStyle:{type:String,reflectToAttribute:!0,computed:"computeMenuStyle_(data.style)"},isPopUpOpen:Boolean,hasYourDataEntryButton:{type:Boolean,value:A("your_data_entrypoint"),reflectToAttribute:!0},backgroundColorUpdate:{type:Boolean,reflectToAttribute:!0,value:A("kevlar_background_color_update")}},
HIGH_PRIORITY_NOTIFICATION_DISPLAY_TIMEOUT_MS:4E3,stampDom:{"data.header":{id:"header",mapping:{activeAccountHeaderRenderer:"ytd-active-account-header-renderer",simpleMenuHeaderRenderer:"ytd-simple-menu-header-renderer"}},"data.sections":{id:"sections",mapping:{accountSectionListRenderer:{component:"ytd-account-section-list-renderer",registration:["defer-on-all"]},backgroundPromoRenderer:"ytd-background-promo-renderer",commentVideoThumbnailHeaderRenderer:"ytd-comment-video-thumbnail-header-renderer",
contactsListRenderer:"ytd-contacts-list-renderer",itemSectionRenderer:"ytd-comments",messageRenderer:"ytd-message-renderer",multiPageMenuNotificationSectionRenderer:"yt-multi-page-menu-section-renderer",multiPageMenuSectionRenderer:"yt-multi-page-menu-section-renderer",toggleItemRenderer:"ytd-toggle-item-renderer"}},"data.footer":{id:"footer",mapping:{multiPageMenuSectionRenderer:"yt-multi-page-menu-section-renderer"}}},created:function(){this.readyForInteractionLogging_=!1},
ready:function(){this.$.container.addEventListener("scroll",this.markDirty.bind(this))},
dataChanged_:function(){!this.readyForInteractionLogging_&&this.isListOfConversations_()&&this.initConversationListInteractionLogging_()},
reset:function(){this.closeJobId_&&(Dn.cancelJob(this.closeJobId_),this.closeJobId_=0);this.covered=!1;this.$.header&&(this.$.header.hidden=!1);var a=this.$$("yt-multi-page-menu-section-renderer");a&&(a.hidden=!1);(a=this.$$("[has-account-settings]"))&&(a=a.$$("ytd-account-settings"))&&a.reset()},
computeMenuStyle_:function(a){return a?a.toLowerCase().replace(/_/g,"-"):""},
onPopupClosed_:function(){this.isPopUpOpen=!1;if(!this.isHighPriorityNotification_()){var a;if(a=Polymer.Element?Polymer.dom(this.root).querySelectorAll("yt-multi-page-menu-section-renderer"):this.querySelectorAll("yt-multi-page-menu-section-renderer")){a=k(a);for(var b=a.next();!b.done;b=a.next())(b=b.value)&&(b=Polymer.Element?Polymer.dom(b.root).querySelectorAll("ytd-notification-renderer"):b.querySelectorAll("ytd-notification-renderer"))&&this.setNotificationsSeen_(b)}}},
onPopupOpened_:function(a,b){var c=this;this.isPopUpOpen=!0;"ytd-multi-page-menu-renderer"==b.is&&(this.reset(),this.fire("yt-refit"),this.isHighPriorityNotification_()&&(this.closeJobId_&&(Dn.cancelJob(this.closeJobId_),this.closeJobId_=0),this.closeJobId_=Gn(Dn,function(){c.isHighPriorityNotification_()&&c.sendAction("yt-close-popup-action",["ytd-multi-page-menu-renderer"])},this.HIGH_PRIORITY_NOTIFICATION_DISPLAY_TIMEOUT_MS)))},
onAccountSettingsCoveredChanged_:function(a){var b=this;a=a.detail;this.toggleClass("account-settings-covered",!!a);this.$.header.hidden=a;Polymer.RenderStatus.afterNextRender(this,function(){b.fire("yt-refit")});
for(var c=this.querySelectorAll("yt-multi-page-menu-section-renderer:not([has-account-settings])"),d=0;d<c.length;d++)c[d].hidden=a},
onYtNavigate_:function(a,b){this.shouldCloseOnNavigateEvent_(b.endpoint)&&this.sendAction("yt-close-all-popups-action")},
onServiceRequestSentOrCompleted_:function(a,b){a.detail&&a.detail.endpoint&&(a=a.detail.endpoint,a.signalServiceEndpoint&&"GET_CONNECTION_SUB_MENU"==a.signalServiceEndpoint.signal||a.getCommentsFromInboxCommand)&&(this.$.spinner.hidden=!1,this.$.header.hidden=!0,this.$.container.hidden=!0,this.$.submenu.hidden=!0);if(b.actions){b=b.actions;a=0;for(var c=b.length;a<c;a++){var d=b[a];d.getMultiPageMenuAction&&this.handleGetMultiPageMenuAction_(d.getMultiPageMenuAction)}}},
handleGetMultiPageMenuAction_:function(a){var b=document.createElement("ytd-multi-page-menu-renderer");Polymer.RenderStatus.afterNextRender(this,function(){this.fire("yt-refit")});
this.emptySubmenuContainer_();Polymer.dom(this.$.submenu).appendChild(b);(a=a.menu.multiPageMenuRenderer)&&this.logSubmenu_(a);b.data=a;b.covered=!1;this.covered=!0;this.$.spinner.hidden=!0},
logSubmenu_:function(a){if(!A("kevlar_multi_page_menu_sub_page_loggin_killswitch")){var b=BS(56219);if(b){var c=this.getScreenLayer();Xo(b,56219,c);(c=Vo(c))&&(a=a.trackingParams)&&CS(b,c,go(a))}}},
emptySubmenuContainer_:function(){for(var a=Polymer.dom(this.$.submenu);a.firstChild;)a.removeChild(a.firstChild)},
onMenuBackTap_:function(a){this.fire("yt-submenu-closed");a.stopPropagation()},
onSubmenuClosed_:function(a){Polymer.dom(a).rootTarget!=this&&(this.covered=!1,this.fire("yt-refit"),a.stopPropagation())},
onRetrieveLocation_:function(a,b){b.hasComments&&(b.locationRetrieved("/comment_service_ajax?action_get_comments=1&pbj=1",void 0),a.stopPropagation())},
setNotificationsSeen_:function(a){for(var b=0;b<a.length;b++)a[b].set("data.seen",!0)},
handleCheckConversationInboxOpenAction_:function(){return this.isListOfConversations_()&&this.isPopUpOpen},
isListOfConversations_:function(){return!!this&&!!this.data&&"MULTI_PAGE_MENU_STYLE_TYPE_CONVERSATIONS"==this.data.style},
isHighPriorityNotification_:function(){return!!this&&!!this.data&&"MULTI_PAGE_MENU_STYLE_TYPE_HIGH_PRIORITY_NOTIFICATION"==this.data.style},
initConversationListInteractionLogging_:function(){if(this&&this.data&&this.data.trackingParams){var a=this.data.trackingParams,b=BS(56219);if(b){Xo(b,56219,2);var c=Vo(2);c&&(a=go(a))&&(CS(b,c,a),this.readyForInteractionLogging_=!0)}}},
shouldCloseOnNavigateEvent_:function(a){return a?a.updateCommentDialogEndpoint||a.updateCommentReplyDialogEndpoint||a.createCommentReplyDialogEndpoint||a.commandMetadata&&a.commandMetadata.webCommandMetadata&&a.commandMetadata.webCommandMetadata.ignoreNavigation?!1:!0:!0}});Polymer({is:"ytd-topbar-menu-button-renderer",behaviors:[V.YtRendererBehavior,dY,T.YtActionSenderBehavior,MY.YtButtonBehavior],listeners:{tap:"onTap_"},properties:{data:Object},created:function(){this.showTooltips=!0},
get container(){return this.$.button},computeAccessibility_:function(a){return this.get("accessibility.accessibilityData",a)||null},
onTap_:function(){var a=this.sendOptionalAction("yt-get-popup-opened-action",["ytd-multi-page-menu-renderer"]);a&&1==a.length&&a[0]?this.sendAction("yt-close-popup-action",["ytd-multi-page-menu-renderer"]):this.data.menuRenderer?this.openPopup({openPopupAction:{popupType:"DROPDOWN",popup:this.data.menuRenderer}}):this.data.menuRequest&&this.sendServiceRequestAction([this.data.menuRequest])}});var M8=function(){return F.apply(this,arguments)||this};
l(M8,F);f=M8.prototype;f.onPopupOpened=function(){this.ytActionSenderBehavior.sendAction("yt-mute-ad-action",["ytd-ad-feedback-renderer",this])};
f.computeConfirmButton=function(a){return{style:"STYLE_BLUE_TEXT",size:"SIZE_DEFAULT",text:a.confirmLabel}};
f.computeCancelButton=function(a){return{style:"STYLE_BLUE_TEXT",size:"SIZE_DEFAULT",text:a.cancelLabel}};
f.onConfirmTap=function(){var a=this.reasons.selected;void 0!==a&&(a=this.data.reasons[a].endpoint)&&(this.ytActionSenderBehavior.sendServiceRequestAction([a]),this.ytActionSenderBehavior.sendAction("yt-close-popup-action"),this.sendFeedbackSubmitToastAction())};
f.sendFeedbackSubmitToastAction=function(){this.data.completionMessage&&this.ytActionSenderBehavior.sendAction("yt-open-popup-action",[{openPopupAction:{popupType:"TOAST",popup:{notificationActionRenderer:{responseText:this.data.completionMessage}}}},this])};
f.onCancelTap=function(){this.ytActionSenderBehavior.sendAction("yt-close-popup-action")};
var N8=M8;N8.prototype.onPopupOpened=N8.prototype.onPopupOpened;v([H(V.YtRendererBehavior),w("design:type",Object)],N8.prototype,"ytRendererBehavior",void 0);v([H(T.YtActionSenderBehavior),w("design:type",Object)],N8.prototype,"ytActionSenderBehavior",void 0);v([I(),w("design:type",Object)],N8.prototype,"data",void 0);v([tl("#reasons"),w("design:type",Object)],N8.prototype,"reasons",void 0);
v([ql("yt-popup-opened"),w("design:type",Function),w("design:paramtypes",[CustomEvent]),w("design:returntype",void 0)],N8.prototype,"onPopupOpened",null);N8=v([W({is:"ytd-ad-feedback-renderer"})],N8);var O8=function(){return F.apply(this,arguments)||this};
l(O8,F);O8.prototype.computeConfirmButton=function(a){return{style:"STYLE_BLUE_TEXT",size:"SIZE_DEFAULT",text:a.confirmLabel}};
O8.prototype.onConfirmTap=function(){this.actionSenderBehavior.sendAction("yt-close-popup-action",["ytd-ad-info-dialog-renderer"])};
O8.prototype.onPopupClosed=function(){this.data&&this.data.confirmServiceEndpoint&&this.actionSenderBehavior.sendServiceRequestAction([this.data.confirmServiceEndpoint])};
var P8=O8;P8.prototype.onPopupClosed=P8.prototype.onPopupClosed;v([H(V.YtRendererBehavior),w("design:type",Object)],P8.prototype,"ytRendererBehavior",void 0);v([H(T.YtActionSenderBehavior),w("design:type",Object)],P8.prototype,"actionSenderBehavior",void 0);v([I(),w("design:type",Object)],P8.prototype,"data",void 0);v([ql("yt-popup-closed"),w("design:type",Function),w("design:paramtypes",[CustomEvent]),w("design:returntype",void 0)],P8.prototype,"onPopupClosed",null);
P8=v([W({is:"ytd-ad-info-dialog-renderer"})],P8);Polymer({is:"ytd-channel-warm-welcome-cont-renderer",hostAttributes:{dialog:!0},behaviors:[X],properties:{data:{type:Object,value:null,observer:"dataChanged"},profileName:{type:String,computed:"computeProfileName_(data.personalAccountTile.contents.createCoreIdentityChannelContentRenderer)"},isError:{type:Boolean,value:!1},isLoading:{type:Boolean,value:!1}},listeners:{"yt-service-request-sent":"onYtServiceRequestSent_","yt-service-request-error":"onYtServiceRequestError_"},dataChanged:function(){this.set("isLoading",
!1);this.set("isError",!1)},
computeProfileName_:function(a){return a?a.givenNameValue+" "+a.familyNameValue:""},
onYtServiceRequestSent_:function(){this.set("data.personalAccountTile.selectButton.buttonRenderer.isDisabled",!0);this.set("data.brandAccountTile.selectButton.buttonRenderer.isDisabled",!0);this.set("data.cancelButton.buttonRenderer.isDisabled",!0);this.set("isLoading",!0);this.set("isError",!1)},
onYtServiceRequestError_:function(){this.set("data.personalAccountTile.selectButton.buttonRenderer.isDisabled",!1);this.set("data.brandAccountTile.selectButton.buttonRenderer.isDisabled",!1);this.set("data.cancelButton.buttonRenderer.isDisabled",!1);this.set("isLoading",!1);this.set("isError",!0)},
stampDom:{"data.personalAccountTile.selectButton":{id:"personal_account_tile-select-button",mapping:{buttonRenderer:"ytd-button-renderer"}},"data.brandAccountTile.selectButton":{id:"brand_account_tile-select-button",mapping:{buttonRenderer:"ytd-button-renderer"}},"data.cancelButton":{id:"cancel-button",mapping:{buttonRenderer:"ytd-button-renderer"}}}});Polymer({is:"ytd-channel-warm-welcome-renderer",hostAttributes:{dialog:!0},behaviors:[X],properties:{data:{type:Object,value:null}},stampDom:{"data.nextButton":{id:"next-button",mapping:{buttonRenderer:"ytd-button-renderer"}},"data.cancelButton":{id:"cancel-button",mapping:{buttonRenderer:"ytd-button-renderer"}}}});Polymer({is:"ytd-conversation-item-heart-details-facepile-renderer",behaviors:[V.YtRendererBehavior],properties:{data:{type:Object,observer:"dataChanged_"},heartDisplayStyle:{type:String,reflectToAttribute:!0,computed:"heartDisplayStyle_(data)"}},makeThumbnailForData_:function(a){var b=document.createElement("yt-img-shadow");b.classList.add("thumbnail");b.thumbnail=a;a=document.createElement("div");a.classList.add("thumbnail-overlapper");a.appendChild(b);return{overlapperEl:a,thumbnailEl:b}},
dataChanged_:function(a){if(a){for(var b=this.$.facepile;b.firstChild;)b.removeChild(b.firstChild);var c=b=0;a.heartedUserThumbnails&&(b=c=a.heartedUserThumbnails.length);b>a.maximumThumbnailsDisplayed&&(b=a.maximumThumbnailsDisplayed);if(a.viewerHearted&&a.viewerThumbnail){b<=c&&b+1<a.maximumThumbnailsDisplayed&&b++;var d=this.makeThumbnailForData_(a.viewerThumbnail);c=d.overlapperEl;d=d.thumbnailEl;Polymer.dom(this.$.facepile).appendChild(c);d.onShow();b--}for(c=0;c<b;c++){var e=this.makeThumbnailForData_(a.heartedUserThumbnails[c]);
d=e.overlapperEl;e=e.thumbnailEl;Polymer.dom(this.$.facepile).appendChild(d);e.onShow()}a.viewerHearted&&a.viewerThumbnail&&b++}},
heartDisplayStyle_:function(a){return a&&(a.heartedUserThumbnails&&a.heartedUserThumbnails.length||a.viewerHearted&&a.viewerThumbnail)?"SHOW":"HIDE"}});Polymer({is:"ytd-conversation-channel-item-renderer",behaviors:[T.YtActionSenderBehavior,V.YtRendererBehavior],properties:{data:{type:Object,observer:"dataChanged_"},justificationStyle:{type:String,reflectToAttribute:!0,computed:"computeJustificationStyle_(data.style.justification)"},heartStyle:{type:String,reflectToAttribute:!0,computed:"computeHeartStyle_(data.heartDetailsRenderer.conversationItemHeartDetailsFacepileRenderer.viewerHearted)"},aggregateTop:{type:String,reflectToAttribute:!0,computed:"computeAggregateTopStyle_(data.aggregateTop)"},
aggregateBottom:{type:String,reflectToAttribute:!0,computed:"computeAggregateBottomStyle_(data.aggregateBottom)"},aggregateTime:{type:String,reflectToAttribute:!0,computed:"computeAggregateTimeStyle_(data.aggregateTime)"},aggregateAuthor:{type:String,reflectToAttribute:!0,computed:"computeAggregateAuthorStyle_(data.aggregateAuthor)"},heartTapped_:Boolean,deleteDisplayed_:Boolean},listeners:{contextmenu:"handleRightClick_",tap:"onTapItem_"},handleRightClick_:function(a){this.data.itemActionsMenu&&(
a.preventDefault(),a={openPopupAction:{popupType:"DROPDOWN",popup:{menuPopupRenderer:this.data.itemActionsMenu.menuRenderer}}},this.deleteDisplayed_=!0,this.sendAction("yt-open-popup-action",[a,this.$["delete-holder"]]))},
onTapItem_:function(){this.deleteDisplayed_&&(this.deleteDisplayed_=!1,this.sendAction("yt-close-popup-action",["ytd-menu-popup-renderer"]))},
onHeartFacepileTap_:function(){this.sendServiceRequestAction([this.data.eventMenuServiceEndpoint])},
computeJustificationStyle_:function(a){return a},
computeHeartStyle_:function(a){if(a)return this.$["heart-button"].label=this.data.removeHeartAccessiblityLabel,"HEARTED";this.$["heart-button"].label=this.data.sendHeartAccessiblityLabel;return"UNHEARTED"},
computeAggregateTopStyle_:function(a){return a},
computeAggregateBottomStyle_:function(a){return a},
computeAggregateTimeStyle_:function(a){return a},
computeAggregateAuthorStyle_:function(a){return a},
onTap_:function(){if(!this.heartTapped_){this.heartTapped_=!0;var a=cb(this.$["heart-facepile"].data);this.get("data.heartDetailsRenderer.conversationItemHeartDetailsFacepileRenderer.viewerHearted")?(this.sendServiceRequestAction([this.data.heartRenderer.conversationItemHeartRenderer.heartButton.toggleButtonRenderer.toggledServiceEndpoint]),this.$["heart-button"].classList.add("unhearted"),this.$["extra-user-not-hearted"].hidden=!1,this.$["extra-user-hearted"].hidden=!0,a.viewerHearted=!1,this.$["heart-button"].label=
this.data.sendHeartAccessiblityLabel):(this.sendServiceRequestAction([this.data.heartRenderer.conversationItemHeartRenderer.heartButton.toggleButtonRenderer.defaultServiceEndpoint]),this.$["heart-button"].classList.add("hearted"),this.$["extra-user-not-hearted"].hidden=!0,this.$["extra-user-hearted"].hidden=!1,a.viewerHearted=!0,this.$["heart-button"].label=this.data.removeHeartAccessiblityLabel);this.$["heart-facepile"].data=a}},
dataChanged_:function(a){this.$["delete-holder"].text=UU(" ");this.heartTapped_=!1;this.$["heart-button"].classList.remove("unhearted");this.$["heart-button"].classList.remove("hearted");if(this.$.avatar)this.$.avatar.onShow();if(this.$["channel-thumbnail"])this.$["channel-thumbnail"].onShow();a.heartDetailsRenderer&&a.heartDetailsRenderer.conversationItemHeartDetailsFacepileRenderer.viewerHearted?(this.$["extra-user-not-hearted"].hidden=!0,this.$["extra-user-hearted"].hidden=!1):(this.$["extra-user-not-hearted"].hidden=
!1,this.$["extra-user-hearted"].hidden=!0)}});Polymer({is:"ytd-conversation-high-priority-notification-content-renderer",behaviors:[T.YtActionSenderBehavior,V.YtRendererBehavior],properties:{data:{type:Object,observer:"dataChanged_"},dismissTimer:Number},listeners:{tap:"onTap_"},onTap_:function(){this.sendOptionalAction("yt-handle-high-priority-notification-open-action");for(var a=0;a<this.data.endpoints.length;a++)this.sendServiceRequestAction([this.data.endpoints[a]]);this.dismissTimer&&clearTimeout(this.dismissTimer);this.closeAnimate_()},
open:function(){this.set("hidden",!1);this.dismissTimer&&clearTimeout(this.dismissTimer);this.dismissTimer=setTimeout(function(){this.closeAnimate_()}.bind(this),4E3);
this.$.notification.classList.add("entrance-animation");this.$.triangle.classList.add("triangle-entrance");this.$["outer-triangle"].classList.add("triangle-entrance")},
close:function(){this.set("hidden",!0)},
dataChanged_:function(a){if(0!=this.children.length)if(a.iconImageUrl&&(this.$.avatar.thumbnail={thumbnails:[{url:a.iconImageUrl}]},this.$.avatar.onShow()),!a.videoThumbnail&&a.videoImageUrl)this.$["video-image"].thumbnail={thumbnails:[{url:a.videoImageUrl}]},this.$["video-image"].onShow(),this.$["video-image"].fit=!0;else if(a.videoThumbnail)this.$["video-image"].onShow()},
closeAnimate_:function(){this.$.notification.classList.remove("entrance-animation");this.$.notification.classList.add("exit-animation");this.$.triangle.classList.remove("triangle-entrance");this.$.triangle.classList.add("triangle-exit");this.$["outer-triangle"].classList.remove("triangle-entrance");this.$["outer-triangle"].classList.add("triangle-exit");setTimeout(function(){this.$.triangle.classList.remove("triangle-exit");this.$["outer-triangle"].classList.remove("triangle-exit");this.$.notification.classList.remove("exit-animation");
this.sendAction("yt-high-priority-notification-closed-action")}.bind(this),390)}});Polymer({is:"ytd-conversation-link-item-renderer",behaviors:[U.YtActionHandlerBehavior,T.YtActionSenderBehavior,V.YtRendererBehavior],properties:{data:{type:Object,observer:"dataChanged_"},justificationStyle:{type:String,reflectToAttribute:!0,computed:"computeJustificationStyle_(data.style.justification)"},aggregateTop:{type:String,reflectToAttribute:!0,computed:"computeAggregateTopStyle_(data.aggregateTop)"},aggregateBottom:{type:String,reflectToAttribute:!0,computed:"computeAggregateBottomStyle_(data.aggregateBottom)"},
aggregateTime:{type:String,reflectToAttribute:!0,computed:"computeAggregateTimeStyle_(data.aggregateTime)"},aggregateAuthor:{type:String,reflectToAttribute:!0,computed:"computeAggregateAuthorStyle_(data.aggregateAuthor)"}},actionMap:{"yt-show-invite-url-action":"handleInviteShown_"},computeJustificationStyle_:function(a){return a},
computeAggregateTopStyle_:function(a){return a},
computeAggregateBottomStyle_:function(a){return a},
computeAggregateTimeStyle_:function(a){return a},
computeAggregateAuthorStyle_:function(a){return a},
onTap_:function(a){a=Polymer.dom(a).rootTarget;if(this.data.endpoint&&"bar"!=a.id&&"share-url"!=a.id)this.sendServiceRequestAction([this.data.endpoint]);else if("bar"==a.id||"share-url"==a.id)this.$["share-url"].select(),document.execCommand("copy")},
dataChanged_:function(){if(this.$.avatar)this.$.avatar.onShow()},
handleInviteShown_:function(a){var b=cb(this.data);b.url=a.showInviteUrlAction.inviteUrlRenderer.copyConnectionInviteUrlRenderer.url;this.data=b}});var Q8=function(){return F.apply(this,arguments)||this};
l(Q8,F);Q8.prototype.makeThumbnailForData=function(a){var b=document.createElement("yt-img-shadow");b.classList.add("thumbnail");b.thumbnail=a;a=document.createElement("div");a.classList.add("thumbnail-overlapper");a.appendChild(b);return{overlapperEl:a,thumbnailEl:b}};
Q8.prototype.dataChanged=function(){if(this.data){for(var a=Polymer.dom(this.facepile);a.firstChild;)a.removeChild(a.firstChild);if(this.data.avatars){a=this.data.avatars.length;for(var b=0;b<a;b++)if(this.data.avatars[b]){var c=this.makeThumbnailForData(this.data.avatars[b]),d=c.overlapperEl;c=c.thumbnailEl;Polymer.dom(this.facepile).appendChild(d);c.onShow()}this.facepile.classList.add("avatars-displayed")}else this.facepile.classList.remove("avatars-displayed")}};
var R8=Q8;R8.prototype.dataChanged=R8.prototype.dataChanged;v([H(V.YtRendererBehavior),w("design:type",Object)],R8.prototype,"ytRendererBehavior",void 0);v([H($Y),w("design:type",Object)],R8.prototype,"ytVisibilityBehavior",void 0);v([I(),w("design:type",Object)],R8.prototype,"data",void 0);v([tl("#facepile"),w("design:type",Object)],R8.prototype,"facepile",void 0);v([rl("data"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],R8.prototype,"dataChanged",null);
R8=v([W({is:"ytd-conversation-metadata-item-renderer"})],R8);var S8=function(){return F.apply(this,arguments)||this};
l(S8,F);S8.prototype.dataChanged=function(){if(!this.data&&this.avatar)this.avatar.onShow()};
var T8=S8;T8.prototype.dataChanged=T8.prototype.dataChanged;v([I(),w("design:type",Object)],T8.prototype,"data",void 0);v([tl("#avatar"),w("design:type",Object)],T8.prototype,"avatar",void 0);v([rl("data"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],T8.prototype,"dataChanged",null);T8=v([W({is:"ytd-conversation-participant-renderer"})],T8);Polymer({is:"ytd-conversation-participant-section-renderer",behaviors:[X,FY,V.YtRendererBehavior],properties:{data:Object},stampDom:{"data.participants":{id:"participants",mapping:{conversationParticipantRenderer:"ytd-conversation-participant-renderer"}}}});Polymer({is:"ytd-typing-status-update-data",properties:{data:{type:Object,observer:"dataChanged_"},typingTemplate:Object,dot1:{type:Number,value:4},dot1Direction:{type:Number,value:-1},dot2:{type:Number,value:10},dot2Direction:{type:Number,value:1},dot3:{type:Number,value:16},dot3Direction:{type:Number,value:1},animationId:Number,animationIdleId:Number,idleId:Number,removeId:Number,typingState:{type:String,reflectToAttribute:!0}},typingStatusShown:function(){this.$.avatar.onShow()},
idleAnimation_:function(){this.dot1Direction=10>=this.dot1?1:-1;this.dot2Direction=10>=this.dot2?1:-1;this.dot3Direction=10>=this.dot3?1:-1;var a=!0;10!=this.dot1&&(a=!1,this.dot1+=1*this.dot1Direction);10!=this.dot2&&(a=!1,this.dot2+=1*this.dot2Direction);10!=this.dot3&&(a=!1,this.dot3+=1*this.dot3Direction);this.$.dot1.style.top=this.dot1+"px";this.$.dot2.style.top=this.dot2+"px";this.$.dot3.style.top=this.dot3+"px";a&&(this.typingState="IDLE",clearInterval(this.idleId))},
switchToIdleAnimation_:function(){clearInterval(this.animationId);this.idleId=setInterval(this.idleAnimation_.bind(this),42)},
activeAnimation_:function(){4>=this.dot1?this.dot1Direction=1:16<=this.dot1&&(this.dot1Direction=-1);4>=this.dot2?this.dot2Direction=1:16<=this.dot2&&(this.dot2Direction=-1);4>=this.dot3?this.dot3Direction=1:16<=this.dot3&&(this.dot3Direction=-1);this.dot1+=1*this.dot1Direction;this.dot2+=1*this.dot2Direction;this.dot3+=1*this.dot3Direction;this.$.dot1.style.top=this.dot1+"px";this.$.dot2.style.top=this.dot2+"px";this.$.dot3.style.top=this.dot3+"px"},
dataChanged_:function(a){this.$.dot1.style.top=this.dot1+"px";this.$.dot2.style.top=this.dot2+"px";this.$.dot3.style.top=this.dot3+"px";this.animationId&&clearInterval(this.animationId);this.animationIdleId&&clearTimeout(this.animationIdleId);this.idleId&&clearInterval(this.idleId);this.removeId&&clearTimeout(this.removeId);a=new Date().getTime()-a.clientTimestampMs;var b=1E4,c=6E4;this.typingTemplate&&(b=this.typingTemplate.typingIdleMs-a,c=this.typingTemplate.typingExpiryMs-a);0>=b?b=0:(this.typingState=
"ACTIVE",this.animationId=setInterval(this.activeAnimation_.bind(this),42));this.removeId=setTimeout(function(){this.fire("yt-conversation-typing-status-expired",this.data)}.bind(this),c);
this.animationIdleId=setTimeout(this.switchToIdleAnimation_.bind(this),b)}});Polymer({is:"ytd-conversation-participant-typing-template-renderer",behaviors:[U.YtActionHandlerBehavior,V.YtRendererBehavior],properties:{data:Object,typingStatuses_:{type:Array},typingStatusNodes_:{type:Array},typingState:{type:String,reflectToAttribute:!0}},listeners:{"yt-conversation-typing-status-expired":"handleRemoveTypingStatus_"},actionMap:{"yt-conversation-typing-status-action":"receivedTypingStatus_","yt-conversation-typing-template-reset":"resetForConversation_"},resetForConversation_:function(){for(var a=
this.$["typing-statuses"];a.firstChild;)a.removeChild(a.firstChild);this.typingStatuses_=[];this.typingStatusNodes_=[];this.typingState="EMPTY"},
addTypingStatus:function(a){var b=!1;if(a.shouldShowTyping){if(this.typingStatuses_&&0!=this.typingStatuses_.length){for(var c=!0,d=0;d<this.typingStatuses_.length;d++)if(this.typingStatuses_[d].contactId===a.contactId){c=!1;this.typingStatuses_[d]=a;break}c&&this.typingStatuses_.push(a)}else b=!0,this.typingState="ACTIVE",this.typingStatuses_=[a];this.updateTypingStatus_(a,!1);b&&this.fire("yt-conversation-typing-displayed")}},
removeTypingStatus:function(a){this.typingStatuses_&&(this.typingStatuses_=this.typingStatuses_.filter(function(b){return b.contactId!==a.contactId}),this.updateTypingStatus_(a,!0),0==this.typingStatuses_.length&&(this.typingState="EMPTY"))},
handleRemoveTypingStatus_:function(a){this.removeTypingStatus(a.detail)},
receivedTypingStatus_:function(a){this.data.filterContactIds.some(function(b){return b===a.contactId})||(a.shouldShowTyping?this.addTypingStatus(a):this.removeTypingStatus(a))},
makeTypingStatusForData:function(a){var b=document.createElement("ytd-typing-status-update-data");b.typingTemplate=this.data;b.data=a;b.width=72;b.height=24;return b},
updateTypingStatus_:function(a,b){var c=!0;this.typingStatusNodes_||(this.typingStatusNodes_=[]);for(var d=0;d<this.typingStatusNodes_.length;d++)if(this.typingStatusNodes_[d].data.contactId===a.contactId){if(a.shouldShowTyping&&!b){c=this.typingStatusNodes_[d].typingState;this.typingStatusNodes_[d].data=a;if(c!==this.typingStatusNodes_[d].typingState){c=!0;for(a=0;a<this.typingStatusNodes_.length;a++)if(a!=d&&"ACTIVE"===this.typingStatusNodes_[a].typingState){c=!1;this.typingStatusNodes_[d].dot1=
this.typingStatusNodes_[a].dot1;this.typingStatusNodes_[d].dot1Direction=this.typingStatusNodes_[a].dot1Direction;this.typingStatusNodes_[d].dot2=this.typingStatusNodes_[a].dot2;this.typingStatusNodes_[d].dot2Direction=this.typingStatusNodes_[a].dot2Direction;this.typingStatusNodes_[d].dot3=this.typingStatusNodes_[a].dot3;this.typingStatusNodes_[d].dot3Direction=this.typingStatusNodes_[a].dot3Direction;break}c&&(this.typingStatusNodes_[d].dot1=4,this.typingStatusNodes_[d].dot1Direction=-1,this.typingStatusNodes_[d].dot2=
10,this.typingStatusNodes_[d].dot2Direction=1,this.typingStatusNodes_[d].dot3=16,this.typingStatusNodes_[d].dot3Direction=1)}return}c=!1;Dh(this.typingStatusNodes_[d]);this.typingStatusNodes_.splice(d,1)}for(d=b=0;d<this.typingStatusNodes_.length;d++)3<d?this.typingStatusNodes_[d].hidden=!0:(this.typingStatusNodes_[d].hidden=!1,this.typingStatusNodes_[d].typingStatusShown()),this.typingStatusNodes_[d].style.left=b+"px",b+=92;if(c)for(d=this.makeTypingStatusForData(a),d.style.left=b+"px",Polymer.dom(this.$["typing-statuses"]).appendChild(d),
this.typingStatusNodes_.push(d),3<this.typingStatusNodes_.length?d.hidden=!0:d.typingStatusShown(),a=this.typingStatusNodes_.length-2;0<=a;a--)if("ACTIVE"===this.typingStatusNodes_[a].typingState){d.dot1=this.typingStatusNodes_[a].dot1;d.dot1Direction=this.typingStatusNodes_[a].dot1Direction;d.dot2=this.typingStatusNodes_[a].dot2;d.dot2Direction=this.typingStatusNodes_[a].dot2Direction;d.dot3=this.typingStatusNodes_[a].dot3;d.dot3Direction=this.typingStatusNodes_[a].dot3Direction;break}}});Polymer({is:"ytd-conversation-playlist-item-renderer",behaviors:[T.YtActionSenderBehavior,V.YtRendererBehavior],properties:{data:{type:Object,observer:"dataChanged_"},justificationStyle:{type:String,reflectToAttribute:!0,computed:"computeJustificationStyle_(data.style.justification)"},heartStyle:{type:String,reflectToAttribute:!0,computed:"computeHeartStyle_(data.heartDetailsRenderer.conversationItemHeartDetailsFacepileRenderer.viewerHearted)"},aggregateTop:{type:String,reflectToAttribute:!0,computed:"computeAggregateTopStyle_(data.aggregateTop)"},
aggregateBottom:{type:String,reflectToAttribute:!0,computed:"computeAggregateBottomStyle_(data.aggregateBottom)"},aggregateTime:{type:String,reflectToAttribute:!0,computed:"computeAggregateTimeStyle_(data.aggregateTime)"},aggregateAuthor:{type:String,reflectToAttribute:!0,computed:"computeAggregateAuthorStyle_(data.aggregateAuthor)"},heartTapped_:Boolean,deleteDisplayed_:Boolean},listeners:{contextmenu:"handleRightClick_",tap:"onTapItem_"},handleRightClick_:function(a){this.data.itemActionsMenu&&(
a.preventDefault(),a={openPopupAction:{popupType:"DROPDOWN",popup:{menuPopupRenderer:this.data.itemActionsMenu.menuRenderer}}},this.deleteDisplayed_=!0,this.sendAction("yt-open-popup-action",[a,this.$["delete-holder"]]))},
onTapItem_:function(){this.deleteDisplayed_&&(this.deleteDisplayed_=!1,this.sendAction("yt-close-popup-action",["ytd-menu-popup-renderer"]))},
onHeartFacepileTap_:function(){this.sendServiceRequestAction([this.data.eventMenuServiceEndpoint])},
computeJustificationStyle_:function(a){return a},
computeHeartStyle_:function(a){if(a)return this.$["heart-button"].label=this.data.removeHeartAccessiblityLabel,"HEARTED";this.$["heart-button"].label=this.data.sendHeartAccessiblityLabel;return"UNHEARTED"},
computeAggregateTopStyle_:function(a){return a},
computeAggregateBottomStyle_:function(a){return a},
computeAggregateTimeStyle_:function(a){return a},
computeAggregateAuthorStyle_:function(a){return a},
onTap_:function(){if(!this.heartTapped_){this.heartTapped_=!0;var a=cb(this.$["heart-facepile"].data);this.get("data.heartDetailsRenderer.conversationItemHeartDetailsFacepileRenderer.viewerHearted")?(this.sendServiceRequestAction([this.data.heartRenderer.conversationItemHeartRenderer.heartButton.toggleButtonRenderer.toggledServiceEndpoint]),this.$["heart-button"].classList.add("unhearted"),this.$["extra-user-not-hearted"].hidden=!1,this.$["extra-user-hearted"].hidden=!0,a.viewerHearted=!1,this.$["heart-button"].label=
this.data.sendHeartAccessiblityLabel):(this.sendServiceRequestAction([this.data.heartRenderer.conversationItemHeartRenderer.heartButton.toggleButtonRenderer.defaultServiceEndpoint]),this.$["heart-button"].classList.add("hearted"),this.$["extra-user-not-hearted"].hidden=!0,this.$["extra-user-hearted"].hidden=!1,a.viewerHearted=!0,this.$["heart-button"].label=this.data.removeHeartAccessiblityLabel);this.$["heart-facepile"].data=a}},
dataChanged_:function(a){this.$["delete-holder"].text=UU(" ");this.heartTapped_=!1;this.$["heart-button"].classList.remove("unhearted");this.$["heart-button"].classList.remove("hearted");if(this.$.avatar)this.$.avatar.onShow();if(this.$["playlist-thumbnail"])this.$["playlist-thumbnail"].onShow();a.heartDetailsRenderer&&a.heartDetailsRenderer.conversationItemHeartDetailsFacepileRenderer.viewerHearted?(this.$["extra-user-not-hearted"].hidden=!0,this.$["extra-user-hearted"].hidden=!1):(this.$["extra-user-not-hearted"].hidden=
!1,this.$["extra-user-hearted"].hidden=!0)}});var JHa=function(){return F.apply(this,arguments)||this};
l(JHa,F);var U8=JHa;v([H(V.YtRendererBehavior),w("design:type",Object)],U8.prototype,"ytRendererBehavior",void 0);v([I(),w("design:type",Object)],U8.prototype,"data",void 0);U8=v([W({is:"ytd-conversation-read-receipt-renderer"})],U8);Polymer({is:"ytd-conversation-reply-renderer",behaviors:[U.YtActionHandlerBehavior,T.YtActionSenderBehavior,V.YtRendererBehavior],properties:{data:Object,hasPressedEnter:{type:Boolean,value:!1},hasSentTypingStatusRecently:{type:Boolean,value:!1}},listeners:{keydown:"onKeydown_",focusin:"onFocusin_"},actionMap:{"yt-clear-conversation-reply-action":"handleClear_"},onInput_:function(){if(this.hasPressedEnter)this.$["reply-box"].value="",this.hasPressedEnter=!1;else if(this.data.showTypingEndpoint&&0<
this.$["reply-box"].value.length){if(!this.hasSentTypingStatusRecently){this.data.showTypingEndpoint.editConversationEndpoint.clientTimestampMs=Date.now()+"";this.sendServiceRequestAction([this.data.showTypingEndpoint]);this.hasSentTypingStatusRecently=!0;var a=5E3;this.data.showTypingTimeoutMs&&(a=this.data.showTypingTimeoutMs);setTimeout(function(){this.hasSentTypingStatusRecently=!1}.bind(this),a)}}else this.data.hideTypingEndpoint&&0==this.$["reply-box"].value.length&&(this.hasSentTypingStatusRecently=
!1,this.data.hideTypingEndpoint.editConversationEndpoint.clientTimestampMs=Date.now()+"",this.sendServiceRequestAction([this.data.hideTypingEndpoint]))},
handleClear_:function(){this.$["reply-box"].value=""},
onFocusin_:function(){this.$["reply-box"].focus()},
onKeydown_:function(a){if(13==a.keyCode&&!a.shiftKey&&(a=this.$["reply-box"].value)&&a.trim()){this.$["reply-box"].value="";a=a.trim();this.data.hideTypingEndpoint&&(this.data.hideTypingEndpoint.editConversationEndpoint.clientTimestampMs=Date.now()+"",this.sendServiceRequestAction([this.data.hideTypingEndpoint]));this.hasPressedEnter=!0;var b=Array(36);for(var c=0,d,e=0;36>e;e++)8==e||13==e||18==e||23==e?b[e]="-":14==e?b[e]="4":(2>=c&&(c=33554432+16777216*Math.random()|0),d=c&15,c>>=4,b[e]=Vxa[19==
e?d&3|8:d]);b=b.join("");this.sendServiceRequestAction([this.data.shareEndpoint,{comment_text:a,unique_id:b}]);c=this.data.shareEndpoint.sendShareToConversationEndpoint.templateConversationItem;c.conversationTextItemRenderer.postText=UU(a);c.conversationTextItemRenderer.uniqueId=b;this.sendAction("yt-chat-post-made",[this.data.shareEndpoint.sendShareToConversationEndpoint])}}});Polymer({is:"ytd-conversation-text-item-renderer",behaviors:[T.YtActionSenderBehavior,V.YtRendererBehavior],properties:{data:{type:Object,observer:"dataChanged_"},justificationStyle:{type:String,reflectToAttribute:!0,computed:"computeJustificationStyle_(data.style.justification)"},heartStyle:{type:String,reflectToAttribute:!0,computed:"computeHeartStyle_(data.heartDetailsRenderer.conversationItemHeartDetailsFacepileRenderer.viewerHearted)"},aggregateTop:{type:String,reflectToAttribute:!0,computed:"computeAggregateTopStyle_(data.aggregateTop)"},
aggregateBottom:{type:String,reflectToAttribute:!0,computed:"computeAggregateBottomStyle_(data.aggregateBottom)"},aggregateTime:{type:String,reflectToAttribute:!0,computed:"computeAggregateTimeStyle_(data.aggregateTime)"},aggregateAuthor:{type:String,reflectToAttribute:!0,computed:"computeAggregateAuthorStyle_(data.aggregateAuthor)"},heartTapped_:Boolean,deleteDisplayed_:Boolean},listeners:{contextmenu:"handleRightClick_",tap:"onTapItem_"},handleRightClick_:function(a){this.data.itemActionsMenu&&(
a.preventDefault(),a={openPopupAction:{popupType:"DROPDOWN",popup:{menuPopupRenderer:this.data.itemActionsMenu.menuRenderer}}},this.deleteDisplayed_=!0,this.sendAction("yt-open-popup-action",[a,this.$["delete-holder"]]))},
onTapItem_:function(){this.deleteDisplayed_&&(this.deleteDisplayed_=!1,this.sendAction("yt-close-popup-action",["ytd-menu-popup-renderer"]))},
onHeartFacepileTap_:function(){this.sendServiceRequestAction([this.data.eventMenuServiceEndpoint])},
computeJustificationStyle_:function(a){return a},
computeHeartStyle_:function(a){if(a)return this.$["heart-button"].label=this.data.removeHeartAccessiblityLabel,"HEARTED";this.$["heart-button"].label=this.data.sendHeartAccessiblityLabel;return"UNHEARTED"},
computeAggregateTopStyle_:function(a){return a},
computeAggregateBottomStyle_:function(a){return a},
computeAggregateTimeStyle_:function(a){return a},
computeAggregateAuthorStyle_:function(a){return a},
onTap_:function(){if(!this.heartTapped_){this.heartTapped_=!0;var a=cb(this.$["heart-facepile"].data);this.get("data.heartDetailsRenderer.conversationItemHeartDetailsFacepileRenderer.viewerHearted")?(this.sendServiceRequestAction([this.data.heartRenderer.conversationItemHeartRenderer.heartButton.toggleButtonRenderer.toggledServiceEndpoint]),this.$["heart-button"].classList.add("unhearted"),this.$["extra-user-not-hearted"].hidden=!1,this.$["extra-user-hearted"].hidden=!0,a.viewerHearted=!1,this.$["heart-button"].label=
this.data.sendHeartAccessiblityLabel):(this.sendServiceRequestAction([this.data.heartRenderer.conversationItemHeartRenderer.heartButton.toggleButtonRenderer.defaultServiceEndpoint]),this.$["heart-button"].classList.add("hearted"),this.$["extra-user-not-hearted"].hidden=!0,this.$["extra-user-hearted"].hidden=!1,a.viewerHearted=!0,this.$["heart-button"].label=this.data.removeHeartAccessiblityLabel);this.$["heart-facepile"].data=a}},
dataChanged_:function(a){this.$["delete-holder"].text=UU(" ");this.heartTapped_=!1;this.$["heart-button"].classList.remove("unhearted");this.$["heart-button"].classList.remove("hearted");if(this.$.avatar)this.$.avatar.onShow();a.heartDetailsRenderer&&a.heartDetailsRenderer.conversationItemHeartDetailsFacepileRenderer.viewerHearted?(this.$["extra-user-not-hearted"].hidden=!0,this.$["extra-user-hearted"].hidden=!1):(this.$["extra-user-not-hearted"].hidden=!1,this.$["extra-user-hearted"].hidden=!0)}});var V8=function(){return F.apply(this,arguments)||this};
l(V8,F);V8.prototype.computeAggregateBottomStyle=function(a){return a};
V8.prototype.heartDataChanged=function(a){this.heartFacepile.data=a;a.viewerHearted?(a.overflowTextViewerHearted&&(this.extraUserHearted.text=a.overflowTextViewerHearted,this.extraUserHearted.hidden=!1),this.extraUserNotHearted.hidden=!0):(a.overflowTextViewerNotHearted&&(this.extraUserNotHearted.text=a.overflowTextViewerNotHearted,this.extraUserNotHearted.hidden=!1),this.extraUserHearted.hidden=!0)};
V8.prototype.onHeartFacepileTap=function(){this.fire("yt-conversation-video-facepile-tapped")};
V8.prototype.dataChanged=function(){if(this.videoImage)this.videoImage.onShow()};
var W8=V8;v([H(T.YtActionSenderBehavior),w("design:type",Object)],W8.prototype,"ytActionSenderBehavior",void 0);v([H(V.YtRendererBehavior),w("design:type",Object)],W8.prototype,"ytRendererBehavior",void 0);v([I({observer:"dataChanged"}),w("design:type",Object)],W8.prototype,"data",void 0);v([I({reflectToAttribute:!0}),w("design:type",String)],W8.prototype,"justificationStyle",void 0);v([I({observer:"heartDataChanged"}),w("design:type",Object)],W8.prototype,"heartObject",void 0);
v([I({reflectToAttribute:!0,computed:"computeAggregateBottomStyle(data.aggregateBottom)"}),w("design:type",String)],W8.prototype,"aggregateBottom",void 0);v([tl("#heart-facepile"),w("design:type",Object)],W8.prototype,"heartFacepile",void 0);v([tl("#extra-user-not-hearted"),w("design:type",Object)],W8.prototype,"extraUserNotHearted",void 0);v([tl("#extra-user-hearted"),w("design:type",Object)],W8.prototype,"extraUserHearted",void 0);
v([tl("#video-image"),w("design:type",Object)],W8.prototype,"videoImage",void 0);W8=v([W({is:"ytd-inline-playback-renderer"})],W8);Polymer({is:"ytd-conversation-video-renderer",properties:{data:{type:Object,observer:"dataChanged_"},justificationStyle:{type:String,reflectToAttribute:!0,computed:"computeJustificationStyle_(data.style.justification)"},heartStyle:{type:String,reflectToAttribute:!0,computed:"computeHeartStyle_(data.heartDetailsRenderer.conversationItemHeartDetailsFacepileRenderer.viewerHearted)"},aggregateTop:{type:String,reflectToAttribute:!0,computed:"computeAggregateTopStyle_(data.aggregateTop)"},aggregateBottom:{type:String,
reflectToAttribute:!0,computed:"computeAggregateBottomStyle_(data)"},aggregateTime:{type:String,reflectToAttribute:!0,computed:"computeAggregateTimeStyle_(data.aggregateTime)"},aggregateAuthor:{type:String,reflectToAttribute:!0,computed:"computeAggregateAuthorStyle_(data.aggregateAuthor)"},heartTapped_:Boolean,deleteDisplayed_:Boolean,heartTimer_:Number},behaviors:[V.YtRendererBehavior,X],listeners:{"yt-conversation-video-facepile-tapped":"facepileTapped_",contextmenu:"handleRightClick_",tap:"onTapItem_"},
handleRightClick_:function(a){if(this.data.itemActionsMenu){a.preventDefault();var b={openPopupAction:{popupType:"DROPDOWN",popup:{menuPopupRenderer:this.data.itemActionsMenu.menuRenderer}}};this.deleteDisplayed_=!0;"img"==a.target.id?(this.$["delete-holder"].style.top=a.layerY+"px",this.$["delete-holder"].style.left=a.layerX+"px"):(this.$["delete-holder"].style.top=this.$["inline-player"].clientHeight+"px",this.$["delete-holder"].style.left=this.$["inline-player"].clientWidth/2+"px");this.sendAction("yt-open-popup-action",
[b,this.$["delete-holder"]])}},
onTapItem_:function(){this.deleteDisplayed_&&(this.deleteDisplayed_=!1,this.sendAction("yt-close-popup-action",["ytd-menu-popup-renderer"]))},
stampDom:{"data.video":{id:"inline-player",mapping:{inlinePlaybackRenderer:{component:"ytd-inline-playback-renderer",properties:{justificationStyle:"[[data.style.justification]]",heartObject:"[[data.heartDetailsRenderer.conversationItemHeartDetailsFacepileRenderer]]"}}}}},computeJustificationStyle_:function(a){return a},
computeHeartStyle_:function(a){if(a)return this.$["heart-button"].label=this.data.removeHeartAccessiblityLabel,"HEARTED";this.$["heart-button"].label=this.data.sendHeartAccessiblityLabel;return"UNHEARTED"},
computeAggregateTopStyle_:function(a){return a},
computeAggregateBottomStyle_:function(a){this.data.video&&(this.data.video.inlinePlaybackRenderer.aggregateBottom=a.aggregateBottom);return a.aggregateBottom},
computeAggregateTimeStyle_:function(a){return a},
computeAggregateAuthorStyle_:function(a){return a},
onTap_:function(){var a=this;if(!this.heartTapped_){clearTimeout(this.heartTimer_);this.heartTapped_=!0;var b=cb(this.data.heartDetailsRenderer.conversationItemHeartDetailsFacepileRenderer);this.get("data.heartDetailsRenderer.conversationItemHeartDetailsFacepileRenderer.viewerHearted")?(this.sendServiceRequestAction([this.data.heartRenderer.conversationItemHeartRenderer.heartButton.toggleButtonRenderer.toggledServiceEndpoint]),this.$["heart-button"].classList.add("unhearted"),b.viewerHearted=!1,this.$["heart-button"].label=
this.data.sendHeartAccessiblityLabel):(this.sendServiceRequestAction([this.data.heartRenderer.conversationItemHeartRenderer.heartButton.toggleButtonRenderer.defaultServiceEndpoint]),this.$["heart-button"].classList.add("hearted"),b.viewerHearted=!0,this.$["heart-button"].label=this.data.removeHeartAccessiblityLabel);0<this.$["inline-player"].children.length&&null!=this.$["inline-player"].children[0]&&null!=this.$["inline-player"].children[0].heartObject&&(this.$["inline-player"].children[0].heartObject=
b);this.set("data.heartDetailsRenderer.conversationItemHeartDetailsFacepileRenderer",b);this.heartTimer_=setTimeout(function(){a.heartTapped_=!1},5E3)}},
facepileTapped_:function(){this.sendServiceRequestAction([this.data.eventMenuServiceEndpoint])},
dataChanged_:function(a){this.$["delete-holder"].text=UU(" ");this.heartTapped_=!1;clearTimeout(this.heartTimer_);this.$["heart-button"].classList.remove("unhearted");this.$["heart-button"].classList.remove("hearted");if(this.$["user-image"])this.$["user-image"].onShow();a.unplayableVideoText&&!a.video&&this.set("data.video",{inlinePlaybackRenderer:{thumbnail:a.sharedVideoThumbnail,metadataRenderer:{inlinePlaybackMetadataRenderer:{title:a.unplayableVideoText}}}})}});var X8=function(){return F.apply(this,arguments)||this};
l(X8,F);X8.prototype.configureRendererStamper=function(){return{"data.contacts":{id:"contacts",mapping:{wideEnrolledContactRenderer:{component:"ytd-wide-enrolled-contact-renderer",noInjection:!0},wideSuggestedContactRenderer:{component:"ytd-wide-suggested-contact-renderer",noInjection:!0}}}}};
X8.prototype.onDataChanged=function(){this.data&&this.data.selectMessageRenderer&&this.data.selectMessageRenderer.contactSelectMessageRenderer&&this.ytActionSenderBehavior.sendAction("yt-share-panel-set-select-message-renderer-action",[this.data.selectMessageRenderer.contactSelectMessageRenderer])};
var Y8=X8;Y8.prototype.onDataChanged=Y8.prototype.onDataChanged;v([H(V.YtRendererBehavior),w("design:type",Object)],Y8.prototype,"ytRendererBehavior",void 0);v([H(X),w("design:type",Object)],Y8.prototype,"ytRendererstamperBehavior",void 0);v([H(T.YtActionSenderBehavior),w("design:type",Object)],Y8.prototype,"ytActionSenderBehavior",void 0);v([I(),w("design:type",Object)],Y8.prototype,"data",void 0);
v([rl("data"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],Y8.prototype,"onDataChanged",null);Y8=v([W({is:"ytd-invite-more-panel-contacts-section-renderer"})],Y8);var Z8=function(){return F.apply(this,arguments)||this};
l(Z8,F);Z8.prototype.handleClick=function(){if(this.data&&this.data.serializedContactInvitee){var a={serializedContact:this.data.serializedContactInvitee,isSuggested:!1,isSelected:this.classList.toggle("selected")},b=this.ytActionSenderBehavior.sendAction("yt-conversation-invite-contact-selected",[a]);b&&b.length&&!b[0]&&(this.classList.toggle("selected"),this.ytActionSenderBehavior.sendAction("yt-conversation-invite-contact-undo-selected",[a]))}};
Z8.prototype.dataChanged=function(){if(this.data){if(this.avatar)this.avatar.onShow();var a=this.data.serializedContactInvitee;a&&this.classList.add(a)}};
var $8=Z8;$8.prototype.dataChanged=$8.prototype.dataChanged;$8.prototype.handleClick=$8.prototype.handleClick;v([H(T.YtActionSenderBehavior),w("design:type",Object)],$8.prototype,"ytActionSenderBehavior",void 0);v([I(),w("design:type",Object)],$8.prototype,"data",void 0);v([tl("#avatar"),w("design:type",Object)],$8.prototype,"avatar",void 0);v([ql("tap"),w("design:type",Function),w("design:paramtypes",[Event]),w("design:returntype",void 0)],$8.prototype,"handleClick",null);
v([rl("data"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],$8.prototype,"dataChanged",null);$8=v([W({is:"ytd-wide-enrolled-contact-renderer"})],$8);var a9=function(){return F.apply(this,arguments)||this};
l(a9,F);a9.prototype.handleClick=function(){if(this.data){var a={serializedContact:this.data.serializedSuggestedContact,isSuggested:!0,isSelected:this.classList.toggle("selected")},b=this.ytActionSenderBehavior.sendAction("yt-conversation-invite-contact-selected",[a]);b&&b.length&&!b[0]&&(this.classList.toggle("selected"),this.ytActionSenderBehavior.sendAction("yt-conversation-invite-contact-undo-selected",[a]))}};
a9.prototype.dataChanged=function(){if(this.data){if(this.avatar)this.avatar.onShow();this.data.serializedSuggestedContact&&this.classList.add(this.data.serializedSuggestedContact)}};
var b9=a9;b9.prototype.dataChanged=b9.prototype.dataChanged;b9.prototype.handleClick=b9.prototype.handleClick;v([H(T.YtActionSenderBehavior),w("design:type",Object)],b9.prototype,"ytActionSenderBehavior",void 0);v([I(),w("design:type",Object)],b9.prototype,"data",void 0);v([tl("#avatar"),w("design:type",Object)],b9.prototype,"avatar",void 0);v([ql("click"),w("design:type",Function),w("design:paramtypes",[Event]),w("design:returntype",void 0)],b9.prototype,"handleClick",null);
v([rl("data"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],b9.prototype,"dataChanged",null);b9=v([W({is:"ytd-wide-suggested-contact-renderer"})],b9);Polymer({is:"ytd-invite-more-panel-renderer",behaviors:[X,U.YtActionHandlerBehavior,T.YtActionSenderBehavior,V.YtRendererBehavior],properties:{data:Object},actionMap:{"yt-conversation-invite-contact-selected":"onSelectContact_"},stampDom:{"data.contents":{id:"contacts",mapping:{inviteMorePanelContactsSectionRenderer:"ytd-invite-more-panel-contacts-section-renderer"}}},ready:function(){this.selectedEnrolledContacts_=[];this.selectedSuggestedContacts_=[];this.$["done-text"].hidden=!0;this.$["selected-text"].hidden=
!0;this.sendAction("yt-share-panel-reset-action")},
onSelectContact_:function(a){var b=this.selectedSuggestedContacts_.length+this.selectedEnrolledContacts_.length;if(a.isSelected&&b>=this.data.maxSelectableContacts)return this.sendAction("yt-open-popup-action",[{openPopupAction:{popupType:"TOAST",popup:{notificationActionRenderer:{responseText:this.data.maxContactsError}}}},this]),!1;a.isSuggested?this.updateContactList_(this.selectedSuggestedContacts_,a):this.updateContactList_(this.selectedEnrolledContacts_,a);this.$["selected-text"].hidden=0==
this.selectedSuggestedContacts_.length;this.$["done-text"].hidden=!this.selectedEnrolledContacts_.length&&!this.selectedSuggestedContacts_.length;return!0},
updateContactList_:function(a,b){b.isSelected?a.push(b.serializedContact):a.splice(a.indexOf(b.serializedContact),1)},
onTapDone_:function(){var a=this.data.inviteButton.buttonRenderer.serviceEndpoint;this.selectedEnrolledContacts_&&(a.inviteToConversationEndpoint.serializedContactInvitees=this.selectedEnrolledContacts_);this.selectedSuggestedContacts_&&(a.inviteToConversationEndpoint.serializedSuggestedContacts=this.selectedSuggestedContacts_);this.sendServiceRequestAction([a]);this.onReset_()},
onReset_:function(){this.deselectContacts_(this.selectedEnrolledContacts_);this.deselectContacts_(this.selectedSuggestedContacts_);this.selectedEnrolledContacts_=[];this.selectedSuggestedContacts_=[];this.$["done-text"].hidden=!0;this.fire("yt-conversation-show-conversation");this.sendAction("yt-share-panel-reset-action")},
deselectContacts_:function(a){for(var b=0;b<a.length;b++){var c=this.getElementsByClassName(a[b]);c&&c.length&&c[0].classList.toggle("selected")}}});Polymer({is:"yt-invalidation-continuation",properties:{data:{type:Object,observer:"dataChanged"},isReusable:{type:Boolean,value:!1},tangoConfiguration:{type:Object,value:function(){return u.unsafeClone(z("LIVE_CHAT_BASE_TANGO_CONFIG",void 0))}},
invalidationTag:{type:String,value:"youtubeLiveComments"}},created:function(){this.manager_=c9.getInstance();this.triggered_=!1;this.timeoutAsyncHandle_=this.managerHandle_=null},
attached:function(){this.data&&this.subscribe_(this.data)},
detached:function(){this.data&&this.unsubscribe_(this.data)},
dataChanged:function(a,b){this.triggered_=!1;b&&this.unsubscribe_(b);a&&this.isAttached&&this.subscribe_(a)},
subscribe_:function(a){this.managerHandle_=this.manager_.subscribe(a,this.trigger_.bind(this,!1),this.tangoConfiguration,this.invalidationTag)||null;this.timeoutAsyncHandle_=this.async(this.trigger_.bind(this,!0),a.timeoutMs)},
unsubscribe_:function(a){this.cancelTimeout_();this.managerHandle_&&(this.manager_.unsubscribe(a,this.managerHandle_),this.managerHandle_=null)},
trigger_:function(a,b){if(this.isReusable||!this.triggered_)this.triggered_=!0,this.fire("yt-load-invalidation-continuation",this.getContinuationUrl.bind(this,a)),b&&this.fire("yt-received-invalidation-data",b),this.cancelTimeout_()},
forceTrigger:function(){this.trigger_(!1)},
cancelTimeout_:function(){null!==this.timeoutAsyncHandle_&&(this.cancelAsync(this.timeoutAsyncHandle_),this.timeoutAsyncHandle_=null)},
getContinuationUrl:function(a,b){var c={ctoken:this.data.continuation};this.data.clickTrackingParams&&(c.itct=this.data.clickTrackingParams);a&&(c.isInvalidationTimeoutRequest=!0);return Ai(b,c)}});
var c9=function(){this.nextHandle_=1;this.clients_={};this.callbacks_={};this.unsubscribeAsyncHandles_={};Polymer.Element?(this.asyncCancel_=Polymer.Async.animationFrame.cancel.bind(Polymer.Async.animationFrame),this.asyncRun_=Polymer.Async.animationFrame.run.bind(Polymer.Async.animationFrame)):(this.asyncCancel_=Polymer.Async.cancel.bind(Polymer.Async),this.asyncRun_=Polymer.Async.run.bind(Polymer.Async))};
Ua(c9);
c9.prototype.subscribe=ve(function(a,b,c,d){var e=d9(a);if(e in this.clients_)e in this.unsubscribeAsyncHandles_&&this.asyncCancel_(this.unsubscribeAsyncHandles_[e]);else{a:{var g=d9(a),h;for(h in this.unsubscribeAsyncHandles_){var m=this.clients_[h];if(m instanceof AS){delete this.clients_[h];delete this.callbacks_[h];this.asyncCancel_(this.unsubscribeAsyncHandles_[h]);delete this.unsubscribeAsyncHandles_[h];m.setObjectId(g);c=m;break a}}c.objectSource=a.invalidationId.objectSource;c.objectId=g;
if(a=a.webAuthConfigurationData)a.multiUserSessionIndex&&(c.sessionIndex=parseInt(a.multiUserSessionIndex,10)),a.pageId&&(c.pageId=a.pageId);m=new AS(c,this.handleInvalidationData_.bind(this),d);m.register();c=m}this.clients_[e]=c;this.callbacks_[e]={}}c=this.nextHandle_++;this.callbacks_[e][c]=b;return c});
c9.prototype.unsubscribe=function(a,b){var c=d9(a);if(c in this.callbacks_&&(delete this.callbacks_[c][b],!this.callbacks_[c].length)){var d=this.clients_[c];b=this.asyncRun_(function(){nk(d);delete this.clients_[c];delete this.unsubscribeAsyncHandles_[c]}.bind(this),0);
this.unsubscribeAsyncHandles_[c]=b}};
c9.prototype.handleInvalidationData_=function(a,b){for(var c in this.callbacks_[a]){var d=this.callbacks_[a][c];1==d.length?d.apply(this,[b]):d()}};
var d9=function(a){return a.invalidationId.objectId?(a=a.invalidationId.objectId,a=a.replace(/-/g,"+").replace(/_/g,"/"),atob(a)):""};Polymer({is:"ytd-conversation-section-renderer",behaviors:[X,U.YtActionHandlerBehavior,T.YtActionSenderBehavior,V.YtRendererBehavior,$Y],screenLayer:1,properties:{data:{type:Object,observer:"dataChanged_"},prevScrollTop_:Number,wasConversationChanged_:Boolean,isShowingConversation_:Boolean,stayAtBottom_:Boolean,unreadMessages_:Number,loadedOlderItems_:Boolean,lastVisibleItem_:Number,emptyConversationDisplayed_:Boolean,missedContent_:Boolean,firstLoad_:Boolean,losingFocus_:Boolean,currentConversationId_:String},
listeners:{keydown:"onKeydown_",tap:"onTap_",focusout:"onFocusout_",focusin:"onFocusin_",mousedown:"onMouseDown_","yt-conversation-show-conversation":"showConversation_","yt-conversation-typing-displayed":"typingDisplayed_","yt-load-invalidation-continuation":"updateChatMole_","yt-received-invalidation-data":"receivedPayload_"},actionMap:{"yt-activate-miniplayer-action":"handleMiniplayerActivated_","yt-chat-post-made":"chatPostMade_","yt-conversation-participants-results-action":"handleParticipantsResults_",
"yt-deactivate-miniplayer-action":"handleMiniplayerDeactivated_","yt-invite-more-results-action":"handleInviteResults_","yt-opened-conversation-id-action":"getOpenedConversationId_","yt-remove-conversation-action":"removeConversation_","yt-remove-conversation-item-action":"removePost_","yt-share-to-conversation-result-action":"chatPostUpdated_","yt-update-chat-mole-action":"handleUpdatePopup_"},stampDom:{"data.conversationReplyRenderer":{id:"reply-renderer",mapping:{conversationReplyRenderer:"ytd-conversation-reply-renderer"}},
"data.menu":{id:"menu",mapping:{menuRenderer:"ytd-menu-renderer"}},"data.items":{id:"contents",mapping:{conversationMetadataItemRenderer:"ytd-conversation-metadata-item-renderer",conversationChannelItemRenderer:"ytd-conversation-channel-item-renderer",conversationLinkItemRenderer:"ytd-conversation-link-item-renderer",conversationPlaylistItemRenderer:"ytd-conversation-playlist-item-renderer",conversationTextItemRenderer:"ytd-conversation-text-item-renderer",conversationVideoItemRenderer:"ytd-conversation-video-renderer",
readReceiptText:"ytd-conversation-read-receipt-renderer",continuationItemRenderer:{component:"ytd-continuation-item-renderer",params:{isOverridable:!0}},conversationParticipantTypingTemplateRenderer:"ytd-conversation-participant-typing-template-renderer"}},"data.continuations":{id:"continuations",mapping:{invalidationContinuationData:{component:"yt-invalidation-continuation",params:{isReusable:!0,tangoConfiguration:{channelUri:"https://client-channel.google.com/client-channel/client",senderUri:"https://clients4.google.com/invalidation/lcs/client",
clientName:"yt-share",clientType:1066,objectId:"0",objectSource:0,requiresAuthToken:!1},invalidationTag:"yt-share"}}}}},AGGREGATE_WINDOW_:18E8,DATA_CHANGE_DELAY_:50,created:function(){this.readyForInteractionLogging_=!1},
attached:function(){this.setVisibility_("attached");this.losingFocus_=!0;this.$["cancel-text"].text=UU(yU("SBOX_INAPPROPRIATE_CANCEL"));this.$.collapse.opened=!0;this.$.collapse.updateSize("auto");this.stayAtBottom_=!1;this.unreadMessages_=0;this.listen(document,"visibilitychange","onVisibilityChanged_");vS(this)},
detached:function(){this.unlisten(document,"visibilitychange","onVisibilityChanged_");wS(this)},
open:function(){this.$.collapse.opened=!0;this.set("hidden",!1);this.scrollToBottom_();this.isShowingConversation_=!0;this.sendAction("yt-close-popup-action",["ytd-multi-page-menu-renderer"]);var a=this.sendOptionalAction("yt-miniplayer-active");a&&a.length&&a[0]?this.handleMiniplayerActivated_():this.handleMiniplayerDeactivated_();this.focusOnReplyBox_(void 0);this.toggleClass("title-focus",!0,this.$["title-bar"])},
close:function(){this.set("hidden",!0)},
handleMiniplayerActivated_:function(){this.classList.add("miniplayer")},
handleMiniplayerDeactivated_:function(){this.classList.remove("miniplayer")},
initInteractionLogging_:function(){if(this&&this.data&&this.data.trackingParams){var a=this.data.trackingParams,b=BS(27669);if(b){Xo(b,27669,1);var c=Vo(1);c&&(a=go(a))&&(CS(b,c,a),this.readyForInteractionLogging_=!0)}}},
getOpenedConversationId_:function(){return this&&this.data&&this.isShowingConversation_?this.data.conversationId:void 0},
typingDisplayed_:function(){44>this.getDistanceToBottom_()&&this.scrollToBottom_()},
receivedPayload_:function(a){a.detail.hasOwnProperty("shouldShowTyping")&&this.sendAction("yt-conversation-typing-status-action",[a.detail])},
updateChatMole_:function(a){if(!this.hidden){for(var b,c=0;c<this.data.continuations.length;c++){var d=this.data.continuations[c].invalidationContinuationData;if(d){b=d.continuation;break}}c=2!=yl(document);this.missedContent_=!c;b={getSharedConversationEndpoint:{continuation:b,markConversationAsRead:c&&this.$.collapse.opened}};a&&(b.getSharedConversationEndpoint.tangoInvalidationTag="chat_mole_desktop_invalidation");this.sendServiceRequestAction([b])}},
handleParticipantsResults_:function(a){(a=a.conversationParticipantsResultsAction.contents.conversationParticipantSectionRenderer)&&this.$["invite-connections"].hidden&&(this.$.collapse.opened||this.$.collapse.toggle(),this.setVisibility_("view-participants"),this.$["participant-connections"].data=a,this.$.title.text=a.title,this.isShowingConversation_=!1)},
handleInviteResults_:function(a){(a=a.inviteMoreResultsAction.contents.inviteMorePanelRenderer)&&this.$["participant-connections"].hidden&&(this.$.collapse.opened||this.$.collapse.toggle(),this.setVisibility_("add-participants"),this.$["invite-connections"].data=a,this.$.title.text=a.title,this.isShowingConversation_=!1)},
chatPostUpdated_:function(a){if(this.data){var b=u.unsafeClone(this.data);a=a.shareToConversationResultAction;b.items=a.newConversationItems;a.readReceiptText&&(b.readReceiptText=a.readReceiptText);a.conversationId===this.data.conversationId&&(this.data=this.updateWithData_(b))}},
chatPostMade_:function(a){if(this.data){70>this.getDistanceToBottom_()&&(this.stayAtBottom_=!0);var b=u.unsafeClone(this.data);b.items=b.items.filter(function(e){return!e.readReceiptText&&!e.conversationParticipantTypingTemplateRenderer});
this.emptyConversationDisplayed_&&(b.items.splice(0,1),this.emptyConversationDisplayed_=!1);var c=0;if(b.items&&0<b.items.length){var d=this.getRenderer_(b.items[b.items.length-1]);d.timestamp&&(c=parseInt(d.timestamp,10)+10)}a.templateConversationItem.conversationTextItemRenderer.timestamp=c;b.items.push({conversationTextItemRenderer:a.templateConversationItem.conversationTextItemRenderer});b.readReceiptText=a.optimisticReadReceipt;b.items=this.insertReadReceipt_(b.items,b);b.items=this.insertTypingTemplate_(b.items,
b);this.prevScrollTop_=this.$.contents.scrollTop;this.data=b}},
handleUpdatePopup_:function(a){if((a=a.updateChatMoleAction.conversationSupportedRenderer.conversationSectionRenderer)&&a.conversationId==this.data.conversationId&&a.items&&0<a.items.length)this.data=this.updateWithData_(a);else if(this.data&&a&&a.readReceiptText&&this.getSimpleString(this.data.readReceiptText)!=this.getSimpleString(a.readReceiptText)){var b=u.unsafeClone(this.data);b.readReceiptText=a.readReceiptText;this.data=this.updateWithData_(b)}},
getRenderer_:function(a){return a.conversationTextItemRenderer||a.conversationVideoItemRenderer||a.conversationMetadataItemRenderer||a.conversationLinkItemRenderer||a.conversationChannelItemRenderer||a.conversationPlaylistItemRenderer},
mergeData_:function(a,b){a=function(c,d){var e=this;return c.filter(function(g){var h=e.getRenderer_(g);return h?!d.some(function(m){return(m=e.getRenderer_(m))?h.uniqueId==m.uniqueId||h.uniqueId==m.temporaryClientId:!1}):!0})}.call(this,a,b);
0<a.length&&(b=b.concat(a));return b},
aggregateItems_:function(a){for(var b=1;b<a.length;b++){var c=a[b-1],d=a[b];if(c&&d){var e=this.getRenderer_(c),g=this.getRenderer_(d);if(e&&g&&e.timestamp&&g.timestamp){var h=!1,m=!1,n=g.timestamp-e.timestamp;if(g.timestamp<e.timestamp||n<this.AGGREGATE_WINDOW_)h=!0,e.aggregationId===g.aggregationId&&(m=!0);g.aggregateTime=h?"AGGREGATE-TIME":"";m?(e.aggregateAuthor="AGGREGATE-AUTHOR",g.aggregateAuthor="AGGREGATE-AUTHOR"):(e.aggregateAuthor="",g.aggregateAuthor="");h&&m?(g.aggregateTop=g.style&&"JUSTIFICATION_START"===
g.style.justification?"AGGREGATE-TOP-LEFT":"AGGREGATE-TOP-RIGHT",e.aggregateBottom=e.style&&"JUSTIFICATION_START"===e.style.justification?"AGGREGATE-BOTTOM-LEFT":"AGGREGATE-BOTTOM-RIGHT"):(g.aggregateTop="",e.aggregateBottom="");""===e.aggregateBottom&&"AGGREGATE-AUTHOR"===e.aggregateAuthor&&(e.aggregateAuthor="");b+1>=a.length&&(g.aggregateAuthor="");c.conversationTextItemRenderer&&(c.conversationTextItemRenderer=e,c=u.unsafeClone(c),a[b-1]=c);d.conversationTextItemRenderer&&(d.conversationTextItemRenderer=
g,d=u.unsafeClone(d),a[b]=d)}}}return a},
updateWithData_:function(a){var b=this;this.wasConversationChanged_=!1;70>this.getDistanceToBottom_()&&(this.stayAtBottom_=!0);var c=[];c=this.data.items.filter(function(m){return!m.readReceiptText&&!m.continuationItemRenderer&&!m.conversationParticipantTypingTemplateRenderer});
var d=a.items.filter(function(m){return!m.readReceiptText&&!m.continuationItemRenderer&&!m.conversationParticipantTypingTemplateRenderer});
if(d){var e=c.length,g=this.getRenderer_(d[0]),h=this.getRenderer_(c[0]);(g?g.timestamp:Infinity)<(h?h.timestamp:Infinity)&&(this.loadedOlderItems_=!0,this.lastVisibleItem_=this.$.contents.scrollHeight);c=this.mergeData_(c,d);c.sort(function(m,n){m=m&&b.getRenderer_(m);n=n&&b.getRenderer_(n);return(m?m.timestamp:Infinity)-(n?n.timestamp:Infinity)});
e=c.length-e;!this.$.collapse.opened&&0<e&&(this.unreadMessages_+=e,this.$["missed-messages"].hidden=!1,e=""+this.unreadMessages_,99<this.unreadMessages_&&(e="99+"),this.$["missed-messages"].text=UU(e))}a.readReceiptText||(a.readReceiptText=this.data.readReceiptText);c=this.aggregateItems_(c);c=this.insertReadReceipt_(c,a);c=this.insertContinuation_(c,a);c=this.insertTypingTemplate_(c,a);a.items=c;this.get("hidden")&&this.open();this.prevScrollTop_=this.$.contents.scrollTop;return a},
onTapCloseButton_:function(){this.isShowingConversation_?(this.isShowingConversation_=!1,this.sendAction("yt-close-popup-action",["ytd-conversation-section-renderer"])):(this.setVisibility_("show-conversation"),this.$.title.text=this.data.conversationName,this.isShowingConversation_=!0)},
showConversation_:function(){this.isShowingConversation_||(this.setVisibility_("show-conversation"),this.$.title.text=this.data.conversationName,this.isShowingConversation_=!0)},
removePost_:function(a){if(this.data){var b=u.unsafeClone(this.data);b.items=b.items.filter(function(d){return!d.readReceiptText&&!d.continuationItemRenderer&&!d.conversationParticipantTypingTemplateRenderer});
for(var c=0;c<b.items.length;c++)if(this.getRenderer_(b.items[c]).uniqueId==a.removeConversationItemAction.itemId){b.items.splice(c,1);break}b.items=this.insertReadReceipt_(b.items,b);b.items=this.insertContinuation_(b.items,b);b.items=this.insertTypingTemplate_(b.items,b);this.prevScrollTop_=this.$.contents.scrollTop;this.data=b}},
removeConversation_:function(){this.sendAction("yt-close-popup-action",["ytd-conversation-section-renderer"])},
onShow_:function(){this.loaded||this.scrollToBottom_()},
insertReadReceipt_:function(a,b){a=a.filter(function(d){return!d.readReceiptText});
for(var c=a.length-1;0<=c;c--)if(!a[c].conversationMetadataItemRenderer){a.splice(c+1,0,{readReceiptText:b.readReceiptText});break}return a},
insertContinuation_:function(a,b){a=a.filter(function(e){return!e.continuationItemRenderer});
for(var c,d=0;d<b.continuations.length;d++)if(b.continuations[d].nextContinuationData){c=b.continuations[d].nextContinuationData.continuation;break}c&&a.splice(0,0,{continuationItemRenderer:{trigger:"CONTINUATION_TRIGGER_ON_ITEM_SHOWN",continuationEndpoint:{getSharedConversationEndpoint:{continuation:c}}}});return a},
insertTypingTemplate_:function(a,b){a=a.filter(function(c){return!c.conversationParticipantTypingTemplateRenderer});
b.typingStatusTemplate&&a.push(b.typingStatusTemplate);return a},
dataChanged_:function(a){var b=this;this.readyForInteractionLogging_||this.initInteractionLogging_();a.chatMoleCloseButtonLabel&&(this.$["close-button"].label=a.chatMoleCloseButtonLabel);if(this.wasConversationChanged_=a.conversationId!=this.currentConversationId_)this.emptyConversationDisplayed_=!1;var c=!1;if(a.items&&a.items.length>this.$.contents.children.length){var d=this.loadedOlderItems_,e=this.stayAtBottom_,g=this.emptyConversationDisplayed_,h=this.isShowingConversation_;setTimeout(function(){b.loadedOlderItems_=
d;b.stayAtBottom_=e;b.emptyConversationDisplayed_=g;b.isShowingConversation_=h;b.dataChanged_(a)},this.DATA_CHANGE_DELAY_)}else{this.currentConversationId_=a.conversationId;
a.items?(this.emptyConversationDisplayed_&&(2<a.items.length||this.getRenderer_(a.items[0]).timestamp)&&(a.items.splice(0,1),this.emptyConversationDisplayed_=!1),a.items=this.aggregateItems_(a.items)):a.emptyConversationItem&&(c=u.unsafeClone(a),c.items=[a.emptyConversationItem],this.emptyConversationDisplayed_=!0,a=c,c=!0);if(a.items&&!a.items.some(function(n){return!!n.readReceiptText})&&a.readReceiptText&&!this.emptyConversationDisplayed_){c=u.unsafeClone(a);
c.items=this.insertReadReceipt_(c.items,c);var m=this.stayAtBottom_;a=c;this.stayAtBottom_=m;c=!0}a.items&&!a.items.some(function(n){return!!n.continuationItemRenderer})&&a.continuations.some(function(n){return!!n.nextContinuationData})&&(c=u.unsafeClone(a),c.items=this.insertContinuation_(c.items,c),m=this.stayAtBottom_,a=c,this.stayAtBottom_=m,c=!0);
a.items&&!a.items.some(function(n){return!!n.conversationParticipantTypingTemplateRenderer})&&a.typingStatusTemplate&&(c=u.unsafeClone(a),c.items=this.insertTypingTemplate_(c.items,c),m=this.stayAtBottom_,a=c,this.stayAtBottom_=m,c=!0);
this.wasConversationChanged_?(this.sendAction("yt-clear-conversation-reply-action"),this.sendAction("yt-conversation-typing-template-reset"),this.isShowingConversation_||(this.setVisibility_("show-conversation"),this.$.title.text=this.data.conversationName,this.isShowingConversation_=!0),this.unreadMessages_=0,this.$["missed-messages"].hidden=!0,this.open(),this.scrollToBottom_()):this.stayAtBottom_?this.scrollToBottom_():this.$.contents.scrollTop=this.loadedOlderItems_?this.$.contents.scrollHeight-
this.lastVisibleItem_:this.prevScrollTop_;c&&(this.wasConversationChanged_=!1,this.data=a,this.sendAction("yt-conversation-typing-template-reset"));this.stayAtBottom_=this.loadedOlderItems_=!1}},
onFocusout_:function(){this.losingFocus_&&this.toggleClass("title-focus",!1,this.$["title-bar"]);this.losingFocus_=!0},
onFocusin_:function(){this.toggleClass("title-focus",!0,this.$["title-bar"])},
onKeydown_:function(a){if(27==a.keyCode)this.onTapCloseButton_(a)},
onMouseDown_:function(a){var b=Polymer.dom(a).rootTarget;"title"===b.id||"title-bar"===b.id?this.$.collapse.opened&&(this.losingFocus_=!0):"TEXTAREA"==a.target.tagName||fi(a.target,null,"ytd-inline-playback-renderer",3)||(this.losingFocus_=!1,this.focusOnReplyBox_(b.id))},
onTap_:function(a){var b=Polymer.dom(a).rootTarget;b.id&&0==b.id.indexOf("title")?(b=this.$.collapse.opened,this.$.collapse.toggle(),this.$["invite-connections"].hidden||(this.$["title-bar"].hidden=!b,this.$["invite-connections"].$["invite-title-bar"].hidden=b),!b&&0<this.unreadMessages_&&(this.updateChatMole_(void 0),this.scrollToBottom_(),this.unreadMessages_=0,this.$["missed-messages"].hidden=!0),a&&a.detail&&(a.detail.x||a.detail.y)&&this.$["title-button"].blur()):"add-title"===b.id?(a=this.$.collapse.opened,
this.$.collapse.toggle(),this.$["title-bar"].hidden=!a,this.$["invite-connections"].$["invite-title-bar"].hidden=a):"TEXTAREA"==a.target.tagName||fi(a.target,null,"ytd-inline-playback-renderer",3)||this.focusOnReplyBox_(b.id)},
computeJustificationStyle_:function(a){return a},
onBackFromViewParticipants_:function(){this.fire("yt-conversation-show-conversation")},
onVisibilityChanged_:function(){2!=yl(document)&&this.missedContent_&&(this.missedContent_=!1,this.updateChatMole_(void 0))},
onScroll_:function(){0==this.$.contents.scrollTop&&this.firstLoad_?this.sendAction("yt-continuation-override-action"):this.firstLoad_=!0},
getDistanceToBottom_:function(){return this.$.contents.scrollHeight-(this.$.contents.scrollTop+this.$.contents.clientHeight)},
scrollToBottom_:function(){this.$.contents.scrollTop=this.$.contents.scrollHeight;this.prevScrollTop_=this.$.contents.scrollTop},
setVisibility_:function(a){switch(a){case"attached":this.$["back-button"].hidden=!0;this.$["cancel-text"].hidden=!0;this.$["invite-connections"].hidden=!0;this.$["participant-connections"].hidden=!0;this.$["missed-messages"].hidden=!0;break;case"view-participants":this.$["back-button"].hidden=!1;this.$["cancel-text"].hidden=!0;this.$["close-button"].hidden=!0;this.$["expanded-content"].hidden=!0;this.$.menu.hidden=!0;this.$["participant-connections"].hidden=!1;break;case"add-participants":this.$["back-button"].hidden=
!0;this.$["cancel-text"].hidden=!1;this.$["close-button"].hidden=!0;this.$["expanded-content"].hidden=!0;this.$.menu.hidden=!0;this.$["title-bar"].hidden=!0;this.$["invite-connections"].hidden=!1;this.$["invite-connections"].$["invite-title-bar"].hidden=!1;break;case"show-conversation":this.$["back-button"].hidden=!0,this.$["cancel-text"].hidden=!0,this.$["close-button"].hidden=!1,this.$["expanded-content"].hidden=!1,this.$["invite-connections"].hidden=!0,this.$.menu.hidden=!1,this.$["title-bar"].hidden=
!1,this.$["participant-connections"].hidden=!0;}},
focusOnReplyBox_:function(a){"share-url"!=a&&(a=jxa(Polymer.IronFocusablesHelper,this.$["reply-renderer"]),0<a.length&&a[0].focus())}});Polymer({is:"ytd-donation-amount-picker-renderer",behaviors:[X,T.YtActionSenderBehavior,V.YtRendererBehavior],properties:{data:{type:Object},selectedAmountIndex:{type:Number,value:1,observer:"selectedAmountIndexChanged_"},customAmount:{type:String}},observers:["validateAmount(data, selectedAmountIndex, customAmount)","updateAmountInEndpoint_(data, selectedAmountIndex, customAmount)","updateDonationPrivacyInEndpoint_(data)"],onAmountTap:function(a){this.selectedAmountIndex=this.$.amounts.indexForElement(a.currentTarget)},
onCheckboxTap:function(){this.updateDonationPrivacyInEndpoint_()},
onDonateButtonTap:function(){this.sendAction("yt-close-popup-action",[this.is]);var a=qW(this);a&&a.getPlayerPromise().then(function(b){b.pauseVideo()}.bind(this))},
selectedAmountIndexChanged_:function(){this.isCustomAmountSelected()&&this.$["custom-amount-input"].focus()},
computeButtonRenderers:function(){return this.data?this.data.suggestedAmounts.map(function(a){return{style:"STYLE_SUGGESTIVE",text:a.label}}):[]},
updateAmountInEndpoint_:function(){var a=this.getAmountMicros_();if(a){var b=this.get("donateButton.buttonRenderer.command.ypcGetCartEndpoint",this.data);if(b)b.donationAmountMicros=a;else if(b=this.get("donateButton.buttonRenderer.command.urlEndpoint",this.data)){var c=new cx(b.url);Xw(c,"amount",a);b.url=c.toString()}}},
updateDonationPrivacyInEndpoint_:function(){var a=this.get("donateButton.buttonRenderer.command.ypcGetCartEndpoint",this.data);a&&(a.productData={donationData:{isAnonymousDonation:!this.$["privacy-checkbox"].checked}})},
getAmountMicros_:function(){return this.getSelectedButtonAmount_()||1E6*Number(this.$["custom-amount-input"].value)},
getSelectedButtonAmount_:function(){return this.get("suggestedAmounts."+this.selectedAmountIndex+".amountMicros",this.data)},
isSelected_:function(a){return a===this.selectedAmountIndex},
isCustomAmountSelected:function(){return-1==this.selectedAmountIndex?!1:!this.get("suggestedAmounts."+this.selectedAmountIndex+".amountMicros",this.data)},
shouldHideCheckbox:function(a){return!a},
validateAmount:function(){var a=this.isAmountValid(this.customAmount),b=""===this.customAmount;this.isCustomAmountSelected()&&!a?this.disableButton_():-1===this.selectedAmountIndex?this.disableButton_():this.enableButton_();this.setInputError_(!a&&!b)},
isAmountValid:function(a){if(""===a)return!1;a=1E6*Number(a);var b=this.get("minAmountMicros",this.data),c=this.get("maxAmountMicros",this.data);return b&&a<b||c&&a>c?!1:!0},
setInputError_:function(a){a?this.$["custom-amount-input"].setAttribute("invalid",""):this.$["custom-amount-input"].removeAttribute("invalid")},
enableButton_:function(){this.set("data.donateButton.buttonRenderer.isDisabled",!1)},
disableButton_:function(){this.set("data.donateButton.buttonRenderer.isDisabled",!0)}});Polymer({is:"ytd-donation-post-transaction-renderer",behaviors:[X,V.YtRendererBehavior],properties:{data:{type:Object}},stampDom:{"data.doneButton":{id:"done-button",mapping:{buttonRenderer:"ytd-button-renderer"}}}});Polymer({is:"ytd-one-time-support-renderer",hostAttributes:{dialog:!0},behaviors:[V.YtRendererBehavior,X,G2],properties:{data:{type:Object},selectedAmountIndex:{type:Number,value:1,observer:"selectedAmountIndexChanged_"},customAmount:{type:String},perksList:{type:Array,computed:"computePerksList_(data, selectedAmountIndex, customAmount)"}},stampDom:{"data.dismissButton":{id:"dismiss-button",mapping:{buttonRenderer:{component:"ytd-button-renderer",attributes:{"dialog-dismiss":!0}}}},"data.menuButton":{id:"action-menu",
mapping:{menuRenderer:"ytd-menu-renderer"}}},observers:["validateAmount(data, selectedAmountIndex, customAmount)"],onAmountTap:function(a){this.selectedAmountIndex=this.$.amounts.indexForElement(a.currentTarget)},
selectedAmountIndexChanged_:function(){this.isCustomAmountSelected()&&this.$["custom-amount-input"].focus()},
computeButtonRenderers:function(){return this.data?this.data.suggestedAmounts.map(function(a){return{style:"STYLE_SUGGESTIVE",text:a.label}}):[]},
getAmountMicros_:function(){return this.getSelectedButtonAmount_()||1E6*Number(this.$["custom-amount-input"].value)},
getSelectedButtonAmount_:function(){return this.get("suggestedAmounts."+this.selectedAmountIndex+".amountMicros",this.data)},
isSelected_:function(a){return a===this.selectedAmountIndex},
isCustomAmountSelected:function(){return-1===this.selectedAmountIndex?!1:!this.get("suggestedAmounts."+this.selectedAmountIndex+".amountMicros",this.data)},
validateAmount:function(){var a=this.isAmountValid(this.customAmount),b=""===this.customAmount;this.isCustomAmountSelected()&&!a?this.disableButton_():-1===this.selectedAmountIndex?this.disableButton_():this.enableButton_();this.setInputError_(!a&&!b)},
isAmountValid:function(a){if(""===a)return!1;a=1E6*Number(a);var b=this.get("minAmountMicros",this.data),c=this.get("maxAmountMicros",this.data);return b&&a<b||c&&a>c?!1:!0},
setInputError_:function(a){a?this.$["custom-amount-input"].setAttribute("invalid",""):this.$["custom-amount-input"].removeAttribute("invalid")},
computePerksList_:function(){var a=this.getAmountMicros_();return(this.data&&this.data.supportPerks||[]).map(function(b){var c=a>=b.minAmountMicros;return{text:b.text,statusIcon:c?"CHECK-CIRCLE":"VPN_KEY",rowClass:c?"perk-row":"perk-row perk-disabled"}})},
enableButton_:function(){this.set("data.supportButton.buttonRenderer.isDisabled",!1)},
disableButton_:function(){this.set("data.supportButton.buttonRenderer.isDisabled",!0)}});Polymer({is:"ytd-checkbox-survey-renderer",hostAttributes:{dialog:!0},behaviors:[G_.YtEventForwardingBehavior,X,T.YtActionSenderBehavior,V.YtRendererBehavior,fFa],properties:{data:{type:Object,observer:"dataChanged_"}},stampDom:{"data.options":{id:"options",mapping:{checkboxSurveyOptionRenderer:"ytd-checkbox-survey-option-renderer"}}},listeners:{"ytd-checkbox-survey-option-changed":"onOptionChange_"},dataChanged_:function(){for(var a=0;a<this.getOptionRenderers_().length;a++)this.notifyPath("data.options."+
a+".checkboxSurveyOptionRenderer.checked"),this.set("data.options."+a+".checkboxSurveyOptionRenderer.checked",!1);this.updateSubmitButton_(!1)},
updateSubmitButton_:function(a){this.set("data.submitButton.buttonRenderer.isDisabled",!a)},
computeAlt_:function(a){return XU(a)},
onDismissTap_:function(){this.sendAction("yt-close-popup-action");this.sendServiceRequestAction([this.data.dismissalEndpoint])},
getOptionRenderers_:function(a){return(a=a||this.data)&&a.options?a.options.map(function(b){return b.checkboxSurveyOptionRenderer}):[]},
onOptionChange_:function(a){var b=this,c=!1;if(a.detail.checked){var d=this.getOptionRenderers_().find(function(e){return e.value===a.detail.value});
this.getOptionRenderers_().forEach(function(e,g){b.notifyPath("data.options."+g+".checkboxSurveyOptionRenderer.checked");e.checked&&(d.isExclusiveOption?!e.isExclusiveOption:e.isExclusiveOption)?b.set("data.options."+g+".checkboxSurveyOptionRenderer.checked",!1):e.checked&&(c=!0)})}else c=this.getOptionRenderers_().some(function(e,g){b.notifyPath("data.options."+g+".checkboxSurveyOptionRenderer.checked");
return e.checked});
this.updateSubmitButton_(c)},
onSubmitTap_:function(){var a=this.getOptionRenderers_().filter(function(d){return d.checked});
if(a.length){var b=a.map(function(d){return d.responseEndpoint});
a=[];for(var c=1;c<b.length;c++)b[c].feedbackEndpoint&&b[c].feedbackEndpoint.feedbackToken&&a.push(b[c].feedbackEndpoint.feedbackToken);b=[b[0]];a.length&&b.push({extra_feedback_tokens:a});this.sendServiceRequestAction(b);this.sendAction("yt-close-popup-action",["ytd-checkbox-survey-renderer"]);this.sendInnerTubeActions(this.data&&this.data.submitActions||[],this)}}});var e9=function(){return F.apply(this,arguments)||this};
l(e9,F);f=e9.prototype;f.created=function(){this.selectedFeedbackTokens=new Iu};
f.attached=function(){this.hasAttribute("dialog")||this.setAttribute("dialog","true")};
f.configureRendererStamper=function(){return{"data.reasons":{id:"reasons",mapping:{dismissalReasonTextRenderer:"ytd-dismissal-reason-text-renderer",dismissalReasonVideoRenderer:"ytd-dismissal-reason-video-renderer"}}}};
f.dataChanged=function(){this.hasReasonsSelected=!1;this.selectedFeedbackTokens.clear()};
f.onDismissalReasonSelected=function(a,b){this.fire("yt-invalidate-popup-tabbables");this.selectedFeedbackTokens.add(b);this.hasReasonsSelected=!0};
f.onDismissalReasonDeselected=function(a,b){this.fire("yt-invalidate-popup-tabbables");this.selectedFeedbackTokens.remove(b);this.hasReasonsSelected=!this.selectedFeedbackTokens.isEmpty()};
f.onCancelTap=function(){this.ytActionSenderBehavior.sendAction("yt-close-popup-action")};
f.onSubmitTap=function(){var a={feedback_tokens:this.selectedFeedbackTokens.getValues()};this.ytActionSenderBehavior.sendServiceRequestAction([this.data.submitFeedbackEndpoint,a]);this.ytActionSenderBehavior.sendAction("yt-close-popup-action")};
var f9=e9;f9.prototype.onDismissalReasonDeselected=f9.prototype.onDismissalReasonDeselected;f9.prototype.onDismissalReasonSelected=f9.prototype.onDismissalReasonSelected;f9.prototype.dataChanged=f9.prototype.dataChanged;v([H(X),w("design:type",Object)],f9.prototype,"ytRendererstamperBehavior",void 0);v([H(V.YtRendererBehavior),w("design:type",Object)],f9.prototype,"ytRendererBehavior",void 0);v([H(T.YtActionSenderBehavior),w("design:type",Object)],f9.prototype,"ytActionSenderBehavior",void 0);
v([I(),w("design:type",Object)],f9.prototype,"data",void 0);v([I(),w("design:type",Boolean)],f9.prototype,"hasReasonsSelected",void 0);v([I(),w("design:type",Iu)],f9.prototype,"selectedFeedbackTokens",void 0);v([rl("data"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],f9.prototype,"dataChanged",null);
v([ql("yt-dismissal-reason-selected"),w("design:type",Function),w("design:paramtypes",[CustomEvent,String]),w("design:returntype",void 0)],f9.prototype,"onDismissalReasonSelected",null);v([ql("yt-dismissal-reason-deselected"),w("design:type",Function),w("design:paramtypes",[CustomEvent,String]),w("design:returntype",void 0)],f9.prototype,"onDismissalReasonDeselected",null);f9=v([W({is:"ytd-dismissal-follow-up-renderer"})],f9);var KHa=function(){return F.apply(this,arguments)||this};
l(KHa,F);var g9=KHa;v([H(V.YtRendererBehavior),w("design:type",Object)],g9.prototype,"ytRendererBehavior",void 0);v([H(aFa),w("design:type",Object)],g9.prototype,"ytdDismissalReasonBehavior",void 0);v([I(),w("design:type",Object)],g9.prototype,"data",void 0);g9=v([W({is:"ytd-dismissal-reason-text-renderer"})],g9);var LHa=function(){return F.apply(this,arguments)||this};
l(LHa,F);var h9=LHa;v([H(V.YtRendererBehavior),w("design:type",Object)],h9.prototype,"ytRendererBehavior",void 0);v([H(aFa),w("design:type",Object)],h9.prototype,"ytdDismissalReasonBehavior",void 0);v([I(),w("design:type",Object)],h9.prototype,"data",void 0);h9=v([W({is:"ytd-dismissal-reason-video-renderer"})],h9);var i9=function(){return F.apply(this,arguments)||this};
l(i9,F);i9.prototype.onCheckedChange=function(){this.multiselect||this.fire("yt-feedback-single-select-changed");this.$.freeform.focus();this.fire("yt-refit")};
i9.prototype.showTextBox=function(a,b){return a&&b};
i9.prototype.dataChanged=function(a){a&&(void 0===a.resultText&&this.set("data.resultText",""),void 0===a.checked&&this.set("data.checked",!1),void 0===a.allowFreeTextInput&&this.set("data.allowFreeTextInput",!1))};
var j9=i9;v([H(V.YtRendererBehavior),w("design:type",Object)],j9.prototype,"ytRendererBehavior",void 0);v([I({observer:"dataChanged"}),w("design:type",Object)],j9.prototype,"data",void 0);v([I({value:!1}),w("design:type",Boolean)],j9.prototype,"multiselect",void 0);j9=v([W({is:"ytd-feedback-option-renderer"})],j9);var k9=function(){return F.apply(this,arguments)||this};
l(k9,F);k9.prototype.configureRendererStamper=function(){return{"data.options":{id:"options",mapping:{feedbackOptionRenderer:{component:"ytd-feedback-option-renderer",properties:{multiselect:"[[data.multiSelect]]"}}}}}};
k9.prototype.onSingleSelectCheckedChanged=function(a){a=Polymer.dom(a).rootTarget;for(var b=0;b<this.data.options.length;b++)if(a.data!==this.data.options[b].feedbackOptionRenderer){var c="data.options."+b+".feedbackOptionRenderer.checked";this.notifyPath(c);this.set(c,!1)}};
var l9=k9;l9.prototype.onSingleSelectCheckedChanged=l9.prototype.onSingleSelectCheckedChanged;v([H(V.YtRendererBehavior),w("design:type",Object)],l9.prototype,"ytRendererBehavior",void 0);v([H(X),w("design:type",Object)],l9.prototype,"ytRendererstamperBehavior",void 0);v([I(),w("design:type",Object)],l9.prototype,"data",void 0);
v([ql("yt-feedback-single-select-changed"),w("design:type",Function),w("design:paramtypes",[Event]),w("design:returntype",void 0)],l9.prototype,"onSingleSelectCheckedChanged",null);l9=v([W({is:"ytd-feedback-question-renderer"})],l9);var m9=function(){return F.apply(this,arguments)||this};
l(m9,F);m9.prototype.configureRendererStamper=function(){return{"data.questions":{id:"questions",mapping:{feedbackQuestionRenderer:"ytd-feedback-question-renderer"}}}};
m9.prototype.getSelectedFeedbackResults=function(){for(var a={},b=0;b<this.data.questions.length;b++)for(var c=this.data.questions[b].feedbackQuestionRenderer,d=0;d<c.options.length;d++){var e=c.options[d].feedbackOptionRenderer;e&&e.checked&&(a[e.optionKey]=e.resultText)}return a};
m9.prototype.onKeyUp=function(){In(this.fire.bind(this,"yt-refit"));Dn.start()};
m9.prototype.submitSurvey=function(){var a=this.getSelectedFeedbackResults();0<Object.keys(a).length&&this.ytActionSenderBehavior.sendServiceRequestAction([this.data.submitFeedbackEndpoint,{survey_results:a,is_feedback_token_unencrypted:!0}])};
var n9=m9;v([H(T.YtActionSenderBehavior),w("design:type",Object)],n9.prototype,"ytActionSenderBehavior",void 0);v([H(V.YtRendererBehavior),w("design:type",Object)],n9.prototype,"ytRendererBehavior",void 0);v([H(X),w("design:type",Object)],n9.prototype,"ytRendererstamperBehavior",void 0);v([I(),w("design:type",Object)],n9.prototype,"data",void 0);n9=v([W({is:"ytd-feedback-survey-renderer"})],n9);var o9=function(){return F.apply(this,arguments)||this};
l(o9,F);o9.prototype.computeAlt=function(a){return XU(a)};
o9.prototype.submitResponse=function(){this.data&&this.data.submissionEndpoint&&(this.ytActionSenderBehavior.sendServiceRequestAction([this.data.submissionEndpoint]),this.ytActionSenderBehavior.sendAction("yt-close-popup-action",["ytd-single-option-survey-renderer"]))};
o9.prototype.onTap=function(){this.vertical&&this.submitResponse()};
var p9=o9;p9.prototype.onTap=p9.prototype.onTap;v([H(V.YtRendererBehavior),w("design:type",Object)],p9.prototype,"ytRendererBehavior",void 0);v([H(T.YtActionSenderBehavior),w("design:type",Object)],p9.prototype,"ytActionSenderBehavior",void 0);v([I(),w("design:type",Object)],p9.prototype,"data",void 0);v([I({reflectToAttribute:!0}),w("design:type",Boolean)],p9.prototype,"vertical",void 0);
v([ql("tap"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],p9.prototype,"onTap",null);p9=v([W({is:"ytd-single-option-survey-option-renderer"})],p9);var q9=function(){return F.apply(this,arguments)||this};
l(q9,F);f=q9.prototype;f.configureRendererStamper=function(){return{"data.options":{id:"options",mapping:{singleOptionSurveyOptionRenderer:{component:"ytd-single-option-survey-option-renderer",properties:{vertical:"[[vertical]]"}}}}}};
f.attached=function(){this.hasAttribute("dialog")||this.setAttribute("dialog","true")};
f.dataChanged=function(a){this.vertical="VERTICAL"===(a&&a.surveyOrientation&&a.surveyOrientation.type||"HORIZONTAL")};
f.computeAlt=function(a){return XU(a)};
f.onDismissTap=function(){this.ytActionSenderBehavior.sendAction("yt-close-popup-action");this.ytActionSenderBehavior.sendServiceRequestAction([this.data.dismissalEndpoint])};
var r9=q9;v([H(T.YtActionSenderBehavior),w("design:type",Object)],r9.prototype,"ytActionSenderBehavior",void 0);v([H(G_.YtEventForwardingBehavior),w("design:type",Object)],r9.prototype,"eventForwardingBehavior",void 0);v([H(V.YtRendererBehavior),w("design:type",Object)],r9.prototype,"ytRendererBehavior",void 0);v([H(X),w("design:type",Object)],r9.prototype,"ytRendererstamperBehavior",void 0);v([H(fFa),w("design:type",Object)],r9.prototype,"ytdHatsSurveyBehavior",void 0);
v([I({observer:"dataChanged"}),w("design:type",Object)],r9.prototype,"data",void 0);v([I({reflectToAttribute:!0}),w("design:type",Boolean)],r9.prototype,"vertical",void 0);r9=v([W({is:"ytd-single-option-survey-renderer"})],r9);var s9=function(){return F.apply(this,arguments)||this};
l(s9,F);s9.prototype.attached=function(){this.hasAttribute("dialog")||this.setAttribute("dialog","true")};
s9.prototype.onDismissTap=function(){this.ytActionSenderBehavior.sendAction("yt-close-popup-action")};
s9.prototype.onNavigate=function(){this.ytActionSenderBehavior.sendAction("yt-close-popup-action")};
var t9=s9;t9.prototype.onNavigate=t9.prototype.onNavigate;v([H(V.YtRendererBehavior),w("design:type",Object)],t9.prototype,"ytRendererBehavior",void 0);v([H(G_.YtEventForwardingBehavior),w("design:type",Object)],t9.prototype,"ytEventForwardingBehavior",void 0);v([H(T.YtActionSenderBehavior),w("design:type",Object)],t9.prototype,"ytActionSenderBehavior",void 0);v([I(),w("design:type",Object)],t9.prototype,"data",void 0);
v([ql("yt-navigate"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],t9.prototype,"onNavigate",null);t9=v([W({is:"ytd-survey-follow-up-renderer"})],t9);var u9=function(){var a=F.apply(this,arguments)||this;a.polymer2="Element"in Polymer;return a};
l(u9,F);u9.prototype.ready=function(){this.secondsEl.addEventListener("blur",this.formatSeconds.bind(this))};
u9.prototype.secondsChanged=function(){this.secondsEl.focused||this.formatSeconds()};
u9.prototype.formatSeconds=function(){1===this.seconds.length&&(this.seconds="0"+this.seconds)};
var v9=u9;v9.prototype.secondsChanged=v9.prototype.secondsChanged;v([I({notify:!0}),w("design:type",String)],v9.prototype,"minutes",void 0);v([I({notify:!0}),w("design:type",String)],v9.prototype,"seconds",void 0);v([I({reflectToAttribute:!0}),w("design:type",Boolean)],v9.prototype,"polymer2",void 0);v([tl("#seconds"),w("design:type",Object)],v9.prototype,"secondsEl",void 0);
v([rl("seconds"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],v9.prototype,"secondsChanged",null);v9=v([W({is:"ytd-timestamp-input"})],v9);Polymer({is:"ytd-legal-report-details-form-renderer",hostAttributes:{dialog:!0},behaviors:[cY.YtOpenPopupBehavior,U.YtActionHandlerBehavior,MY.YtPolymer2AwareBehavior,V.YtRendererBehavior],properties:{data:{type:Object,observer:"dataChanged_"},showTimestamp_:{type:Boolean,computed:"computeShowTimestamp_(data.timestampLabel)"},serviceEndpoint_:{type:Object,readOnly:!0,computed:"computeServiceEndpoint_(data)"},submitButton_:{type:Object,computed:"computeSubmitButton_(data)"},descriptionText_:String,
issueType_:Number,affiliation_:Number,fullNameText_:String,minutes_:String,seconds_:String},observers:["handleInput_(descriptionText_, issueType_, affiliation_, fullNameText_, minutes_, seconds_)"],listeners:{"yt-service-request-sent":"onYtServiceRequestSent_","yt-service-request-completed":"onYtServiceRequestCompleted_","yt-service-request-error":"onYtServiceRequestError_","yt-navigate":"onYtNavigate_"},attached:function(){this.$.scroller.dialogElement=this.parentNode},
dataChanged_:function(){this.$.description.value="";this.seconds_=this.minutes_=this.$["full-name"].value="";this.toggleSubmitButton_(!1);this.showTimestamp_&&sW(this).getPlayerPromise().then(function(a){a=a.getCurrentTime();this.minutes_=Math.floor(a/60).toString();this.seconds_=(Math.floor(a)%60).toString()}.bind(this))},
onTapSubmit_:function(a){a.stopPropagation();this.serviceEndpoint_&&(a={flag_description:this.descriptionText_.trim(),flag_issue_type:this.issueType_,flag_affiliation:this.affiliation_},this.fullNameText_&&(a.flag_full_name=this.fullNameText_.trim()),this.showTimestamp_&&(a.minutes=this.minutes_,a.seconds=this.seconds_),this.sendServiceRequestAction([this.serviceEndpoint_,a]))},
onYtServiceRequestSent_:function(){this.toggleSubmitButton_(!1)},
onYtServiceRequestCompleted_:function(a,b){b=b.actions;for(var c=0,d=b.length;c<d;c++)b[c].openPopupAction&&(a.stopPropagation(),this.parentElement.close(),this.openPopup(b[c]))},
onYtServiceRequestError_:function(){this.toggleSubmitButton_(!0)},
toggleSubmitButton_:function(a){this.set("submitButton_.isDisabled",!a)},
handleInput_:function(a,b,c,d,e,g){d=!this.showTimestamp_||!!e&&!!g;this.toggleSubmitButton_(!!a&&!!b&&!!c&&d)},
computeServiceEndpoint_:function(a){return this.get("submitButton.buttonRenderer.serviceEndpoint",a)},
computeSubmitButton_:function(a){if(a=this.get("submitButton.buttonRenderer",a))a=Polymer.Base.mixin({},a),a.serviceEndpoint=void 0;return a},
computeShowTimestamp_:function(a){return!!a}});var w9=function(){return F.apply(this,arguments)||this};
l(w9,F);f=w9.prototype;f.attached=function(){this.hasAttribute("dialog")||this.setAttribute("dialog","true")};
f.configureRendererStamper=function(){return{"data.cancelButton":{id:"cancel-button",mapping:{buttonRenderer:{component:"ytd-button-renderer",attributes:{"dialog-dismiss":!0}}}},"data.backButton":{id:"back-button",mapping:{buttonRenderer:"ytd-button-renderer"}},"data.submitButton":{id:"submit-button",mapping:{buttonRenderer:"ytd-button-renderer"}}}};
f.ready=function(){this.$["submit-button"].addEventListener("yt-action",this.onSubmitYtAction.bind(this))};
f.onSubmitYtAction=function(a){var b=a.detail;"yt-service-request"===b.actionName&&(b=b.args[1],b.flagEndpoint&&(a.stopPropagation(),a={text:this.description,minutes:Number(this.minutes),seconds:Number(this.seconds)},this.vssId&&(a.vss_id=this.vssId),this.ytActionSenderBehavior.sendServiceRequestAction([b,a]),this.submitDisabled=!0))};
f.dataChanged=function(){var a=this;this.vssId=this.description=this.seconds=this.minutes="";this.submitDisabled=!1;var b=qW(this);b&&b.getPlayerPromise().then(function(c){var d=c.getOption("cc","track")||c.getOption("captions","track");d&&(a.vssId=d.vss_id);c=c.getCurrentTime();a.minutes=Math.floor(c/60).toString();a.seconds=(Math.floor(c)%60).toString()})};
f.updateSubmitButtonState=function(a,b,c){this.set("data.submitButton.buttonRenderer.isDisabled",c||""===a||""===b)};
f.onYtServiceRequestCompleted=function(){this.ytActionSenderBehavior.sendAction("yt-close-popup-action")};
f.onYtServiceRequestError=function(){this.submitDisabled=!1};
var x9=w9;x9.prototype.onYtServiceRequestError=x9.prototype.onYtServiceRequestError;x9.prototype.onYtServiceRequestCompleted=x9.prototype.onYtServiceRequestCompleted;x9.prototype.updateSubmitButtonState=x9.prototype.updateSubmitButtonState;v([H(X),w("design:type",Object)],x9.prototype,"ytRendererstamperBehavior",void 0);v([H(V.YtRendererBehavior),w("design:type",Object)],x9.prototype,"ytRendererBehavior",void 0);
v([H(T.YtActionSenderBehavior),w("design:type",Object)],x9.prototype,"ytActionSenderBehavior",void 0);v([H(MY.YtPolymer2AwareBehavior),w("design:type",Object)],x9.prototype,"ytPolymer2AwareBehavior",void 0);v([I({observer:"dataChanged"}),w("design:type",Object)],x9.prototype,"data",void 0);v([I(),w("design:type",Boolean)],x9.prototype,"submitDisabled",void 0);v([I(),w("design:type",String)],x9.prototype,"minutes",void 0);v([I(),w("design:type",String)],x9.prototype,"seconds",void 0);
v([I(),w("design:type",String)],x9.prototype,"description",void 0);v([I(),w("design:type",String)],x9.prototype,"vssId",void 0);v([rl("minutes","seconds","submitDisabled"),w("design:type",Function),w("design:paramtypes",[String,String,Boolean]),w("design:returntype",void 0)],x9.prototype,"updateSubmitButtonState",null);v([ql("yt-service-request-completed"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],x9.prototype,"onYtServiceRequestCompleted",null);
v([ql("yt-service-request-error"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],x9.prototype,"onYtServiceRequestError",null);x9=v([W({is:"ytd-report-details-form-renderer"})],x9);var y9=function(){var a=F.apply(this,arguments)||this;a.actionMap={"yt-refresh-form-command":"onYtRefreshFormCommand"};return a};
l(y9,F);f=y9.prototype;f.configureRendererStamper=function(){return{"data.fields":{id:"fields",mapping:{textInputFormFieldRenderer:{component:"ytd-text-input-form-field-renderer",params:{required:!0},properties:{hideLabel:"[[data.hideLabels]]"}},toggleFormFieldRenderer:{component:"ytd-toggle-form-field-renderer"},optionsRenderer:"yt-options-renderer",contactSectionRenderer:"ytd-contact-section-renderer"}}}};
f.attached=function(){this.ytActionHandlerBehavior.actionMap=this.actionMap};
f.onYtRefreshFormCommand=function(a){a.refreshFormCommand&&a.refreshFormCommand.formRenderer&&a.refreshFormCommand.formRenderer.formRenderer&&this.set("data",a.refreshFormCommand.formRenderer.formRenderer)};
f.reset=function(){for(var a=this.$.fields.children,b=0;b<a.length;b++)a[b].reset()};
f.getForm=function(){for(var a={},b=this.$.fields.children,c=0;c<b.length;c++){var d=b[c];if(!d.validate())return null;a[d.data.key]=d.value}return a};
var z9=y9;v([H(U.YtActionHandlerBehavior),w("design:type",Object)],z9.prototype,"ytActionHandlerBehavior",void 0);v([H(V.YtRendererBehavior),w("design:type",Object)],z9.prototype,"ytRendererBehavior",void 0);v([H(X),w("design:type",Object)],z9.prototype,"ytRendererstamperBehavior",void 0);v([I(),w("design:type",Object)],z9.prototype,"data",void 0);z9=v([W({is:"ytd-form-renderer"})],z9);Polymer({is:"yt-options-renderer",behaviors:[J0.YtComponentBehavior,V.YtRendererBehavior],properties:{data:{type:Object,observer:"dataChanged_"},itemSelected_:{type:Number,value:-1},value:{type:Number,computed:"computeItemSelected_(itemSelected_)"},restoreFocusOnClose_:{type:Boolean,value:!1}},dataChanged_:function(){this.itemSelected_=-1},
isSubReasonHidden_:function(a,b){return a!=b},
onTopItemSelected_:function(a,b){for(var c=Polymer.dom(this.root).querySelectorAll("paper-listbox"),d=0,e=c.length;d<e;d++)c[d].select(0);this.sendAction("yt-report-form-update",[b.item.value]);a.stopPropagation()},
onItemSelected_:function(a,b){this.sendAction("yt-report-form-update",[b.item.value]);a.stopPropagation()},
getItem_:function(a){return a.serviceItem?a.serviceItem:a.navigationItem?a.navigationItem:a.optionSelectableItemRenderer?a.optionSelectableItemRenderer:null},
computeText_:function(a){return(a=this.getItem_(a))?this.getSimpleString(a.text):null},
validate:function(){return-1!==this.itemSelected_},
computeItemSelected_:function(a){return a}});Polymer({is:"ytd-form-popup-renderer",hostAttributes:{dialog:!0},behaviors:[G_.YtEventForwardingBehavior,X,U.YtActionHandlerBehavior,MY.YtPolymer2AwareBehavior,V.YtRendererBehavior],properties:{data:Object},listeners:{"yt-popup-closed":"onPopupClosed_","yt-popup-opened":"onPopupOpened_","yt-service-request-completed":"onYtServiceRequestCompleted_"},actionMap:{"yt-signal-action-submit-form":"handleSignalActionSubmitForm_"},stampDom:{"data.form":{id:"form",mapping:{formRenderer:"ytd-form-renderer"}},
"data.buttons":{id:"buttons",mapping:{buttonRenderer:"ytd-button-renderer"}}},handleSignalActionSubmitForm_:function(){var a=this.$$("ytd-form-renderer");a&&(a=a.getForm())&&(this.sendServiceRequestAction([this.data.submitEndpoint,a]),this.sendAction("yt-close-popup-action"))},
onPopupClosed_:function(){var a=this.$$("ytd-form-renderer");a&&a.reset()},
onPopupOpened_:function(){this.fire("yt-invalidate-popup-tabbables")},
onYtServiceRequestCompleted_:function(a,b){b.data&&b.data.success&&(this.set("data.buttons.1.buttonRenderer.isDisabled",!1),this.fire("yt-invalidate-popup-tabbables"))}});var A9=function(){return F.apply(this,arguments)||this};
l(A9,F);f=A9.prototype;f.attached=function(){this.hasAttribute("dialog")||this.setAttribute("dialog","true");Wya(this)};
f.fireOnCloseActions=function(){this.data&&this.data.onClosedActions&&this.ytActionSenderBehavior.sendInnerTubeActions(this.data.onClosedActions,this)};
f.closePopupHandler=function(a,b){this.ytActionSenderBehavior.sendAction("yt-confirm-dialog-close-action",[b]);this.fireOnCloseActions()};
f.onHeaderImageChanged=function(){if(this.data){this.data.headerImage?this.setAttribute("dialog-with-header-image",""):this.removeAttribute("dialog-with-header-image");var a=this.get("data.headerImage.thumbnails");a&&(a=LY(a,this.clientWidth),this.$.header.style.backgroundImage="url("+a+")")}};
f.onYtNavigate=function(a){(a=Polymer.dom(a).rootTarget)&&a.parentElement===this.$["confirm-button"]&&this.parentElement&&this.parentElement.close()};
var B9=A9;B9.prototype.onYtNavigate=B9.prototype.onYtNavigate;B9.prototype.onHeaderImageChanged=B9.prototype.onHeaderImageChanged;B9.prototype.closePopupHandler=B9.prototype.closePopupHandler;v([H(T.YtActionSenderBehavior),w("design:type",Object)],B9.prototype,"ytActionSenderBehavior",void 0);v([H(V.YtRendererBehavior),w("design:type",Object)],B9.prototype,"ytRendererBehavior",void 0);v([H(G_.YtEventForwardingBehavior),w("design:type",Object)],B9.prototype,"ytEventForwardingBehavior",void 0);
v([I(),w("design:type",Object)],B9.prototype,"data",void 0);v([ql("yt-popup-closed"),w("design:type",Function),w("design:paramtypes",[CustomEvent,Object]),w("design:returntype",void 0)],B9.prototype,"closePopupHandler",null);v([rl("data.headerImage"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],B9.prototype,"onHeaderImageChanged",null);
v([ql("yt-navigate"),w("design:type",Function),w("design:paramtypes",[CustomEvent]),w("design:returntype",void 0)],B9.prototype,"onYtNavigate",null);B9=v([W({is:"ytd-gaming-account-link-confirm-dialog-renderer"})],B9);var C9=function(){return F.apply(this,arguments)||this};
l(C9,F);f=C9.prototype;f.configureRendererStamper=function(){return{"data.dismissButton":{id:"dismiss-button",mapping:{buttonRenderer:{component:"ytd-button-renderer",attributes:{"dialog-dismiss":!0}}}},"data.linkButton":{id:"link-button",mapping:{buttonRenderer:"ytd-button-renderer"}}}};
f.attached=function(){this.hasAttribute("dialog")||this.setAttribute("dialog","true");this.scrollable&&(this.scrollable.dialogElement=this.parentNode);Wya(this)};
f.onYtServiceRequestCompleted=function(){this.ytActionSenderBehavior.sendAction("yt-close-popup-action",["ytd-gaming-account-link-setting-renderer"])};
f.onYtServiceRequestError=function(a){this.ytOpenToastBehavior.openToast(a.detail.error.message)};
f.onDataChanged=function(){var a=this.get("data.headerImage.thumbnails");a&&(a=LY(a,this.clientWidth),this.header.style.backgroundImage="url("+a+")");a=Wo();var b=Vo(),c=this.get("data.trackingParams");c&&b&&a&&CS(a,b,go(c))};
ea.Object.defineProperties(C9.prototype,{hasDescription:{configurable:!0,enumerable:!0,get:function(){return!(!this.data||!this.data.descriptions)}}});
var D9=C9;D9.prototype.onDataChanged=D9.prototype.onDataChanged;D9.prototype.onYtServiceRequestError=D9.prototype.onYtServiceRequestError;D9.prototype.onYtServiceRequestCompleted=D9.prototype.onYtServiceRequestCompleted;v([H(X),w("design:type",Object)],D9.prototype,"ytRendererstamperBehavior",void 0);v([H(V.YtRendererBehavior),w("design:type",Object)],D9.prototype,"ytRendererBehavior",void 0);v([H(T.YtActionSenderBehavior),w("design:type",Object)],D9.prototype,"ytActionSenderBehavior",void 0);
v([H(G2),w("design:type",Object)],D9.prototype,"ytOpenToastBehavior",void 0);v([I(),w("design:type",Object)],D9.prototype,"data",void 0);v([I({reflectToAttribute:!0}),sl("data"),w("design:type",Boolean),w("design:paramtypes",[])],D9.prototype,"hasDescription",null);v([tl("paper-dialog-scrollable"),w("design:type",Object)],D9.prototype,"scrollable",void 0);v([tl("#header"),w("design:type",HTMLElement)],D9.prototype,"header",void 0);
v([ql("yt-service-request-completed"),w("design:type",Function),w("design:paramtypes",[CustomEvent]),w("design:returntype",void 0)],D9.prototype,"onYtServiceRequestCompleted",null);v([ql("yt-service-request-error"),w("design:type",Function),w("design:paramtypes",[CustomEvent]),w("design:returntype",void 0)],D9.prototype,"onYtServiceRequestError",null);v([rl("data"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],D9.prototype,"onDataChanged",null);
D9=v([W({is:"ytd-gaming-account-link-setting-renderer"})],D9);var E9=function(){return F.apply(this,arguments)||this};
l(E9,F);E9.prototype.configureRendererStamper=function(){return{"data.thirdParties":{id:"third-parties",mapping:{gamingThirdPartyRenderer:{component:"ytd-gaming-third-party-renderer",noInjection:!0}}}}};
var F9=E9;v([H(X),w("design:type",Object)],F9.prototype,"ytRendererstamperBehavior",void 0);v([H(V.YtRendererBehavior),w("design:type",Object)],F9.prototype,"ytRendererBehavior",void 0);v([I(),w("design:type",Object)],F9.prototype,"data",void 0);F9=v([W({is:"ytd-gaming-multiple-account-link-dialog-renderer"})],F9);var G9=function(){return F.apply(this,arguments)||this};
l(G9,F);G9.prototype.attached=function(){this.hasAttribute("role")||this.setAttribute("role","menuItem")};
G9.prototype.handleTap=function(){this.ytActionSenderBehavior.sendAction("yt-close-popup-action",["ytd-gaming-multiple-account-link-dialog-renderer"]);this.ytActionSenderBehavior.sendServiceRequestAction([this.data.command])};
var H9=G9;H9.prototype.handleTap=H9.prototype.handleTap;v([H(V.YtRendererBehavior),w("design:type",Object)],H9.prototype,"ytRendererBehavior",void 0);v([H(GY.YtEndpointBehavior),w("design:type",Object)],H9.prototype,"ytEndpointBehavior",void 0);v([H(ZX.YtBooleanLogicBehavior),w("design:type",Object)],H9.prototype,"ytBooleanLogicBehavior",void 0);v([H(T.YtActionSenderBehavior),w("design:type",Object)],H9.prototype,"ytActionSenderBehavior",void 0);
v([H(Polymer.PaperItemBehavior),w("design:type",Object)],H9.prototype,"paperItemBehavior",void 0);v([I(),w("design:type",Object)],H9.prototype,"data",void 0);v([I({computed:"toBool(data.linked)",reflectToAttribute:!0}),w("design:type",Boolean)],H9.prototype,"linked",void 0);v([ql("tap"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],H9.prototype,"handleTap",null);H9=v([W({is:"ytd-gaming-third-party-renderer"})],H9);var I9=function(){return F.apply(this,arguments)||this};
l(I9,F);I9.prototype.attached=function(){this.hasAttribute("dialog")||this.setAttribute("dialog","true")};
var J9=I9;v([H(V.YtRendererBehavior),w("design:type",Object)],J9.prototype,"ytRendererBehavior",void 0);v([I(),w("design:type",Object)],J9.prototype,"data",void 0);J9=v([W({is:"ytd-queue-to-play-dialog-renderer"})],J9);var K9=function(){return F.apply(this,arguments)||this};
l(K9,F);f=K9.prototype;f.prepareSubsHintActions_=function(){if(A("kevlar_mysubs_edu")&&this.active&&this.guideOpened){var a=this.componentBehavior.getInterfaceForTs("ytd-page-manager");a&&(a=a.getCurrentPage())&&"filteredsubscriptions"===a.pageSubtype&&this.set("data.targetId","subs-filtered-by-channel")}};
f.triggerHintActions=function(){var a=this;this.data&&this.data.hintActions&&Fn(this.taskEmitterBehavior.getTaskManager(),function(){var b=a.actionSenderBehavior.sendOptionalAction("yt-get-opened-popups-action");!(b&&1===b.length?b[0]:[]).some(function(c){c=c.openPopupAction.popupType;return"SURVEY"===c||"MEALBAR"===c||"HINT"===c})&&a.data.hintActions&&a.guideOpened&&(a.actionSenderBehavior.sendInnerTubeActions(a.data.hintActions,a),a.data.hintActions=void 0)})};
f.prepareHintActions=function(){if(!A("kevlar_nitrate_driven_tooltips")&&this.data.targetId){var a=this.data.targetId;a&&(a=aW(a))&&this.set("data.hintActions",a)}};
f.getIconType=function(a){return a?"yt-icons:"+a.toLowerCase():null};
f.getBadgeIconType=function(a){return a&&a.liveBroadcasting?"live":null};
f.onTap=function(a){this.data.serviceEndpoint?(this.actionSenderBehavior.sendServiceRequestAction([this.data.serviceEndpoint]),a.preventDefault()):this.data.navigationEndpoint&&!GZ(Polymer.dom(a).path||[],this,["A".toString()])&&this.fire("yt-navigate",{endpoint:this.data.navigationEndpoint})};
f.computeActive=function(a,b){return a&&b?a.browseEndpoint&&b.browseEndpoint?A("skip_endpoint_param_comparison")?a.browseEndpoint.browseId===b.browseEndpoint.browseId:a.browseEndpoint.browseId===b.browseEndpoint.browseId&&a.browseEndpoint.params===b.browseEndpoint.params:a.commandMetadata&&a.commandMetadata.webCommandMetadata&&b.commandMetadata&&b.commandMetadata.webCommandMetadata&&a.commandMetadata.webCommandMetadata.url===b.commandMetadata.webCommandMetadata.url?!0:!1:!1};
f.computeIsPrimary=function(a){return!!a};
ea.Object.defineProperties(K9.prototype,{active:{configurable:!0,enumerable:!0,get:function(){return this.data&&this.computeActive(this.data.navigationEndpoint,this.activeEndpoint)}},
isPrimary:{configurable:!0,enumerable:!0,get:function(){return this.computeIsPrimary(this.data.isPrimary)}},
lineEndStyle:{configurable:!0,enumerable:!0,get:function(){return this.data?this.data.badges&&this.getBadgeIconType(this.data.badges)?"badge":"GUIDE_ENTRY_PRESENTATION_STYLE_NEW_CONTENT"===this.data.presentationStyle?"dot":this.data.count?"count":"none":"none"}},
ariaLabel:{configurable:!0,enumerable:!0,get:function(){var a=this.get("data.accessibility.accessibilityData.label");if("none"!==this.lineEndStyle&&a)return a}}});
var L9=K9;L9.prototype.onTap=L9.prototype.onTap;L9.prototype.prepareHintActions=L9.prototype.prepareHintActions;L9.prototype.triggerHintActions=L9.prototype.triggerHintActions;L9.prototype.prepareSubsHintActions_=L9.prototype.prepareSubsHintActions_;v([H(J0.YtComponentBehavior),w("design:type",Object)],L9.prototype,"componentBehavior",void 0);v([H(V.YtRendererBehavior),w("design:type",Object)],L9.prototype,"rendererBehavior",void 0);
v([H(tY.YtTaskEmitterBehavior),w("design:type",Object)],L9.prototype,"taskEmitterBehavior",void 0);v([H(T.YtActionSenderBehavior),w("design:type",Object)],L9.prototype,"actionSenderBehavior",void 0);v([I(),w("design:type",Object)],L9.prototype,"activeEndpoint",void 0);v([I(),w("design:type",Object)],L9.prototype,"data",void 0);v([I(),w("design:type",Boolean)],L9.prototype,"guideOpened",void 0);v([I(),w("design:type",String)],L9.prototype,"type",void 0);
v([I({reflectToAttribute:!0}),sl("data","activeEndpoint"),w("design:type",Boolean),w("design:paramtypes",[])],L9.prototype,"active",null);v([I({reflectToAttribute:!0}),sl("data"),w("design:type",Boolean),w("design:paramtypes",[])],L9.prototype,"isPrimary",null);v([I({reflectToAttribute:!0,value:A("kevlar_background_color_update")}),w("design:type",Boolean)],L9.prototype,"backgroundColorUpdate",void 0);
v([I({reflectToAttribute:!0}),sl("data.count","data.presentationStyle","data.badges.*"),w("design:type",String),w("design:paramtypes",[])],L9.prototype,"lineEndStyle",null);v([sl("lineEndStyle"),w("design:type",Object),w("design:paramtypes",[])],L9.prototype,"ariaLabel",null);v([rl("active","guideOpened"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],L9.prototype,"prepareSubsHintActions_",null);
v([rl("data.hintActions","guideOpened"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],L9.prototype,"triggerHintActions",null);v([rl("data.targetId"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],L9.prototype,"prepareHintActions",null);v([ql("tap"),w("design:type",Function),w("design:paramtypes",[CustomEvent]),w("design:returntype",void 0)],L9.prototype,"onTap",null);
var MHa=L9=v([wY({is:"ytd-guide-entry-renderer",notifyObserversOnUndefined:!0,noInjection:!0})],L9);Polymer({is:"ytd-guide-collapsible-entry-renderer",behaviors:[V.YtRendererBehavior,X,FY],properties:{data:{type:Object},expanded:{type:Boolean,readOnly:!0,reflectToAttribute:!0},initialCount:{type:Number,value:0},activeEndpoint:Object},observers:["observeActiveEndpoint_(data, activeEndpoint, canShowMore)"],itemsPath:"data.expandableItems",stampDom:{shownItems:{id:"expandable-items",mapping:{guideEntryRenderer:{component:"ytd-guide-entry-renderer",properties:{activeEndpoint:"[[activeEndpoint]]"},noInjection:!0}}}},
created:function(){this.userToggled_=!1},
onExpanderItemTapped_:function(a){this._setExpanded(!0);this.userToggled_=!0;this.fillRemainingListItems();a.preventDefault()},
onCollapserItemTapped_:function(a){this._setExpanded(!1);this.userToggled_=!0;a.preventDefault()},
observeActiveEndpoint_:function(a,b){for(var c=this.$["expandable-items"].children,d=0,e=c.length;d<e;d++)c[d].activeEndpoint=b;a&&a.autoExpandCommand&&b&&!this.userToggled_&&(c=this.data.autoExpandCommand,a=!(!c.browseEndpoint||!b.browseEndpoint||c.browseEndpoint.browseId!=b.browseEndpoint.browseId),b=this.get("commandMetadata.webCommandMetadata.url",b),c=this.get("commandMetadata.webCommandMetadata.url",c),a=a||!!(b&&c&&b.includes(c)),this._setExpanded(a),a&&this.fillRemainingListItems())}});var M9=function(){var a=F.apply(this,arguments)||this;a.isGuideRefresh=A("kevlar_guide_refresh");a.actionMap={"yt-add-to-guide-section-action":"handleAddToGuideSectionAction"};return a};
l(M9,F);M9.prototype.attached=function(){this.actionHandlerBehavior.actionMap=this.actionMap};
M9.prototype.configureRendererStamper=function(){return{"data.sectionItems":{id:"section-items",mapping:{guideCollapsibleEntryRenderer:{component:"ytd-guide-collapsible-entry-renderer",noInjection:!0,properties:{activeEndpoint:"[[activeEndpoint]]"}},guideEntryRenderer:{component:"ytd-guide-entry-renderer",noInjection:!0,properties:{activeEndpoint:"[[activeEndpoint]]"}}}}}};
M9.prototype.activeEndpointChanged=function(){if(this.activeEndpoint){this.headerEntry.activeEndpoint=this.activeEndpoint;for(var a=this.sectionItems.children,b=0,c=a.length;b<c;b++)a[b].activeEndpoint=this.activeEndpoint}};
M9.prototype.handleAddToGuideSectionAction=function(a){if(a.addToGuideSectionAction&&this.data){var b=a.addToGuideSectionAction.items;a=a.addToGuideSectionAction.handlerData;if(b&&a&&this.data.handlerDatas&&-1<this.data.handlerDatas.indexOf(a)){a=0;for(var c=b.length;a<c;a++)b[a].guideEntryRenderer&&this.data.sectionItems&&this.splice("data.sectionItems",this.data.sectionItems.length-1,0,b[a])}}};
var N9=M9;N9.prototype.activeEndpointChanged=N9.prototype.activeEndpointChanged;v([H(V.YtRendererBehavior),w("design:type",Object)],N9.prototype,"ytRendererBehavior",void 0);v([H(U.YtActionHandlerBehavior),w("design:type",Object)],N9.prototype,"actionHandlerBehavior",void 0);v([H(X),w("design:type",Object)],N9.prototype,"ytRendererstamperBehavior",void 0);v([tl("#section-items"),w("design:type",HTMLDivElement)],N9.prototype,"sectionItems",void 0);
v([tl("#header-entry"),w("design:type",MHa)],N9.prototype,"headerEntry",void 0);v([I(),w("design:type",Object)],N9.prototype,"data",void 0);v([I(),w("design:type",Object)],N9.prototype,"activeEndpoint",void 0);v([I({reflectToAttribute:!0}),w("design:type",Object)],N9.prototype,"isGuideRefresh",void 0);v([rl("activeEndpoint"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],N9.prototype,"activeEndpointChanged",null);
N9=v([W({is:"ytd-guide-collapsible-section-entry-renderer"})],N9);Polymer({is:"ytd-guide-section-renderer",behaviors:[V.YtRendererBehavior,X,U.YtActionHandlerBehavior,FY,lY.YtdGuideStateAwareBehavior],properties:{data:Object,type:String,initialCount:{type:Number,value:20},targetFramerate:{type:Number,value:10},autoFill:{type:Boolean,value:!0},renderDelay:{type:Number,value:50},isGuideRefresh:{type:Boolean,value:A("kevlar_guide_refresh"),reflectToAttribute:!0}},observers:["activeEndpointChanged_(activeEndpoint)","persistentGuideChanged_(guidePersistentAndVisible)",
"guideOpenedChanged_(guideOpened)","observeForEdu_(data, activeEndpoint)"],actionMap:{"yt-add-to-guide-section-action":"handleAddToGuideSectionAction_","yt-remove-from-guide-section-action":"handleRemoveFromGuideSectionAction_","yt-reset-channel-unread-count-command":"handleResetChannelUnreadCountCommand_"},stampDom:{shownItems:{id:"items",mapping:{guideEntryRenderer:{component:"ytd-guide-entry-renderer",properties:{activeEndpoint:"[[activeEndpoint]]",guideOpened:"[[guideOpened]]",type:"[[type]]"},
noInjection:!0},guideCollapsibleEntryRenderer:{component:"ytd-guide-collapsible-entry-renderer",properties:{activeEndpoint:"[[activeEndpoint]]"},noInjection:!0},guideCollapsibleSectionEntryRenderer:{component:"ytd-guide-collapsible-section-entry-renderer",properties:{activeEndpoint:"[[activeEndpoint]]"},noInjection:!0}}}},observeForEdu_:function(a){A("kevlar_mysubs_edu")&&"subscriptions"==this.type&&a&&(a=this.getInterface(vV))&&(a=(a=a.getCurrentPage())?a.pageSubtype:null,A("kevlar_mysubs_single_guide_section")?(
"home"==a&&this.setEduTarget_(0,"subs-guide-item"),"subscriptions"==a&&A("kevlar_mysubs_enable_filter_by_channel")&&this.setEduTarget_(1,"subs-filter-by-channel")):A("kevlar_mysubs_enable_filter_by_channel")&&"subscriptions"==a&&this.setEduTarget_(0,"subs-filter-by-channel"))},
setEduTarget_:function(a,b){this.data.items&&this.data.items.length>a&&this.data.items[a].guideEntryRenderer&&this.set("data.items."+a+".guideEntryRenderer.targetId",b)},
persistentGuideChanged_:function(a){a||(a=this.sendOptionalAction("yt-get-popup-opened-action",["yt-bubble-hint-renderer"]))&&1==a.length&&a[0]&&this.sendOptionalAction("yt-close-popup-action",["yt-bubble-hint-renderer"])},
handleResetChannelUnreadCountCommand_:function(a){a.resetChannelUnreadCountCommand&&a.resetChannelUnreadCountCommand.channelId&&this.data.items&&(a=this.getPathToEntryMatchingId_(a.resetChannelUnreadCountCommand.channelId))&&(this.set(a+".guideEntryRenderer.count",0),this.set(a+".guideEntryRenderer.presentationStyle","GUIDE_ENTRY_PRESENTATION_STYLE_NONE"))},
getPathToEntryMatchingId_:function(a){if(this.data&&this.data.items){var b=this.getEntryIndexMatchingId_(a,this.data.items);if(-1<b)return"data.items."+b;for(var c=0;c<this.data.items.length;c++)if(b=this.get("guideCollapsibleEntryRenderer.expandableItems",this.data.items[c]))if(b=this.getEntryIndexMatchingId_(a,b),-1<b)return"data.items."+c+".guideCollapsibleEntryRenderer.expandableItems."+b}},
handleAddToGuideSectionAction_:function(a){if(a.addToGuideSectionAction){var b=a.addToGuideSectionAction.items;a=a.addToGuideSectionAction.handlerData;b&&a&&this.data.handlerDatas&&-1<this.data.handlerDatas.indexOf(a)&&(b=b.filter(function(c){return(c=this.get("guideEntryRenderer.entryData.guideEntryData.guideEntryId",c))&&!this.isGuideItemPresent_(c)}.bind(this)),A("kevlar_mysubs_single_guide_section")?(b.unshift("data.items",1,0),this.splice.apply(this,b)):(b.unshift("data.items"),this.unshift.apply(this,
b)))}},
isGuideItemPresent_:function(a){if(this.data&&this.data.items){if(-1!=this.getEntryIndexMatchingId_(a,this.data.items))return!0;var b=this.data.items.find(function(c){return!!c.guideCollapsibleEntryRenderer});
if(b&&b.guideCollapsibleEntryRenderer.expandableItems&&-1!=this.getEntryIndexMatchingId_(a,b.guideCollapsibleEntryRenderer.expandableItems))return!0}return!1},
getEntryIndexMatchingId_:function(a,b){return tb(b,function(c){return this.get("guideEntryRenderer.entryData.guideEntryData.guideEntryId",c)==a}.bind(this))},
handleRemoveFromGuideSectionAction_:function(a){if(a.removeFromGuideSectionAction){var b=a.removeFromGuideSectionAction.guideEntryId;a=a.removeFromGuideSectionAction.handlerData;b&&a&&this.data.handlerDatas&&-1<this.data.handlerDatas.indexOf(a)&&this.data&&this.data.items&&(this.removeFromExpandedSection_(b,this.data.items),this.removeFromCollapsedSection_(b,this.data.items))}},
removeFromExpandedSection_:function(a,b){a=this.getEntryIndexMatchingId_(a,b);-1!=a&&this.splice("data.items",a,1)},
removeFromCollapsedSection_:function(a,b){var c=tb(b,function(d){return!!d.guideCollapsibleEntryRenderer});
-1!=c&&(b=b[c].guideCollapsibleEntryRenderer.expandableItems)&&(a=this.getEntryIndexMatchingId_(a,b),-1!=a&&this.splice("data.items."+c+".guideCollapsibleEntryRenderer.expandableItems",a,1))},
activeEndpointChanged_:function(a){for(var b=this.$.items.children,c=0,d=b.length;c<d;c++)b[c].activeEndpoint=a},
guideOpenedChanged_:function(a){for(var b=this.$.items.children,c=0,d=b.length;c<d;c++)b[c].guideOpened=a}});var O9=function(){return F.apply(this,arguments)||this};
l(O9,F);O9.prototype.onSignInTap=function(){var a=this.ytComponentBehavior.getInterface({});a&&a.signIn()};
ea.Object.defineProperties(O9.prototype,{alignByText:{configurable:!0,enumerable:!0,get:function(){return"STYLE_BLUE_TEXT"===this.get("data.signInButton.buttonRenderer.style")}}});
var P9=O9;v([H(V.YtRendererBehavior),w("design:type",Object)],P9.prototype,"rendererBehaviors",void 0);v([H(J0.YtComponentBehavior),w("design:type",Object)],P9.prototype,"ytComponentBehavior",void 0);v([I(),w("design:type",Object)],P9.prototype,"data",void 0);v([I(),sl("data.signInButton.buttonRenderer.style"),w("design:type",Object),w("design:paramtypes",[])],P9.prototype,"alignByText",null);P9=v([W({is:"ytd-guide-signin-promo-renderer"})],P9);Polymer({is:"ytd-guide-renderer",properties:{data:{type:Object,observer:"dataChanged_"},showFooter_:{type:Boolean,value:!1},autoFill:{type:Boolean,value:!0},isGuideRefresh:{type:Boolean,value:A("kevlar_guide_refresh"),reflectToAttribute:!0}},behaviors:[V.YtRendererBehavior,FY,X],stampDom:{shownItems:{id:"sections",mapping:{guideSectionRenderer:{component:"ytd-guide-section-renderer",noInjection:!0},guideSigninPromoRenderer:{component:"ytd-guide-signin-promo-renderer",noInjection:!0},guideSubscriptionsSectionRenderer:{component:"ytd-guide-section-renderer",
params:{type:"subscriptions"},noInjection:!0}}}},attached:function(){var a=this,b;return Ca(function(c){if(1==c.nextAddress)return(b=a.getInterface(kY))?ta(c,b.setGuideData(a),3):c.jumpTo(0);a.initialCount=2;return c.return()})},
dataChanged_:function(){this.data&&(this.showFooter_=!0)}});var Q9=function(){return F.apply(this,arguments)||this};
l(Q9,F);Q9.prototype.computeActive=function(a,b){return a&&b?a.browseEndpoint&&b.browseEndpoint?a.browseEndpoint.browseId===b.browseEndpoint.browseId&&a.browseEndpoint.params===b.browseEndpoint.params:a.commandMetadata&&a.commandMetadata.webCommandMetadata&&b.commandMetadata&&b.commandMetadata.webCommandMetadata&&a.commandMetadata.webCommandMetadata.url===b.commandMetadata.webCommandMetadata.url?!0:!1:!1};
Q9.prototype.computeTitle=function(a,b){return b?"":this.ytRendererBehavior.getSimpleString(a)};
var R9=Q9;v([H(V.YtRendererBehavior),w("design:type",Object)],R9.prototype,"ytRendererBehavior",void 0);v([I(),w("design:type",Object)],R9.prototype,"data",void 0);v([I(),w("design:type",Object)],R9.prototype,"activeEndpoint",void 0);v([I({reflectToAttribute:!0}),w("design:type",Boolean)],R9.prototype,"noLabels",void 0);v([I({reflectToAttribute:!0,computed:"computeActive(data.navigationEndpoint,activeEndpoint)"}),w("design:type",Boolean)],R9.prototype,"active",void 0);
v([I({reflectToAttribute:!0,value:A("kevlar_background_color_update")}),w("design:type",Boolean)],R9.prototype,"backgroundColorUpdate",void 0);R9=v([W({is:"ytd-mini-guide-entry-renderer"})],R9);Polymer({is:"ytd-mini-guide-renderer",behaviors:[V.YtRendererBehavior,X,lY.YtdGuideStateAwareBehavior],properties:{data:{type:Object,observer:"dataChanged_"},visible:{type:Object,observer:"visibleChanged_"},miniGuideItems_:Object,noLabels_:{type:Boolean,reflectToAttribute:!0,value:A("kevlar_mini_guide_no_labels")},backgroundColorUpdate_:{type:Boolean,reflectToAttribute:!0,value:A("kevlar_background_color_update")}},observers:["activeEndpointChanged_(activeEndpoint)"],stampDom:{miniGuideItems_:{id:"items",
mapping:{guideEntryRenderer:{component:"ytd-mini-guide-entry-renderer",properties:{activeEndpoint:"[[activeEndpoint]]",noLabels:"[[noLabels_]]"},noInjection:!0}}}},visibleChanged_:function(a){a&&!this.data&&(a=this.getInterface(kY))&&a.setGuideData(this)},
dataChanged_:function(){var a=this,b=[];A("kevlar_js_fixes")&&!this.data.items||this.data.items.forEach(function(c){c.guideSectionRenderer&&c.guideSectionRenderer.items.forEach(function(d){(d=d.guideEntryRenderer||a.get("guideCollapsibleSectionEntryRenderer.headerEntry.guideEntryRenderer",d))&&d.isPrimary&&b.push({guideEntryRenderer:d})})});
this.miniGuideItems_=b},
activeEndpointChanged_:function(a){for(var b=this.$.items.children,c=0;c<b.length;c++)b[c].activeEndpoint=a}});var NHa=function(){return F.apply(this,arguments)||this};
l(NHa,F);var S9=NHa;v([H(V.YtRendererBehavior),w("design:type",Object)],S9.prototype,"ytRendererBehavior",void 0);v([I(),w("design:type",Object)],S9.prototype,"data",void 0);S9=v([W({is:"ytd-hotkey-dialog-section-option-renderer"})],S9);var T9=function(){return F.apply(this,arguments)||this};
l(T9,F);T9.prototype.configureRendererStamper=function(){return{"data.options":{id:"options",mapping:{hotkeyDialogSectionOptionRenderer:"ytd-hotkey-dialog-section-option-renderer"}}}};
var U9=T9;v([H(X),w("design:type",Object)],U9.prototype,"ytRendererstamperBehavior",void 0);v([H(V.YtRendererBehavior),w("design:type",Object)],U9.prototype,"ytRendererBehavior",void 0);v([I(),w("design:type",Object)],U9.prototype,"data",void 0);U9=v([W({is:"ytd-hotkey-dialog-section-renderer"})],U9);Polymer({is:"ytd-hotkey-dialog-renderer",hostAttributes:{dialog:!0},behaviors:[X,V.YtRendererBehavior],properties:{data:Object},stampDom:{"data.sections":{id:"sections",mapping:{hotkeyDialogSectionRenderer:"ytd-hotkey-dialog-section-renderer"}}},attached:function(){this.$.scrollable.dialogElement=this.parentElement},
onCloseTap_:function(){this.sendAction("yt-close-popup-action")}});var V9=function(){return F.apply(this,arguments)||this};
l(V9,F);V9.prototype.setTip=function(a){var b=this;this.data&&(this.tip=$Ba(YBa.getInstance(),a,this.data),Polymer.RenderStatus.afterNextRender(this,function(){b.fire("yt-refit")}))};
V9.prototype.clearTip=function(){this.tip=void 0};
V9.prototype.computeHidden=function(a){return!a};
var W9=V9;v([H(V.YtRendererBehavior),w("design:type",Object)],W9.prototype,"ytRendererBehavior",void 0);v([I(),w("design:type",Object)],W9.prototype,"data",void 0);v([I({reflectToAttribute:!0,computed:"computeHidden(tip)",value:!0}),w("design:type",Boolean)],W9.prototype,"hidden",void 0);v([I(),w("design:type",Object)],W9.prototype,"tip",void 0);W9=v([W({is:"ytd-menu-popup-tip-renderer"})],W9);var X9=function(){var a=F.apply(this,arguments)||this;a.useIcons=!1;return a};
l(X9,F);f=X9.prototype;f.onFocus=function(){this.$$("paper-item").focus()};
f.computeText=function(a,b,c){return this.componentBehavior.getSimpleString(a?c:b)};
f.onTap=function(){var a=this.data.isToggled?this.data.toggledServiceEndpoint:this.data.defaultServiceEndpoint;a&&this.ytActionSenderBehavior.sendServiceRequestAction([a])};
f.onYtServiceRequestCompleted=function(){this.set("data.isToggled",!this.data.isToggled)};
f.computeIcon=function(a,b,c){return(a=a?c:b)&&a.iconType?gY(a.iconType):""};
f.computeIconHidden=function(){return this.useIcons?!1:!this.icon};
var Y9=X9;Y9.prototype.onYtServiceRequestCompleted=Y9.prototype.onYtServiceRequestCompleted;Y9.prototype.onTap=Y9.prototype.onTap;Y9.prototype.onFocus=Y9.prototype.onFocus;v([H(V.YtRendererBehavior),w("design:type",Object)],Y9.prototype,"ytRendererBehavior",void 0);v([H(T.YtActionSenderBehavior),w("design:type",Object)],Y9.prototype,"ytActionSenderBehavior",void 0);v([H(J0.YtComponentBehavior),w("design:type",Object)],Y9.prototype,"componentBehavior",void 0);
v([I(),w("design:type",Object)],Y9.prototype,"data",void 0);v([I({reflectToAttribute:!0}),w("design:type",Object)],Y9.prototype,"useIcons",void 0);v([I({reflectToAttribute:!0}),w("design:type",Boolean)],Y9.prototype,"menuRefresh",void 0);v([I({computed:"computeIcon(data.isToggled,data.defaultIcon,data.toggledIcon)",value:""}),w("design:type",String)],Y9.prototype,"icon",void 0);
v([ql("focus"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],Y9.prototype,"onFocus",null);v([ql("tap"),w("design:type",Function),w("design:paramtypes",[CustomEvent]),w("design:returntype",void 0)],Y9.prototype,"onTap",null);v([ql("yt-service-request-completed"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],Y9.prototype,"onYtServiceRequestCompleted",null);Y9=v([W({is:"ytd-toggle-menu-service-item-renderer"})],Y9);Polymer({is:"ytd-menu-popup-renderer",behaviors:[G_.YtEventForwardingBehavior,X,T.YtActionSenderBehavior,V.YtRendererBehavior],properties:{data:Object,veData:Object,ariaLabel:{type:String,reflectToAttribute:!0,readOnly:!0,computed:"computeAriaLabel_(data.menuPopupAccessibility.label)"},useIcons_:{type:Boolean,computed:"computeUseIcons_(data)",reflectToAttribute:!0},menuRefresh_:{type:Boolean,value:function(){return A("kevlar_menu_refresh")},
reflectToAttribute:!0}},listeners:{"yt-popup-opened":"onPopupOpened_","yt-popup-closed":"onPopupClosed_"},stampDom:{"data.items":{id:"items",mapping:{menuNavigationItemRenderer:{component:"ytd-menu-navigation-item-renderer",properties:{useIcons:"[[useIcons_]]",menuRefresh:"[[menuRefresh_]]"}},menuServiceItemRenderer:{component:"ytd-menu-service-item-renderer",properties:{useIcons:"[[useIcons_]]",menuRefresh:"[[menuRefresh_]]"}},menuConditionalNavigationItemRenderer:{component:"ytd-menu-navigation-item-renderer",
properties:{useIcons:"[[useIcons_]]",menuRefresh:"[[menuRefresh_]]"}},menuConditionalServiceItemRenderer:{component:"ytd-menu-service-item-renderer",properties:{useIcons:"[[useIcons_]]",menuRefresh:"[[menuRefresh_]]"}},toggleMenuServiceItemRenderer:{component:"ytd-toggle-menu-service-item-renderer",registration:["defer-on-watch"],properties:{useIcons:"[[useIcons_]]",menuRefresh:"[[menuRefresh_]]"}}}},"data.footer":{id:"footer",mapping:{menuPopupTipRenderer:"ytd-menu-popup-tip-renderer"}}},computeAriaLabel_:function(a){return a},
onPopupOpened_:function(){this.$.items.selected=null;Polymer.dom(this.$.items).children.forEach(function(b){b.popupPositionTarget=this.positionTarget}.bind(this));
var a=this.$$("ytd-menu-popup-tip-renderer");a&&"ytd-menu-popup-tip-renderer"==a.is&&(a.setTip(this.source),this.source=void 0);this.veData&&(a=Wo())&&DS(a,[this.veData])},
onPopupClosed_:function(){var a=this.$$("ytd-menu-popup-tip-renderer");a&&"ytd-menu-popup-tip-renderer"==a.is&&a.clearTip()},
onIronActivate_:function(){this.sendAction("yt-close-popup-action",["ytd-menu-popup-renderer"]);if(this.veData){var a=Wo();a&&Co(a,this.veData,void 0)}},
computeUseIcons_:function(){return A("kevlar_icons_on_menus")&&this.data&&this.data.items?this.data.items.some(function(a){var b=Object.keys(a)[0];return!!a[b].icon}):!1}});var OHa=Be("high_priority_flyout_frequency",1);
Polymer({is:"ytd-notification-topbar-button-renderer",behaviors:[V.YtRendererBehavior,dY,U.YtActionHandlerBehavior,MY.YtButtonBehavior],actionMap:{"yt-broadcast-user-invalidation-action":"updateCount_","yt-update-notifications-unseen-count-action":"handleUpdateNotificationsUnseenCountAction_","yt-handle-high-priority-notification-open-action":"handleHighPriorityNotificationOpenAction_"},listeners:{tap:"onTap_","yt-service-request-completed":"onServiceRequestCompleted_"},properties:{data:{type:Object,
observer:"onDataChanged_"},cachedAction_:Object,unseenCount_:{type:Number,value:0},showHighPriorityNotificationIcon_:{type:Boolean,value:!1},showNotificationCount_:{type:Boolean,computed:"computeShowNotificationCount(unseenCount_, showHighPriorityNotificationIcon_)"}},computeShowNotificationCount:function(a,b){return b?!1:a},
created:function(){this.showTooltips=!0},
attached:function(){this.data&&this.data.updateUnseenCountEndpoint&&this.sendUnseenCountRequest_(this.data.updateUnseenCountEndpoint);navigator&&navigator.serviceWorker&&navigator.serviceWorker.addEventListener("message",r(this.onServiceWorkerMessage_,this))},
onDataChanged_:function(a,b){this.isAttached&&!b&&a&&a.updateUnseenCountEndpoint&&this.sendUnseenCountRequest_(a.updateUnseenCountEndpoint)},
onServiceWorkerMessage_:function(a){"update_unseen_notifications_count_signal"==a.data.type&&this.data&&this.data.updateUnseenCountEndpoint&&this.hasUnseenNotificationCountEndpoint_()&&this.sendUnseenCountRequest_(this.data.updateUnseenCountEndpoint)},
hasUnseenNotificationCountEndpoint_:function(){return!!this.data&&!!this.data.updateUnseenCountEndpoint&&!!this.data.updateUnseenCountEndpoint.signalServiceEndpoint&&"GET_UNSEEN_NOTIFICATION_COUNT"==this.data.updateUnseenCountEndpoint.signalServiceEndpoint.signal},
updateCount_:function(a){if(a&&"NOTIFICATION_BUTTON_STYLE_TYPE_CONVERSATION_DEFAULT"==this.data.style){var b=this.sendOptionalAction("yt-opened-conversation-id-action");b&&1==b.length&&null!=b[0]&&b[0]===a.conversationId||(b=this.sendOptionalAction("yt-check-conversation-inbox-open-action"))&&b.some(function(c){return c})||a.newCount&&this.updateCountUI_(a.newCount)}},
get container(){return this.$.button},computeAccessibility_:function(a){return this.get("accessibility.accessibilityData",a)||null},
handleUpdateNotificationsUnseenCountAction_:function(a){var b=this;!a.updateNotificationsUnseenCountAction||!this.data||"NOTIFICATION_ACTION_UPDATE_UNSEEN_COUNT"!=a.updateNotificationsUnseenCountAction.handlerData&&"NOTIFICATION_BUTTON_STYLE_TYPE_DEFAULT"==this.data.style||"NOTIFICATION_ACTION_UPDATE_CONVERSATION_UNSEEN_COUNT"!=a.updateNotificationsUnseenCountAction.handlerData&&"NOTIFICATION_BUTTON_STYLE_TYPE_CONVERSATION_DEFAULT"==this.data.style||(a.updateNotificationsUnseenCountAction.highPriorityNotificationIcon&&
this.set("showHighPriorityNotificationIcon_",!0),this.maybeFetchHighPriorityNotification(a.updateNotificationsUnseenCountAction.highPriorityNotificationTimestamp||0).then(function(){b.updateCountUI_(a.updateNotificationsUnseenCountAction.unseenCount);0<a.updateNotificationsUnseenCountAction.unseenCount&&(b.cachedAction_=void 0);Fn(Dn,function(){this.sendServiceRequestAction([this.data.updateUnseenCountEndpoint])}.bind(b),a.updateNotificationsUnseenCountAction.timeoutMs)}))},
maybeFetchHighPriorityNotification:function(a){var b=this;return nX("NotificationsDisabled").then(function(c){return A("desktop_notification_high_priority_ignore_push")||!window.Notification||"granted"!=Notification.permission||c?nX("HighPriorityNotificationTimestamp").then(function(d){d||(d=0);if(a>d)b.showHighPriorityNotification(),lX("HighPriorityNotificationShowCount",1).then(function(){lX("HighPriorityNotificationTimestamp",a).then(function(){return Promise.resolve(!0)})});else
return a==d?nX("HighPriorityNotificationShowCount").then(function(e){return e<OHa?(b.showHighPriorityNotification(),lX("HighPriorityNotificationShowCount",++e).then(function(){return Promise.resolve(!0)})):Promise.resolve(!1)}):Promise.resolve(!1)}):Promise.resolve(!1)})},
showHighPriorityNotification:function(){this.data.getHighPriorityNotificationEndpoint&&this.sendServiceRequestAction([this.data.getHighPriorityNotificationEndpoint])},
onTap_:function(){var a=this;this.fire("yt-update-unseen-notification-count",0);this.set("unseenCount_",0);this.set("showHighPriorityNotificationIcon_",!1);var b=this.sendOptionalAction("yt-get-popup-opened-action",["ytd-multi-page-menu-renderer"]),c=this.sendOptionalAction("yt-get-opened-popups-action");(c&&1==c.length?c[0]:[]).some(function(d){return"MULTI_PAGE_MENU_STYLE_TYPE_HIGH_PRIORITY_NOTIFICATION"==a.get("openPopupAction.popup.multiPageMenuRenderer.style",d)})&&(this.sendAction("yt-close-popup-action",
["ytd-multi-page-menu-renderer"]),this.sendServiceRequestAction([this.data.menuRequest]));
b&&1==b.length&&b[0]?this.sendAction("yt-close-popup-action",["ytd-multi-page-menu-renderer"]):this.cachedAction_?this.openPopup(this.cachedAction_):this.data.menuRequest&&this.sendServiceRequestAction([this.data.menuRequest])},
onServiceRequestCompleted_:function(a,b){if(a=b.actions){b=0;for(var c=a.length;b<c;b++){var d=this.get("openPopupAction.popupType",a[b]);if("MULTI_PAGE_MENU_STYLE_TYPE_NOTIFICATIONS"==this.get("openPopupAction.popupType.multiPageMenuRenderer.style",a[b])&&"DROPDOWN"==d){this.cachedAction_=a[b];break}}}},
sendUnseenCountRequest_:function(a){En(function(){this.sendServiceRequestAction([a])}.bind(this))},
updateCountUI_:function(a){this.set("unseenCount_",9>a?a:"9+")},
handleHighPriorityNotificationOpenAction_:function(){"NOTIFICATION_BUTTON_STYLE_TYPE_CONVERSATION_DEFAULT"==this.data.style&&1==this.unseenCount_&&this.set("unseenCount_",0)}});Polymer({is:"yt-pdg-buy-flow-header-renderer",properties:{data:Object}});Polymer({is:"yt-super-vod-buy-flow-content-renderer",behaviors:[V.YtRendererBehavior,X],properties:{data:Object},stampDom:{"data.buyButton":{id:"buy-button",mapping:{buttonRenderer:{component:"ytd-button-renderer"}}}}});Polymer({is:"ytd-pdg-buy-flow-renderer",hostAttributes:{dialog:!0},behaviors:[V.YtRendererBehavior,X,G2],properties:{data:{type:Object}},stampDom:{"data.header":{id:"header",mapping:{pdgBuyFlowHeaderRenderer:{component:"yt-pdg-buy-flow-header-renderer"}}},"data.content":{id:"content",mapping:{superVodBuyFlowContentRenderer:{component:"yt-super-vod-buy-flow-content-renderer"}}}}});var Z9=function(){var a=F.apply(this,arguments)||this;a.isOpen=!1;a.isPlaylistCreated=!1;return a};
l(Z9,F);f=Z9.prototype;f.reset=function(){this.isPlaylistCreated=this.isOpen=!1;this.nameInput.reset();this.privacyInput.reset()};
f.onOpenTap=function(){this.isOpen=!0;this.isPlaylistCreated=!1;this.nameInput.focusTextInput();this.fire("yt-refit")};
f.onCreateTap=function(){!this.isPlaylistCreated&&this.nameInput.validate()&&(this.ytActionSenderBehavior.sendServiceRequestAction([this.data.serviceEndpoint,{create_playlist_title:this.nameInput.value,create_playlist_privacy_status:this.privacyInput.value}]),this.isPlaylistCreated=!0)};
f.onKeydown=function(a){if(13===a.keyCode)this.onCreateTap()};
f.onServiceRequestCompleted=function(a){a.stopPropagation();this.ytActionSenderBehavior.sendAction("yt-close-popup-action",["ytd-add-to-playlist-renderer"])};
var $9=Z9;$9.prototype.onServiceRequestCompleted=$9.prototype.onServiceRequestCompleted;$9.prototype.onKeydown=$9.prototype.onKeydown;v([H(T.YtActionSenderBehavior),w("design:type",Object)],$9.prototype,"ytActionSenderBehavior",void 0);v([H(V.YtRendererBehavior),w("design:type",Object)],$9.prototype,"ytRendererBehavior",void 0);v([H(MY.YtPolymer2AwareBehavior),w("design:type",Object)],$9.prototype,"ytPolymer2AwareBehavior",void 0);v([I(),w("design:type",Object)],$9.prototype,"data",void 0);
v([I(),w("design:type",Object)],$9.prototype,"isOpen",void 0);v([I(),w("design:type",Object)],$9.prototype,"isPlaylistCreated",void 0);v([I({value:{REQUIRED_LABEL:yU("REQUIRED_LABEL",void 0,"Required"),NO_ANGLE_BRACKET_LABEL:yU("NO_ANGLE_BRACKET_LABEL",void 0,"Cannot contain < or >")}}),w("design:type",Object)],$9.prototype,"addToStrings",void 0);v([tl("#privacy-input"),w("design:type",UGa)],$9.prototype,"privacyInput",void 0);
v([tl("#name-input"),w("design:type",Object)],$9.prototype,"nameInput",void 0);v([ql("keydown"),w("design:type",Function),w("design:paramtypes",[KeyboardEvent]),w("design:returntype",void 0)],$9.prototype,"onKeydown",null);v([ql("yt-service-request-completed"),w("design:type",Function),w("design:paramtypes",[CustomEvent]),w("design:returntype",void 0)],$9.prototype,"onServiceRequestCompleted",null);$9=v([W({is:"ytd-add-to-playlist-create-renderer"})],$9);var a$=function(){var a=F.apply(this,arguments)||this;a.addToStrings={ADD_TO_DROPDOWN_LABEL:yU("ADD_TO_DROPDOWN_LABEL",void 0,"Save to...")};a.closeButtonAriaLabel=yU("SBOX_INAPPROPRIATE_CANCEL");a.dialog=A("desktop_add_to_playlist_renderer_dialog_popup");return a};
l(a$,F);a$.prototype.configureRendererStamper=function(){return{"data.playlists":{id:"playlists",mapping:{playlistAddToOptionRenderer:"ytd-playlist-add-to-option-renderer"}},"data.actions":{id:"actions",mapping:{addToPlaylistCreateRenderer:"ytd-add-to-playlist-create-renderer"}}}};
a$.prototype.onPopupOpened=function(){this.toggleClass("scrollable",!0,this.playlists);this.createRenderer&&(A("kevlar_js_fixes")&&!this.createRenderer.reset?xe(Error("createRenderer.reset missing")):this.createRenderer.reset())};
a$.prototype.onPopupClosed=function(){this.toggleClass("scrollable",!1,this.playlists)};
a$.prototype.onTapClose=function(){this.ytActionSenderBehavior.sendAction("yt-close-popup-action",["ytd-add-to-playlist-renderer"])};
var b$=a$;b$.prototype.onPopupClosed=b$.prototype.onPopupClosed;b$.prototype.onPopupOpened=b$.prototype.onPopupOpened;v([H(V.YtRendererBehavior),w("design:type",Object)],b$.prototype,"ytRendererBehavior",void 0);v([H(T.YtActionSenderBehavior),w("design:type",Object)],b$.prototype,"ytActionSenderBehavior",void 0);v([H(G_.YtEventForwardingBehavior),w("design:type",Object)],b$.prototype,"ytEventForwardingBehavior",void 0);v([H(X),w("design:type",Object)],b$.prototype,"ytRendererStamperBehavior",void 0);
v([I(),w("design:type",Object)],b$.prototype,"data",void 0);v([I(),w("design:type",Object)],b$.prototype,"addToStrings",void 0);v([I(),w("design:type",String)],b$.prototype,"closeButtonAriaLabel",void 0);v([I({reflectToAttribute:!0}),w("design:type",Boolean)],b$.prototype,"dialog",void 0);v([tl("#playlists"),w("design:type",HTMLElement)],b$.prototype,"playlists",void 0);v([tl("ytd-add-to-playlist-create-renderer"),w("design:type",Object)],b$.prototype,"createRenderer",void 0);
v([ql("yt-popup-opened"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],b$.prototype,"onPopupOpened",null);v([ql("yt-popup-closed"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],b$.prototype,"onPopupClosed",null);b$=v([W({is:"ytd-add-to-playlist-renderer"})],b$);var c$=function(){return F.apply(this,arguments)||this};
l(c$,F);c$.prototype.dataChanged=function(){this.data&&(this.$.checkbox.checked="ALL"===this.data.containsSelectedVideos)};
c$.prototype.onCheckboxChange=function(a){var b=this;this.data&&this.debounce("yt-playlist-checkbox-changed",function(){var c=Polymer.dom(a).rootTarget.checked?b.data.addToPlaylistServiceEndpoint:b.data.removeFromPlaylistServiceEndpoint;b.ytRendererBehavior.sendServiceRequestAction([c])},100)};
c$.prototype.computeIconType=function(a){return a?"yt-icons:"+a.toLowerCase():null};
var d$=c$;d$.prototype.dataChanged=d$.prototype.dataChanged;v([H(T.YtActionSenderBehavior),w("design:type",Object)],d$.prototype,"ytActionSenderBehavior",void 0);v([H(V.YtRendererBehavior),w("design:type",Object)],d$.prototype,"ytRendererBehavior",void 0);v([I(),w("design:type",Object)],d$.prototype,"data",void 0);v([rl("data"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],d$.prototype,"dataChanged",null);d$=v([W({is:"ytd-playlist-add-to-option-renderer"})],d$);Polymer({is:"ytd-mealbar-promo-renderer",hostAttributes:{dialog:!0},behaviors:[V.YtRendererBehavior],properties:{data:{type:Object},icon_:{type:String,computed:"computeIcon_(data.alternateIcon.iconType)"},hasFullHeightImage_:{type:Boolean,reflectToAttribute:!0,computed:"computeHasFullHeightImage_(data.icon)"}},listeners:{"yt-img-shadow-loaded":"onThumbnailLoaded_"},onDismissTap:function(){this.sendAction("yt-close-popup-action",["ytd-mealbar-promo-renderer"])},
onYtNavigate_:function(){this.sendAction("yt-close-popup-action",["ytd-mealbar-promo-renderer"])},
computeIcon_:function(a){return a?"BACKSTAGE_ARTWORK"==a?"backstage:artwork":a:null},
computeHasFullHeightImage_:function(a){return!!(a&&a.thumbnails&&0<a.thumbnails.length)},
onThumbnailLoaded_:function(){this.fire("yt-refit")}});OY("itemSectionRenderer","redCancelSurveyRenderer","ytd-red-cancel-survey-renderer");
Polymer({is:"ytd-red-cancel-survey-renderer",hostAttributes:{dialog:!0},behaviors:[dY,V.YtRendererBehavior,X],listeners:{"yt-popup-opened":"onPopupOpened_"},properties:{data:{type:Object,observer:"dataChanged_"},selectedResponseIndex_:{type:Number,observer:"onSelectedResponseIndexChange_"}},stampDom:{"data.nextButton":{id:"next-button",mapping:{buttonRenderer:{component:"ytd-button-renderer",attributes:{"dialog-confirm":!0}}}},"data.dismissButton":{id:"dismiss-button",mapping:{buttonRenderer:{component:"ytd-button-renderer",
classListBinding:"[[buttonClass_]]",attributes:{"dialog-dismiss":!0}}}}},created:function(){this.nextNavigationEndpoint_=void 0},
dataChanged_:function(){switch(this.get("data.singleOptions.preselectMode")){case"SINGLE_OPTION_PRESELECT_MODE_LAST":this.selectedResponseIndex_=this.get("data.singleOptions.styles").length-1;break;default:this.selectedResponseIndex_=void 0;}var a=this.get("data.nextButton.buttonRenderer.navigationEndpoint");a&&(this.nextNavigationEndpoint_=a,this.set("data.nextButton.buttonRenderer.navigationEndpoint",void 0))},
onSelectedResponseIndexChange_:function(){if(null!=this.get("data.nextButton.buttonRenderer")){switch(this.get("data.submissionMode")){case"SURVEY_SUBMISSION_MODE_ONE_SELECTED_OPTION":this.set("data.nextButton.buttonRenderer.isDisabled",!Ia(this.selectedResponseIndex_));break;default:this.set("data.nextButton.buttonRenderer.isDisabled",!1);}if(null!=this.selectedResponseIndex_){var a={feedbackTokens:[this.get(["data.singleOptions.styles",this.selectedResponseIndex_]).radioButtonSurveyOptionRenderer.submissionEndpoint.feedbackEndpoint.feedbackToken]};
this.set("nextNavigationEndpoint_.confirmDialogEndpoint.content.confirmDialogRenderer.confirmButton.buttonRenderer.serviceEndpoint.ypcCancelRecurrenceEndpoint.feedbackData",a)}}},
onPopupOpened_:function(a){a.detail==this&&A("enable_premium_voluntary_pause")&&this.sendAction("yt-close-popup-action",["yt-confirm-dialog-renderer"])},
onNextButtonTap_:function(){var a=this.nextNavigationEndpoint_&&this.getNavigationEndpointPopupAction(this.nextNavigationEndpoint_);a&&this.openPopup(a)}});var e$=function(){return F.apply(this,arguments)||this};
l(e$,F);e$.prototype.attached=function(){this.hasAttribute("dialog")||this.setAttribute("dialog","true")};
e$.prototype.configureRendererStamper=function(){return{"data.okayButton":{id:"okay-button",mapping:{buttonRenderer:{component:"ytd-button-renderer",attributes:{"dialog-dismiss":!0}}}}}};
e$.prototype.onDataChanged=function(){var a=this.get("data.headerImage.thumbnails");a&&(a=LY(a,this.clientWidth),this.$.header.style.backgroundImage="url("+a+")");a=Wo();var b=Vo(),c=this.get("data.trackingParams");c&&b&&a&&CS(a,b,go(c));this.querySelectorAll("yt-img-shadow").forEach(function(d){d.onShow()})};
e$.prototype.onPopupClosed=function(a){"ytd-membership-post-cancel-renderer"===Polymer.dom(a).rootTarget.localName&&this.ytActionSenderBehavior.sendAction("ytd-refresh-channel-tab-action",["TAB_ID_SPONSORSHIPS"])};
var f$=e$;f$.prototype.onPopupClosed=f$.prototype.onPopupClosed;v([H(T.YtActionSenderBehavior),w("design:type",Object)],f$.prototype,"ytActionSenderBehavior",void 0);v([H(V.YtRendererBehavior),w("design:type",Object)],f$.prototype,"ytRendererBehavior",void 0);v([H(X),w("design:type",Object)],f$.prototype,"ytRendererstamperBehavior",void 0);v([I({observer:"onDataChanged"}),w("design:type",Object)],f$.prototype,"data",void 0);
v([ql("yt-popup-closed"),w("design:type",Function),w("design:paramtypes",[CustomEvent]),w("design:returntype",void 0)],f$.prototype,"onPopupClosed",null);f$=v([W({is:"ytd-membership-post-cancel-renderer"})],f$);var g$=function(){return F.apply(this,arguments)||this};
l(g$,F);f=g$.prototype;f.configureRendererStamper=function(){return{"data.confirmButton":{id:"confirm-button",mapping:{buttonRenderer:{component:"ytd-button-renderer",properties:{"on-tap":"[[onConfirmTap]]"}}}},"data.feedbackSurvey":{id:"feedback-survey",mapping:{feedbackSurveyRenderer:"ytd-feedback-survey-renderer"}}}};
f.attached=function(){this.hasAttribute("dialog")||this.setAttribute("dialog","true");this.scrollable.dialogElement=this.parentNode;this.onDataChanged()};
f.onYtPopupOpened=function(a,b){b===this&&this.data&&this.data.onOpenCommands&&this.ytActionSenderBehavior.sendInnerTubeActions(this.data.onOpenCommands,this);this.ytActionSenderBehavior.sendAction("yt-close-popups-action",[["ytd-manage-membership-renderer","ytd-membership-offer-renderer"]])};
f.onYtPopupClosed=function(a,b){(b&&!0===b.canceled||b&&!1===b.canceled&&!1===b.confirmed)&&this.data&&this.data.onDismissCommands&&this.ytActionSenderBehavior.sendInnerTubeActions(this.data.onDismissCommands,this)};
f.onYtServiceRequestCompleted=function(){this.ytActionSenderBehavior.sendAction("yt-close-popup-action",["ytd-sponsorship-confirm-cancel-renderer"])};
f.onYtServiceRequestError=function(a){this.ytOpenToastBehavior.openToast(a.detail.error.message)};
f.maybeSubmitFeedback=function(){var a=this.$$("ytd-feedback-survey-renderer");a&&a.submitSurvey()};
f.onDataChanged=function(){if(this.isAttached){var a=this.get("data.header.sponsorshipDialogHeaderRenderer.headerImage.thumbnails");a&&(a=LY(a,this.clientWidth),this.$.header.style.backgroundImage="url(\""+a+"\")")}};
f.onConfirmTap=function(){this.fire("yt-request-feedback-submission")};
var h$=g$;h$.prototype.maybeSubmitFeedback=h$.prototype.maybeSubmitFeedback;h$.prototype.onYtServiceRequestError=h$.prototype.onYtServiceRequestError;h$.prototype.onYtServiceRequestCompleted=h$.prototype.onYtServiceRequestCompleted;h$.prototype.onYtPopupClosed=h$.prototype.onYtPopupClosed;h$.prototype.onYtPopupOpened=h$.prototype.onYtPopupOpened;v([H(V.YtRendererBehavior),w("design:type",Object)],h$.prototype,"ytRendererBehavior",void 0);
v([H(X),w("design:type",Object)],h$.prototype,"ytRendererstamperBehavior",void 0);v([H(G2),w("design:type",Object)],h$.prototype,"ytOpenToastBehavior",void 0);v([H(T.YtActionSenderBehavior),w("design:type",Object)],h$.prototype,"ytActionSenderBehavior",void 0);v([I({observer:"onDataChanged"}),w("design:type",Object)],h$.prototype,"data",void 0);v([I({value:function(){return yU("SBOX_INAPPROPRIATE_CANCEL")}}),
w("design:type",String)],h$.prototype,"closeButtonAriaLabel",void 0);v([tl("#scrollable"),w("design:type",Object)],h$.prototype,"scrollable",void 0);v([ql("yt-popup-opened"),w("design:type",Function),w("design:paramtypes",[CustomEvent,Object]),w("design:returntype",void 0)],h$.prototype,"onYtPopupOpened",null);v([ql("yt-popup-closed"),w("design:type",Function),w("design:paramtypes",[CustomEvent,Object]),w("design:returntype",void 0)],h$.prototype,"onYtPopupClosed",null);
v([ql("yt-service-request-completed"),w("design:type",Function),w("design:paramtypes",[CustomEvent]),w("design:returntype",void 0)],h$.prototype,"onYtServiceRequestCompleted",null);v([ql("yt-service-request-error"),w("design:type",Function),w("design:paramtypes",[CustomEvent]),w("design:returntype",void 0)],h$.prototype,"onYtServiceRequestError",null);
v([ql("yt-request-feedback-submission"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],h$.prototype,"maybeSubmitFeedback",null);h$=v([W({is:"ytd-sponsorship-confirm-cancel-renderer"})],h$);Polymer({is:"ytd-sponsorships-celebration-renderer",hostAttributes:{dialog:!0},behaviors:[T.YtActionSenderBehavior,V.YtRendererBehavior,X],listeners:{"yt-popup-closed":"onPopupClosed_"},properties:{data:{type:Object,observer:"onDataChanged_"},scriptsAppended:{type:Boolean,value:!1}},stampDom:{"data.header.sponsorshipsHeaderRenderer.dismissButton":{id:"dismiss-button",mapping:{buttonRenderer:{component:"ytd-button-renderer",attributes:{"dialog-dismiss":!0}}}},"data.primaryButton":{id:"primary-button",
mapping:{buttonRenderer:{component:"yt-button-renderer",attributes:{"dialog-dismiss":!0}}}},"data.secondaryButton":{id:"secondary-button",mapping:{buttonRenderer:{component:"yt-button-renderer",attributes:{"dialog-dismiss":!0}}}},"data.contents":{id:"content",mapping:{sponsorshipsListTileRenderer:{component:"ytd-sponsorships-list-tile-renderer"}}}},onDataChanged_:function(){var a=this.get("data.header.sponsorshipsHeaderRenderer.backgroundColor");this.$.header.style["background-color"]=tX(a);if(a=
this.get("data.header.sponsorshipsHeaderRenderer.backgroundImage.thumbnails"))a=LY(a,this.width),this.$.header.style["background-image"]="url("+a+")";a=Wo(4);var b=Vo(4),c=this.get("data.trackingParams");c&&b&&a&&CS(a,b,go(c));this.querySelectorAll("yt-img-shadow").forEach(function(d){d.onShow()});
this.setupConversionTracking_()},
setupConversionTracking_:function(){if(!this.scriptsAppended){var a=document.createElement("script");a.async=!0;a.src="https://www.googletagmanager.com/gtag/js?id=AW-758154851";document.body.appendChild(a);a=document.createElement("script");a.innerHTML="window.dataLayer = window.dataLayer || [];\n function gtag(){dataLayer.push(arguments);}\n gtag('js', new Date());\n gtag('config', 'AW-758154851');";document.body.appendChild(a);a=document.createElement("script");a.innerHTML="gtag('event', 'conversion', {'send_to': 'AW-758154851/gA4iCK3u5ZYBEOOMwukC', 'transaction_id': ''});";
document.body.appendChild(a);this.scriptsAppended=!0}},
onPopupClosed_:function(a){"ytd-sponsorships-celebration-renderer"==Polymer.dom(a).rootTarget.localName&&this.sendAction("ytd-refresh-channel-tab-action",["TAB_ID_SPONSORSHIPS"])}});var i$=function(){return F.apply(this,arguments)||this};
l(i$,F);i$.prototype.attached=function(){this.hasAttribute("dialog")||this.setAttribute("dialog","true")};
i$.prototype.onYtPopupOpened=function(){this.offerWithVideoRenderer.resetDialogScrolling()};
i$.prototype.onYtPopupClosed=function(){this.offerWithVideoRenderer.resetOfferVideo()};
var j$=i$;j$.prototype.onYtPopupClosed=j$.prototype.onYtPopupClosed;j$.prototype.onYtPopupOpened=j$.prototype.onYtPopupOpened;v([I(),w("design:type",Object)],j$.prototype,"data",void 0);v([tl("ytd-sponsorships-offer-with-video-renderer"),w("design:type",Object)],j$.prototype,"offerWithVideoRenderer",void 0);v([ql("yt-popup-opened"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],j$.prototype,"onYtPopupOpened",null);
v([ql("yt-popup-closed"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],j$.prototype,"onYtPopupClosed",null);j$=v([W({is:"ytd-sponsorships-offer-renderer"})],j$);Polymer({is:"ytd-sponsorships-offer-with-video-renderer",hostAttributes:{dialog:!0},behaviors:[V.YtRendererBehavior,X,G2],properties:{data:{type:Object,observer:"onDataChanged_"},selectedTier:{type:Number,value:0,notify:!0},offerVideo:{type:String,value:""}},listeners:{"yt-service-request-completed":"onYtServiceRequestCompleted_","yt-service-request-error":"onYtServiceRequestError_"},stampDom:{"data.header.sponsorshipsHeaderRenderer.dismissButton":{id:"dismiss-button",mapping:{buttonRenderer:{component:"ytd-button-renderer",
attributes:{"dialog-dismiss":!0}}}},"data.header.sponsorshipsHeaderRenderer.menuButton":{id:"action-menu",mapping:{menuRenderer:"ytd-menu-renderer"}},"data.alert":{id:"alert-renderer",mapping:{sponsorshipsAlertRenderer:{component:"ytd-sponsorships-alert-renderer"}}}},getTier_:function(a,b){return!a||!a.tiers||0>b?null:a.tiers[b].sponsorshipsTierRenderer},
moreThanOne_:function(a){return!!(a&&1<a.length)},
tierOverviewTap_:function(a){this.set("selectedTier",a.model.index);Polymer.RenderStatus.afterNextRender(this,function(){this.fire("yt-refit")})},
computeSelectedClass_:function(a,b){return a==b?"selected":""},
onYtServiceRequestCompleted_:function(){this.sendAction("yt-close-popup-action",["ytd-sponsorships-offer-renderer"])},
onYtServiceRequestError_:function(a){this.openToast(a.detail.error.message)},
onDataChanged_:function(){this.$["header-overlay"].style.visibility="";this.offerVideo=this.get("data.header.sponsorshipsHeaderRenderer.inlineVideo.sponsorshipsOfferVideoRenderer.externalVideoId");var a=this.get("data.header.sponsorshipsHeaderRenderer.inlineVideo.sponsorshipsOfferVideoRenderer.playerWatchEndpointParams");this.setHeaderBackground_();var b=Wo(),c=Vo(),d=this.get("data.trackingParams");c&&b&&(this.screenLayer=4,b=BS(69877,{clientScreenNonce:b,visualElement:c}),Xo(b,69877,4),c=Vo(4),
d&&c&&(d=go(d),CS(b,c,d),this.offerVideo&&(this.offerVideoVe=ho(74659),CS(b,d,this.offerVideoVe))));this.querySelectorAll("yt-img-shadow").forEach(function(e){e.onShow()});
this.set("selectedTier",0);this.offerVideo&&this.setupVideoPlayer_(this.offerVideo,a)},
detached:function(){this.$.player.stop()},
setHeaderBackground_:function(){var a=this.get("data.header.sponsorshipsHeaderRenderer.backgroundColor");this.$["background-image-layer"].style["background-color"]=tX(a);if(a=this.get("data.header.sponsorshipsHeaderRenderer.backgroundImage.thumbnails"))a=LY(a,this.width),this.$["background-image-layer"].style["background-image"]="url("+a+")"},
setupVideoPlayer_:function(a,b){var c=this,d,e,g,h,m;return Ca(function(n){if(1==n.nextAddress){d=z("FILLER_DATA",{});if(!d||!d.player)return n.return();e=Object.assign({},d.player);e.args=Object.assign({},e.args||{},{autoplay:"0",video_id:a,fs:!1,rel:!1,mute:!1,controls:1,show_miniplayer_button:!1,iv_load_policy:3,player_response:void 0,player_params:b,enablesizebutton:!1,allow_autonav:!1,el:"sponsorshipsoffer"});e.attrs=Object.assign({},e.attrs||{},{id:"ytd-sponsorships-offer-with-video-renderer"+
bb(c)});g=c.$.player;g.update(e);return ta(n,g.getPlayerPromise(),2)}h=n.yieldResult;h.addEventListener("onStateChange",function(p){return c.onPlayerStateChange_(p)});
h.setScreenLayer(c.screenLayer);(m=Wo(4))&&c.offerVideoVe&&zo(bo,m,c.offerVideoVe,void 0);ua(n)})},
onPlayerStateChange_:function(a){1==a?this.pauseOtherPlayers_():0==a&&(this.$["header-overlay"].style.visibility="")},
onHeaderTap_:function(){if(this.offerVideo){this.$["header-overlay"].style.visibility="hidden";this.$.player.play();var a=Wo(4);a&&this.offerVideoVe&&Co(a,this.offerVideoVe,void 0)}},
getBackgroundImageLayerClass_:function(a){return a?"background-image-layer-with-video":"background-image-layer-without-video"},
getHeaderClass_:function(a){return a?"header-with-video":""},
getHeaderOverlayClass_:function(a){return a?"header-overlay-with-video":""},
getTitleContainerClass_:function(a){return a?"title-container-with-video":"title-container-without-video"},
tierTitleDisplayStatus_:function(a){return this.moreThanOne_(a)?"hide":"show"},
pauseOtherPlayers_:function(){var a,b=this.sendOptionalAction("yt-miniplayer-active");b&&b[0]?(b=this.sendOptionalAction("yt-get-miniplayer-component-action"))&&b[0]&&(a=b[0].getPlayerElement()):a=qW(this,!0);a&&a.pause()},
resetOfferVideo:function(){this.$.player.stop()},
resetDialogScrolling:function(){this.$.scrollable.scrollTarget.scrollTop=0},
displayPlayButtonIcon_:function(a){return!!a&&A("sponsorships_offer_video_red_play_button_desktop")}});var k$=function(){return F.apply(this,arguments)||this};
l(k$,F);k$.prototype.getValue=function(){return this.checkbox.checked?this.data.params:void 0};
k$.prototype.computeIsInitiallyChecked=function(a){return 1===a};
var l$=k$;v([H(V.YtRendererBehavior),w("design:type",Object)],l$.prototype,"ytRendererBehavior",void 0);v([I(),w("design:type",Object)],l$.prototype,"data",void 0);v([tl("#checkbox"),w("design:type",Object)],l$.prototype,"checkbox",void 0);l$=v([W({is:"ytd-subscription-toggle-option-renderer"})],l$);Polymer({is:"ytd-subscription-notification-options-renderer",hostAttributes:{dialog:!0},behaviors:[G_.YtEventForwardingBehavior,X,U.YtActionHandlerBehavior,V.YtRendererBehavior],properties:{data:Object,initialIndex_:{type:Number,computed:"computeInitialIndex_(data.options)"}},actionMap:{"yt-signal-action-submit-notification-options-form":"handleSignalActionSubmitNotificationOptionsForm_"},stampDom:{"data.secondaryOptions":{id:"secondary-options",mapping:{subscriptionToggleOptionRenderer:"ytd-subscription-toggle-option-renderer"}},
"data.cancelButton":{id:"cancel-button",mapping:{buttonRenderer:{component:"ytd-button-renderer",attributes:{"dialog-dismiss":!0}}}},"data.confirmButton":{id:"confirm-button",mapping:{buttonRenderer:"ytd-button-renderer"}}},computeInitialIndex_:function(a){for(var b=0;b<a.length;b++)if(a[b].subscriptionRadioOptionRenderer.selected)return b},
handleSignalActionSubmitNotificationOptionsForm_:function(){var a=this.data.options[this.$.options.selected].subscriptionRadioOptionRenderer.serviceEndpoint,b=this.$$("ytd-subscription-toggle-option-renderer");b&&a.modifyChannelNotificationPreferenceEndpoint&&(b=b.getValue())&&(a.modifyChannelNotificationPreferenceEndpoint.secondaryParams=[b]);this.sendServiceRequestAction([a]);this.sendAction("yt-close-popup-action")}});Polymer({is:"ytd-consent-bump-lightbox",behaviors:[V.YtRendererBehavior],listeners:{"iron-overlay-closed":"onIronOverlayClosed_"},getDialog:function(){return this.$.dialog},
getIframe:function(){return this.$.iframe},
onIronOverlayClosed_:function(){var a=qW(this,!0);a&&a.play()}});Polymer({is:"ytd-consent-bump-renderer",behaviors:[V.YtRendererBehavior],properties:{data:{type:Object,observer:"dataChanged_"}},created:function(){this.lightbox_=null},
attached:function(){this.listen(window,"message","onReceivedMessage_");this.lightbox_&&this.fire("yt-add-element-to-app",this.lightbox_);window.ytdConsentBumpRenderer&&(this.data=window.ytdConsentBumpRenderer)},
detached:function(){this.unlisten(window,"message","onReceivedMessage_")},
dataChanged_:function(a){a&&this.async(function(){this.fire("yt-consent-bump-display-changed")});
a&&a.forceConsent?(this.hideConsentBump_(),this.async(this.pausePlayer_.bind(this),1E3),this.openLightbox_()):"true"==Ig.get("HideTicker","false")&&this.hideConsentBump_()},
createLightbox_:function(){var a=document.createElement("ytd-consent-bump-lightbox");a.id="consent-bump";document.body.appendChild(a);this.data&&this.data.forceConsent?a.getDialog().modal=!0:a.getDialog().withBackdrop=!0;this.fire("yt-add-element-to-app",a);return a},
getConsentBumpIcon_:function(a){return a.toLowerCase()},
onReceivedMessage_:function(a){if(!this.lightbox_){var b=this.getLightbox_();if(b)this.lightbox_=b;else return}b=oi(a.origin);if(Sya[b]&&Sya.hasOwnProperty(b)||Ce("consent_url_override"))switch(a.data){case"cb-ui-done-early":case"cb-ui-done":case"cb-already-consented":this.hideConsentBump_();case"cb-user-closed":this.lightbox_.getDialog().close();this.resumePlayer_();break;case"verify-origin":a.source.parent==window&&a.source.postMessage("verify-origin-reply",a.origin);}},
onRemindMeLaterTap_:function(){Wn("HideTicker","true",86400);this.hideConsentBump_()},
onReviewTap_:function(){this.pausePlayer_();this.openLightbox_()},
openLightbox_:function(){var a=this.getLightbox_();a||(a=this.createLightbox_());a.getIframe().src=this.data.iframeUrl;this.lightbox_=a;a.getDialog().open()},
pausePlayer_:function(){var a=qW(this,!0);a&&a.pause()},
hideConsentBump_:function(){this.hidden=!0;this.fire("yt-consent-bump-display-changed")},
resumePlayer_:function(){var a=qW(this,!0);a&&a.play()},
getLightbox_:function(){var a=document.querySelector("ytd-app")||document.querySelector("ytg-app");return a?a.querySelector("#consent-bump"):null}});var PHa=function(){return F.apply(this,arguments)||this};
l(PHa,F);var m$=PHa;v([H(V.YtRendererBehavior),w("design:type",Object)],m$.prototype,"ytRendererBehavior",void 0);v([I(),w("design:type",Object)],m$.prototype,"data",void 0);m$=v([W({is:"ytd-tvfilm-offer-groups-renderer"})],m$);var n$=function(){return F.apply(this,arguments)||this};
l(n$,F);n$.prototype.dataChanged=function(){this.userInput=this.data.couponCode?this.data.couponCode:"";this.validate()};
n$.prototype.onSubmit=function(){var a=this.data.serviceEndpoint;a&&a.ypcGetOffersEndpoint&&(a.ypcGetOffersEndpoint.couponCode=this.userInput,this.ytRendererBehavior.sendServiceRequestAction([a]))};
n$.prototype.validate=function(){var a=!(!this.data||!this.data.couponCode||this.data.couponCode!==this.userInput);this.showTick=a&&!this.data.errorMessage;this.showErrorMessage=a&&!!this.data.errorMessage;this.hideApplyButton=!this.userInput||this.showTick||this.showErrorMessage;this.disableApplyButton=null==this.userInput.match(/^[\d\w]{12}$/)};
var o$=n$;v([H(V.YtRendererBehavior),w("design:type",Object)],o$.prototype,"ytRendererBehavior",void 0);v([H(MY.YtPolymer2AwareBehavior),w("design:type",Object)],o$.prototype,"ytPolymer2AwareBehavior",void 0);v([I({observer:"dataChanged"}),w("design:type",Object)],o$.prototype,"data",void 0);v([I(),w("design:type",String)],o$.prototype,"userInput",void 0);v([I(),w("design:type",Boolean)],o$.prototype,"disableApplyButton",void 0);v([I(),w("design:type",Boolean)],o$.prototype,"hideApplyButton",void 0);
v([I(),w("design:type",Boolean)],o$.prototype,"hideErrorMessage",void 0);v([I(),w("design:type",Boolean)],o$.prototype,"showTick",void 0);v([I(),w("design:type",Boolean)],o$.prototype,"showErrorMessage",void 0);o$=v([W({is:"ytd-ypc-coupon-renderer"})],o$);Polymer({is:"ytd-ypc-offers-overlay-renderer",hostAttributes:{dialog:!0,"aria-label":"Offers"},behaviors:[X,V.YtRendererBehavior],properties:{data:Object},computeThumbnailClass:function(a){return a.thumbnailOverlays?a.isShow?"thumbnail-show":"thumbnail-movie":a.isShow?"thumbnail-no-overlay-show":"thumbnail-no-overlay-movie"},
computeCommerceSectionClass:function(a){return a.offers&&a.offers.tvfilmOffersRenderer?"commerce-section-groups":"commerce-section-tabs"},
computeTitleClass:function(a){return a.offers&&a.offers.tvfilmOffersRenderer?"title-with-offer-groups":""},
onHelpTap_:function(){this.sendAction("yt-help-dialog-requested")},
stampDom:{"data.offers":{id:"offers",mapping:{tvfilmOffersRenderer:{component:"ytd-tvfilm-offer-groups-renderer"}}},"data.coupon":{id:"coupon",mapping:{ypcCouponRenderer:"ytd-ypc-coupon-renderer"}},"data.thumbnailOverlays":{id:"overlays",mapping:{thumbnailOverlayTimeStatusRenderer:"ytd-thumbnail-overlay-time-status-renderer"}}}});var p$=function(){return F.apply(this,arguments)||this};
l(p$,F);f=p$.prototype;
f.onLoad=function(){var a=this;this.updateBackgroundImage(this.data&&this.data.thumbnail);if(!this.isAnimatedYoodleInitialized){this.isAnimatedYoodleInitialized=!0;var b=z("ANIMATED_YOODLE_JS_URL","");var c=!Polymer.Element||window.ShadyDOM&&window.ShadyDOM.noPatch?this.querySelector("#animated-yoodle"):Polymer.dom(this.root).querySelector("#animated-yoodle");QR(b,function(){var d=Sa("yt.www.masthead.AnimatedYoodle.init");d&&d(a.data.animationFrameLength,a.data.animationDuration,a.data.animationDelay,
a.data.stopOnLastFrame,c,a)})}};
f.computeEmptyGif=function(){return"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"};
f.computeUseMapLink=function(a){return"#"+a};
f.computeThumbnailUrl=function(a){a=a&&a.thumbnails?(a=LY(a.thumbnails,110))?wc(Ac(a)):null:null;return a};
f.computeUrlForEndpoint=function(a){return PU(a)};
f.scaleCoords=function(a){if(!a)return"";var b=[];a.split(",").forEach(function(c){b.push(Math.round(.8*Number(c)))});
return b.toString()};
f.updateBackgroundImage=function(a){var b=this.$$("#animated-yoodle");b&&a&&(a=this.computeThumbnailUrl(a),b.style.backgroundImage="url("+a+")",this.data&&this.data.animationFrameLength&&(b.style.backgroundSize=110*this.data.animationFrameLength+"px 30px"))};
var q$=p$;q$.prototype.updateBackgroundImage=q$.prototype.updateBackgroundImage;q$.prototype.computeUseMapLink=q$.prototype.computeUseMapLink;v([H(V.YtRendererBehavior),w("design:type",Object)],q$.prototype,"ytRendererBehavior",void 0);v([I(),w("design:type",Object)],q$.prototype,"data",void 0);v([I(),w("design:type",Boolean)],q$.prototype,"isAnimatedYoodleInitialized",void 0);v([I({value:"doodle"}),w("design:type",String)],q$.prototype,"mapId",void 0);
v([I({computed:"computeUseMapLink(mapId)"}),w("design:type",String)],q$.prototype,"useMapLink",void 0);v([rl("mapId"),w("design:type",Function),w("design:paramtypes",[String]),w("design:returntype",void 0)],q$.prototype,"computeUseMapLink",null);v([rl("data.thumbnail"),w("design:type",Function),w("design:paramtypes",[Object]),w("design:returntype",void 0)],q$.prototype,"updateBackgroundImage",null);q$=v([W({is:"ytd-yoodle-renderer"})],q$);var r$=function(){return F.apply(this,arguments)||this};
l(r$,F);r$.prototype.attached=function(){this.hasAttribute("dialog")||this.setAttribute("dialog","true")};
var s$=r$;v([H(V.YtRendererBehavior),w("design:type",Object)],s$.prototype,"ytRendererBehavior",void 0);v([I(),w("design:type",Object)],s$.prototype,"data",void 0);s$=v([W({is:"ytd-ypc-transaction-error-message-renderer"})],s$);Polymer({is:"ytd-searchbox",behaviors:[V.YtRendererBehavior,T.YtActionSenderBehavior],hostAttributes:{role:"search"},properties:{data:Object,hasFocus:{type:Boolean,value:!1,reflectToAttribute:!0},icon_:{type:String,computed:"computeIcon_(data.icon)"},placeholder_:{type:String,computed:"computePlaceholder_(data.placeholderText, searchInput_)"},searchInput_:{type:Object}},created:function(){this.sboxJsUrl_="";this.searchButton_=this.querySelector("#search-icon-legacy")},
observers:["logSearchboxVisibility_(data.trackingParams)"],attached:function(){var a=this;this.listen(document,"yt-navigate-finish","onYtNavigateFinish_");Polymer.dom(this.$.container).observeNodes(function(b){mb(b.addedNodes,function(c){1==c.nodeType&&"search-input"==c.id&&(this.searchInput_=c.firstElementChild,this.loadSearchbox_(),this.searchInput_.hidden=!1,this.listen(this.searchInput_,"focus","onInputFocus_"),this.listen(this.searchInput_,"blur","onInputBlur_"))},a)})},
focus:function(){this.searchInput_.focus()},
computePlaceholder_:function(a,b){a=a?XU(a):yU("SBOX_PLACEHOLDER",void 0,"Search");b&&(b.placeholder=a,b.setAttribute("aria-label",a));return a},
hideKeyboard:function(){var a=document.getElementById("kbd"),b=document.querySelector(".gsst_a");a&&b&&"none"!=a.style.display&&b.click()},
search_:function(a){var b=this.searchInput_.value;if(b){re("REFINEMENTS_TUPLE",["ClearBySearchbox",[]]);a.feature="web-masthead-search";this.data&&(a.itct=this.data.trackingParams);var c=this.data&&this.data.searchEndpoint;if(c){var d=u.unsafeClone(c);if(d.commandMetadata&&d.commandMetadata.webCommandMetadata.url){var e=Gi(d.commandMetadata.webCommandMetadata.url,"search_query",b);e=e.replace(/%20/g,"+");d.commandMetadata.webCommandMetadata.url=e;c.clickTrackingParams&&(a.itct=c.clickTrackingParams);
this.fire("yt-navigate",{endpoint:d,tempData:a})}else we(Error("SearchEndpoint missing url. Endpoint: "+JSON.stringify(c)))}else xe(Error("SearchEndpoint missing.")),e=Gi("/results","search_query",b),e=e.replace(/%20/g,"+"),this.fire("yt-navigate",{endpoint:{searchEndpoint:{query:b},commandMetadata:{webCommandMetadata:{url:e,rootVe:4724}}},tempData:a});this.previousQuery_=b}return!1},
onYtNavigateFinish_:function(){var a=this,b=location.href;if(0<=b.indexOf("/results")){var c=Ei(b,"q")||Ei(b,"search_query");c&&(this.searchInput_?this.searchInput_.value=c:Polymer.RenderStatus.afterNextRender(this,function(){a.searchInput_.value=c}))}},
initializeSearchbox_:function(){var a=z("SBOX_SETTINGS");a.SBOX_STRINGS={SBOX_REPORT_SUGGESTIONS:yU("SBOX_INAPPROPRIATE_PROMPT",void 0,"Report search predictions")};a.SEARCHBOX_REPORTING=A("searchbox_reporting");a.SEARCHBOX_COMPONENT=this;return(a=Sa("yt.www.masthead.searchbox.initPolymer"))?(a(this.$["search-form"],this.searchInput_,this.$["search-icon-legacy"],this.search_.bind(this)),this.searchInput_.classList.add("ytd-searchbox"),!0):!1},
loadSearchbox_:function(){var a=z("SBOX_JS_URL",this.sboxJsUrl_);a&&(this.sboxJsUrl_=a,this.initializeSearchbox_()||this.setupSearchboxLoad_(a,this.initializeSearchbox_.bind(this)))},
setupSearchboxLoad_:function(a,b){var c=function(){this.cancelSearchboxLoad_();this.sboxJsCallback_=b;QR(a,b);Em([d,e,g,h])};
var d=Fm(this.searchInput_,"mouseover",c.bind(this));var e=Fm(this.searchInput_,"keypress",c.bind(this));var g=Fm(this.searchButton_,"mouseover",c.bind(this));var h=Fm(this.searchButton_,"keypress",c.bind(this))},
cancelSearchboxLoad_:function(){Sa("yt.www.masthead.searchbox.initPolymer")||(SR(this.sboxJsUrl_,this.sboxJsCallback_),this.sboxJsCallback_=null)},
onInputFocus_:function(){this.hasFocus=!0;this.fire("yt-autonav-pause-focus")},
onInputBlur_:function(){this.hasFocus=!1;this.fire("yt-autonav-pause-blur")},
logSearchboxVisibility_:function(a){var b=Wo();b&&a&&zo(bo,b,go(a),void 0)},
openReportForm:function(a){a={openPopupAction:{popup:{searchSuggestionReportDialog:{searchQuery:this.searchInput_.value,title:yU("SBOX_INAPPROPRIATE_TITLE"),suggestions:a,catagoryLabel:yU("SBOX_INAPPROPRIATE_CATEGORY"),catagories:[{id:1,label:yU("SBOX_INAPPROPRIATE_HATEFUL")},{id:2,label:yU("SBOX_INAPPROPRIATE_EXPLICIT")},{id:3,label:yU("SBOX_INAPPROPRIATE_VIOLENT")},{id:4,label:yU("SBOX_INAPPROPRIATE_DANGEROUS")},{id:5,label:yU("SBOX_INAPPROPRIATE_OTHER"),reasonLabel:yU("SBOX_INAPPROPRIATE_REASON")}],
detailsPlaceholderLabel:yU("SBOX_INAPPROPRIATE_ADDITIONAL"),cancelButtonLabel:yU("SBOX_INAPPROPRIATE_CANCEL"),submitButtonLabel:yU("SBOX_INAPPROPRIATE_REPORT")}},popupType:"DIALOG"}};this.sendAction("yt-open-popup-action",[a,this])},
getPreviousQuery:function(){return this.previousQuery_?this.previousQuery_:null},
getRefinementsTuple:function(){if("REFINEMENTS_TUPLE"in qe){var a=z("REFINEMENTS_TUPLE",void 0);re("REFINEMENTS_TUPLE",void 0);return a}return null},
getForm:function(){return this.$["search-form"]}});var t$=function(){var a=F.apply(this,arguments)||this;a.actionMap={"yt-navigate-home-action":"onNavigateHomeAction"};return a};
l(t$,F);f=t$.prototype;f.attached=function(){this.ytActionHandlerBehavior.actionMap=this.actionMap};
f.computeIsRedLogo=function(a){return"YOUTUBE_RED_LOGO"===a||"YOUTUBE_PREMIUM_LOGO"===a};
f.computeTooltipText=function(a){return XU(a)};
f.computeShowYoodle=function(a,b,c){return a&&!!b&&c};
f.computeYoodleData=function(a){return a||null};
f.onNavigateHomeAction=function(){this.$$(".yt-simple-endpoint").click()};
var u$=t$;v([H(U.YtActionHandlerBehavior),w("design:type",Object)],u$.prototype,"ytActionHandlerBehavior",void 0);v([H(V.YtRendererBehavior),w("design:type",Object)],u$.prototype,"ytRendererBehavior",void 0);v([I(),w("design:type",Object)],u$.prototype,"data",void 0);v([I(),w("design:type",String)],u$.prototype,"countryCode",void 0);v([I({value:!1,computed:"computeIsRedLogo(data.iconImage.iconType)"}),w("design:type",Boolean)],u$.prototype,"isRedLogo",void 0);
v([I({computed:"computeTooltipText(data.tooltipText)"}),w("design:type",String)],u$.prototype,"tooltipText",void 0);v([I({computed:"computeYoodleData(data.yoodle)"}),w("design:type",Object)],u$.prototype,"yoodleData",void 0);v([I({value:!1}),w("design:type",Boolean)],u$.prototype,"isWhite",void 0);v([I({value:!1}),w("design:type",Boolean)],u$.prototype,"useYoodle",void 0);v([I({computed:"computeShowYoodle(useYoodle,yoodleData,isWhite)"}),w("design:type",Boolean)],u$.prototype,"showYoodle",void 0);
u$=v([W({is:"ytd-topbar-logo-renderer"})],u$);Polymer({is:"ytd-masthead",behaviors:[Polymer.IronResizableBehavior,bFa,lY.YtdGuideStateAwareBehavior,X,J0.YtComponentBehavior,V.YtRendererBehavior,MY.YtSwatchBehavior],hostAttributes:{role:"banner"},properties:{data:{type:Object,observer:"dataChanged_"},narrow_:{type:Boolean,value:!1,observer:"narrowChanged_"},menuStrings_:{type:Object,value:{BACK_ALT_LABEL:yU("BACK_ALT_LABEL",void 0,"Back"),GUIDE_ALT_LABEL:yU("GUIDE_ALT_LABEL",void 0,"Guide"),LOGO_ALT_LABEL:yU("LOGO_ALT_LABEL",void 0,"YouTube Home"),
SEARCH_ALT_LABEL:yU("SBOX_PLACEHOLDER",void 0,"Search")}},isWhite_:{type:Boolean,value:!0},dark:{type:Boolean,reflectToAttribute:!0}},listeners:{"iron-resize":"onIronResize_","yt-consent-bump-display-changed":"onYtConsentBumpDisplayChanged_","yt-rendererstamper-finished":"onRendererStamperFinished_"},stampDom:{"data.ticker":{id:"ticker",mapping:{consentBumpRenderer:"ytd-consent-bump-renderer"}},"data.interstitial":{id:"interstitial",mapping:{consentBumpRenderer:"ytd-consent-bump-renderer"}},"data.topbarButtons":{id:"buttons",
events:!0,mapping:{buttonRenderer:"ytd-button-renderer",notificationTopbarButtonRenderer:"ytd-notification-topbar-button-renderer",topbarMenuButtonRenderer:"ytd-topbar-menu-button-renderer"},initialRenderPriority:1},"data.a11ySkipNavigationButton":{id:"skip-navigation",mapping:{buttonRenderer:"ytd-button-renderer"}}},created:function(){this.areGhostCardsHidden_=this.isDarkThemeForced=!1},
attached:function(){var a=this,b=lp(ip.getInstance(),"aa");this.toggleClass("shell",!1);if(this.classList.contains("dark")||this.classList.contains("theater"))b||(this.isDarkThemeForced=this.dark=!0),this.toggleClass("dark",!1),this.toggleClass("theater",!1);this.$.logo.hidden=!0;Polymer.Element&&Polymer.RenderStatus.afterNextRender(this,function(){var c=a.getParentRenderer_();c&&c.registerRenderer_(a)})},
forceSetDarkTheme_:function(){this.isDarkThemeForced=!0;this.setSwatch(this.THEATER_MODE_BASE_COLOR)},
dataChanged_:function(a){a&&(a.onReceivedActions&&0<a.onReceivedActions.length&&!this.hasShownCreatorEmailOptInPopup_&&(this.sendInnerTubeActions(a.onReceivedActions,this),this.hasShownCreatorEmailOptInPopup_=!0),!this.hasRenderedWithData_&&a&&(this.hasRenderedWithData_=!0,this.$.logo.hidden=!1,(a=Polymer.dom(this).querySelector("#masthead-logo"))&&Dh(a)))},
onRendererStamperFinished_:function(){this.areGhostCardsHidden_||(this.toggleClass("masthead-finish",!0),this.areGhostCardsHidden_=!0)},
focusGuide:function(){this.$["guide-button"].focus()},
onIronResize_:function(){(this.get("data.interstitial")||this.get("data.ticker"))&&this.fire("yt-masthead-height-changed",{height:this.clientHeight})},
onYtConsentBumpDisplayChanged_:function(){this.fire("yt-masthead-height-changed",{height:this.clientHeight})},
onGuideToggleTap_:function(){this.fire("yt-guide-toggle")},
onGuideToggleHover_:function(){this.fire("yt-guide-hover")},
onSearchCloseClick_:function(){this.showInput=!1},
openOnClickHandler:function(){this.$.search.focus()},
narrowChanged_:function(a){a?a&&this.$.search.hasFocus?this.openOnClick_():this.$.search.hideKeyboard():this.showInput=!1},
showInputChanged:function(a){a||(!A("kevlar_js_fixes")||this.$)&&this.$.search.hideKeyboard()},
closeOnOutsideClickCondition:function(a){for(a=Polymer.dom(a).path;a[0];)if("kbd"==a.shift().id)return!1;return!0}});var QHa={productId:"5047190",bucket:"suggest",enableAnonymousFeedback:!0,flow:"submit",allowNonLoggedInFeedback:!0};function RHa(a,b,c,d,e,g){var h=u.clone(QHa);h.locale=z("SBOX_SETTINGS",{}).REQUEST_LANGUAGE;h.report={description:e||"<empty>"};e=z("SBOX_SETTINGS",{});b=b.join(",");var m=fb();a={choice_cc:d,choice_id_cc:c,choices_sc:b,gl:e.REQUEST_DOMAIN,hl:e.REQUEST_LANGUAGE,query:a,time:m};g&&(a.choice_additional_comment_cc=g);PR(h,a)}
;var v$=function(){return F.apply(this,arguments)||this};
l(v$,F);f=v$.prototype;f.attached=function(){this.hasAttribute("dialog")||this.setAttribute("dialog","true")};
f.dataChanged=function(a){if(void 0!==a){Array.prototype.slice.call(this.querySelectorAll("paper-checkbox")).forEach(function(c){c.checked=!1});
this.catagorySelected=this.suggestionSelected=!1;a=this;!Polymer.Element||window.ShadyDOM&&window.ShadyDOM.noPatch||(a=Polymer.dom(this.root));a.querySelector("paper-radio-group").selected=null;var b=a.querySelector("#reason-text");b&&(b.value=null);a.querySelector("#description-text").value=null}};
f.canSubmit=function(a,b){this.fire("yt-invalidate-popup-tabbables");return!(a&&b)};
f.onCancel=function(){this.ytActionSenderBehavior.sendAction("yt-close-popup-action",["ytd-search-suggestion-report-dialog"])};
f.onSubmit=function(){var a=Array.prototype.slice.call(this.querySelectorAll("paper-checkbox")).filter(function(g){return g.active}).map(function(g){return g.innerText.trim()}),b=this.querySelector("paper-radio-group"),c=b.selectedItem.name,d=b.selectedItem.innerText.trim(),e=b.querySelector("#reason-text");
b=void 0;e&&(b=e.value);(e=this.descriptionText.value)&&(e=e.trim());RHa(this.data.searchQuery,a,c,d,e,b);this.ytActionSenderBehavior.sendAction("yt-close-popup-action",["ytd-search-suggestion-report-dialog"]);this.sendFormSubmitToast()};
f.sendFormSubmitToast=function(){var a={openPopupAction:{popupType:"TOAST",popup:{notificationActionRenderer:{responseText:UU(yU("SBOX_INAPPROPRIATE_TOAST"))}}}};this.ytActionSenderBehavior.sendAction("yt-open-popup-action",[a,this])};
f.onIronChange=function(){this.suggestionSelected=Array.prototype.slice.call(this.querySelectorAll("paper-checkbox")).some(function(a){return a.active})};
f.onIronSelect=function(){this.catagorySelected=!!this.querySelector("paper-radio-group").selected};
var w$=v$;w$.prototype.onIronSelect=w$.prototype.onIronSelect;w$.prototype.onIronChange=w$.prototype.onIronChange;v([H(T.YtActionSenderBehavior),w("design:type",Object)],w$.prototype,"ytActionSenderBehavior",void 0);v([I({observer:"dataChanged"}),w("design:type",Object)],w$.prototype,"data",void 0);v([I({value:!0,computed:"canSubmit(suggestionSelected,catagorySelected)"}),w("design:type",Boolean)],w$.prototype,"submitDisabled",void 0);
v([I(),w("design:type",Boolean)],w$.prototype,"suggestionSelected",void 0);v([I(),w("design:type",Boolean)],w$.prototype,"catagorySelected",void 0);v([tl("#description-text"),w("design:type",Object)],w$.prototype,"descriptionText",void 0);v([ql("iron-change"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],w$.prototype,"onIronChange",null);
v([ql("iron-select"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],w$.prototype,"onIronSelect",null);w$=v([W({is:"ytd-search-suggestion-report-dialog"})],w$);var SHa=[U.YtActionHandlerBehavior,{created:function(){this.popupContainerConfig=null;this.popups_={};this.popupContainerActionMap_={"yt-close-popup-action":"handleClosePopupAction_","yt-close-popups-action":"handleClosePopupsAction_","yt-close-all-popups-action":"handleCloseAllPopupsAction_","yt-get-popup-opened-action":"handleGetPopupOpenedAction_","yt-get-opened-popups-action":"handleGetOpenedPopupsAction_","yt-open-popup-action":"handleOpenPopupAction_","yt-signal-action-close-popup":"handleSignalActionClosePopup_",
"yt-window-scrolled":"windowResizedOrScrolled_","yt-window-resized":"windowResizedOrScrolled_","yt-refit-popups-action":"refitPopups_"};this.narrowMediaQuery_=void 0;this.repositionEventsBound_=!1;this.setPopupVisibilityJobId_=this.setPopupPositioningJobId_=0;this.dynamicallyPositionedElements_=new Set},
attached:function(){this.registerActionMap(this.popupContainerActionMap_);vS(this,!1)},
detached:function(){this.unregisterActionMap(this.popupContainerActionMap_);wS(this)},
windowResizedOrScrolled_:function(){this.setPopupPositioningJobId_||(this.setPopupPositioningJobId_=Fn(Dn,this.setPopupPositioning_.bind(this)));this.setPopupVisibilityJobId_||(this.setPopupVisibilityJobId_=Fn(Dn,this.setPopupVisibility_.bind(this)))},
setPopupPositioning_:function(){this.dynamicallyPositionedElements_.forEach(function(a){a.opened&&a.keepBelowPlayer&&this.ensurePopupBelowPlayer(a)},this);
this.setPopupPositioningJobId_=0},
setPopupVisibility_:function(){for(var a in this.popups_){var b=this.popups_[a];if("refit"==b.popup.scrollAction){var c=b.popup.positionTarget.getBoundingClientRect(),d=b.popup;c=c.top;var e=b;if(!e.naturalHeight_){e.popup.hidden=!1;e.popup.style.position="fixed";e.popup.style.top="0px";e.popup.style.left="0px";var g=e.popup.getBoundingClientRect();e.naturalHeight_=g.bottom-g.top;e.popup.refit()}d.hidden=!(c>=e.naturalHeight_+60);0==b.popupContent.clientHeight&&b.popup.refit()}}this.setPopupVisibilityJobId_=
0},
ensurePopupBelowPlayer:function(){return!1},
initPopupContainerBehavior:function(a){this.popupContainerConfig=a},
handleOpenPopupAction_:function(a,b){var c=a.openPopupAction,d=this.ensurePopup_(c,b);return new Yv(function(e){d.then(function(g){if(!g)return e();this.maybeCreateNarrowMediaQuery_();var h=this.popups_[g.rendererName],m=!(!h||!h.openPopupAction.beReused);m=!!c.reusePopup||m;if(g.popup.opened&&!m){this.handleClosePopupAction_(g.rendererName);if(h&&h.target==b&&!g.openPopupAction.replacePopup)return e();Polymer.RenderStatus.afterNextRender(g.popup,function(){this.completeOpenPopupAction_(c,b,g);e()}.bind(this))}else g.popup.opened?
iDa(g,c):this.completeOpenPopupAction_(c,b,g),e()}.bind(this))}.bind(this))},
completeOpenPopupAction_:function(a,b,c){var d=this.narrowMediaQuery_.queryMatches;c.target=b;b=c.target.popupPositionTarget||c.target;c.popup.positionTarget=b;c.popupContent.positionTarget=b;c.popupConfig_.forceFocus&&(c.popupContent.tabIndex=0,c.popupContent.style.outline="none");c.popupConfig_.narrowProperties&&(c.popup.style.position="static");c.popupConfig_.preventAutonav&&c.popup.setAttribute("prevent-autonav",!0);c.popupConfig_.forceCloseOnOutsideClick&&c.popup.setAttribute("force-close-on-outside-click",
!0);jDa(c,d);kDa(c,c.popupConfig_.styles);c.isRtl_()&&kDa(c,c.popupConfig_.rtlStyles);c.openPopupAction.shouldStopParentSignal||c.popupContent.startForwardingEvents&&c.target.parentComponent!=c.popupContent&&c.popupContent!=c.target&&c.popupContent.startForwardingEvents(c.popupContainerConfig_.forwardedEvents,c.target);iDa(c,a);a=c.popup;this.listen(a,"iron-overlay-opened","onPopupIronOverlayOpened_");this.listen(a,"iron-overlay-closed","onPopupIronOverlayClosed_");this.listen(a,"iron-overlay-canceled",
"onPopupIronOverlayCanceled_");this.listen(a,"yt-refit","refitPopup_");this.listen(a,"yt-invalidate-popup-tabbables","handleInvalidatePopupTabbables_");a.open()},
getPopupDurationMs_:function(a){return 0===a.durationHintMs?a.durationHintMs:Math.max(4E3,a.durationHintMs||4E3)},
handleClosePopupAction_:function(a){a=a?(a=this.popups_[a])&&a.popup:fQ(Polymer.IronOverlayManager);a&&a.close&&a.close()},
handleCloseAllPopupsAction_:function(a){for(var b in this.popups_)a&&a.some(function(c){return c==b})||this.popups_[b].popup.close()},
handleClosePopupsAction_:function(a){a.forEach(function(b){(b=this.popups_[b])&&b.popup.close()}.bind(this))},
handleGetPopupOpenedAction_:function(a){return a&&this.popups_[a]?this.popups_[a].popup.opened:!1},
handleGetOpenedPopupsAction_:function(){var a=[],b;for(b in this.popups_){var c=this.popups_[b];c.popup.opened&&a.push(c)}return a},
handleSignalActionClosePopup_:function(){this.handleCloseAllPopupsAction_()},
ensurePopup_:function(a,b){this.maybeCreateNarrowMediaQuery_();var c=VU(a.popup,"renderer")||VU(a.popup,"dialog");if(!c)return bw();var d=WU(c,eDa(this.popupContainerConfig,c));return se("ENABLE_SELECTIVE_REGISTRATION")?new Yv(function(e){op(ip.getInstance(),d,function(){e(this.getAndMaybeCreatePopup_(a,d,b))}.bind(this))}.bind(this)):bw(this.getAndMaybeCreatePopup_(a,d,b))},
getAndMaybeCreatePopup_:function(a,b,c){if(this.popups_[b])return this.popups_[b];a=new hX({openPopupAction:a,target:c,container:this,popupContainerConfig:this.popupContainerConfig,getElement:this.getElement.bind(this)});return this.popups_[b]=a},
getElement:function(){return null},
maybeCreateNarrowMediaQuery_:function(){this.narrowMediaQuery_||(this.narrowMediaQuery_=document.createElement("iron-media-query"),this.narrowMediaQuery_.query="(max-width: 656px)",this.listen(this.narrowMediaQuery_,"query-matches-changed","openPopupQueryMatchesChanged_"),Polymer.dom(this).appendChild(this.narrowMediaQuery_))},
openPopupQueryMatchesChanged_:function(a){a=a.detail.value;for(var b in this.popups_)jDa(this.popups_[b],a)},
onPopupIronOverlayClosed_:function(a){var b=a.currentTarget,c=b.getContentChildren();c=0<c.length?c[0]:b;a.detail.popup=b;a.detail.popupRenderer=c;c.fire("yt-popup-closed",a.detail);this.unlisten(b,"yt-refit","refitPopup_");this.unlisten(b,"yt-invalidate-popup-tabbables","handleInvalidatePopupTabbables_");this.unlisten(b,"iron-overlay-canceled","onPopupIronOverlayCanceled_");this.unlisten(b,"iron-overlay-closed","onPopupIronOverlayClosed_");this.dynamicallyPositionedElements_.delete(b)},
onPopupIronOverlayCanceled_:function(a,b){var c=Polymer.dom(a).rootTarget,d=c.getContentChildren();(0<d.length?d[0]:c).fire("yt-popup-canceled",a.detail);d=Polymer.dom(b).path;(!b||["click","tap"].includes(b.type))&&!c.hasAttribute("force-close-on-outside-click")&&c.positionTarget&&d&&d.includes(c.positionTarget)&&a.preventDefault();c.restoreFocusOnClose=Polymer.IronA11yKeysBehavior.keyboardEventMatchesKeys(b,"esc")},
onPopupIronOverlayOpened_:function(a){a=a.currentTarget;var b=a.getContentChildren();b=0<b.length?b[0]:a;b.fire("yt-popup-opened",b);a.keepBelowPlayer&&(this.ensurePopupBelowPlayer(a,!0),this.dynamicallyPositionedElements_.add(a));this.unlisten(a,"iron-overlay-opened","onPopupIronOverlayOpened_")},
refitPopup_:function(a){a=a.currentTarget;a.refit&&a.refit()},
refitPopups_:function(){for(var a in this.popups_)this.popups_[a].refit()},
handleInvalidatePopupTabbables_:function(a){a=a.currentTarget;a.invalidateTabbables&&a.invalidateTabbables()}}];var x$=function(){var a=F.apply(this,arguments)||this;a.submitting=!1;a.submitButtonDisabled=!0;a.dialogEndpoint=null;a.submitEndpoint=null;a.navigationEndpoint=null;a.canShowCheckbox=!1;a.canShowAdditionalDetailCheckbox=!1;a.canShowNextButton=!1;a.additionalDetailCheckboxChecked=!1;a.refitJob=0;a.actionMap={"yt-report-form-update":"handleReportFormEndpointUpdateAction","yt-report-form-endpoint-update":"handleReportFormEndpointUpdateAction","yt-confirm-dialog-close-action":"handleConfirmDialogCloseAction",
"yt-modify-report-form-command":"handleModifyReportFormCommand","yt-additional-detail-checkbox-update":"handleAdditionalDetailCheckboxUpdateAction"};return a};
l(x$,F);f=x$.prototype;f.configureRendererStamper=function(){return{"data.legalReportCheckbox":{id:"checkbox-container",mapping:{booleanFormFieldV2Renderer:{component:"yt-boolean-form-field-v2-renderer",noInjection:!0}}},"data.additionalDetailCheckbox":{id:"additional-detail-checkbox-container",mapping:{booleanFormFieldV2Renderer:{component:"yt-boolean-form-field-v2-renderer",noInjection:!0}}}}};
f.created=function(){this.refitJob=0};
f.attached=function(){this.scroller&&(this.scroller.dialogElement=this.parentNode,this.scroller.attached&&"function"===typeof this.scroller.attached&&this.scroller.attached());this.hasAttribute("dialog")||this.setAttribute("dialog","true")};
f.dataChanged=function(a){a&&(this.toggleSubmitButton(!!this.get("data.submitButton.buttonRenderer.isDisabled")),this.set("data.submitButton.buttonRenderer.isDisabled",void 0),this.set("data.nextButton.buttonRenderer.isDisabled",void 0),this.navigationEndpoint=this.submitEndpoint=null,this.additionalDetailCheckboxChecked=this.canShowNextButton=this.canShowAdditionalDetailCheckbox=this.canShowCheckbox=this.hideReportForm=this.submitting=!1,a.legalReportCheckbox&&this.set("data.legalReportCheckbox.booleanFormFieldV2Renderer.value",
!1),a.additionalDetailCheckbox&&this.set("data.additionalDetailCheckbox.booleanFormFieldV2Renderer.value",!1))};
f.onYtPopupOpened=function(){var a=qW(this,!0);a&&a.getPlayerPromise().then(function(b){b.pauseVideo()})};
f.onYtNavigate=function(a){var b=a.detail.endpoint;b&&b.confirmDialogEndpoint&&(a.stopPropagation(),this.hideReportForm=!0)};
f.onYtServiceRequestSent=function(){this.toggleSubmitButton(!0)};
f.onYtServiceRequestCompleted=function(a,b){var c=b.actions;if(c)for(var d=0,e=c.length;d<e;d++)c[d].openPopupAction&&(a.stopPropagation(),this.parentElement.close(),this.openPopupBehavior.openPopup(c[d]));if(b.data&&(a=this.get("feedbackResponses",b.data)))for(b=0;b<a.length;b++)if(a[b].isThumbnailReporting){this.parentElement.close();break}};
f.onYtServiceRequestError=function(){this.toggleSubmitButton(!1)};
f._onDescendantIronResize=function(a){a.stopPropagation();return!1};
f.handleReportFormEndpointUpdateAction=function(a){if(a.submitEndpoint){var b=this.submitEndpoint=a.submitEndpoint;b&&b.flagEndpoint&&b.flagEndpoint.additionalDetailCheckboxChecked&&(b.flagEndpoint.additionalDetailCheckboxChecked=this.additionalDetailCheckboxChecked);this.dialogEndpoint=null;this.toggleSubmitButton(!1)}else a.submitNavigationEndpoint?(this.navigationEndpoint=a.submitNavigationEndpoint,this.dialogEndpoint=null,this.toggleSubmitButton(!1)):a.confirmDialog?(this.navigationEndpoint={confirmDialogEndpoint:{content:{confirmDialogRenderer:a.confirmDialog.confirmDialogRenderer}}},
this.submitEndpoint=null,this.toggleSubmitButton(!1)):this.submitEndpoint=this.navigationEndpoint=null;a.disableSubmitButton&&this.toggleSubmitButton(!0);this.handleModifyReportFormCommand(this.get("clickCommands.0.modifyReportFormCommand",a));this.refit()};
f.handleConfirmDialogCloseAction=function(a){a.confirmed?this.parentElement.close():this.hideReportForm=!1};
f.submitButtonDisabledChanged=function(){this.parentElement&&this.parentElement.invalidateTabbables&&this.parentElement.invalidateTabbables()};
f.handleModifyReportFormCommand=function(a){a=this.get("action",a);"REPORT_FORM_ACTION_LEGAL_CHECKBOX_HIDE"===a?this.canShowCheckbox=!1:"REPORT_FORM_ACTION_LEGAL_CHECKBOX_SHOW"===a?this.canShowCheckbox=!0:"REPORT_FORM_ACTION_ADDITIONAL_DETAIL_CHECKBOX_HIDE"===a?this.canShowAdditionalDetailCheckbox=!1:"REPORT_FORM_ACTION_ADDITIONAL_DETAIL_CHECKBOX_SHOW"===a?this.canShowAdditionalDetailCheckbox=!0:"REPORT_FORM_ACTION_SUBMIT_BUTTON_SHOW"===a?this.canShowNextButton=!1:"REPORT_FORM_ACTION_NEXT_BUTTON_SHOW"===
a&&(this.canShowNextButton=!0);this.refit()};
f.toggleSubmitButton=function(a){this.submitButtonDisabled=!a;this.submitButtonDisabled=a};
f.computeSubmitButtonData=function(a,b,c){var d={};b&&(d.navigationEndpoint=b);c&&(c.urlEndpoint?d.navigationEndpoint=c:d.serviceEndpoint=c);a&&a.buttonRenderer&&u.extend(d,a.buttonRenderer);return d};
f.computeNextButtonData=function(a,b){var c={};if(!a||!a.buttonRenderer)return c;u.extend(c,a.buttonRenderer);b&&(c.serviceEndpoint=cb(b),c.serviceEndpoint.flagEndpoint&&(c.serviceEndpoint.flagEndpoint.legalCheckboxChecked=!0));return c};
f.computeShowNextButton=function(a,b,c){return!!a&&b&&c};
f.refit=function(){var a=this;this.refitJob||(this.refitJob=Fn(Dn,function(){a.fire("yt-refit");a.refitJob=0}))};
f.handleAdditionalDetailCheckboxUpdateAction=function(a){this.additionalDetailCheckboxChecked=a;this.submitEndpoint.flagEndpoint.additionalDetailCheckboxChecked=a};
var y$=x$;y$.prototype.onYtServiceRequestError=y$.prototype.onYtServiceRequestError;y$.prototype.onYtServiceRequestCompleted=y$.prototype.onYtServiceRequestCompleted;y$.prototype.onYtServiceRequestSent=y$.prototype.onYtServiceRequestSent;y$.prototype.onYtNavigate=y$.prototype.onYtNavigate;y$.prototype.onYtPopupOpened=y$.prototype.onYtPopupOpened;v([H(cY.YtOpenPopupBehavior),w("design:type",Object)],y$.prototype,"openPopupBehavior",void 0);
v([H(X),w("design:type",Object)],y$.prototype,"ytRendererstamperBehavior",void 0);v([H(V.YtRendererBehavior),w("design:type",Object)],y$.prototype,"ytRendererBehavior",void 0);v([H(U.YtActionHandlerBehavior),w("design:type",Object)],y$.prototype,"ytActionHandlerBehavior",void 0);v([H(G_.YtEventForwardingBehavior),w("design:type",Object)],y$.prototype,"eventForwardingBehavior",void 0);v([H(Polymer.IronResizableBehavior),w("design:type",Object)],y$.prototype,"ironResizableBehavior",void 0);
v([I({observer:"dataChanged"}),w("design:type",Object)],y$.prototype,"data",void 0);v([I(),w("design:type",Object)],y$.prototype,"submitting",void 0);v([I({observer:"submitButtonDisabledChanged"}),w("design:type",Object)],y$.prototype,"submitButtonDisabled",void 0);v([I(),w("design:type",Object)],y$.prototype,"dialogEndpoint",void 0);v([I(),w("design:type",Object)],y$.prototype,"submitEndpoint",void 0);v([I(),w("design:type",Object)],y$.prototype,"navigationEndpoint",void 0);
v([I({reflectToAttribute:!0}),w("design:type",Boolean)],y$.prototype,"hideReportForm",void 0);v([I(),w("design:type",Object)],y$.prototype,"canShowCheckbox",void 0);v([I(),w("design:type",Object)],y$.prototype,"canShowAdditionalDetailCheckbox",void 0);v([I(),w("design:type",Object)],y$.prototype,"canShowNextButton",void 0);v([I(),w("design:type",Object)],y$.prototype,"additionalDetailCheckboxChecked",void 0);v([I(),w("design:type",Object)],y$.prototype,"refitJob",void 0);
v([tl("#scroller"),w("design:type",Object)],y$.prototype,"scroller",void 0);v([ql("yt-popup-opened"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],y$.prototype,"onYtPopupOpened",null);v([ql("yt-navigate"),w("design:type",Function),w("design:paramtypes",[CustomEvent]),w("design:returntype",void 0)],y$.prototype,"onYtNavigate",null);
v([ql("yt-service-request-sent"),w("design:type",Function),w("design:paramtypes",[CustomEvent,aY]),w("design:returntype",void 0)],y$.prototype,"onYtServiceRequestSent",null);v([ql("yt-service-request-completed"),w("design:type",Function),w("design:paramtypes",[CustomEvent,bY]),w("design:returntype",void 0)],y$.prototype,"onYtServiceRequestCompleted",null);
v([ql("yt-service-request-error"),w("design:type",Function),w("design:paramtypes",[CustomEvent]),w("design:returntype",void 0)],y$.prototype,"onYtServiceRequestError",null);y$=v([wY({is:"yt-report-form-modal-renderer",notifyObserversOnUndefined:!1,noInjection:!0})],y$);Polymer({is:"yt-boolean-form-field-v2-renderer",behaviors:[V.YtRendererBehavior,U.YtActionHandlerBehavior],properties:{data:Object},onCheckedChanged_:function(){if(this.data){var a=this.$.checkbox.checked;"yt-external-links-checkbox"===this.data.identifier?this.sendAction("yt-additional-detail-checkbox-update",[a]):a&&this.data.enableCommand?this.sendAction("yt-modify-report-form-command",[this.data.enableCommand.modifyReportFormCommand]):!a&&this.data.disableCommand&&this.sendAction("yt-modify-report-form-command",
[this.data.disableCommand.modifyReportFormCommand])}},
onLabelTap_:function(a){"A"!=a.target.tagName&&(this.$.checkbox.checked=!this.$.checkbox.checked)}});Polymer({is:"yt-tooltip-renderer",behaviors:[V.YtRendererBehavior,G_.YtEventForwardingBehavior,X],properties:{data:Object,positionType:{type:String,reflectToAttribute:!0},hasButtons_:{type:Boolean,value:!1,reflectToAttribute:!0,computed:"computeHasButtons_(data)"},boundOnTap_:{type:Function,value:function(){return this.onTap_.bind(this)}}},
observers:["observeImpressionEndpoints_(data.promoConfig.impressionEndpoints)"],stampDom:{"data.dismissButton":{id:"dismiss-button",mapping:{buttonRenderer:{component:"yt-button-renderer",properties:{"on-tap":"[[boundOnTap_]]"}}}},"data.acceptButton":{id:"accept-button",mapping:{buttonRenderer:{component:"yt-button-renderer",properties:{"on-tap":"[[boundOnTap_]]"}}}}},computeHasButtons_:function(a){return!(!a.dismissButton&&!a.acceptButton)},
computeStyle_:function(a){return a||"BUBBLE_HINT_STYLE_UNKNOWN"},
observeImpressionEndpoints_:function(){var a=this;this.data&&this.data.promoConfig&&this.data.promoConfig.impressionEndpoints&&this.data.promoConfig.impressionEndpoints.forEach(function(b){b.clickTrackingParams&&delete b.clickTrackingParams;a.sendServiceRequestAction([b])})},
onTap_:function(){this.sendAction("yt-close-popup-action",["yt-tooltip-renderer"])}});Polymer({is:"yt-sharing-embed-renderer",hostAttributes:{dialog:!0},behaviors:[X,V.YtRendererBehavior,U.YtActionHandlerBehavior],properties:{data:Object,embedCode_:{type:String,computed:"computeEmbedCode_(data.videoId, startAtTimeStamp_, startAtChecked_, isPlayerControlsOptionChecked_, isPrivacyModeOptionChecked_)"},isPlayerControlsOptionChecked_:{type:Boolean,value:!0},isPrivacyModeOptionChecked_:{type:Boolean,value:!1},startAtChecked_:{type:Boolean,value:!1,notify:!0},startAtTimeStamp_:{type:String,
value:0}},listeners:{"yt-popup-closed":"onYtPopupClosed_"},actionMap:{"yt-signal-action-copy-share-embed-url":"handleSignalActionCopyShareEmbedUrl_","yt-share-panel-set-timestamp-action":"handleSetTimestamp_"},stampDom:{"data.actionButtons":{id:"action-buttons",mapping:{buttonRenderer:"yt-button-renderer"}},"data.startAt":{id:"start-at",mapping:{startAtRenderer:"yt-start-at-renderer"}}},ready:function(){this.$["embed-code"].addEventListener("tap",this.onEmbedCode_.bind(this))},
computeEmbedCode_:function(a,b,c,d,e){a=(e?"https://www.youtube-nocookie.com/embed/":"https://www.youtube.com/embed/")+a;e=[];d||e.push("controls=0");c&&0<b&&e.push("start="+b);b=0<e.length?a+"?"+e.join("&"):a;Polymer.dom(this.$["video-preview"]).innerHTML=this.getEmbedCode_(b,854,480);return this.getEmbedCode_(b,560,315)},
getEmbedCode_:function(a,b,c){return"<iframe width=\""+b+"\" height=\""+c+"\" src=\""+a+"\" frameborder=\"0\" allow=\"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen></iframe>"},
handleSignalActionCopyShareEmbedUrl_:function(){this.$["embed-code"].inputElement.textarea.select();document.execCommand("copy");gV("EMBED",this.data.videoId)},
handleSetTimestamp_:function(a){this.startAtTimeStamp_=(this.startAtChecked_=a.isSet)?a.timestamp:0},
closePanel_:function(){this.sendAction("yt-close-popup-action",["yt-sharing-embed-renderer"])},
onEmbedCode_:function(){this.$["embed-code"].inputElement.textarea.select();gV("EMBED",this.data.videoId)},
onYtPopupClosed_:function(){zh(this.$["video-preview"])}});Polymer({is:"yt-sharing-renderer",behaviors:[ZX.YtPlayerListenerBehavior,G_.YtEventForwardingBehavior,X,U.YtActionHandlerBehavior,MY.YtPolymer2AwareBehavior,V.YtRendererBehavior],properties:{data:Object,player_:{type:Object,value:null},startAtChecked_:{type:Boolean,value:!1,notify:!0},currentTime_:Number,startAtTimeStamp_:{type:String,computed:"computeHumanReadableTimeStamp_(currentTime_)",notify:!0},timeStampParam_:{type:String,computed:"computeTimeStampParam_(startAtTimeStamp_)"},shareUrl_:{type:String,
computed:"computeShareURL_(data.sharingRenderer.shortUrl, timeStampParam_, startAtChecked_)"},url_:{type:String,computed:"computeURL_(data)"},menuStrings_:{type:Object,value:{SHARE_LABEL:yU("SHARE_LABEL",void 0,"Share")}},emailTarget_:{type:String,computed:"computeEmailShareLink_(shareUrl_)"}},listeners:{"yt-popup-opened":"onPopupOpened_","yt-popup-closed":"onPopupClosed_"},actionMap:{"yt-signal-action-copy-share-url":"handleSignalActionCopyShareUrl_"},stampDom:{"data.sharingRenderer.actionButtons":{id:"action-buttons",
mapping:PY("sharingRendererButtons")}},ready:function(){this.$["share-url"].addEventListener("tap",this.onShareUrlTap_.bind(this));this.$.email.addEventListener("tap",this.onEmailTap_.bind(this))},
attached:function(){this.currentTime_=0},
onPopupOpened_:function(){var a=this;this.$["share-url"].inputElement.select();var b=qW(this);b&&(this.disposePlayerEvents_(),b.getPlayerPromise().then(function(c){a.listenToPlayerEvent(c,"onVideoProgress",a.updateTime_);a.updateTime_(c.getCurrentTime());a.player_=c}))},
onPopupClosed_:function(){this.disposePlayerEvents_();this.$["start-at-option"].checked=!1},
updateTime_:function(a){this.currentTime_=a},
computeHumanReadableTimeStamp_:function(a){a+="";var b=Math.floor(a/3600),c=Math.floor(a%3600%60);return(0<b?b+":":"")+wd(Math.floor(a%3600/60),0<b?2:1)+":"+wd(c,2)},
computeURL_:function(a){return a.sharingRenderer.shortUrl},
computeShareURL_:function(a,b,c){c&&b&&(a=Bi(a,"t",b));return a},
computeTimeStampParam_:function(a){return xEa(a)},
onStartAtChange_:function(){this.$["start-at-timestamp"].disabled=!this.startAtChecked_},
disposePlayerEvents_:function(){this.player_&&this.unlistenFromPlayerEvent(this.player_,"onVideoProgress",this.updateTime_)},
getIconName_:function(a){return"socialNetworks:"+a.toLowerCase()},
handleSignalActionCopyShareUrl_:function(){this.$["share-url"].inputElement.select();document.execCommand("copy");this.getVideoId_()&&gV("COPY_PASTE",this.getVideoId_())},
computeEmailShareLink_:function(a){return"mailto:?body="+a},
onShareUrlTap_:function(){this.$["share-url"].inputElement.select();this.getVideoId_()&&gV("COPY_PASTE",this.getVideoId_())},
onEmailTap_:function(){this.getVideoId_()&&gV("EMAIL",this.getVideoId_())},
getVideoId_:function(){if(this.player_)return this.player_.getVideoData().video_id},
onStartAtTimeStampChanged_:function(){var a=this.$["start-at-timestamp"].value.split(":");this.currentTime_=3==a.length?3600*Number(a[0])+Number(60*a[1])+Number(a[2]):2==a.length?60*Number(a[0])+Number(a[1]):Number(a[0])}});var z$={YtUnlimitedFamilyInterstitialBehaviorImpl_:{actionMap:{"yt-signal-action-show-previous-family-dialog":"handleSignalActionShowPreviousFamilyDialog_","yt-open-popup-action":"handleOpenPopupAction_"},listeners:{"yt-popup-closed":"onPopupClosed_"},created:function(){window.familyDialogHistory||(window.familyDialogHistory=[]);this.dialogHistory_=window.familyDialogHistory;this.showingPreviousDialog_=!1},
maybeCloseDialogOnFooterButtonTap:function(a){return fi(Polymer.dom(a).rootTarget,"yt-button-renderer").hasAttribute("footer-button")?(this.parentElement.close(),!0):!1},
pushToHistory:function(a){this.dialogHistory_.push(a)},
popFromHistory:function(){return this.dialogHistory_.pop()},
handleSignalActionShowPreviousFamilyDialog_:function(){var a=this.popFromHistory();if(a){var b={openPopupAction:{popupType:"DIALOG",popup:{}}};b.openPopupAction.popup[a.renderer]=a.data;this.showingPreviousDialog_=!0;this.openPopup(b)}},
handleOpenPopupAction_:function(a){if(this.showingPreviousDialog_)this.showingPreviousDialog_=!1;else{var b=["unlimitedFamilyMessageInterstitialRenderer","unlimitedFamilyProfileInterstitialRenderer"].some(function(d){return!!a.openPopupAction.popup[d]}),c=this.getElementName_();
b&&this.data&&(this.pushToHistory({renderer:c,data:this.data}),this.parentElement.close())}},
getElementName_:function(){var a=this.nodeName.split("-").slice(1).map(function(b){return b[0].toUpperCase()+b.slice(1).toLowerCase()}).join("");
return a[0].toLowerCase()+a.slice(1)}}};
z$.YtUnlimitedFamilyInterstitialBehavior=[cY.YtOpenPopupBehavior,U.YtActionHandlerBehavior,z$.YtUnlimitedFamilyInterstitialBehaviorImpl_];Polymer({is:"yt-unlimited-family-message-interstitial-renderer",hostAttributes:{dialog:!0},behaviors:[G_.YtEventForwardingBehavior,X,z$.YtUnlimitedFamilyInterstitialBehavior,V.YtRendererBehavior],properties:{data:{type:Object,observer:"dataChanged_"},loading:{reflectToAttribute:!0,type:Boolean,value:!1}},listeners:{"yt-navigate":"onYtNavigate_","yt-service-request-completed":"onYtServiceRequestCompleted_","yt-service-request-sent":"onYtServiceRequestSent_","yt-popup-opened":"openPopupHandler_","yt-popup-closed":"closePopupHandler_"},
stampDom:{"data.actionButton":{id:"action-button",mapping:{buttonRenderer:{component:"yt-button-renderer",attributes:{"footer-button":!0}}}},"data.dismissButton":{id:"dismiss-button",mapping:{buttonRenderer:{component:"yt-button-renderer",attributes:{"dialog-dismiss":!0,"footer-button":!0}}}}},attached:function(){this.sendAction("yt-register-create-family-dialog");this.$.thumbnail.onShow()},
onYtNavigate_:function(a){var b=a.detail.endpoint;b.unlimitedCreateFamilyEndpoint?(this.loading=!0,this.sendAction("yt-open-create-family-dialog",[b.unlimitedCreateFamilyEndpoint,this.unicornReadyCallback_.bind(this)]),a.stopPropagation()):this.maybeCloseDialogOnFooterButtonTap(a)},
onYtServiceRequestSent_:function(a,b){b&&b.endpoint&&b.endpoint.signalServiceEndpoint||(this.loading=!0)},
onYtServiceRequestCompleted_:function(){this.parentElement.close&&this.parentElement.close();this.loading=!1},
openPopupHandler_:function(a){a.detail==this&&this.data.onOpenCommands&&this.sendInnerTubeActions(this.data.onOpenCommands,this)},
closePopupHandler_:function(a,b){(b&&!0===b.canceled||b&&!1===b.canceled&&!1===b.confirmed)&&this.data.onDismissCommands&&this.sendInnerTubeActions(this.data.onDismissCommands,this)},
dataChanged_:function(){this.loading=!1},
unicornReadyCallback_:function(){this.parentElement.close&&this.parentElement.close();this.loading=!1}});Polymer({is:"yt-unlimited-family-profile-interstitial-renderer",hostAttributes:{dialog:!0},properties:{data:Object,mainThumbnailWidth_:{type:Number,computed:"computeMainThumbnailWidth_(data.secondaryThumbnails)"},boundButtonTap_:{type:Function,value:function(){return this.onButtonTap_.bind(this)}}},
behaviors:[X,V.YtRendererBehavior,z$.YtUnlimitedFamilyInterstitialBehavior],stampDom:{"data.actionButton":{id:"action-button",mapping:{buttonRenderer:{component:"yt-button-renderer",attributes:{"footer-button":!0},properties:{"on-tap":"[[boundButtonTap_]]"}}}},"data.dismissButton":{id:"dismiss-button",mapping:{buttonRenderer:{component:"yt-button-renderer",attributes:{"dialog-dismiss":!0,"footer-button":!0}}}},"data.manageButton":{id:"manage-button",mapping:{buttonRenderer:"yt-button-renderer"}}},
attached:function(){Polymer.dom(this.root).querySelectorAll(".secondary-thumbnail").forEach(function(a){a.onShow()});
this.$["main-thumbnail"].onShow()},
onButtonTap_:function(a){this.maybeCloseDialogOnFooterButtonTap(a)},
computeMainThumbnailWidth_:function(a){return a&&0!==a.length?72:96}});Polymer({is:"yt-unplugged-pause-membership-dialog-renderer",hostAttributes:{dialog:!0},behaviors:[U.YtActionHandlerBehavior,T.YtActionSenderBehavior,V.YtRendererBehavior,X],listeners:{"yt-popup-closed":"closePopupHandler_","yt-popup-opened":"onPopupOpened_","yt-service-request-completed":"onYtServiceRequestCompleted","yt-service-request-sent":"onYtServiceRequestSent"},properties:{data:{type:Object,observer:"dataChanged_"},loading:{reflectToAttribute:!0,type:Boolean,value:!1},selectIndexMax_:Number,
selectedData_:Object,sliderAriaLabel_:{type:String,value:null},onButtonTap_:{type:Function,value:function(){return this.onSubmitTap_.bind(this)}},
onSecondaryTap_:{type:Function,value:function(){return this.onExitButtonTap_.bind(this)}}},
stampDom:{"data.primaryButton":{id:"primary-button",mapping:{buttonRenderer:{component:"yt-button-renderer",properties:{"on-tap":"[[onButtonTap_]]"}}}},"data.secondaryButton":{id:"secondary-button",mapping:{buttonRenderer:{component:"yt-button-renderer",attributes:{"dialog-dismiss":!0},properties:{"on-tap":"[[onSecondaryTap_]]"}}}}},onPopupOpened_:function(a){a.detail==this&&A("enable_premium_voluntary_pause")&&(this.sendAction("yt-close-popup-action",["yt-confirm-dialog-renderer"]),this.handleOnOpenCommands_())},
created:function(){this.selectedIndex_=0},
setDialogData:function(a){this.data=a;this.resetSlider_()},
dataChanged_:function(){this.data&&this.resetSlider_()},
onSubmitTap_:function(){if(this.data.confirmCommand){var a=this.data.confirmCommand;a.ypcPauseSubscriptionCommand&&this.sendServiceRequestAction([a,{resume_time_ms:parseInt(this.selectedData_.resumeTimeMs,10)}])}},
onExitButtonTap_:function(){this.sendAction("yt-close-popup-action",["yt-unplugged-pause-membership-dialog-renderer"])},
closePopupHandler_:function(a,b){(b&&!0===b.canceled||!1===b.canceled&&!1===b.confirmed)&&this.handleOnDismissCommands_()},
onSliderChange_:function(){this.selectedIndex_=this.$["id-pause-slider"].immediateValue;this.updateUiState_()},
updateUiState_:function(){this.data&&(this.selectedData_=this.data.endOptions[this.selectedIndex_],this.setSliderAriaLabel_())},
setSliderAriaLabel_:function(){this.selectedData_&&(this.sliderAriaLabel_=this.selectedData_.accessibilityData.label)},
resetSlider_:function(){if(this.data){var a=this.data.defaultEndOptionIndex||0,b=this.$["id-pause-slider"];if(b.immediateValue<a)for(;b.immediateValue!=a;)b.increment();else if(a<b.immediateValue)for(;b.immediateValue!=a;)b.decrement();this.selectedIndex_=a;this.selectIndexMax_=this.data.endOptions.length-1;this.updateUiState_()}},
handleOnOpenCommands_:function(){this.data&&this.data.onOpenCommands&&this.data.onOpenCommands&&this.sendInnerTubeActions(this.data.onOpenCommands,this)},
handleOnDismissCommands_:function(){this.data&&this.data.onDismissCommands&&this.data.onDismissCommands&&this.sendInnerTubeActions(this.data.onDismissCommands,this)},
onYtServiceRequestSent:function(){this.loading=!0},
onYtServiceRequestCompleted:function(){this.parentElement.close&&this.parentElement.close();this.loading=!1}});Polymer({is:"yt-ypc-upgrade-dialog-renderer",hostAttributes:{dialog:!0},behaviors:[V.YtRendererBehavior,X,G2],properties:{data:{type:Object},showSpinner:{type:Boolean,value:!1},continueButtonTapped:{type:Boolean,value:!1},bindOnContinueTapped_:{type:Function,value:function(){return this.onContinueTapped_.bind(this)}}},
listeners:{"yt-service-request-completed":"onYtServiceRequestCompleted_","yt-service-request-error":"onYtServiceRequestError_","yt-popup-closed":"onYtPopupClosed_","yt-popup-opened":"onYtPopupOpened_"},stampDom:{"data.continueButton":{id:"continue-button",mapping:{buttonRenderer:{component:"yt-button-renderer",properties:{"on-tap":"[[bindOnContinueTapped_]]"}}}},"data.cancelButton":{id:"cancel-button",mapping:{buttonRenderer:{component:"yt-button-renderer",attributes:{"dialog-dismiss":!0}}}}},attached:function(){this.$.scrollable.dialogElement=
this.parentNode},
onYtServiceRequestCompleted_:function(){this.set("showSpinner",!1);this.sendAction("yt-close-popup-action",["yt-ypc-upgrade-dialog-renderer"])},
onYtPopupOpened_:function(a,b){b==this&&this.data.onOpenCommands&&this.sendInnerTubeActions(this.data.onOpenCommands,this)},
onYtPopupClosed_:function(a,b){this.continueButtonTapped||b&&(!0===b.canceled||!1===b.canceled&&!1===b.confirmed)&&this.data.onDismissCommands&&this.sendInnerTubeActions(this.data.onDismissCommands,this)},
onYtServiceRequestError_:function(a){this.set("showSpinner",!1);this.openToast(a.detail.error.message)},
onContinueTapped_:function(){this.set("continueButtonTapped",!0);A("enable_ypc_spinners")?this.sendAction("yt-close-popup-action",["yt-ypc-upgrade-dialog-renderer"]):this.set("showSpinner",!0)}});Polymer({is:"yt-bubble-hint-renderer",behaviors:[V.YtRendererBehavior,G_.YtEventForwardingBehavior,X],properties:{data:Object,positionType:{type:String,reflectToAttribute:!0},hasButtons_:{type:Boolean,value:!1,reflectToAttribute:!0,computed:"computeHasButtons_(data)"},style_:{type:Boolean,computed:"computeStyle_(data.style)",reflectToAttribute:!0}},stampDom:{"data.dismissButton":{id:"dismiss-button",mapping:{buttonRenderer:"yt-button-renderer"}},"data.confirmButton":{id:"accept-button",mapping:{buttonRenderer:"yt-button-renderer"}}},
computeHasButtons_:function(a){return!(!a.dismissButton&&!a.confirmButton)},
computeStyle_:function(a){return a||"BUBBLE_HINT_STYLE_UNKNOWN"}});Polymer({is:"yt-confirm-dialog-renderer",hostAttributes:{dialog:!0},properties:{data:Object,primaryIsCancel:{type:Object,computed:"computePrimaryIsCancel_(data.primaryIsCancel)",reflectToAttribute:!0,readOnly:!0},isCancelButtonHidden:{type:Object,computed:"computeIsCancelButtonHidden_(data)",readOnly:!0},useOverlayForSpinner_:{type:Boolean,value:!1,computed:"computeUseOverlayForSpinner_(data.showLoadingSpinnerOnAction, isActionInProgress_)",reflectToAttribute:!0},showSpinner_:{type:Boolean,value:!1,
computed:"computeShowSpinner_(useOverlayForSpinner_, data.showLoadingSpinner)"},isActionInProgress_:{type:Boolean,value:!1}},observers:["onHeaderImageChanged_(data.headerImage)","onThumbnailChanged_(data.thumbnail)"],behaviors:[V.YtRendererBehavior,G_.YtEventForwardingBehavior],listeners:{"yt-img-shadow-loaded":"onThumbnailLoaded_","yt-navigate":"onYtNavigate_","yt-popup-opened":"openPopupHandler_","yt-popup-closed":"closePopupHandler_","yt-service-request-sent":"onYtServiceRequestSent_","yt-service-request-completed":"onYtServiceRequestCompleted_"},
attached:function(){var a=this;this.$.scroller.dialogElement=this.parentNode;window.requestAnimationFrame(function(){a.$.thumbnail.onShow()})},
computeUseOverlayForSpinner_:function(a,b){return!!a&&b},
computeShowSpinner_:function(a,b){return a||!!b},
fireOnCloseActions_:function(){this.data.onClosedActions&&this.sendInnerTubeActions(this.data.onClosedActions,this)},
fireOnOpenCommands_:function(a){this.data.onOpenCommands&&(a.stopImmediatePropagation(),this.sendInnerTubeActions(this.data.onOpenCommands,this))},
fireOnDismissCommands_:function(a){this.data.onDismissCommands&&(a.stopImmediatePropagation(),this.sendInnerTubeActions(this.data.onDismissCommands,this))},
openPopupHandler_:function(a){a.detail==this&&this.fireOnOpenCommands_(a)},
closePopupHandler_:function(a,b){this.sendOptionalAction("yt-confirm-dialog-close-action",[b]);this.fireOnCloseActions_();(b&&!0===b.canceled||b&&!1===b.canceled&&!1===b.confirmed)&&this.fireOnDismissCommands_(a)},
onHeaderImageChanged_:function(a){a?this.setAttribute("dialog-with-header-image",""):this.removeAttribute("dialog-with-header-image")},
onThumbnailChanged_:function(a){a?(this.setAttribute("dialog-with-thumbnail",""),this.$.scroller.scrollTarget.style.maxHeight="139px"):(this.removeAttribute("dialog-with-thumbnail"),this.$.scroller.scrollTarget.style.maxHeight="none")},
onYtNavigate_:function(a){a=Polymer.dom(a).rootTarget;Polymer.dom(this.$["confirm-button"]).deepContains(a)&&this.parentElement.close()},
computePrimaryIsCancel_:function(a){return a},
computeIsCancelButtonHidden_:function(a){return a.skipCancelButton||!a.cancelButton},
onThumbnailLoaded_:function(){this.parentElement&&this.parentElement.fit()},
onYtServiceRequestSent_:function(){this.isActionInProgress_=!0},
onYtServiceRequestCompleted_:function(){this.data.showLoadingSpinnerOnAction&&this.parentElement&&this.parentElement.close&&this.parentElement.opened&&this.parentElement.close();this.isActionInProgress_=!1}});Polymer({is:"yt-fancy-dismissible-dialog-renderer",hostAttributes:{dialog:!0},behaviors:[V.YtRendererBehavior],properties:{data:Object},attached:function(){this.$.scroller.dialogElement=this.parentNode},
computeConfirmButton_:function(a){var b={text:a.confirmLabel,size:"SIZE_DEFAULT",style:"STYLE_BLUE_TEXT"};a.confirmNavigationEndpoint?b.navigationEndpoint=a.confirmNavigationEndpoint:a.confirmServiceEndpoint&&(b.serviceEndpoint=a.confirmServiceEndpoint);return b}});Polymer({is:"yt-loading-renderer",behaviors:[V.YtRendererBehavior,Polymer.IronOverlayBehavior],properties:{data:Object},listeners:{"iron-overlay-opened":"onIronOverlayOpened_","iron-overlay-closed":"onIronOverlayClosed_"},created:function(){hQ(2201)},
onIronOverlayOpened_:function(){this.$.spinner&&(this.$.spinner.active=!0)},
onIronOverlayClosed_:function(){this.$.spinner&&(this.$.spinner.active=!1)}});Polymer({is:"yt-upsell-dialog-renderer",hostAttributes:{dialog:!0},properties:{data:{type:Object,observer:"dataChanged_"},hasHeader:{type:Boolean,computed:"computeHasHeader_(data)"},layoutStyle:{type:String,computed:"computeLayoutStyle_(data.layout)",reflectToAttribute:!0},popupSize:{type:String,computed:"computePopupSize_(data.popupSize)",reflectToAttribute:!0}},behaviors:[X,V.YtRendererBehavior],stampDom:{"data.actionButton":{id:"action-button",mapping:{buttonRenderer:"yt-button-renderer"}},"data.dismissButton":{id:"dismiss-button",
mapping:{buttonRenderer:"yt-button-renderer"}}},created:function(){this.closeOnDismissButton_=new Set;this.closeOnDismissButton_.add("UPSELL_DIALOG_DISMISS_STRATEGY_UNKNOWN");this.closeOnDismissButton_.add("UPSELL_DIALOG_DISMISS_STRATEGY_ONLY_DISMISS_BUTTON_TAP");this.closeOnAcceptButton_=new Set;this.closeOnAcceptButton_.add("UPSELL_DIALOG_DISMISS_STRATEGY_UNKNOWN");this.closeOnAcceptButton_.add("UPSELL_DIALOG_DISMISS_STRATEGY_ONLY_ACTION_BUTTON_TAP");this.defaultDismissStrategy_="UPSELL_DIALOG_DISMISS_STRATEGY_UNKNOWN"},
dataChanged_:function(a){this.hidden=!a.isVisible;a.isVisible||this.impressionLog()},
onDismissButtonTap_:function(){this.closeOnDismissButton_.has(this.data.dismissStrategy||this.defaultDismissStrategy_)&&(this.set("data.isVisible",!1),this.sendAction("yt-close-popup-action",["yt-upsell-dialog-renderer"]))},
onAcceptButtonTap_:function(){this.closeOnAcceptButton_.has(this.data.dismissStrategy||this.defaultDismissStrategy_)&&(this.set("data.isVisible",!1),this.sendAction("yt-close-popup-action",["yt-upsell-dialog-renderer"]))},
computeHasHeader_:function(a){return!!a.headerBackgroundImage},
computeLayoutStyle_:function(a){return a},
computePopupSize_:function(a){return a},
computeImageHeight_:function(a){return a&&a.thumbnails?a.thumbnails[0].height||0:0},
computeImageWidth_:function(a){return a&&a.thumbnails?a.thumbnails[0].width||0:0}});Polymer({is:"ytd-popup-container",behaviors:[SHa,J0.YtComponentBehavior],created:function(){hQ(2200);this.initPopupContainerBehavior(PGa)},
ensurePopupBelowPlayer:function(a,b){var c=this.getInterface(vV);if(!c||!c.isOnWatch()||!qW(this,!0))return!1;c=c.getCurrentPage().getPlayerContainer().getBoundingClientRect().bottom;NW().height>c+this.getPopupHeight_(a,b)?(a.style.top="auto",a.style.bottom="0px"):(a.style.top=c+"px",a.style.bottom="auto");return!0},
getPopupHeight_:function(a,b){b&&(a.cachedPopupHeight=0);if(!a.cachedPopupHeight){b=0;var c=a.clientHeight,d=window.getComputedStyle(a);b+=parseInt(d.marginTop,10);b+=parseInt(d.marginBottom,10);a.cachedPopupHeight=c+b}return a.cachedPopupHeight},
getElement:function(a){var b=!1;switch({"iron-dropdown":"immediate","paper-dialog":"immediate","yt-bubble-hint-renderer":"defer-on-all","yt-confirm-dialog-renderer":"defer-on-home","yt-fancy-dismissible-dialog-renderer":"immediate","yt-loading-renderer":"immediate","yt-notification-action-renderer":"defer-on-home","yt-report-form-modal-renderer":"defer-on-all","yt-sharing-embed-renderer":"defer-on-home","yt-sharing-renderer":"defer-on-home","yt-tooltip-renderer":"defer-on-all","yt-unlimited-family-message-interstitial-renderer":"defer-on-all",
"yt-unlimited-family-profile-interstitial-renderer":"defer-on-all","yt-unplugged-pause-membership-dialog-renderer":"defer-on-all","yt-upsell-dialog-renderer":"immediate","yt-ypc-upgrade-dialog-renderer":"defer-on-home","ytd-gaming-account-link-confirm-dialog-renderer":"defer-on-home","ytd-gaming-account-link-setting-renderer":"defer-on-home","ytd-gaming-multiple-account-link-dialog-renderer":"defer-on-home","ytd-queue-to-play-dialog-renderer":"defer-on-home","ytd-ad-feedback-renderer":"immediate",
"ytd-ad-info-dialog-renderer":"immediate","ytd-add-to-playlist-renderer":"defer-on-home","ytd-channel-warm-welcome-renderer":"defer-on-home","ytd-channel-warm-welcome-cont-renderer":"defer-on-home","ytd-checkbox-survey-renderer":"immediate","ytd-backstage-post-dialog-popup-renderer":"defer-on-all","ytd-conversation-section-renderer":"immediate","ytd-dismissal-follow-up-renderer":"defer-on-all","ytd-donation-amount-picker-renderer":"defer-on-home","ytd-donation-post-transaction-renderer":"defer-on-home",
"ytd-form-popup-renderer":"defer-on-all","ytd-hotkey-dialog-renderer":"immediate","ytd-legal-report-details-form-renderer":"immediate","ytd-mealbar-promo-renderer":"immediate","ytd-membership-post-cancel-renderer":"defer-on-home","ytd-menu-popup-renderer":"defer-on-home","ytd-modal-with-title-and-button-renderer":"defer-on-home","ytd-multi-page-menu-renderer":"immediate","ytd-red-cancel-survey-renderer":"immediate","ytd-report-details-form-renderer":"immediate","ytd-search-suggestion-report-dialog":"immediate",
"ytd-sponsorships-celebration-renderer":"defer-on-home","ytd-sponsorships-offer-renderer":"defer-on-home","ytd-single-option-survey-renderer":"defer-on-all","ytd-sponsorship-confirm-cancel-renderer":"immediate","ytd-subscription-notification-options-renderer":"defer-on-all","ytd-survey-follow-up-renderer":"defer-on-home","ytd-unified-share-panel-renderer":"defer-on-home","ytd-ypc-offers-overlay-renderer":"defer-on-home","ytd-ypc-transaction-error-message-renderer":"defer-on-home","ytd-conversation-high-priority-notification-content-renderer":"immediate",
"ytd-pdg-buy-flow-renderer":"defer-on-home","ytd-one-time-support-renderer":"defer-on-home"}[a]){case"immediate":case"defer-on-home":case"defer-on-watch":case"defer-on-all":b=!0;}return b?document.createElement(a):null}});var A$=function(){return F.apply(this,arguments)||this};
l(A$,F);A$.prototype.created=function(){this.forwardedEvents="yt-service-request yt-service-request-sent yt-service-request-completed yt-action yt-popup-opened yt-popup-closed".split(" ")};
A$.prototype.detached=function(){this.ytEventForwardingBehavior.stopForwardingEvents()};
A$.prototype.setPosition=function(a,b,c){this.style.left=a+"px";this.style.top=b+"px";this.ytEventForwardingBehavior.startForwardingEvents(this.forwardedEvents,c)};
var B$=A$;v([H(G_.YtEventForwardingBehavior),w("design:type",Object)],B$.prototype,"ytEventForwardingBehavior",void 0);v([I(),w("design:type",String)],B$.prototype,"link",void 0);v([I(),w("design:type",Array)],B$.prototype,"forwardedEvents",void 0);B$=v([W({is:"ytd-positioning-target"})],B$);var THa={};THa.YtCancelRecurrenceBehavior=[iY.ComponentBehavior,$X.YtEndpointHandlerBehavior,T.YtActionSenderBehavior,{attached:function(){var a=this;this.registerServiceEndpointHandler(function(b,c){return a.ypcCancelRecurrenceHandler(b,c)})},
ypcCancelRecurrenceHandler:function(a,b){var c=this;if(!b||!b.ypcCancelRecurrenceEndpoint)return!1;if(!b.ypcCancelRecurrenceEndpoint.params)return we(Error("params not provided for ypcCancelRecurrenceEndpoint")),!0;var d=this.getInterface(BW);d?jw(d.requestDataForServiceEndpoint(b).then(function(e){c.ypcCancelRecurrenceSuccess_(a,b,e)},function(e){c.ypcCancelRecurrenceFailure_(a,b,e)}),function(){we(Error("Error occurred in ypc cancel recurrence response handling."))}):we(Error("Network Manager not initialized"));
return!0},
ypcCancelRecurrenceSuccess_:function(a,b,c){c.data||(c={data:c});c.data&&c.data.actions&&this.sendInnerTubeActions(c.data.actions,this);c.data.messageRenderer?KEa(b.ypcCancelRecurrenceEndpoint.serializedYpcCancelFlowLoggingParams):(b=b.ypcCancelRecurrenceEndpoint.serializedYpcCancelFlowLoggingParams)&&OX("ypcCancelFlowSucceeded","serializedYpcCancelFlowLoggingParams",b);a.fire("yt-service-request-completed",c)},
ypcCancelRecurrenceFailure_:function(a,b,c){KEa(b.ypcCancelRecurrenceEndpoint.serializedYpcCancelFlowLoggingParams);a.fire("yt-service-request-error",{error:c,params:[a,b]})}}];var UHa=function(a,b){hb.call(this,b);this.errorSupportedRenderers=a};
t(UHa,FHa);var mIa=function(a){A("enable_ypc_spinners")&&cV(a,"yt-open-popup-action",[{openPopupAction:{popupType:"FULLSCREEN_OVERLAY",popup:{loadingRenderer:{hack:!0}}}},a])},C$=function(a){A("enable_ypc_spinners")&&cV(a,"yt-close-popup-action",["yt-loading-renderer"])};var nIa={};nIa.YtCompleteTransactionBehavior=[iY.ComponentBehavior,$X.YtEndpointHandlerBehavior,T.YtActionSenderBehavior,{attached:function(){var a=this;this.registerServiceEndpointHandler(function(b,c){return a.ypcCompleteTransactionHandler(b,c)})},
completeTransaction:function(a,b){var c=this;b={payments_payload:window.btoa(b.integratorData),buybucket_params:a.data.buybucketParams,offer_params:a.data.offerParams};var d=this.getInterface(BW),e=a.data.completeTransactionEndpoint,g=this.get("ypcCompleteTransactionEndpoint.actions",e);g&&this.sendInnerTubeActions(g,this);return d.requestDataForServiceEndpoint(e,b).then(this.handleCompleteTransactionSuccess_,function(){return c.handleCompleteTransactionFailure_(a)})},
handleCompleteTransactionSuccess_:function(a){a.data||(a={data:a});if(a.data.messageRenderer)return cw(new UHa(a.data.messageRenderer));if(a.data.trackingParams){var b=Wo(),c=Vo();b&&c&&CS(b,c,go(a.data.trackingParams))}return bw(a)},
handleCompleteTransactionFailure_:function(a){a=this.get("data.serializedTransactionFlowLoggingParams",a);RX("TRANSACTION_ERROR_TYPE_YPC_COMPLETE_TRANSACTION_RPC_FAILURE",a);return cw(new VX("TRANSACTION_ERROR_TYPE_YPC_COMPLETE_TRANSACTION_RPC_FAILURE",a))},
ypcCompleteTransactionHandler:function(a,b){var c=this;if(!b.ypcCompleteTransactionEndpoint)return!1;if(!b.ypcCompleteTransactionEndpoint.transactionParams)return we(Error("transactionParams not provided for ypcCompleteTransactionEndpoint")),!0;b.ypcCompleteTransactionEndpoint&&b.ypcCompleteTransactionEndpoint.gtmData&&UX(b.ypcCompleteTransactionEndpoint.gtmData);var d=this.getInterface(BW);d&&(mIa(this),d.requestDataForServiceEndpoint(b).then(function(e){a.fire("yt-service-request-completed");c.ypcCompleteTransactionSuccess_(b,
e)},function(){return c.ypcCompleteTransactionFailure_(b)}));
return!0},
ypcCompleteTransactionSuccess_:function(a,b){C$(this);b.data||(b={data:b});this.sendAction("yt-close-popup-action",["yt-loading-renderer"]);b.data.messageRenderer||"YPC_RESPONSE_CODE_ERROR"===b.data.ypcResponseCode?this.ypcCompleteTransactionFailure_(a):(UX("{\"event\": \"purchased\", \"purchaseStatus\": \"success\"}"),this.logTransactionEvent_("transactionFlowSucceeded",a));b.data.actions&&(a=SEa(b.data.actions),b=TEa(b.data.actions),a.length&&this.sendServiceRequestAction(a),b.length&&this.sendInnerTubeActions(b,
this))},
ypcCompleteTransactionFailure_:function(a){C$(this);this.sendAction("yt-close-popup-action",["yt-loading-renderer"]);this.logTransactionEvent_("transactionFlowFailed",a,"TRANSACTION_ERROR_TYPE_YPC_COMPLETE_TRANSACTION_RPC_FAILURE")},
logTransactionEvent_:function(a,b,c){if(b=this.get("ypcCompleteTransactionEndpoint.serializedTransactionFlowLoggingParams",b))b={serializedTransactionFlowLoggingParams:b},c&&(b.errorType=c),co(a,b),eo()}}];var oIa={};oIa.YtWalletPaymentBehavior=[{openWalletDialog:function(a,b,c,d,e){var g=this,h=fw();b=b.replace(/-/g,"+").replace(/_/g,"/");var m=eS.getInstance().get("hl");NEa(TX.getInstance(),b,h.resolve,e,h.reject,m,function(n){return g.onServerBackendAnalyticEvent_(a,c,n)},this.onDialogClose_.bind(this),d);
return h.promise},
openFixFlowDialog:function(a,b,c){a=a.replace(/-/g,"+").replace(/_/g,"/");TX.getInstance().openFixFlowDialog(a,b,void 0,c)},
onDialogClose_:function(){this.sendAction("yt-wallet-dialog-closed")},
onServerBackendAnalyticEvent_:function(a,b,c){a.fire("yt-commerce-action-init-done");b&&this.sendServiceRequestAction([b,{backend_analytics:c}])}},
T.YtActionSenderBehavior];function pIa(a,b){var c;c||(c={bubbles:!0,cancelable:!1,composed:!0});b&&(c.detail=b);b=new CustomEvent("yt-service-request-completed",c);a.dispatchEvent(b)}
;var rIa=function(a,b,c,d){var e=MU(BW);e&&e.requestDataForServiceEndpoint(c,d).then(function(g){pIa(b,g);g.code&&"ERROR"==g.code?qIa(c):((g=g.data.commands)&&dV(a,g,b),(g=c.ypcPauseSubscriptionCommand.serializedYpcPauseFlowLoggingParams)&&g&&OX("ypcPauseFlowSucceeded","serializedYpcPauseFlowLoggingParams",g))},function(){return qIa(c)})};
function qIa(a){(a=a.ypcPauseSubscriptionCommand.serializedYpcPauseFlowLoggingParams)&&a&&OX("ypcPauseFlowFailed","serializedYpcPauseFlowLoggingParams",a,void 0,"YPC_ERROR_REASON_INNERTUBE_RESPONSE_FAILURE")}
;var tIa=function(a,b,c){var d=MU(BW);d&&d.requestDataForServiceEndpoint(c).then(function(e){pIa(b,e);e.code&&"ERROR"==e.code?sIa(c):((e=e.data.commands)&&dV(a,e,b),(e=c.ypcResumeSubscriptionCommand.serializedYpcResumeFlowLoggingParams)&&e&&OX("ypcResumeFlowSucceeded","serializedYpcResumeFlowLoggingParams",e))},function(){return sIa(c)})};
function sIa(a){(a=a.ypcResumeSubscriptionCommand.serializedYpcResumeFlowLoggingParams)&&a&&OX("ypcResumeFlowFailed","serializedYpcResumeFlowLoggingParams",a,void 0,"YPC_ERROR_REASON_INNERTUBE_RESPONSE_FAILURE")}
;var uIa={};
uIa.YtEndpointHandlerWithYpcBehavior=[$X.YtEndpointHandlerBehavior,U.YtActionHandlerBehavior,T.YtActionSenderBehavior,oIa.YtWalletPaymentBehavior,cY.YtOpenPopupBehavior,THa.YtCancelRecurrenceBehavior,nIa.YtCompleteTransactionBehavior,{listeners:{"yt-service-request-sent":"onServiceRequestSent_","yt-service-request-completed":"onGetCartServiceRequestCompleted_","yt-service-request-error":"onServiceRequestError_"},created:function(){this.buyFlowActionMap_={"yt-wallet-dialog-closed":"handleWalletDialogCloseEvent_"};this.ypcRegisterActionMapJobId_=
0},
attached:function(){var a=this;this.registerServiceEndpointHandler(function(b,c,d){return a.handleYPCEndpoint(b,c,d)});
this.ypcRegisterActionMapJobId_=En(function(){a.registerActionMap(a.buyFlowActionMap_)})},
detached:function(){var a=this;Dn.cancelJob(this.ypcRegisterActionMapJobId_);En(function(){a.unregisterActionMap(a.buyFlowActionMap_)})},
handleYPCEndpoint:function(a,b,c){var d=b.ypcGetCartEndpoint;if(d){var e=d.gtmId;e&&UEa(e);(d=d.gtmData)&&UX(d)}return null!=this.get("ypcGetCartEndpoint.prefetchConfig.ypcGetCartPrefetchResponseDataConfig.encryptedPurchaseParams",b)?(this.handleYPCGetCartEndpointWithPrefetch_(a,b),!0):null!=this.get("ypcFixInstrumentEndpoint.encryptedFixInstrumentParameters",b)?(this.handleYPCFixInstrumentEndpoint_(b),!0):A("enable_premium_voluntary_pause")&&b.ypcPauseSubscriptionCommand?(rIa(this,a,b,c),!0):A("enable_premium_voluntary_pause")&&
b.ypcResumeSubscriptionCommand?(tIa(this,a,b),!0):!1},
handleYPCGetCartEndpointWithPrefetch_:function(a,b){var c=this,d=b.ypcGetCartEndpoint;b=d.prefetchConfig.ypcGetCartPrefetchResponseDataConfig;var e=b.encryptedPurchaseParams,g=d.offerParams,h=b.completeTransactionEndpoint;d=b.serializedTransactionFlowLoggingParams;var m={data:{offerParams:window.btoa(g),completeTransactionEndpoint:h,serializedTransactionFlowLoggingParams:d}};g={offerParams:g};this.changeButtonState(a,!0);co("buyFlowStarted",g);iw(this.openWalletDialog(a,e,b.ypcLogWalletAnalyticDataEndpoint,
d,function(){c.changeButtonState(a,!1)}).then(function(n){return c.handleBuyFlowCompleteCallback_(m,n)},function(){return c.handleOnLoadError(m)}).then(function(n){return c.handlePostPurchaseSuccess_(a,m,n)},function(n){return c.handlePostPurchaseError_(n)}),function(){c.changeButtonState(a,!1);
a.fire("yt-commerce-action-done")})},
onGetCartServiceRequestCompleted_:function(a,b){var c=this;if(b&&b.data&&b.data.messageRenderer)C$(this),this.handleMessageRenderer_(b.data.messageRenderer);else{var d=this.get("data.offerParams",b),e=this.get("data.encryptedPurchaseParams",b),g=this.get("data.upgradeDialogRenderer.ypcUpgradeDialogRenderer",b),h=this.get("data.ypcLogWalletAnalyticDataEndpoint",b);if(e||g)if(a.stopPropagation(),C$(this),g)this.sendAction("yt-open-popup-action",[{openPopupAction:{popupType:z("openPopupConfig").popupTypeMap.ypcUpgradeDialogRenderer,
popup:{ypcUpgradeDialogRenderer:g}}},this]);else{d&&co("buyFlowStarted",{offerParams:d});d=this.getLoggingParams_(b);var m=a.target;this.changeButtonState(m,!0);iw(this.openWalletDialog(m,e,h,d,function(){c.changeButtonState(m,!1)}).then(function(n){return c.handleBuyFlowCompleteCallback_(b,n)},function(){return c.handleOnLoadError(b)}).then(function(n){return c.handlePostPurchaseSuccess_(m,b,n)},function(n){return c.handlePostPurchaseError_(n)}),function(){c.changeButtonState(m,!1);
m.fire("yt-commerce-action-done")})}}},
onServiceRequestSent_:function(a,b){b&&b.endpoint&&b.endpoint.ypcGetCartEndpoint&&(b.endpoint.ypcGetCartEndpoint.prefetchConfig||mIa(this))},
onServiceRequestError_:function(a,b){if(b&&b.params&&b.params.length)for(a=k(b.params),b=a.next();!b.done;b=a.next())if((b=b.value)&&b.ypcGetCartEndpoint){C$(this);break}},
handleBuyFlowCompleteCallback_:function(a,b){var c=b.integratorData;return null==c||""===c||null!=b.error?(a=this.getLoggingParams_(a),cw(new VX("TRANSACTION_ERROR_TYPE_YPC_BUYFLOW_COMPLETE_FAILURE",a))):this.completeTransaction(a,b)},
handlePostPurchaseSuccess_:function(a,b,c){(b=this.getLoggingParams_(b))&&PX("transactionFlowSucceeded",b);(b=c.data)&&b.gtmDatas&&b.gtmDatas.length?UX(b.gtmDatas[0]):UX("{\"event\": \"purchased\", \"purchaseStatus\": \"success\"}");c.data&&c.data.actions&&this.sendInnerTubeActions(c.data.actions,a)},
handlePostPurchaseError_:function(){we(Error("Error occurred during buyflow."))},
handleOnLoadError:function(a){a=this.getLoggingParams_(a);return cw(new VX("TRANSACTION_ERROR_TYPE_LOAD_FAILURE",a))},
getLoggingParams_:function(a){return this.get("data.serializedTransactionFlowLoggingParams",a)},
handleWalletDialogCloseEvent_:function(){},
handleMessageRenderer_:function(a){var b=VU(a,"renderer"),c=z("openPopupConfig");"confirmDialogRenderer"===b&&c&&this.sendAction("yt-open-popup-action",[{openPopupAction:{popupType:c.popupTypeMap[b],popup:a}},this])},
handleYPCFixInstrumentEndpoint_:function(a){var b=this,c=a.ypcFixInstrumentEndpoint;a=c.encryptedFixInstrumentParameters;this.logFixFopEvent_(c,"FIX_FOP_EVENT_TYPE_START");this.openFixFlowDialog(a,function(d,e){b.onFixFlowCompleteCallback_(c,d,e)},function(){b.logFixFopEvent_(c,"FIX_FOP_EVENT_TYPE_FAILURE","FIX_FOP_ERROR_TYPE_LOAD_FAILURE")})},
onFixFlowCompleteCallback_:function(a,b,c){var d=Sa("payments.business.integration.scenario.FixInstrument");if(b==d.IntegratorCallbackType.ON_COMPLETE){b="FIX_FOP_EVENT_TYPE_CANCEL";var e=null;null!=c.error?c.error!=d.OnCompleteCallbackError.USER_CANCELLED&&(this.sendInnerTubeActions([a.errorAction],this),b="FIX_FOP_EVENT_TYPE_FAILURE",e="FIX_FOP_ERROR_TYPE_UNSPECIFIED"):(this.sendInnerTubeActions([a.successAction],this),b="FIX_FOP_EVENT_TYPE_SUCCESS");this.logFixFopEvent_(a,b,e)}},
logFixFopEvent_:function(a,b,c){(a=a.serializedFixFopLoggingParams)?(b={eventType:b,serializedFixFopLoggingParams:a},null!=c&&(b.errorType=c),co("fixFopFlow",b),eo()):we(Error("Fix Fop Logging params not provided."))},
changeButtonState:function(a,b){A("enable_ypc_spinners")&&(a.disabled=b)}}];var D$=function(){};
D$.prototype.start=function(){};
D$.prototype.finish=function(){};var E$;E$={};re("LATEST_ECATCHER_SERVICE_TRACKING_PARAMS",E$);function vIa(a){a.forEach(function(b){var c=b.key;b=b.value;c&&b&&pq(c,b)})}
function wIa(a){a.forEach(function(b){var c=b.key;b=b.value;c&&b&&(E$[c]=b)})}
function xIa(a){a=k(a);for(var b=a.next();!b.done;b=a.next()){var c=b.value;b=c.params;c=c.service;b&&("CSI"===c?vIa(b):"ECATCHER"===c&&wIa(b))}}
;var F$=function(){var a=HS();this.metricName_="/client_streamz/youtube/web/navigation_request";this.streamzService_=a;this.streamzService_.addNewCounter(this.metricName_,{field_type:3,field_name:"page_type"})};
F$.prototype.increment=function(a){this.streamzService_.incrementCounter(this.metricName_,a)};
F$.prototype.incrementBy=function(a,b){this.streamzService_.incrementCounterBy(this.metricName_,a,b)};
var G$=function(){var a=HS();this.metricName_="/client_streamz/youtube/web/navigation_response";this.streamzService_=a;this.streamzService_.addNewCounter(this.metricName_,{field_type:3,field_name:"result"},{field_type:3,field_name:"page_type"},{field_type:3,field_name:"error_type"})};
G$.prototype.increment=function(a,b,c){this.streamzService_.incrementCounter(this.metricName_,a,b,c)};
G$.prototype.incrementBy=function(a,b,c,d){this.streamzService_.incrementCounterBy(this.metricName_,a,b,c,d)};
var H$=function(){var a=HS();this.metricName_="/client_streamz/youtube/web/servlet_response_errors";this.streamzService_=a;this.streamzService_.addNewCounter(this.metricName_,{field_type:3,field_name:"code"},{field_type:3,field_name:"location"})};
H$.prototype.increment=function(a,b){this.streamzService_.incrementCounter(this.metricName_,a,b)};
H$.prototype.incrementBy=function(a,b,c){this.streamzService_.incrementCounterBy(this.metricName_,a,b,c)};
var I$=function(){var a=HS();this.metricName_="/client_streamz/youtube/web/debug/navigate_page_type";this.streamzService_=a;this.streamzService_.addNewCounter(this.metricName_,{field_type:3,field_name:"page_type"},{field_type:3,field_name:"request_type"})};
I$.prototype.increment=function(a,b){this.streamzService_.incrementCounter(this.metricName_,a,b)};
I$.prototype.incrementBy=function(a,b,c){this.streamzService_.incrementCounterBy(this.metricName_,a,b,c)};
var J$=function(){var a=HS();this.metricName_="/client_streamz/youtube/web/debug/away_from_app_endpoint";this.streamzService_=a;this.streamzService_.addNewCounter(this.metricName_,{field_type:3,field_name:"page_type"})};
J$.prototype.increment=function(a){this.streamzService_.incrementCounter(this.metricName_,a)};
J$.prototype.incrementBy=function(a,b){this.streamzService_.incrementCounterBy(this.metricName_,a,b)};
var K$=function(){var a=HS();this.metricName_="/client_streamz/youtube/web/debug/bad_endpoint";this.streamzService_=a;this.streamzService_.addNewCounter(this.metricName_,{field_type:3,field_name:"page_type"})};
K$.prototype.increment=function(a){this.streamzService_.incrementCounter(this.metricName_,a)};
K$.prototype.incrementBy=function(a,b){this.streamzService_.incrementCounterBy(this.metricName_,a,b)};
var L$=function(){var a=HS();this.metricName_="/client_streamz/youtube/web/debug/forcer_cold_load";this.streamzService_=a;this.streamzService_.addNewCounter(this.metricName_,{field_type:3,field_name:"page_type"},{field_type:1,field_name:"url_not_polymer_compatible"},{field_type:1,field_name:"config_disable_warm_loads"})};
L$.prototype.increment=function(a,b,c){this.streamzService_.incrementCounter(this.metricName_,a,b,c)};
L$.prototype.incrementBy=function(a,b,c,d){this.streamzService_.incrementCounterBy(this.metricName_,a,b,c,d)};
var M$=function(){var a=HS();this.metricName_="/client_streamz/youtube/web/debug/page_request_fail";this.streamzService_=a;this.streamzService_.addNewCounter(this.metricName_,{field_type:3,field_name:"page_type"})};
M$.prototype.increment=function(a){this.streamzService_.incrementCounter(this.metricName_,a)};
M$.prototype.incrementBy=function(a,b){this.streamzService_.incrementCounterBy(this.metricName_,a,b)};
var N$=function(){var a=HS();this.metricName_="/client_streamz/youtube/web/debug/load_page_request";this.streamzService_=a;this.streamzService_.addNewCounter(this.metricName_,{field_type:1,field_name:"has_player"},{field_type:3,field_name:"data_page_type"},{field_type:1,field_name:"from_history"},{field_type:1,field_name:"from_miniplayer"})};
N$.prototype.increment=function(a,b,c,d){this.streamzService_.incrementCounter(this.metricName_,a,b,c,d)};
N$.prototype.incrementBy=function(a,b,c,d,e){this.streamzService_.incrementCounterBy(this.metricName_,a,b,c,d,e)};
var O$=function(){var a=HS();this.metricName_="/client_streamz/youtube/web/debug/page_chunk_received";this.streamzService_=a;this.streamzService_.addNewCounter(this.metricName_,{field_type:2,field_name:"chunks_received"},{field_type:3,field_name:"data_page_type"},{field_type:3,field_name:"page_type"})};
O$.prototype.increment=function(a,b,c){this.streamzService_.incrementCounter(this.metricName_,a,b,c)};
O$.prototype.incrementBy=function(a,b,c,d){this.streamzService_.incrementCounterBy(this.metricName_,a,b,c,d)};
var P$=function(){var a=HS();this.metricName_="/client_streamz/youtube/web/debug/page_request_finished";this.streamzService_=a;this.streamzService_.addNewCounter(this.metricName_,{field_type:3,field_name:"page_type"},{field_type:3,field_name:"data_page_type"},{field_type:1,field_name:"from_history"},{field_type:1,field_name:"from_miniplayer"})};
P$.prototype.increment=function(a,b,c,d){this.streamzService_.incrementCounter(this.metricName_,a,b,c,d)};
P$.prototype.incrementBy=function(a,b,c,d,e){this.streamzService_.incrementCounterBy(this.metricName_,a,b,c,d,e)};
var Q$=function(){var a=HS();this.metricName_="/client_streamz/youtube/web/debug/page_update_finish";this.streamzService_=a;this.streamzService_.addNewCounter(this.metricName_,{field_type:3,field_name:"page_type"},{field_type:3,field_name:"data_page_type"},{field_type:3,field_name:"from_history"})};
Q$.prototype.increment=function(a,b,c){this.streamzService_.incrementCounter(this.metricName_,a,b,c)};
Q$.prototype.incrementBy=function(a,b,c,d){this.streamzService_.incrementCounterBy(this.metricName_,a,b,c,d)};
var R$=function(){var a=HS();this.metricName_="/client_streamz/youtube/web/cold_load_requests";this.streamzService_=a;this.streamzService_.addNewCounter(this.metricName_,{field_type:3,field_name:"page_type"})};
R$.prototype.increment=function(a){this.streamzService_.incrementCounter(this.metricName_,a)};
R$.prototype.incrementBy=function(a,b){this.streamzService_.incrementCounterBy(this.metricName_,a,b)};
var S$=function(a){this.metricName_="/client_streamz/youtube/web/navigation_requests";this.streamzService_=a;this.streamzService_.addNewCounter(this.metricName_,{field_type:3,field_name:"page_type"},{field_type:3,field_name:"load_type"})};
S$.prototype.increment=function(a,b){this.streamzService_.incrementCounter(this.metricName_,a,b)};
S$.prototype.incrementBy=function(a,b,c){this.streamzService_.incrementCounterBy(this.metricName_,a,b,c)};var yIa={};
yIa.YtAppBehavior=[iY.ComponentBehavior,U.YtActionHandlerBehavior,T.YtActionSenderBehavior,{_noAccessors:!0,properties:{data:Object,hasError:{type:Boolean,value:!1},errorMessage:String,pauseVisibilityMonitor:Boolean},listeners:{"yt-history-load":"onYtHistoryLoad_","yt-history-pop":"onYtHistoryPop_","yt-navigate":"onYtNavigate_","yt-navigate-set-page-offset":"onYtNavigateSetPageOffset_","yt-update-title":"onYtUpdateTitle_","yt-update-unseen-notification-count":"onYtUpdateUnseenNotificationCount_"},actionRouterIsRoot:!0,
created:function(){this.actionMap_={"yt-update-notifications-unseen-count-action":"handleUpdateNotificationsUnseenCountAction_","yt-clear-cookie-action":"handleClearCookieAction_","yt-store-grafted-ve-action":"onStoreGraftedVeAction_"};this.pageTitle_="";this.titleSuffix_="YouTube";this.unseenNotificationCount_=0;"complete"==document.readyState?this.handleDocumentLoaded_():window.addEventListener("load",this.handleDocumentLoaded_.bind(this));A("flush_onbeforeunload")?window.addEventListener("beforeunload",
this.onUnload_.bind(this)):window.addEventListener("unload",this.onUnload_.bind(this));this.initCsi_();this.initScraperAttributes_();this.hasSetScrollTopForNavigation_=this.hasNavigated_=!1;this.pagePreparer_=null;this.zwiebackInitJobId_=0;this.dataUpdatePromise_=null;A("enable_navigation_requests_streamz")&&(this.navigationRequestSentCounter_=new S$(new HS()));this.loadDepsPromise=bw();this.hasPendingNavigation_=!1;this.viewportLoadCalculationJobId_=0;ADa||(pX={heightPixels:screen.height,widthPixels:screen.width},
oX&&(pX.memoryTotalKbytes=String(Math.round(oX.jsHeapSizeLimit/1E3))),window.devicePixelRatio&&(pX.devicePixelRatio=window.devicePixelRatio),qX.intersectionObserverPresent="IntersectionObserver"in window,qX.indexedDbPresent="indexedDB"in window,qX.serviceWorkerPresent="serviceWorker"in navigator,qX.webSharePresent="share"in navigator,qX.fullScreenApiPresent="exitFullscreen"in document||"webkitExitFullscreen"in document,Math.random()<Be("web_system_health_fraction")&&(Jm(DDa,3E4),CDa()),ADa=!0);Lo||(
On(),Qo("FOREGROUND_HEARTBEAT_TRIGGER_ON_FOREGROUND"),Jm(db(Qo,"FOREGROUND_HEARTBEAT_TRIGGER_ON_INTERVAL"),3E4),Fda.push(Cm(document,"visibilitychange",Gda)),Lo=!0);Ro(z("EVENT_ID",void 0))},
handleDocumentLoaded_:function(){rq("dl");ip.getInstance().processSignal("pcl")},
attached:function(){this.registerNavigationManagerListenersWhenAvailable_();this.listen(document,"yt-navigate-cache","onYtNavigateCache_");this.registerActionMap(this.actionMap_)},
registerNavigationManagerListenersWhenAvailable_:function(a){var b=this;a=void 0===a?0:a;var c=this.getInterface(D2);if(c)this.registerNavigationManagerListeners_(c);else{if(5<=a)throw Error("Unable to find the Navigation manager");setTimeout(function(){b.registerNavigationManagerListenersWhenAvailable_(a+1)},0)}},
registerNavigationManagerListeners_:function(a){this.listen(a,"yt-navigate-start","onYtNavigateStart_");this.listen(a,"yt-navigate-finish","onYtNavigateFinish_");this.listen(a,"yt-navigate-error","onYtNavigateError_");this.listen(a,"yt-page-data-fetched","onYtPageDataFetched_");this.listen(a,"yt-navigate-redirect","onYtNavigateRedirect_")},
detached:function(){var a=this.getInterface(D2);this.unlisten(a,"yt-navigate-start","onYtNavigateStart_");this.unlisten(a,"yt-navigate-finish","onYtNavigateFinish_");this.unlisten(a,"yt-navigate-error","onYtNavigateError_");this.unlisten(document,"yt-navigate-cache","onYtNavigateCache_");this.unlisten(a,"yt-page-data-fetched","onYtPageDataFetched_");this.unlisten(a,"yt-navigate-redirect","onYtNavigateRedirect_");this.unregisterActionMap(this.actionMap_)},
setPageOffset:function(a,b){this.sendAction("yt-set-page-offset",[a,b])},
setPageOffsetForNavigation_:function(a,b){this.hasSetScrollTopForNavigation_||(this.hasSetScrollTopForNavigation_=!0,this.setPageOffset(a,b))},
onYtNavigateSetPageOffset_:function(a,b){this.setPageOffsetForNavigation_(b.page,b.offset)},
getPageOffset:function(){var a=this.$["page-manager"].getCurrentPage(),b=0;a&&(b=this.sendAction("yt-get-page-offset",[a])[0]);return b},
initCsi_:function(){this.CSI_SERVICE_NAME&&(re("CSI_SERVICE_NAME",this.CSI_SERVICE_NAME),pq("yt_lt","cold"))},
initScraperAttributes_:function(){var a=Ei(document.location.href,"enable");a&&-1<a.indexOf("scraper")&&re("ADD_SCRAPER_ATTRIBUTES",!0)},
onUnload_:function(){qq("u");Qo("FOREGROUND_HEARTBEAT_TRIGGER_ON_BACKGROUND");FS();GS&&GS.snapshotAndFlush();eo()},
onYtHistoryPop_:function(a,b){if(se("DISABLE_WARM_LOADS"))a.preventDefault(),window.location.reload();else{var c=this.getInterface(D2);c.hasPendingNavigation()&&a.preventDefault();c.cancelPendingNavigation();b.errorMsg&&(a=b.errorMsg.split(" - "),b=Error(a[0]),2==a.length&&(b.params=a[1]),we(b,"WARNING"),window.location.reload())}},
onYtHistoryLoad_:function(a,b){var c=this;if(se("DISABLE_WARM_LOADS"))window.location.reload();else{this.hasError=!1;a=b.endpoint;var d=b.historyEntry,e=this.getInterface(D2),g=this.getInterface(vV),h=null;d&&d.rootData&&(h=d.rootData);!h||this.isDataExpired_(h)||h.filler||se("DISABLE_DATA_REPLAY",!1)?a?(e.navigate(a,!0),this.tryOnYtEndpointChangeHandler_(a)):(b.legacyBorder||we(Error("Malformed history entry")),window.location.reload()):(FS(),rq("srt"),pq("yt_lt","hot"),rq("pdc"),this.cancelPendingTasks_(),
this.logHistoryNav_(b.forward,h),h.player&&(h.player.loaded=!1),this.tryOnYtEndpointChangeHandler_(a),e.resetChunkState(),e.pageRequestFinished(a||{},h,!0,b.savedComponentState).then(function(){c.setPageOffset(g.getCurrentPage(),d.scrollTop||0)}))}},
navigateStart:function(){},
initHistoryManager:function(a){this.hasNavigated_=!0;var b=this.$["page-manager"].getCurrentData();a=isNaN(a)?this.getPageOffset():a;var c=this.getInterface(D2).getCurrentEndpoint();this.$.historyManager.replaceState(c,b,a)},
cancelPendingTasks_:function(){Dn.cancelJob(this.viewportLoadCalculationJobId_);this.pagePreparer_&&this.pagePreparer_.cancel();this.pauseVisibilityMonitor=!0;var a=this.getInterface(mW);a&&a.reset();aZ.getInstance().reset()},
onYtNavigateStart_:function(a,b){this.cancelPendingTasks_();b.noProgressBar||(a=this.getInterface(D$))&&a.start();a=this.hasPendingNavigation_?null:this.data;this.hasError=!1;this.navigateStart(b);var c=this.getInterface(vV);this.fire("yt-page-manager-navigate-start",b,{node:c,bubbles:!1});this.pagePreparer_=new qp(1,"pcl");sp(this.pagePreparer_,c.preparePage.bind(c,b.pageType,b.endpoint));c=this.getPageOffset();this.hasNavigated_||this.initHistoryManager(c);var d=this.$.historyManager;b.reload||
this.hasPendingNavigation_?d.replaceState(b.endpoint,a,c):"navigate-back"!=b.type&&"navigate-forward"!=b.type&&d.saveAndPush(b.url,b.endpoint,a,c);this.hasPendingNavigation_=!0},
finishNavigation_:function(){this.hasPendingNavigation_=!1;var a=this.getInterface(D$);a&&a.finish();this.pauseVisibilityMonitor=!1},
onYtNavigateError_:function(a,b){this.finishNavigation_(b.navigationDoneMs);this.hasError=!0;this.errorMessage=b&&b.errorMessage?b.errorMessage:void 0;a=this.get("endpoint.commandMetadata.webCommandMetadata.url",b);b=mm(window.location.href);a&&!b.pbjreload&&(b=Error("Request failed, attempting to reload"),b.params=a,xe(b),zU(nm(a,{pbjreload:"10"})))},
onYtNavigateCache_:function(a,b){a=b.url;var c=b.endpoint,d=b.data;b=!!b.miniplayer;if(a&&c&&d){var e=this.getPageOffset();this.$.historyManager.saveAndPush(a,c,this.data||null,e);this.getInterface(D2).pageRequestFinished(c,d,!1,void 0,b)}},
collectViewportLoadTime_:function(){var a=this;Dn.cancelJob(this.viewportLoadCalculationJobId_);var b=aZ.getInstance();b.reset();this.viewportLoadCalculationJobId_=En(function(){b.elementLoadPromises_.size||b.loadTimeResolver_.resolve(0);QFa(b);b.loadTimeResolver_.promise.then(function(c){a.reportViewportLoad_(c)},function(){var c=0;
for(var d=k(b.visibleSet_),e=d.next();!e.done;e=d.next())e=e.value.loadTime,Infinity!=e&&e>c&&(c=e);rq("vptl",c);a.reportViewportLoad_(c)})},z("VISIBILITY_TIME_BETWEEN_JOBS_MS",500)+50)},
onYtNavigateFinish_:function(a,b){var c=this;this.dataUpdatePromise_.then(function(){c.finishNavigation_(b.navigationDoneMs);var d=c.getInterface(vV);!b.fromHistory&&c.hasNavigated_&&c.setPageOffsetForNavigation_(d.getCurrentPage(),0);c.onYtNavigateFinishHandler();c.async(function(){c.async(function(){rq("pda");c.collectViewportLoadTime_()})})})},
onYtNavigateRedirect_:function(a){a.detail.url&&this.$.historyManager.replaceUrl(a.detail.url)},
onYtNavigate_:function(a){a.detail.endpoint||we(Error("Error: Missing yt-navigate endpoint from target: "+a.target));var b=this.$.historyManager;A("cold_missing_history")&&!b.init()&&re("DISABLE_WARM_LOADS",!0);this.hasSetScrollTopForNavigation_=!1;b=this.getInterface(D2);var c=a.detail.tempData||{};b.navigate(a.detail.endpoint,!1,a.detail.params,c,a.detail.type)&&this.tryOnYtEndpointChangeHandler_(a.detail.endpoint,c)},
waitForViewportLoad_:function(){kq("vpl")},
onYtPageDataFetched_:function(a,b){try{rX.getInstance().reset();kq("cpt");this.waitForViewportLoad_();this.data=b.pageData;this.dataUpdatePromise_&&(this.dataUpdatePromise_.cancel(),this.dataUpdatePromise_=null);var c=this.get("response.frameworkUpdates.entityBatchUpdate",this.data);c&&(this.data.response.frameworkUpdates.entityBatchUpdate=void 0,this.onEntitiesUpdated(c));this.dataUpdatePromise_=this.getInterface(vV).updatePageData(this.data);var d=this.get("playerResponse.responseContext.serviceTrackingParams",
this.data);d&&xIa(d);var e=this.get("response.responseContext.serviceTrackingParams",this.data);e&&xIa(e);var g=this.get("playerResponse.onResponseReceivedActions",this.data);g&&this.sendInnerTubeActions(g,this);var h=this.get("response.responseContext.webResponseContextExtensionData.ytConfigData",this.data);h&&this.handleYtConfigData_(h)}catch(m){we(m)}},
reportViewportLoad_:function(a){rX.getInstance();rq("vpl",a);EDa()},
handleYtConfigData_:function(a){void 0!=a.delegatedSessionId&&re("DELEGATED_SESSION_ID",a.delegatedSessionId);void 0!=a.sessionIndex&&re("SESSION_INDEX",a.sessionIndex);a.visitorData&&re("VISITOR_DATA",a.visitorData)},
tryOnYtEndpointChangeHandler_:function(a,b){try{this.onYtEndpointChangeHandler(a,b)}catch(c){we(c)}},
onYtEndpointChangeHandler:function(){},
onYtNavigateFinishHandler:function(){},
setPageTitle:function(a){a=(this.pageTitle_=a)?a+" - "+this.titleSuffix_:this.titleSuffix_;document.title=this.getNotificationTitlePrefix_()+a},
onYtUpdateTitle_:function(a,b){this.setPageTitle(b)},
getNotificationTitlePrefix_:function(){return this.unseenNotificationCount_?"("+this.unseenNotificationCount_+") ":""},
setUnseenNotificationCount:function(a){this.unseenNotificationCount_=a;this.setPageTitle(this.pageTitle_)},
handleUpdateNotificationsUnseenCountAction_:function(a){a.updateNotificationsUnseenCountAction&&(a.updateNotificationsUnseenCountAction.unseenCount?this.setUnseenNotificationCount(a.updateNotificationsUnseenCountAction.unseenCount):this.setUnseenNotificationCount(0))},
handleClearCookieAction_:function(a){a.clearCookieAction&&a.clearCookieAction.cookieName&&Xn(a.clearCookieAction.cookieName)},
onYtUpdateUnseenNotificationCount_:function(a,b){this.setUnseenNotificationCount(b)},
loadData:function(a,b){var c=this;this.loadDepsPromise.then(function(){var d=c.getInterface(D2);d||we(Error("Load data called with no navigation manager."));if(b&&b.response){if(!a){var e=qi(window.document.location.href),g="";if("/"==e||e.startsWith("/?"))g="WEB_PAGE_TYPE_BROWSE";a={commandMetadata:{webCommandMetadata:{url:e,webPageType:g}}}}var h=d.pageRequestFinished.bind(d,a,b,!1);d=se("ASYNC_COLD_WATCH")&&"watch"==b.page?new Yv(function(m){setTimeout(function(){Jn(function(){h().then(m)})},16)}):
h();
A("kevlar_client_side_screens")&&!b.filler&&c.createClientSideScreen_(b);d.then(function(){A("enable_navigation_requests_streamz")&&c.navigationRequestSentCounter_&&c.navigationRequestSentCounter_.increment(b.page||"null","COLD")})}else a?d.navigate(a):d.navigate({browseEndpoint:{browseId:"FEwhat_to_watch"}});
Dn.cancelJob(c.zwiebackInitJobId_);c.zwiebackInitJobId_=Fn(Dn,HDa)})},
isDataExpired_:function(a){return!a||isNaN(a.expirationTime)?!1:nn()>a.expirationTime},
logHistoryNav_:function(a,b){var c=this.get("response.trackingParams",b),d=Vo(),e=Wo();if(c&&d&&e&&(c=this.get("response.responseContext.webResponseContextExtensionData.ytConfigData.rootVisualElementType",b),a=this.getHistoryButtonVe_(a),b.csn=BS(c,{clientScreenNonce:e,visualElement:a||d},b.csn),d=io(c),b.response&&b.response.trackingParams&&CS(b.csn,d,go(b.response.trackingParams)),b.playerResponse&&b.playerResponse.trackingParams&&CS(b.csn,d,go(b.playerResponse.trackingParams)),b.graftedVes))for(e=
k(b.graftedVes),a=e.next();!a.done;a=e.next())CS(b.csn,d,a.value)},
getHistoryButtonVe_:function(a){var b=a?"forwardButton":"backButton";a=this.get("playerResponse.topbar.desktopTopbarRenderer."+b+".buttonRenderer.command.clickTrackingParams",this.data);b=this.get("response.topbar.desktopTopbarRenderer."+b+".buttonRenderer.command.clickTrackingParams",this.data);if(a=a||b)return go(a)},
onStoreGraftedVeAction_:function(a){this.data?(this.data.graftedVes||(this.data.graftedVes=[]),this.data.graftedVes.push(a)):xe(Error("this.data missing"))},
createClientSideScreen_:function(a){var b=this.get("response.responseContext.webResponseContextExtensionData.ytConfigData.rootVisualElementType",a);if(b){var c=nV();a.endpoint&&!a.endpoint.urlEndpoint?(a.previousCsn&&Xo(a.previousCsn,b),mBa(c,a.endpoint)):lBa(c,b,void 0);a.response&&a.response.trackingParams&&pV(c,a.response.trackingParams);a.playerResponse&&a.playerResponse.trackingParams&&pV(c,a.playerResponse.trackingParams)}},
onEntitiesUpdated:function(){}}];var zIa={};zIa.YtFeedbackCollectorBehavior=[U.YtActionHandlerBehavior,{_noAccessors:!0,created:function(){this.feedbackCollectorActionMap_={"yt-help-dialog-requested":"handleHelpDialogRequested_","yt-feedback-dialog-requested":"handleFeedbackDialogRequested_","yt-signal-action-help":"handleSignalActionHelp_","yt-signal-action-send-feedback":"handleSignalActionSendFeedback_","yt-send-feedback-action":"handleSendFeedbackAction_","yt-user-feedback-endpoint":"handleUserFeedbackEndpoint_"}},
attached:function(){this.registerActionMap(this.feedbackCollectorActionMap_)},
detached:function(){this.unregisterActionMap(this.feedbackCollectorActionMap_)},
handleFeedbackDialogRequested_:function(a){a=void 0===a?{}:a;this.getInterface(B7).showFeedbackDialog(a.customProductData,a.feedbackContent,a.onFeedbackSubmitted,a.bucket)},
handleHelpDialogRequested_:function(a){a=void 0===a?{}:a;this.getInterface(B7).showHelpDialog(a.helpContext,a.articleId,a.productData)},
handleSignalActionHelp_:function(){this.handleHelpDialogRequested_()},
handleSignalActionSendFeedback_:function(){this.handleFeedbackDialogRequested_()},
handleSendFeedbackAction_:function(a,b,c){a.sendFeedbackAction&&a.sendFeedbackAction.productId?PR({productId:a.sendFeedbackAction.productId,bucket:a.sendFeedbackAction.bucket,enableAnonymousFeedback:!0,allowNonLoggedInFeedback:!0},{feedbackChoice:c.feedbackChoice}):this.handleFeedbackDialogRequested_({bucket:a.sendFeedbackAction.bucket})},
handleUserFeedbackEndpoint_:function(a){if(a.userFeedbackEndpoint){a=a.userFeedbackEndpoint;var b={bucket:a.bucketIdentifier};a.additionalDatas&&(b.customProductData={},a.additionalDatas.forEach(function(c){if(c=c.userFeedbackEndpointProductSpecificValueData)b.customProductData[c.key]=c.value}));
this.handleFeedbackDialogRequested_(b)}}}];z$.YtLogYpcFlowCommandsBehavior=[[U.YtActionHandlerBehavior,{created:function(){this.logFlowCommandsMap_={"yt-log-ypc-flow-start-command":"handleLogYpcFlowStart_","yt-log-ypc-flow-dismiss-command":"handleLogYpcFlowDismiss_"}},
attached:function(){this.registerActionMap(this.logFlowCommandsMap_)},
detached:function(){this.unregisterActionMap(this.logFlowCommandsMap_)},
handleLogYpcFlowStart_:function(a){a.logYpcFlowStartCommand&&a.logYpcFlowStartCommand&&(a=a.logYpcFlowStartCommand,a.serializedTransactionFlowLoggingParams?HEa(a.serializedTransactionFlowLoggingParams):a.serializedYpcCancelFlowLoggingParams?(a=a.serializedYpcCancelFlowLoggingParams)&&OX("ypcCancelFlowStarted","serializedYpcCancelFlowLoggingParams",a):a.serializedYpcResumeFlowLoggingParams?(a=a.serializedYpcResumeFlowLoggingParams)&&OX("ypcResumeFlowStarted","serializedYpcResumeFlowLoggingParams",
a):a.serializedYpcPauseFlowLoggingParams&&(a=a.serializedYpcPauseFlowLoggingParams)&&OX("ypcPauseFlowStarted","serializedYpcPauseFlowLoggingParams",a))},
handleLogYpcFlowDismiss_:function(a){a.logYpcFlowDismissCommand&&(a=a.logYpcFlowDismissCommand,a.serializedTransactionFlowLoggingParams?IEa(a.serializedTransactionFlowLoggingParams):a.serializedYpcCancelFlowLoggingParams?(a=a.serializedYpcCancelFlowLoggingParams)&&OX("ypcCancelFlowCancelled","serializedYpcCancelFlowLoggingParams",a):a.serializedYpcResumeFlowLoggingParams?(a=a.serializedYpcResumeFlowLoggingParams)&&OX("ypcResumeFlowCancelled","serializedYpcResumeFlowLoggingParams",a):a.serializedYpcPauseFlowLoggingParams&&(
a=a.serializedYpcPauseFlowLoggingParams)&&OX("ypcPauseFlowCancelled","serializedYpcPauseFlowLoggingParams",a))}}]];MY.YtNextContinuationBehavior=r0;var T$=function(){this.registrationCompletedPromise_=null;this.isFirstWarmTransitionRequested_=!1},U$=function(a){if(a.registrationCompletedPromise_)return a.registrationCompletedPromise_;
if(se("ENABLE_SELECTIVE_REGISTRATION")){var b=ip.getInstance();a.registrationCompletedPromise_=lp(b,"eor")?bw():new Yv(function(c){b.parkOrScheduleJob(c,3,"eor")})}else a.registrationCompletedPromise_=bw();
return a.registrationCompletedPromise_},AIa=function(){var a=T$.getInstance();
if(se("ENABLE_SELECTIVE_REGISTRATION")){var b=ip.getInstance();lp(b,"eor")||a.isFirstWarmTransitionRequested_||(b.processSignal("fwtr"),a.isFirstWarmTransitionRequested_=!0)}a=U$(a);a.then(function(){re("IS_HOMEPAGE_COLD",!1);re("IS_RESULTS_PAGE_COLD",!1);re("IS_WATCH_PAGE_COLD",!1)});
return a};
Ua(T$);Na("yt.logging.errors.log",bn,void 0);mb(z("ERRORS")||[],function(a){bn.apply(null,a)});
re("ERRORS",[]);
window.onerror=function(a,b,c,d,e){var g=!1,h=te("log_window_onerror_fraction");if(h&&Math.random()<h)g=!0;else{h=document.getElementsByTagName("script");for(var m=0,n=h.length;m<n;m++)if(0<h[m].src.indexOf("/debug-")){g=!0;break}}g&&(g=!1,e?g=!0:(Ka(a)?h=a:ErrorEvent&&a instanceof ErrorEvent?(g=!0,h=a.message,b=a.filename,c=a.lineno,d=a.colno):(h="Unknown error",b="Unknown file",c=0),e=ze(h,"UnhandledWindowError"),e.message=h,e.fileName=b,e.lineNumber=c,isNaN(d)?delete e.columnNumber:e.columnNumber=
d),g?we(e):xe(e))};
window.Polymer&&!window.Polymer.Element&&ue&&hp();qw=ye;window.addEventListener("unhandledrejection",function(a){ye(a.reason)});var V$=function(){this.MAX_SIZE_=z("HISTORY_CACHE_MAX_SIZE",100);this.timeToDataCache_=new Map};
V$.prototype.get=function(a){var b=this.timeToDataCache_.get(a);b&&(this.timeToDataCache_.delete(a),this.timeToDataCache_.set(a,b));return b};
V$.prototype.set=function(a,b){if(this.timeToDataCache_.has(a))this.timeToDataCache_.delete(a);else if(this.timeToDataCache_.size>=this.MAX_SIZE_){var c=this.timeToDataCache_.keys().next();this.timeToDataCache_.delete(c.value)}this.timeToDataCache_.set(a,b)};
V$.prototype.clear=function(){this.timeToDataCache_.clear()};var BIa=function(a,b,c){this.entryTime=a;this.endpoint=b;this.savedComponentState=void 0===c?null:c};Polymer({is:"yt-history-manager",behaviors:[iY.ComponentBehavior,T.YtActionSenderBehavior],properties:{noIframe:Boolean},created:function(){this.historyEntryTime_=0;this.historyEntryTimeToDataMap_={};this.historySnapshotCache_=(this.USE_HISTORY_SNAPSHOT_CACHE_=A("web_enable_history_cache_map"))?new V$:null;this.global=window;this.iframe_=null;this.initialized_=!1;this.boundHistoryPushState_=this.boundHistoryReplaceState_=void 0;this.entryIndex_=0;this.debugInfo_={}},
hasBoundFunctions_:function(){return!!this.boundHistoryReplaceState_&&!!this.boundHistoryPushState_},
init:function(a){if(this.initialized_)return this.hasBoundFunctions_();this.initialized_=!0;if(!this.noIframe){var b=vh("IFRAME");b.src=A("polymer_history_javascript_src")?"javascript:\"\"":"about:blank";b.style.display="none";this.iframe_=b;document.body.appendChild(b)}this.bindHistoryStateFunctions_();a||this.replaceState(null,null,0);return this.hasBoundFunctions_()},
bindHistoryStateFunctions_:function(){var a=[];if(this.iframe_&&this.iframe_.contentWindow.history){var b=this.iframe_.contentWindow.history;b&&(a.push(b),b.__proto__&&a.push(b.__proto__))}this.global.history&&a.push(this.global.history);this.global.history.__proto__&&a.push(this.global.history.__proto__);b=function(d){for(var e=null,g=0;g<a.length;g++){var h=a[g];if(Za(h[d])){e=h[d].bind(this.global.history);this.debugInfo_[d]=g;break}}return e}.bind(this);
if(!this.boundHistoryReplaceState_){var c=b("replaceState");c&&(this.boundHistoryReplaceState_=c)}!this.boundHistoryPushState_&&(c=b("pushState"))&&(this.boundHistoryPushState_=c)},
attached:function(){this.listen(this.global,"popstate","onPopState_");"scrollRestoration"in this.global.history&&(this.global.history.scrollRestoration="manual")},
detached:function(){this.unlisten(this.global,"popstate","onPopState_")},
getDebugString_:function(){var a="";this.initialized_&&(a+=",i");this.boundHistoryReplaceState_&&(a+=",bhr");this.boundHistoryPushState_&&(a+=",bhs");"replaceState"in this.debugInfo_&&(a+=",brs:"+this.debugInfo_.replaceState);"pushState"in this.debugInfo_&&(a+=",bps:"+this.debugInfo_.pushState);return a+=",ei:"+this.entryIndex_},
onPopState_:function(a){eq("h");pq("nr","h");var b=null;a.state||(b="History popstate has no state.");b&&(b+=" - "+this.getDebugString_());if(!this.fire("yt-history-pop",{errorMsg:b},{cancelable:!0}).defaultPrevented){var c=this.getInterface(vV);b=c.getCurrentData();c=this.sendAction("yt-get-page-offset",[c.getCurrentPage()]);this.saveSnapshot_(this.historyEntryTime_,b,c[0])}if(a.state){var d=b=null;c=!1;var e=null,g=!!a.state["spf-timestamp"]||!!a.state.blazer;a.state.entryTime&&(a=a.state,e=this.USE_HISTORY_SNAPSHOT_CACHE_?
this.historySnapshotCache_.get(a.entryTime):this.historyEntryTimeToDataMap_[a.entryTime],c=a.entryTime>this.historyEntryTime_,this.historyEntryTime_=a.entryTime,b=a.endpoint,d=a.savedComponentState);c?this.entryIndex_++:this.entryIndex_--;this.fire("yt-history-load",new EGa(b,c,e,d,g))}},
saveSnapshot_:function(a,b,c){se("DISABLE_DATA_REPLAY",!1)&&(b={});b=new DGa(b,c);this.USE_HISTORY_SNAPSHOT_CACHE_?this.historySnapshotCache_.set(a,b):this.historyEntryTimeToDataMap_[a]=b},
clearSavedStates:function(){this.USE_HISTORY_SNAPSHOT_CACHE_?this.historySnapshotCache_.clear():this.historyEntryTimeToDataMap_={}},
safeReplaceState_:function(a,b,c){this.boundHistoryReplaceState_||this.bindHistoryStateFunctions_();this.boundHistoryReplaceState_?this.boundHistoryReplaceState_(a,b,c):we(Error("history.replaceState is not a function"))},
safePushState_:function(a,b,c){this.entryIndex_++;this.boundHistoryPushState_||this.bindHistoryStateFunctions_();this.boundHistoryPushState_?this.boundHistoryPushState_(a,b,c):we(Error("history.pushState is not a function"))},
replaceState:function(a,b,c,d){this.init(!0);var e=this.global.history.state&&this.global.history.state.entryTime?this.global.history.state.entryTime:window.performance.now();a=new BIa(e,a,d);this.saveSnapshot_(e,b,c);this.historyEntryTime_=e;this.safeReplaceState_(a,"",this.global.location.href)},
replaceUrl:function(a){this.init(!0);this.safeReplaceState_(this.global.history.state,"",a)},
replaceSavedComponentState:function(a){this.init(!0);var b=this.global.history.state;b.savedComponentState=a;this.safeReplaceState_(b,"",qi(this.global.location.href))},
saveAndPush:function(a,b,c,d,e){this.init();this.maybeCacheTime_(c);this.saveSnapshot_(this.historyEntryTime_,c,d);b=new BIa(window.performance.now(),b,e);this.historyEntryTime_=b.entryTime;this.safePushState_(b,"",a)},
maybeCacheTime_:function(a){var b=qW(this);if("watch"==a.page&&this.get("player.args",a)&&!this.get("player.args.live_playback",a)&&b&&(b=b.getPlayer())){var c=b.getDuration()-b.getCurrentTime()>Be("kevlar_time_caching_end_threshold")&&b.getCurrentTime()>Be("kevlar_time_caching_start_threshold");a.player.args.start=c?b.getCurrentTime():0}}});MY.YtNavigationManagerBehavior={_noAccessors:!0,created:function(){this.pendingNavigationPromise_=null},
hasPendingNavigation:function(){return!!this.pendingNavigationPromise_},
cancelPendingNavigation:function(){this.pendingNavigationPromise_&&(this.pendingNavigationPromise_=null)}};function CIa(a){var b=ri(qi(q.location.href));a=ri(qi(a));return W$(b)==W$(a)}
var DIa=["frags"];function W$(a){var b=Oba(a),c=a.slice(0);DIa.forEach(function(d){c=Fi(ri(c),d)});
return ri(c)+(b?"#"+b:"")}
;function EIa(a){if(!a.urlEndpoint)return!1;if(!a.urlEndpoint.url)return we(Error("UrlEndpoint with no url specified.")),!1;if("TARGET_NEW_WINDOW"==a.urlEndpoint.target){var b=a.urlEndpoint.url;a={target:"_blank",noopener:!0};var c=window;var d=b instanceof uc?b:Ac("undefined"!=typeof b.href?b.href:String(b));b=a.target||b.target;var e=[];for(g in a)switch(g){case"width":case"height":case"top":case"left":e.push(g+"="+a[g]);break;case"target":case"noopener":case"noreferrer":break;default:e.push(g+
"="+(a[g]?1:0));}var g=e.join(",");Je()&&c.navigator&&c.navigator.standalone&&b&&"_self"!=b?(g=c.document.createElement("A"),fd(g,d),g.setAttribute("target",b),a.noreferrer&&g.setAttribute("rel","noreferrer"),a=document.createEvent("MouseEvent"),a.initMouseEvent("click",!0,!0,c,1),g.dispatchEvent(a)):a.noreferrer?(c=c.open("",b,g),a=wc(d),c&&(Pe&&pc(a,";")&&(a="'"+a.replace(/'/g,"%27")+"'"),c.opener=null,a=cd("<meta name=\"referrer\" content=\"no-referrer\"><meta http-equiv=\"refresh\" content=\"0; url="+
od(a)+"\">"),c.document.write(Vc(a)),c.document.close())):(c=c.open(wc(d),b,g))&&a.noopener&&(c.opener=null)}else if(oi(a.urlEndpoint.url)&&!si(window.location.href,a.urlEndpoint.url))qq("n"),zU(a.urlEndpoint.url,void 0,void 0,window.top);else return c=Error("UrlEndpoint should not be used for same origin navigations. Use a better typed endpoint instead."),c.params=a,xe(c),!1;return!0}
function FIa(a){if(!(a.signOutEndpoint||a.signInEndpoint||a.urlEndpoint&&a.urlEndpoint.url)||!a.clickTrackingParams)return!1;var b=a.clickTrackingParams,c=Wo();return c&&b?(Co(c,go(b),a.urlEndpoint&&a.urlEndpoint.url?{externalLinkData:{url:a.urlEndpoint.url}}:null),!0):!1}
;var GIa="/channel/ /feed/ /gaming /gaming/ /manage_red /originals /playlist /results /search /user/ /watch /youtuberedoriginals /paid_memberships".split(" ");
Polymer({is:"yt-navigation-manager",provides:D2,behaviors:[iY.ComponentBehavior,MY.YtNavigationManagerBehavior,U.YtActionHandlerBehavior,T.YtActionSenderBehavior],actionMap:{"yt-signal-action-channel-reload-without-polymer":"handleSignalActionChannelReloadWithoutPolymer_","yt-signal-action-reload-without-polymer":"handleSignalActionReloadWithoutPolymer_","yt-signal-action-reload-page":"handleSignalActionReloadPage_","yt-signal-action-reset-warm-loads":"handleSignalActionResetWarmLoads_"},created:function(){this.logger_=
null;this.numNavigations_=-1;this.chunksReceived_=0;this.lastNavigationUrl_=this.pendingNavigationPromise_=null;this.initClientStreamzObjects_();this.autoplayCount=1;this.resetWarmLoads_=!1},
initClientStreamzObjects_:function(){A("enable_servlet_streamz")&&(this.requestCounter_=new F$,this.responsesCounter_=new G$);A("debug_servlet_streamz")&&(this.navigatePageTypeCounter_=new I$,this.awayFromAppEndpointCounter_=new J$,this.cannotGenerateURLCounter_=new K$,this.forcedColdLoadCounter_=new L$,this.pageRequestFailCounter_=new M$,this.loadPageRequestCounter_=new N$,this.pageChunkReceivedCounter_=new O$,this.pageRequestFinishedCounter_=new P$,this.pageUpdateFinishCounter_=new Q$);A("enable_navigation_requests_streamz")&&(
this.navigationRequestSentCounter_=new S$(HS()));A("enable_servlet_errors_streamz")&&(this.servletResponseErrorsCounter_=new H$)},
factoryImpl:function(){},
currentEndpoint_:null,getPageTypeForEndpoint_:function(a){var b="";if(!a)return null;a.commandMetadata&&a.commandMetadata.webCommandMetadata&&a.commandMetadata.webCommandMetadata.webPageType?(a=a.commandMetadata.webCommandMetadata.webPageType.toLowerCase())?(a=a.toLowerCase(),a.startsWith("web_page_type_")&&(a=a.slice(14)),b=a):b=a:a.webNavigationEndpointData&&a.webNavigationEndpointData.webPageType?b=a.webNavigationEndpointData.webPageType.toLowerCase():a.browseEndpoint||a.watchPlaylistEndpoint?
b="browse":a.searchEndpoint?b="search":a.watchEndpoint&&(b="watch");return b},
getCurrentEndpoint:function(){return this.currentEndpoint_},
reload:function(){window.location.reload()},
navigate:function(a,b,c,d,e){var g=this;c=void 0===c?{}:c;d=void 0===d?{}:d;var h=this.getPageTypeForEndpoint_(a);this.navigatePageTypeCounter_&&this.navigatePageTypeCounter_.increment(h||"null",e||"null");var m="1"==d.autonav,n=Wo(),p;if("watch"===h&&(A("kevlar_prefetch")&&(p=aDa(eX.getInstance(),a,m)),A("persistent_miniplayer")&&this.shouldLoadEndpointInMiniplayer_()))return this.endpointInMiniplayer_(a)?this.sendAction("yt-expand-watch-page-action"):this.sendAction("yt-miniplayer-load-endpoint",
[a]),!1;p&&(c.frags=p.missingFragments_.join(","));var x=null;this.get("commandMetadata.webCommandMetadata.ignoreNavigation",a)||(x=A("kevlar_command_url")?this.get("commandMetadata.webCommandMetadata.url",a):PU(a,c));var y=!1;if(A("cancel_pending_navs")&&x&&this.pendingNavigationPromise_){if(A("web_dont_cancel_pending_navigation_same_url")&&this.lastNavigationUrl_&&x==this.lastNavigationUrl_)return jq("nrsu")||pq("nrsu",1),A("kevlar_track_mousedown_prefetch")&&XW.getInstance().resolve(!1,!0),!1;
this.pendingNavigationPromise_.cancel();y=!0}x&&(this.lastNavigationUrl_=x);var B=AIa();!A("kevlar_nav_logging_urls_killswitch")&&a.loggingUrls&&a.loggingUrls.forEach(function(P){P.baseUrl&&Zo(P.baseUrl)});
FIa(a)&&A("kevlar_flush_logs_on_away_navigation")&&eo();if(EIa(a))return this.awayFromAppEndpointCounter_&&this.awayFromAppEndpointCounter_.increment(h||"null"),!1;if(!x)return this.cannotGenerateURLCounter_&&this.cannotGenerateURLCounter_.increment(h||"null"),!1;FS();if(this.shouldRedirect_(x)||z("DISABLE_WARM_LOADS")||this.resetWarmLoads_)return zU(x,void 0,void 0,window.top),this.forcedColdLoadCounter_&&this.forcedColdLoadCounter_.increment(h||"null",this.shouldRedirect_(x),z("DISABLE_WARM_LOADS")),
!1;this.resetChunkState();eq("n");kq("nd");hq("nr");m&&pq("nr","an");y&&pq("pnc",1);if(A("kevlar_mousedown_prefetch")&&p&&p.completionPromise){var G=p.completionPromise;p.addPartCallback(function(P){g.handleNavigatePart_(G,a,P)})}else a.clickTrackingParams&&(d.itct=a.clickTrackingParams,d.csn=n),A("kevlar_client_side_screens")&&(d.endpoint=JSON.stringify(a)),u.isEmpty(d)||cS(x,d),m={headers:{"X-YouTube-STS":18138}},e&&(m.type=e),this.requestCounter_&&this.requestCounter_.increment(h||"null"),G=this.getInterface(BW).requestDataForEndpoint(a,
c,function(P){this.handleNavigatePart_(G,a,P)}.bind(this),m,!!A("cancel_pending_navs"));
this.pendingNavigationPromise_=G;c=B.then(function(){return G}).then(this.handleNavigateSuccess_.bind(this,G,a,p,d),this.handleNavigateFail_.bind(this,G,a));
xV.getInstance().navigationFinishPromise=c;b={endpoint:a,pageType:h,url:W$(x),reload:!!b};e&&(b.type=e);B.then(this.fire.bind(this,"yt-navigate-start",b));p&&B.then(this.loadPrefetchedData_.bind(this,a,p));return!0},
loadPrefetchedData_:function(a,b){(b=$W(b))&&this.loadPageChunk_(a,b)},
navigateApp:function(){throw Error("Not implemented for this navigation manager.")},
isNetworkPromiseStale_:function(a){return a!=this.pendingNavigationPromise_},
pageRequestFail_:function(a,b,c){var d=this.getPageTypeForEndpoint_(a);this.pageRequestFailCounter_&&this.pageRequestFailCounter_.increment(d||"null");a={endpoint:a,pageType:d};c&&(a.errorMessage=c);we(b,"WARNING");a.navigationDoneMs=rq("nd");this.responsesCounter_&&(c=this.get("params.error.0.code",b)||"null_error",this.responsesCounter_.increment("failure",d||"null",c));this.servletResponseErrorsCounter_&&(d=this.get("params.error.0.code",b)||"null_error_code",b=this.get("params.error.0.location",
b)||"null_error_location",this.servletResponseErrorsCounter_.increment(d,b));this.fire("yt-navigate-error",a)},
handleNavigateFail_:function(a,b,c){if(this.isNetworkPromiseStale_(a))return A("kevlar_track_mousedown_prefetch")&&XW.getInstance().resolve(!0),a=void 0,c instanceof kw&&(a=c),cw(a);this.pageRequestFail_(b,c);return cw()},
handleNavigatePart_:function(a,b,c){this.isNetworkPromiseStale_(a)||(c.reload?window.location.reload(!0):U$(T$.getInstance()).then(this.pageChunkReceived_.bind(this,b,c)))},
handleNavigateSuccess_:function(a,b,c,d,e){if(this.isNetworkPromiseStale_(a))return A("kevlar_track_mousedown_prefetch")&&XW.getInstance().resolve(!0),bw();A("kevlar_track_mousedown_prefetch")&&XW.getInstance().resolve();this.pendingNavigationPromise_=null;if(!e)return cw(Error("Missing data in response for navigation endpoint: "+JSON.stringify(b)));if(e.reload)return window.location.reload(!0),bw();c&&(a={},u.extend(a,$W(c),e),e=a);c=this.get("timing.responseStart",e);null!=c&&rq("srt",c);rq("pdc");
c=this.get("timing.info",e);if(null!=c)for(var g in c)pq(g,c[g]);A("decorate_autoplay_renderer")&&(d.playnext?PW().count++:PW().count=1);(d=this.get("response.responseContext.webResponseContextExtensionData.webResponseContextPreloadData.preloadThumbnailUrls",e))&&this.fire("yt-preconnect-urls",d);if(d&&A("polymer_warm_thumbnail_preload"))return new Yv(function(h){this.async(function(){A("enable_chunk_load_requests_streamz")&&this.incrementNavigationRequestsStreamz_(b);this.pageRequestFinished(b,e,
!1);h()}.bind(this))}.bind(this));
A("enable_navigation_requests_streamz")&&this.incrementNavigationRequestsStreamz_(b);this.pageRequestFinished(b,e,!1);return bw()},
shouldRedirect_:function(a){if("/"==a||"/red"==a)return!1;var b=!0;GIa.forEach(function(c){0==a.indexOf(c)&&(b=!1)});
return b},
publishPageData_:function(a){this.fire("yt-page-data-fetched",{pageData:a})},
updatePlayer_:function(a,b,c,d,e){var g=qW(this);if(!g)return b=Error("Player missing when attempting update from updatePlayer_"),b.params="el="+this.get("args.el",a),we(b),bw();try{return g.update(a,g,b,c,d,e)}catch(h){we(h)}return bw()},
updatePlayerComponents_:function(a,b,c,d){try{var e=sW(this);e.updatePlayerComponents(a,b,c,d)}catch(g){e?we(g):we(Error("Player missing when attempting update from updatePlayerComponents_"))}},
loadPageChunk_:function(a,b){this.performChunkLoad_(a,b,!1,!0)},
resetChunkState:function(){this.chunksReceived_=0;this.chunkHandler_=void 0},
makeChunkPayload_:function(a,b){return{endpoint:a,data:b}},
performChunkLoad_:function(a,b,c,d){if(!this.chunkHandler_){var e=this.getInterface(vV);this.chunkHandler_="watch"==b.page?d||c?new VV(this.playerProvider_.bind(this),e,{clientParams:{miniplayer:!1,autoSaveToQueue:!0}}):new WV(this.playerProvider_.bind(this),e):new nBa}this.chunkHandler_.processChunk(this.makeChunkPayload_(a,b));return this.chunkHandler_.playerPromiseResolver.promise},
loadPageRequest_:function(a,b,c,d){var e=null;this.loadPageRequestCounter_&&this.loadPageRequestCounter_.increment(null!==a.player,a.page||"null",b,c);if("watch"!=a.page||c){if(a.player){if(this.get("response.contents.twoColumnWatchNextResults",a)){var g=this.get("response.playerOverlays.playerOverlayRenderer.endScreen.watchNextEndScreenRenderer",a);var h=this.get("response.contents.twoColumnWatchNextResults.autoplay.autoplay",a);var m=this.get("response.webWatchNextResponseExtensionData.relatedVideoArgs",
a);var n=this.get("response.contents.twoColumnWatchNextResults.playlist.playlist",a)}else this.get("response.contents.singleColumnWatchNextResults",a)&&(m=this.get("response.webWatchNextResponseExtensionData.relatedVideoArgs",a));b&&LDa(a.player.args);b=this.updatePlayer_.bind(this,a.player,g,h,m,n);a.filler||(iq("cfg"),this.sendAction("player-update-pre",[a.page,a.player,a.playerResponse]));"browse"==a.page?this.asyncFrame(b,0):e=c?bw():this.isMiniplayerActive_()&&this.isPlayerPlayingData_(a)?bw():
b()}a.filler||this.sendAction("yt-stop-old-player",[a])}else e=this.performChunkLoad_(d,a,b,!1);if(e)return e.then(this.publishPageData_.bind(this,a));this.publishPageData_(a);return bw()},
checkNetworkResponseErrors_:function(a){var b=null;if(!a)return b=Error("Error: Empty data.");a.response||(b=Error("Response field missing from data"));var c=a.response;c.responseContext||(b=Error("Error: responseContext missing from data response."));if(c=c.responseContext.errors)if(b=Error("Error: Errors in response context."),b.params=c,A("reload_without_polymer_innertube"))for(var d in c)if(d.argument)for(var e in d.argument)"REDIRECT_TO_VIDEO"==e&&F3();if(a=this.get("response.responseContext.webResponseContextExtensionData.webResponseContextDebugData.debugErrorMessages",
a))for(d=0;d<a.length;d++);return b},
getUserFacingErrorMessage_:function(a){return this.get("response.responseContext.errors.error.0",a)},
pageChunkReceived_:function(a,b){rq("nc"+this.chunksReceived_);this.chunksReceived_++;this.currentEndpoint_=a;if(this.pageChunkReceivedCounter_){var c=this.getPageTypeForEndpoint_(a);this.pageChunkReceivedCounter_.increment(this.chunksReceived_,b.page||"null",c||"null")}b&&LGa(b)?F3():(b.url&&!CIa(b.url)&&this.fire("yt-navigate-redirect",{url:b.url}),b.csn&&b.rootVe&&Xo(b.csn,b.rootVe),"watch"==b.page&&b.response&&!A("disable_watch_next_delay")?Hn(Dn,this.loadPageChunk_.bind(this,a,b)):this.loadPageChunk_(a,
b))},
pageRequestFinished:function(a,b,c,d,e){e=void 0===e?!1:e;this.currentEndpoint_=a;if(this.pageRequestFinishedCounter_){var g=this.getPageTypeForEndpoint_(a);this.pageRequestFinishedCounter_.increment(g||"null",b.page||"null",c,e)}this.numNavigations_++;this.numNavigations_&&(BDa.navigationCount=this.numNavigations_);re("NUM_NAV",this.numNavigations_);if(b&&LGa(b))return F3(),cw();if(g=this.checkNetworkResponseErrors_(b))return e=this.getUserFacingErrorMessage_(b),this.pageRequestFail_(a,g,e),cw();
g=b.rootVe||this.get("response.responseContext.webResponseContextExtensionData.ytConfigData.rootVisualElementType",b);b.csn&&g&&(Xo(b.csn,g),JS());c||!b.url||CIa(b.url)||this.fire("yt-navigate-redirect",{url:b.url});var h=this.get("response.responseContext.maxAgeSeconds",b);if(!c&&!isNaN(h)){var m;A("kevlar_use_response_ttl_to_invalidate_cache")?m=Hm()+1E3*h:A("kevlar_always_invalidate_cache")&&(m=0);isNaN(m)||(b.expirationTime=m)}eX.getInstance().prefetchCache_.clear();c||"watch"!=b.page||"reduced"!=
b.type?e=this.loadPageRequest_(b,c,!!e,a):(this.publishPageData_(b),e=bw());d&&(e=e.then(function(){this.sendAction("yt-restore-component-state-action",[d])}.bind(this)));
(m=this.getInterface(mW))&&m.markDirty();m=e.then(function(){var n=this.getPageTypeForEndpoint_(a);this.pageUpdateFinishCounter_&&this.pageUpdateFinishCounter_.increment(n||"null",b.page||"null",c.toString()||"null");var p={endpoint:a,pageType:n,fromHistory:c,response:b};p.navigationDoneMs=rq("nd");!c&&this.responsesCounter_&&this.responsesCounter_.increment("success",n||"null","null");this.fire("yt-navigate-finish",p)}.bind(this));
b.csn&&g&&b.clientSideGrafts&&e.then(this.attachClientSideGrafts_.bind(this,b,Vo()));return m},
attachClientSideGrafts_:function(a,b){a.clientSideGrafts&&b&&a.clientSideGrafts.forEach(function(c){b&&c&&CS(a.csn,b,go(c))})},
endpointInMiniplayer_:function(a){var b=this.sendOptionalAction("yt-get-miniplayer-component-action");if(!(b&&b.length&&b[0]))return!1;a=this.get("commandMetadata.webCommandMetadata.url",a);b=this.get("data.watchEndpoint.commandMetadata.webCommandMetadata.url",b[0]);return a&&b?(a=ox(new cx(a),"v"),b=ox(new cx(b),"v"),a===b):!1},
handleSignalActionChannelReloadWithoutPolymer_:function(){this.async(function(){F3(!0)},500)},
handleSignalActionReloadWithoutPolymer_:function(){F3()},
handleSignalActionReloadPage_:function(){this.reload()},
handleSignalActionResetWarmLoads_:function(){this.resetWarmLoads_=!0},
playerProvider_:function(){return qW(this)},
isPlayerPlayingData_:function(a){var b=qW(this);if(!b)return!1;b=(b=b.getPlayer())&&b.getVideoData();if(!b)return!1;b=b.video_id;a=this.get("player.args.video_id",a);return!!b&&b==a},
isMiniplayerActive_:function(){var a=this.sendOptionalAction("yt-miniplayer-active");return a&&a.length&&a[0]},
shouldLoadEndpointInMiniplayer_:function(){return this.isMiniplayerActive_()&&(xV.getInstance().userActivation||xV.getInstance().lockupActivation)},
incrementNavigationRequestsStreamz_:function(a){this.navigationRequestSentCounter_&&(a=this.getPageTypeForEndpoint_(a),this.navigationRequestSentCounter_.increment(a||"null","WARM"))}});function HIa(a){if(a){var b=new Image;gd(b,a)}}
;Polymer({is:"yt-network-manager",provides:BW,behaviors:[iY.ComponentBehavior],properties:{baseUrl:{type:String,value:""},baseServiceEndpointUrl:{type:String,value:""},mobile:Boolean},factoryImpl:function(){},
created:function(){this.aTag_=document.createElement("a");this.preloadTagPool_=[]},
attached:function(){this.listen(document,"yt-preconnect-urls","onYtPreconnectUrls_")},
detached:function(){this.unlisten(document,"yt-preconnect-urls","onYtPreconnectUrls_")},
onYtPreconnectUrls_:function(a,b){b.forEach(HIa)},
endpointToXhrUrl:function(a,b){b=void 0===b?{}:b;b.pbj||(b.pbj=1);a=PU(a,b);this.baseUrl&&a&&(ni(1,a)||oi(a)||(a=Hi(this.baseUrl,a)));this.aTag_.href=a;return this.aTag_.href},
fetchData:function(a){return t4(a)},
postData:function(a,b){var c={method:"POST"};if(b){for(var d in b){var e=b[d];$a(e)&&(b[d]=JSON.stringify(e))}c.postParams=b}return t4(a,c)},
requestDataForEndpoint:function(a,b,c,d,e){b=this.endpointToXhrUrl(a,b);if(!b)throw c=Error("Cannot construct url for endpoint"),c.params=a,c;return t4(b,d,c,e)},
requestDataForServiceEndpoint:function(a,b){b=b||{};var c=a.webSerializedServiceEndpointExtension;c?b.se=c.base64EncodedServiceEndpoint:b.sej=JSON.stringify(a);(c=Wo())&&A("enable_service_ajax_csn")&&(b.csn=c);a.getAccountMenuEndpoint&&a.getAccountMenuEndpoint.sendTheme&&(b.theme=nS());c=null;for(var d in a)if(fc(d,"Endpoint")||fc(d,"Command")){c=d;break}if(!c)return b=Error("Missing endpoint name for serviceEndpoint"),b.params=a,cn(b,"WARNING"),a=fw(),a.reject(b),a;d={name:c};a.signalServiceEndpoint&&
a.signalServiceEndpoint.signal&&(d.signal=a.signalServiceEndpoint.signal);(c=mm(window.location.href))&&c.internalcountrycode&&(d.internalcountrycode=c.internalcountrycode);c="/service_ajax";A("debug_forward_web_query_parameters")&&(c=Sm(c));this.baseServiceEndpointUrl&&(c=Hi(this.baseServiceEndpointUrl,c));d=Ai(c,d);a.clickTrackingParams&&cS(d,{itct:a.clickTrackingParams});return this.postServiceRequest_(d,b)},
postServiceRequest_:function(a,b){return this.postData(a,b)}});Polymer({is:"yt-visibility-monitor",behaviors:[iY.ComponentBehavior],provides:mW,properties:{trackWindowScroll:Boolean,heightPrescan:{type:Number,value:50},pauseScan:{type:Boolean,observer:"pauseScanChanged_"}},created:function(){this.dirty_=!0;this.visibilityRoot_=null;this.timeBetweenJobsMs_=z("VISIBILITY_TIME_BETWEEN_JOBS_MS",500);this.nodeCount_=0;this.screenRect_=new Wi(0,0,window.innerWidth,window.innerHeight);this.prescanRect_=null;this.pendingRefresh_=!1;this.lastJobRunTime_=0;this.boundDoAfterRenderRequest_=
this.doAfterRenderRequest_.bind(this);this.lastVisibleSet_=new Set;this.logger_=null},
factoryImpl:function(){},
get visibilityRoot(){if(!this.visibilityRoot_){var a=z("VISIBILITY_ROOT",void 0);a&&(this.visibilityRoot_=Polymer.dom(this.parentElement.root).querySelector(a))}return this.visibilityRoot_},set visibilityRoot(a){this.visibilityRoot_&&this.unlisten(this.visibilityRoot_,"yt-visibility-refresh","markDirty");this.visibilityRoot_=a;this.dirty_=!1;this.refreshVisibility_();this.visibilityRoot_&&this.listen(this.visibilityRoot_,"yt-visibility-refresh","markDirty")},attached:function(){this.requestVisibilityRefresh();
this.trackWindowScroll&&(this.listen(window,"resize","markDirty"),this.listen(window,"scroll","markDirty"));this.visibilityRoot&&this.listen(this.visibilityRoot,"yt-visibility-refresh","markDirty")},
reset:function(){this.lastVisibleSet_.clear()},
runVisibilityJob_:function(){this.pendingRefresh_=!1;this.lastJobRunTime_=Date.now();this.refreshVisibility_()},
doIdleRequest_:function(a){window.setTimeout(this.boundDoAfterRenderRequest_,a)},
doAfterRenderRequest_:function(){Polymer.RenderStatus.afterNextRender(this,this.runVisibilityJob_)},
requestVisibilityRefresh:function(){if(!this.pendingRefresh_){this.pendingRefresh_=!0;var a=Date.now()-this.lastJobRunTime_;a>=this.timeBetweenJobsMs_?this.doAfterRenderRequest_():this.doIdleRequest_(this.timeBetweenJobsMs_-a)}},
refreshVisibility_:function(){if(this.dirty_&&!this.pauseScan)if(this.dirty_=!1,this.isAttached){var a=this.visibilityRoot;if(a){var b=window.innerHeight,c=window.innerWidth;this.nodeCountNoPreload_=this.nodeCount_=0;this.screenRect_=new Wi(0,0,c,b);this.prescanRect_=new Wi(this.screenRect_.left,this.screenRect_.top+this.screenRect_.height,this.screenRect_.width,this.heightPrescan);b=new Set;this.traverseNodes_(a,this.screenRect_,b,0);a=aZ.getInstance();c=k(b);for(var d=c.next();!d.done;d=c.next())d=
d.value,this.lastVisibleSet_.has(d)||TFa(a,d),this.lastVisibleSet_.delete(d);this.lastVisibleSet_.forEach(a.hidden.bind(a));this.lastVisibleSet_=b;this.fire("yt-visibility-monitor-refreshed")}else xe(Error("Cannot find root node for visibility monitor"))}else xe(Error("Visibility monitor is not attached"))},
isNodeVisible:function(a){return this.lastVisibleSet_.has(a)},
traverseNodes_:function(a,b,c,d){if(3!=a.visibilityLogging){var e=IS.getInstance();d=a.screenLayer||d;var g=window.getComputedStyle(a);if(!g||"none"!=g.display&&"hidden"!=g.visibility){var h=a.getBoundingClientRect();if(h.top||h.right||h.bottom||h.left||h.width||h.height){h=new Wi(h.left,h.top,h.width,h.height);b=A("viewport_non_overlapping_intersect")?h.left<b.left+b.width&&b.left<h.left+h.width&&h.top<b.top+b.height&&b.top<h.top+h.height:Xi(h,b);var m=Xi(h,this.screenRect_);g=g&&"fixed"==g.position?
m:b&&m;b=null;this.heightPrescan&&(b=!a.disablePrescanVisibility&&Yi(h,this.prescanRect_));if(g||b){g&&c.add(a);if(!a.wasVisible&&!a.wasPrescan&&a.onShow)a.onShow();g?LS(e,a,d):MS(e,a,d);a.wasVisible||(a.wasVisible=!!g);a.wasPrescan||(a.wasPrescan=b);this.nodeCount_++;if((a=a.getNodes?a.getNodes():null)&&a.length)for(e=a.length,g=0;g<e;g++){b=a[g];m=h;var n=void 0;if(Polymer.Element){var p=b.constructor.generatedFrom;p&&(n=p.hostAttributes)}else n=b.hostAttributes;n&&n.dialog&&(m=this.screenRect_);
this.traverseNodes_(b,m||h,c,d)}}else!MS(e,a,d)&&A("web_log_hidden_children")&&NS(e,a,d)}}else!MS(e,a,d)&&A("web_log_hidden_children")&&NS(e,a,d)}},
markDirty:function(){this.dirty_=!0;this.requestVisibilityRefresh()},
pauseScanChanged_:function(a){a||this.requestVisibilityRefresh()}});var IIa={channelUri:"https://client-channel.google.com/client-channel/client",senderUri:"https://clients4.google.com/invalidation/lcs/client",clientName:"yt-share",clientType:1066,objectId:"0",objectSource:0,requiresAuthToken:!1};Polymer({is:"yt-activity-manager",provides:EY,behaviors:[iY.ComponentBehavior,T.YtActionSenderBehavior],factoryImpl:function(){},
created:function(){On();var a=this.sendOptionalAction.bind(this,"yt-user-activity");Na("ytglobal.ytUtilActivityCallback_",a,void 0);this.eventJobIds_=Object.create(null);this.WAIT_FOR_SCROLL_EVENT_DURATION_=500;this.scrollEventsToIgnore_=0;this.stopIgnoringScrollTimeoutIds_=[];new Lm(this.onMouseMove_.bind(this));this.listen(document,"scroll","onScroll_");this.listen(window,"resize","onResize_")},
setTimestampAfterDelay_:function(a,b){a in this.eventJobIds_||(b=Fn(Dn,this.setTimestampAndClearJob_.bind(this,a),b),this.eventJobIds_[a]=b)},
setTimestampAndClearJob_:function(a){Pn();delete this.eventJobIds_[a]},
onScroll_:function(a){0<this.scrollEventsToIgnore_?this.stopIgnoringScroll_():a.target==document&&this.setTimestampAfterDelay_("scroll",200)},
onResize_:function(){this.setTimestampAfterDelay_("resize",200)},
onMouseMove_:function(){this.setTimestampAfterDelay_("mousemove",100)},
stopIgnoringScroll_:function(a){this.scrollEventsToIgnore_--;a||clearTimeout(this.stopIgnoringScrollTimeoutIds_.pop())},
getTimeSinceActive:function(){return Rn()},
ignoreNextScroll:function(){this.scrollEventsToIgnore_+=1;this.stopIgnoringScrollTimeoutIds_.push(setTimeout(this.stopIgnoringScroll_.bind(this,!0),this.WAIT_FOR_SCROLL_EVENT_DURATION_))}});function JIa(){var a={abuseLink:"https://support.google.com/youtube/bin/answer.py?answer=140536",customZIndex:"2000000005"};A("gfeedback_for_signed_out_users_enabled")&&(a.allowNonLoggedInFeedback=!0);z("GOOGLE_FEEDBACK_FORCE_ANONYMOUS")&&(a.enableAnonymousFeedback=!0);z("SESSION_INDEX")&&(a.authuser=String(z("SESSION_INDEX")));return a}
var X$=function(a){this.element=a;this.productData_={};this.chatSupportLoaded_=!1;document.body.addEventListener("yt-page-data-updated",this.resetProductData_)};
X$.prototype.showFeedbackDialog=function(a,b,c,d){var e=KIa();if(!e)return!1;var g=JIa();g.productId=e;b&&(g.flow="submit",g.report={description:b});c&&(g.callback=ve(c));g.bucket=d||z("GOOGLE_FEEDBACK_BUCKET","Other");LIa(g);a=MIa(this,"GFEEDBACK",a);try{PR(g,a)}catch(h){return we(h),!1}return!0};
X$.prototype.showHelpDialog=function(a,b,c){var d=this,e=KIa();if(!e)return!1;var g={helpCenterPath:"/youtube",productData:MIa(this,"GUIDED_HELP",c)};LIa(g);var h=JIa();h.context=a||g.productData.context||"default";h.defaultHelpArticleId=b;h.enableSendFeedback=!0;(Sa("gapi.load")||function(m,n){return n()})("client",function(){try{var m=g||{},n=Nka(Rka,"help.service.Lazy.create",e,{apiKey:m.apiKey||m.apiKey,
environment:m.environment||m.environment,helpCenterPath:m.helpCenterPath||m.helpCenterPath,locale:m.locale||m.locale||"en".replace(/-/g,"_"),nonce:m.nonce||m.nonce,productData:m.productData||m.productData,receiverUri:m.receiverUri||m.receiverUri,renderApiUri:m.renderApiUri||m.renderApiUri,theme:m.theme||m.theme,window:m.window||m.window});var p=new Qka(n);if(A("web_always_load_chat_support")&&!d.chatSupportLoaded_)try{p.loadChatSupport(h),d.chatSupportLoaded_=!0}catch(x){}p.startHelp(h)}catch(x){we(x)}})};
var KIa=function(){var a=z("GOOGLE_FEEDBACK_PRODUCT_ID",void 0);a||we(Error("Missing feedback product ID"));return a},LIa=function(a){a&&(a.locale=A("kevlar_help_use_locale")?z("INNERTUBE_CONTEXT_HL","en"):z("HTML_LANG","en"))},MIa=function(a,b,c){var d=a.productData_;
delete d.origin;d.device=Kc;var e;a:{if(e=document.createElement("canvas")){var g=e.getContext("experimental-webgl",{stencil:!0});if(g){var h=g.getExtension("WEBGL_debug_renderer_info");if(h){e=g.getParameter(h.UNMASKED_RENDERER_WEBGL);break a}}if(g=e.getContext("webgl")){e=g.getParameter(g.RENDERER);break a}}e=null}d.gpu=e;(e=z("GOOGLE_FEEDBACK_PRODUCT_DATA",void 0))&&u.extend(d,e);(b=NIa(b))&&u.extend(d,b);if(b=qW(a.element))if(b=b.getPlayer())b.pauseVideo(),d.playback_id=b.getVideoData().cpn,d.debug_text=
b.getDebugText(!0);(a=cV(a.element,"yt-get-autonav-pause-debug-state",void 0,!0))&&a.length&&(d.autonav_pause_state=a[0]);a=kh();d.browser_resolution=a.width+"\xD7"+a.height+"@"+(window.devicePixelRatio||1)+"x";c&&u.extend(d,c);return d},NIa=function(a){if("GFEEDBACK"!=a&&"GUIDED_HELP"!=a)return we(Error("Unsupported service: ["+a+"]")),null;
var b=MU(vV);if(!b)return null;if((b=b.getCurrentPage())&&b.getServiceTrackingParams){var c=b.getServiceTrackingParams();if(c)for(var d=0;b=c[d++];)if(b.service==a){a=null;if(b=b.params)for(a={},c=0;d=b[c++];)a[d.key]=d.value;return a}}return null};
X$.prototype.resetProductData_=function(){this.productData_={}};Polymer({is:"yt-gfeedback-manager",provides:B7,behaviors:[iY.ComponentBehavior],created:function(){this.feedbackManager=new X$(this)},
factoryImpl:function(){},
showFeedbackDialog:function(a,b,c,d){return this.feedbackManager.showFeedbackDialog(a,b,c,d)},
showHelpDialog:function(a,b,c){return this.feedbackManager.showHelpDialog(a,b,c)}});var OIa=["INPUT".toString(),"SELECT".toString(),"TEXTAREA".toString(),"EMBED".toString(),"YTD-COMMENTBOX"],Y$=new Map;Y$.set(32,59972);Y$.set(27,50765);Y$.set(70,60102);Y$.set(76,60221);Y$.set(77,60222);Y$.set(74,60223);Y$.set(84,60224);Y$.set(38,61941);Y$.set(40,61942);Y$.set(73,62521);Y$.set(67,62522);Y$.set(80,63390);Y$.set(78,63397);Y$.set(75,59972);Y$.set(188,63385);Y$.set(190,63384);Y$.set(36,63387);Y$.set(35,63386);Y$.set(37,63388);Y$.set(39,63389);Y$.set(79,63423);Y$.set(87,63424);
Y$.set(107,63426);Y$.set(109,63425);Y$.set(65,63428);Y$.set(83,63430);Y$.set(68,63429);Y$.set(221,63431);Y$.set(219,63432);Y$.set(97,63439);Y$.set(98,63440);Y$.set(99,63441);Y$.set(100,63442);Y$.set(101,63443);Y$.set(102,63444);Y$.set(103,63445);Y$.set(104,63446);Y$.set(105,63447);var Z$=new Map;Z$.set(80,63390);Z$.set(78,63397);Z$.set(188,63400);Z$.set(190,63401);Z$.set(191,60765);
function $$(a,b){A("desktop_keyboard_shortcut_usage_log")&&(a=b?Z$.get(a):Y$.get(a))&&(a=ho(a),CS(Wo(),Vo(),a),Co(Wo(),a,void 0))}
function PIa(a){return-1<a.findIndex(function(b){return-1<OIa.indexOf(b.tagName)})}
;Polymer({is:"yt-hotkey-manager",behaviors:[J0.YtComponentBehavior,T.YtActionSenderBehavior],created:function(){this.keyboardInUse_=!1;this.handleCapturedKeydownEventBound_=this.handleCapturedKeydownEvent_.bind(this)},
attached:function(){this.listen(document,"keydown","onKeyDownEvent_");this.listen(document,"keyup","onKeyUpEvent_");this.listen(document,"mousedown","onMouseDownEvent_");A("desktop_keyboard_capture_keydown_killswitch")||document.addEventListener("keydown",this.handleCapturedKeydownEventBound_,!0)},
detached:function(){this.unlisten(document,"keydown","onKeyDownEvent_");this.unlisten(document,"keyup","onKeyUpEvent_");this.unlisten(document,"mousedown","onMouseDownEvent_");A("desktop_keyboard_capture_keydown_killswitch")||document.removeEventListener("keydown",this.handleCapturedKeydownEventBound_,!0)},
handleCapturedKeydownEvent_:function(a){if(32==a.keyCode&&!this.keyboardInUse_)this.onKeyDownEvent_(a)},
onMouseDownEvent_:function(){this.keyboardInUse_=!1},
ignoreKeyEvent_:function(a){if(a.ctrlKey||a.altKey)return!0;var b=Polymer.dom(a).path||[];return PIa(b)?!0:a.defaultPrevented?($$(a.keyCode,a.shiftKey),!0):32==a.keyCode&&this.keyboardInUse_?this.isSpacebarClick_(a):!1},
isSpacebarClick_:function(a){var b=a||window.event;if(b.composedPath&&Za(b.composedPath))var c=b.composedPath();else b.path&&(c=b.path);c&&c.length?b=c[0]:(b=b||window.event,b=b.target||b.srcElement,3==b.nodeType&&(b=b.parentNode));return b&&32==a.keyCode&&(a="BUTTON"==b.tagName||"A"==b.tagName||"INPUT"==b.tagName,b=(b=b.getAttribute("role"))&&("option"==b||"button"==b||0==b.indexOf("menuitem")),a||b)?!0:!1},
onKeyDownEvent_:function(a){if(!this.ignoreKeyEvent_(a)&&(191==a.keyCode&&(a.shiftKey||a.metaKey?null!=a.repeat&&a.repeat||(this.openHotkeyDialog_(),$$(a.keyCode,a.shiftKey)):(this.focusSearchBox_(),a.preventDefault())),!a.metaKey))switch(a.keyCode){case 9:this.keyboardInUse_=!0;break;case 32:A("global_spacebar_pause")&&!this.keyboardInUse_&&(a.preventDefault(),this.passEventToPlayer_(a));break;case 84:this.toggleTheaterMode_(a.keyCode,a.shiftKey);break;case 73:this.toggleMiniplayer_(a.keyCode,a.shiftKey);
break;case 70:this.isMiniplayerActive_()||this.passEventToPlayer_(a);break;case 27:this.closeMiniplayer_(a.keyCode,a.shiftKey)||this.passEventToPlayer_(a);break;default:this.passEventToPlayer_(a);}},
onKeyUpEvent_:function(a){if(!this.ignoreKeyEvent_(a)){var b=this.getPlayerManager_();b&&(b=b.getPlayer())&&b.handleGlobalKeyUp(a.keyCode,a.shiftKey,a.ctrlKey,a.altKey,a.metaKey,a.key,a.code)}},
getPlayerManager_:function(){var a=qW(this),b=this.getInterface(vV);return a&&b&&b.isOnWatch()?a:null},
passEventToPlayer_:function(a){var b=this,c,d,e,g;return Ca(function(h){if(1==h.nextAddress)return d=b.sendOptionalAction("yt-miniplayer-active"),!A("desktop_keyboard_shortcuts_enabled_miniplayer_killswitch")&&d&&d[0]?(e=b.sendOptionalAction("yt-get-miniplayer-component-action"))&&e[0]&&(c=e[0].getPlayerElement()):c=qW(b,!0),c?ta(h,c.getPlayerPromise(),3):h.jumpTo(0);g=h.yieldResult;g.handleGlobalKeyDown(a.keyCode,a.shiftKey,a.ctrlKey,a.altKey,a.metaKey,a.key,a.code);38!=a.keyCode&&40!=a.keyCode&&
$$(a.keyCode,a.shiftKey);ua(h)})},
focusSearchBox_:function(){this.fire("yt-focus-searchbox")},
openHotkeyDialog_:function(){this.fire("yt-open-hotkey-dialog")},
isMiniplayerActive_:function(){var a=this.sendOptionalAction("yt-miniplayer-active");return a&&a.length&&a[0]},
closeMiniplayer_:function(a,b){return this.isMiniplayerActive_()?(this.sendAction("yt-shortcut-close-miniplayer"),$$(a,b),!0):!1},
toggleTheaterMode_:function(a,b){var c=this.sendOptionalAction("yt-is-theater"),d=this.getPlayerManager_(),e=A("disable_theater_mode_keyboard")||se("START_IN_FULL_WINDOW_MODE");d&&!e&&1<=c.length&&(this.sendAction("yt-toggle-theater-mode",[!c[0]]),$$(a,b))},
toggleMiniplayer_:function(a,b){var c=this.getPlayerManager_();this.isMiniplayerActive_()?(this.sendAction("yt-expand-watch-page-action"),$$(a,b)):c&&(this.sendAction("yt-activate-miniplayer-from-watch-action"),$$(a,b))}});Polymer({is:"yt-mdx-manager",behaviors:[U.YtActionHandlerBehavior],properties:{appId:String,mdxConnected:Boolean,receiverAvailable:Boolean,receiverName:String,currentVideoId_:String,currentListId_:String},actionMap:{"yt-get-mdx-status":"handleGetMdxStatus_","yt-add-to-remote-queue-action":"handleAddToQueueAction_","yt-clear-remote-queue-action":"handleClearQueueAction_","yt-insert-in-remote-queue-action":"handleInsertInQueueAction_","yt-remove-from-remote-queue-action":"handleRemoveFromQueueAction_"},
created:function(){this.remoteApi_=null},
ready:function(){A("polymer_enable_mdx")&&(vAa({device:"Desktop",app:"youtube-desktop",appId:this.appId}),gn("yt-remote-connection-change",this.handleConnectionChange_,this),gn("yt-remote-receiver-availability-change",this.handleReceiverAvailabilityChange_,this),(this.remoteApi_=AAa())&&this.remoteApi_.subscribe("remoteQueueChange",this.handleRemoteQueueChange_,this))},
handleGetMdxStatus_:function(){return{connected:this.mdxConnected,receiverAvailable:this.receiverAvailable,receiverName:this.receiverName}},
handleConnectionChange_:function(a){(this.mdxConnected=a)?(a=xAa(),!a&&OT()&&Yza()&&(a={key:"cast-selector-receiver",name:Yza()}),a=a.name):a=null;this.receiverName=a;nk(this.remoteApi_);(this.remoteApi_=AAa())&&this.remoteApi_.subscribe("remoteQueueChange",this.handleRemoteQueueChange_,this)},
handleReceiverAvailabilityChange_:function(){var a=wAa();OT()&&kT("yt-remote-cast-available")&&a.push({key:"cast-selector-receiver",name:"Cast..."});this.receiverAvailable=0<a.length},
handleRemoteQueueChange_:function(){var a=this.currentVideoId_,b=this.currentListId_,c=$T(this.remoteApi_);this.currentVideoId_=c.videoId;this.currentListId_=c.listId;this.currentVideoId_&&this.sendAction("yt-sync-with-remote-video",[this.currentVideoId_,A("polymer_enable_mdx_queue")?this.currentListId_:null,a,b])},
handleAddToQueueAction_:function(a){a=a.addToRemoteQueueAction;this.remoteApi_&&(a.videoId?this.remoteApi_.addVideo(a.videoId):a.playlistId&&this.remoteApi_.addPlaylist(a.playlistId))},
handleClearQueueAction_:function(){this.remoteApi_&&this.remoteApi_.clearPlaylist()},
handleInsertInQueueAction_:function(a){a=a.insertInRemoteQueueAction;this.remoteApi_&&a.videoId&&this.remoteApi_.insertVideo(a.videoId)},
handleRemoveFromQueueAction_:function(a){a=a.removeFromRemoteQueueAction;this.remoteApi_&&a.videoId&&this.remoteApi_.removeVideo(a.videoId)}});Polymer({is:"yt-playlist-manager",provides:SW,behaviors:[iY.ComponentBehavior,ZX.YtPlayerListenerBehavior],UNAVAILABLE_AUTOPLAY_DELAY_:5E3,UNAVAILABLE_AUTOPLAY_DELAY_BG_:1E3,factoryImpl:function(){},
created:function(){this.PLAYER_EVENTS_=new Map;this.PLAYER_EVENTS_.set("onPlaylistNext",this.onPlaylistNext);this.PLAYER_EVENTS_.set("onPlaylistPrevious",this.onPlaylistPrevious);this.PLAYER_EVENTS_.set("onPlaylistIndex",this.onPlaylistIndex_);this.PLAYER_EVENTS_.set("onStateChange",this.onPlayerStateChange_);this.playerListenersSetup_=!1;this.videoSkipJob_=0;this.canAutoAdvance_=!1;this.playerManager_=null},
attached:function(){this.listen(document,"yt-navigate-start","onYtNavigateStart_");this.listen(document,"yt-navigate-finish","onYtNavigateFinish_")},
detached:function(){this.unlisten(document,"yt-navigate-start","onYtNavigateStart_");this.unlisten(document,"yt-navigate-finish","onYtNavigateFinish_")},
updatePlaylistEventListeners:function(a,b){b&&!this.playerListenersSetup_?(this.playerManager_=a,this.registerPlaylistEventListeners_(a)):!b&&this.playerListenersSetup_&&(this.playerManager_=null,this.removePlaylistEventListeners_(a))},
setPlayer:function(a){this.playerManager_&&this.removePlaylistEventListeners_(this.playerManager_);this.playerManager_=a},
activate_:function(){this.playerManager_&&this.registerPlaylistEventListeners_(this.playerManager_)},
deactivate_:function(){this.playerManager_&&this.removePlaylistEventListeners_(this.playerManager_)},
registerPlaylistEventListeners_:function(a){a.getPlayerPromise().then(function(b){A("kevlar_frontend_video_list_actions")&&this.playerListenersSetup_||(this.listenToPlayerEvents(b,this.PLAYER_EVENTS_),this.playerListenersSetup_=!0)}.bind(this))},
removePlaylistEventListeners_:function(a){a.getPlayerPromise().then(function(b){if(!A("kevlar_frontend_video_list_actions")||this.playerListenersSetup_)this.unlistenFromPlayerEvents(b,this.PLAYER_EVENTS_),this.playerListenersSetup_=!1}.bind(this))},
isShuffleNextPlaylist:!1,setPlaylistComponent:function(a){this.playlistComponent&&(this.unlisten(this.playlistComponent,"yt-navigate","onPlaylistYtNavigate_"),a&&(a.data&&this.playlistComponent.data&&a.data.playlistId==this.playlistComponent.data.playlistId?(a.loopOn=this.playlistComponent.loopOn,a.shuffleOn=this.playlistComponent.shuffleOn):(a.loopOn=!1,a.shuffleOn=!1),this.isShuffleNextPlaylist&&(a.shuffleOn=!0,this.isShuffleNextPlaylist=!1)));this.playlistComponent=a;this.listen(this.playlistComponent,
"yt-navigate","onPlaylistYtNavigate_")},
setAutoplayRenderer:function(a){this.autoplayData=a},
setPlaylistData:function(a){this.currentPlaylistData_=a;this.fire("yt-playlist-data-updated");A("kevlar_frontend_video_list_actions")&&(u.isEmpty(a)?this.deactivate_():this.activate_())},
setPlayerPlaybackControlData:function(a){A("kevlar_frontend_video_list_actions")&&this.playerManager_&&this.playerManager_.updatePlayerComponents(a.endScreenRenderer,void 0,a.rvs,a.playlistPanelRenderer)},
getPlaylistData:function(){return this.currentPlaylistData_},
getTempData_:function(a,b){if(null==this.playlistComponent)return null;var c={};this.playlistComponent.shuffleOn&&(c.shuffle_on=this.playlistComponent.shuffleOn);this.playlistComponent.loopOn&&(c.loop_on=this.playlistComponent.loopOn);(a=this.get("watchEndpoint.params",a))&&(c.watch_params=a);if(b){b=this.get("webAutoplayRendererData.autoplayCount",this.autoplayData);if(A("decorate_autoplay_renderer")){if(a=PW().count,c.playnext=a,a!=b){var d=Error("AutoplayCount did not match decorator in playlist manager");
d.params="Client autoplayCount "+a+" did not match "+b;xe(d)}}else c.playnext=b;c.autonav="1";b=this.getInterface(EY).getTimeSinceActive();0<b&&(c.lact=b);this.playerManager_&&(b=this.playerManager_.getPlayer())&&b.shouldSendVisibilityState()&&(b=b.getVisibilityState(),0!=b&&(c.vis=b))}return c},
getPlaylistState_:function(){return this.playlistComponent.loopOn&&this.playlistComponent.shuffleOn?"LOOP_SHUFFLE":this.playlistComponent.loopOn?"LOOP":this.playlistComponent.shuffleOn?"SHUFFLE":"NORMAL"},
onPlaylistNext:function(){this.playlistComponent&&this.navigateToAutoplayWatchEndpoint_(this.getPlaylistState_(),"nextButtonVideo")},
onPlaylistPrevious:function(){this.playlistComponent&&this.navigateToAutoplayWatchEndpoint_(this.getPlaylistState_(),"previousButtonVideo")},
skipVideo:function(){var a=this.isInBackground_()?this.UNAVAILABLE_AUTOPLAY_DELAY_BG_:this.UNAVAILABLE_AUTOPLAY_DELAY_;this.videoSkipJob_=Gn(Dn,this.onPlaylistNext.bind(this),a)},
cancelVideoSkip:function(){this.videoSkipJob_&&Dn.cancelJob(this.videoSkipJob_)},
isInBackground_:function(){var a=window.document.visibilityState;return!(!a||"visible"==a)},
onPlaylistIndex_:function(a){this.playlistComponent&&(a=this.playlistComponent.data.contents[a].playlistPanelVideoRenderer.navigationEndpoint,this.fire("yt-navigate",{endpoint:a,tempData:this.getTempData_(a)}))},
onPlayerStateChange_:function(a){0==a&&this.playlistComponent&&this.canAutoAdvance_&&this.navigateToAutoplayWatchEndpoint_(this.getPlaylistState_(),"autoplayVideo",!0)},
onYtNavigateStart_:function(){this.canAutoAdvance_=!1},
onYtNavigateFinish_:function(){this.canAutoAdvance_=!0},
navigateToAutoplayWatchEndpoint_:function(a,b,c){if(A("player_allow_autonav_after_playlist")){var d=this.playlistComponent.data.currentIndex+1>=this.playlistComponent.data.totalVideos;if("NORMAL"==a&&"autoplayVideo"==b&&d&&c)return}if(a=this.getVideoEndpoint_(a,b))c=this.getTempData_(a,c),this.fire("yt-navigate",{endpoint:a,tempData:c})},
getVideoEndpoint_:function(a,b){if(this.autoplayData&&this.autoplayData.sets)for(var c=0,d=this.autoplayData.sets.length;c<d;c++){var e=this.autoplayData.sets[c];if(e.mode==a){if(e[b])return e[b];break}}else c=Error("AutoplayData is undefined in playlist manager"),c.params="Mode: "+a+" endpoint: "+b,xe(c)},
getAutoplayEndpoint:function(){if(this.playlistComponent)return this.getVideoEndpoint_(this.getPlaylistState_(),"autoplayVideo")},
onPlaylistYtNavigate_:function(a){if(a.detail.endpoint){a.stopPropagation();var b=a.detail;b.tempData=this.getTempData_(a.detail.endpoint);this.fire("yt-navigate",b)}}});Polymer({is:"yt-create-family-dialog",APP_IDS:{ytr:3,ytm:5},behaviors:[U.YtActionHandlerBehavior],properties:{isMobile:{type:Boolean,reflectToAttribute:!0},onReadyCallback_:Function,observer_:Object},actionMap:{"yt-open-create-family-dialog":"open"},created:function(){this.timeoutId_=0;hQ(2200)},
detached:function(){this.observer_&&this.observer_.disconnect()},
open:function(a,b){var c=a.serializedYpcFamilyCreateLoggingParams;this.timeoutId_=setTimeout(this.abort_.bind(this,a.postFlowErrorEndpoint,c),3E4);b&&(this.onReadyCallback_=b);var d=this.$["unicorn-iframe"];c&&c&&QX("ypcFamilyCreateFlowStarted",c);zS("family_creation",function(){var e=Sa("gapi.config.update"),g=Sa("gapi.family_creation.render");e("iframes/family_creation/url",this.getFamilyCreationUrlWithUnicornParams_());e=3;a.appId&&a.appId in this.APP_IDS&&(e=this.APP_IDS[a.appId]);e={authUser:z("SESSION_INDEX")||
0,clientId:e,darkmode:document.documentElement.hasAttribute("dark")?1:0,hl:z("HL",void 0),initialflow:[4,5,6,7],m:this.isMobile?1:0,onFlowComplete:this.onUnicornFlowComplete_.bind(this,a.postFlowSuccessEndpoint,c),onError:this.onUnicornFlowError_.bind(this,a.postFlowErrorEndpoint,c),onReady:this.onUnicornFlowReady_.bind(this,a.referencePcidParams)};g(d,e)}.bind(this))},
close:function(){this.$.dialog.close();this.observer_&&this.observer_.disconnect()},
onUnicornFlowComplete_:function(a,b){this.close();b&&b&&QX("ypcFamilyCreateFlowSucceeded",b,void 0,void 0,void 0);this.fire("yt-navigate",{endpoint:a})},
onUnicornFlowError_:function(a,b){this.close();b&&QX("ypcFamilyCreateFlowCancelled",b);this.fire("yt-navigate",{endpoint:a})},
onUnicornFlowReady_:function(a){this.clearTimeout_();if(this.onReadyCallback_)this.onReadyCallback_();a&&Sa("gapi.family_creation.setConfig")(0,a);this.observer_=new MutationObserver(function(){this.$.dialog.fit()}.bind(this));
this.observer_.observe(this.$["unicorn-iframe"].querySelector("iframe"),{atttributes:!0,attributeFilter:["style"]});this.$.dialog.open()},
getFamilyCreationUrlWithUnicornParams_:function(){return z("YTR_FAMILY_CREATION_URL",void 0)},
getCurrentUrl_:function(){return document.location.href},
abort_:function(a,b){this.clearTimeout_();this.onUnicornFlowError_(a,b)},
clearTimeout_:function(){clearTimeout(this.timeoutId_)}});Polymer({is:"yt-page-navigation-progress",provides:D$,behaviors:[iY.ComponentBehavior],factoryImpl:function(){},
STEP:1,BLOCK_ON:80,MIN_PROGESS:0,MAX_PROGESS:100,created:function(){this.boundNextProgress_=this.nextProgress_.bind(this)},
ready:function(){this.progress_=this.MIN_PROGESS;this.hidden=!0;this.setAttribute("aria-valuemin",this.MIN_PROGESS);this.setAttribute("aria-valuemax",this.MAX_PROGESS)},
set progress(a){this.progress_=a;var b="scaleX("+a/this.MAX_PROGESS+")",c=this.$.progress.style;c.transform=b;c.webkitTransform=b;this.setAttribute("aria-valuenow",a)},get progress(){return this.progress_},start:function(){this.progress=this.MIN_PROGESS;this.hidden=!1;window.requestAnimationFrame(this.boundNextProgress_)},
finish:function(){this.progress=this.MAX_PROGESS;this.asyncFrame(function(){this.progress==this.MAX_PROGESS&&(this.hidden=!0)}.bind(this),80)},
nextProgress_:function(){this.progress>=this.BLOCK_ON||(this.progress+=this.STEP,window.requestAnimationFrame(this.boundNextProgress_))}});Polymer({is:"ytd-app",behaviors:[hY.YtdAutonavPauseBehavior,AY.YtdReduxBehavior,iFa.YtdPlaylistHandlerBehavior,G_.YtEventForwardingBehavior,cY.YtOpenPopupBehavior,U.YtActionHandlerBehavior,{_noAccessors:!0,actionRouterIsRoot:!1,created:function(){this.actionRouter_=$U.getInstance();this.actionRouterNode=this.actionRouterIsRoot?document:this;this.onYtActionBoundListener_=this.onYtAction_.bind(this);this.onYtRegisterActionBoundListener_=this.onYtRegisterAction_.bind(this);this.actionRouterListenersRegistered_=
!1;this.onYtUnregisterActionBoundListener_=this.onYtUnregisterAction_.bind(this);this.registerActionRouterEventListeners_()},
attached:function(){this.registerActionRouterEventListeners_()},
detached:function(){this.unregisterActionRouterEventListeners_()},
registerActionRouterEventListeners_:function(){this.actionRouterListenersRegistered_||(this.actionRouterListenersRegistered_=!0,document.addEventListener("yt-unregister-action",this.onYtUnregisterActionBoundListener_),this.actionRouterNode.addEventListener("yt-action",this.onYtActionBoundListener_),this.actionRouterNode.addEventListener("yt-register-action",this.onYtRegisterActionBoundListener_))},
unregisterActionRouterEventListeners_:function(){this.actionRouterListenersRegistered_=!1;document.removeEventListener("yt-unregister-action",this.onYtUnregisterActionBoundListener_);this.actionRouterNode.removeEventListener("yt-action",this.onYtActionBoundListener_);this.actionRouterNode.removeEventListener("yt-register-action",this.onYtRegisterActionBoundListener_)},
onYtAction_:function(a){aV(this.actionRouter_,a.detail)},
onYtRegisterAction_:function(a){a=a.detail;var b=this.actionRouter_.actionRoutingMap.get(a.actionName);b||(b=new Map,this.actionRouter_.actionRoutingMap.set(a.actionName,b));b.set(a.context,ve(a.handler.bind(a.context)))},
onYtUnregisterAction_:function(a){var b=this.actionRouter_.actionRoutingMap.get(a.detail.actionName);b&&b.delete(a.detail.context)}},
yIa.YtAppBehavior,GY.YtEndpointBehavior,uIa.YtEndpointHandlerWithYpcBehavior,z$.YtLogYpcFlowCommandsBehavior,zIa.YtFeedbackCollectorBehavior,V.YtRendererBehavior,MY.YtSwatchBehavior],CSI_SERVICE_NAME:"youtube",properties:{renderGuide:Boolean,guidePersistentAndVisible:{type:Boolean,reflectToAttribute:!0},miniGuideVisible_:{type:Boolean,reflectToAttribute:!0},mastheadHidden_:{type:Boolean,reflectToAttribute:!0,value:function(){return se("START_IN_FULL_WINDOW_MODE")}},
playerFullscreen_:{type:Boolean,reflectToAttribute:!0},hideHeaderShadow:{type:Boolean,value:!1,reflectToAttribute:!0},menuStrings_:{type:Object,value:{GUIDE_ALT_LABEL:yU("GUIDE_ALT_LABEL",void 0,"Guide")}},topbarData_:{type:Object,computed:"computeTopbarData_(data)"},isWatchPage:{type:Boolean,value:!1,reflectToAttribute:!0},useVimio_:{type:Boolean,value:A("kevlar_use_vimio_behavior")},scrolling_:{type:Boolean,reflectToAttribute:!0},backgroundColorUpdate_:{type:Boolean,reflectToAttribute:!0,value:A("kevlar_background_color_update")}},
listeners:{"app-drawer-transitioned":"onDrawerIronSelect_",attached:"onYtdPageManagerAttached_","yt-add-element-to-app":"onAddElementToApp_","yt-guide-hover":"onGuideOpenButtonHover_","yt-masthead-height-changed":"onYtMastheadHeightChanged_","yt-load-invalidation-continuation":"handleUserInvalidationEvent_","yt-page-type-changed":"onPageChanged_","yt-received-invalidation-data":"handleUserInvalidationEventWithPayload_","yt-request-panel-mode-change":"onRequestPanelModeChange_","yt-set-theater-mode-enabled":"onSetTheaterModeEnabled_",
"yt-set-fullerscreen-styles":"setFullscreen_","yt-focus-searchbox":"onFocusSearchBox_","yt-open-hotkey-dialog":"onOpenHotkeyDialog_"},observers:["updateMastheadData_(data)","observeGuideVisibility_(guidePersistentAndVisible, miniGuideVisible_)"],actionMap:{"yt-command-executor-command":"onYtCommandExecutorCommand_","yt-dark-mode-toggled-action":"onDarkModeToggledAction_","yt-dark-theme-action":"onDarkThemeAction_","yt-edu-dismiss-action":"handleEduDismissAction_","yt-edu-impression-action":"handleEduImpressionAction_",
"yt-get-shared-conversation-endpoint":"handleGetSharedConversationEndpoint_","yt-high-priority-notification-closed-action":"highPriorityNotificationClosed_","yt-light-theme-action":"onLightThemeAction_","yt-navigate-action":"onYtNavigateAction","yt-open-chat-mole-wrapper-action":"handleOpenChatMoleWrapperAction_","yt-player-fullscreen":"onPlayerFullscreen_","yt-register-create-family-dialog":"onYtRegisterCreateFamilyDialog_","yt-register-user-tango-invalidation-command":"handleRegisterUserTangoInvalidationCommand_",
"yt-clear-url-param-command":"handleClearUrlParamCommand_","yt-send-share-to-contacts-endpoint":"handleSendShareToContactsEndpoint_","yt-set-cookie-command":"onSetCookieCommand_","yt-show-high-priority-notification-command":"handleHighPriorityNotificationFilled_","yt-signal-action-enable-chrome-notifications":"onYtSignalActionEnableChromeNotifications_","yt-signal-action-toggle-restricted-mode-on":"onYtSignalActionToggleRestrictedModeOnAction_","yt-signal-action-toggle-restricted-mode-off":"onYtSignalActionToggleRestrictedModeOffAction_",
"yt-signal-action-toggle-polymer-off":"onYtSignalActionTogglePolymerOffAction_","yt-signal-action-confirm-next-up-next-edu":"onYtSignalActionConfirmNextUpNextEdu_","yt-signal-action-open-in-new-tab":"handleSignalActionOpenInNewTab_","yt-signal-action-copy-link-address":"handleSignalActionCopyLinkAddress_","yt-signal-action-confirm-mentions-edu":"onYtSignalActionConfirmMentionsEdu_","yt-signal-action-record-mentions-edu-impression":"onYtSignalActionRecordMentionsEduImpression_","yt-signal-action-show-keyboard-shortcut-dialog":"onYtSignalActionShowKeyboardShortcutDialog_",
"yt-signal-action-skip-navigation":"onYtSignalActionSkipNavigation_","yt-window-resized":"onWindowResized_"},created:function(){this.SVG_NAMESPACE_="http://www.w3.org/2000/svg";this.pageManagerAttachedPromise_=fw();this.loadDepsPromise=ew([this.loadDepsPromise,this.pageManagerAttachedPromise_.promise]);this.optOutButtonPromise_=fw();this.scrollAtTop_=!0;this.scrollThrottle_=new Cw(this.onThrottledScroll_,200,this);this.isTheaterModeSession_=se("START_IN_THEATER_MODE");this.isFullWindowSession_=se("START_IN_FULL_WINDOW_MODE");
this.hasCreateFamilyDialog_=!1;this.forcedTheme_=null;A("external_fullscreen")&&(this.fullscreen_=!1);this.mastheadHeight_=56;se("RECORD_LONG_TASKS")&&Xda();jS=!!Sa("ytappsettings.initialized");kS=Sa("ytappsettings.previousValue");lS=Sa("ytappsettings.previousSnapshotTime");jS||(jS=!0,mS());A("enable_cold_load_instrumentation")&&this.sendColdLoadRequestStreamz_();KDa();var a=eS.getInstance(),b=hS(0,119),c=1<window.devicePixelRatio;document.body&&qk(document.body,"exp-invert-logo")&&(c&&!qk(document.body,
"inverted-hdpi")?rk(document.body,"inverted-hdpi"):!c&&qk(document.body,"inverted-hdpi")&&tk(document.body,"inverted-hdpi"));b!=c&&(iS(0,119,c),a.save());re("openPopupConfig",OGa);this.registerServiceEndpointHandler(SBa)},
ready:function(){this.$.guide.addEventListener("transitionend",this.processDrawerIronSelect_.bind(this));this.$["guide-inner-content"].addEventListener("scroll",this.markDirty.bind(this));var a=Tya();a&&A("external_fullscreen")&&document.addEventListener(a,this.setFullscreen_.bind(this))},
attached:function(){this.initialLoad_();Polymer.RenderStatus.afterNextRender(this,this.updateIconSet_.bind(this));vS(this.$["guide-inner-content"],!1);this.useVimio_||(this.$["visibility-monitor"].visibilityRoot=this);var a=this.getInterface(mW);a&&jCa(nW.getInstance(),a);this.$["guide-service"].guideElement=this.$.guide;NV&&(a=document.createElement("ytd-miniplayer"),Polymer.dom(this.root).appendChild(a));A("kevlar_right_click_on_lockups")&&Polymer.IronOverlayManager._onCaptureClick&&document.addEventListener("contextmenu",
Polymer.IronOverlayManager._onCaptureClick.bind(Polymer.IronOverlayManager),!0);var b=function(){var d=Gq("yt-page-navigation-progress");Polymer.dom(this.root).appendChild(d)}.bind(this);
if(A("enable_signals")){var c=se("ENABLE_SELECTIVE_REGISTRATION")?"eor":"eocs";setTimeout(function(){ip.getInstance().parkOrScheduleJob(b,0,c,16)}.bind(this),0)}else En(b,200);
A("service_worker_push_enabled")&&En(vEa);this.fire("ytd-app-attached");ip.getInstance().processSignal("aa");DCa(this);Na("gapi.load",zS,void 0);this.reset_();z("LOGGED_IN",!1)&&(a=function(){this.sendServiceRequestAction([{signalServiceEndpoint:{signal:"REGISTER_USER_TANGO_INVALIDATION"}}])}.bind(this),ip.getInstance().parkOrScheduleJob(a,0,"pcl",3E3))},
detached:function(){wS(this.$["guide-inner-content"]);Dn.cancelJob(KW);KW=0;Dn.cancelJob(LW);LW=0;Em(JW);JW.length=0;IW=HW=null;nW.getInstance().dispose()},
initIconDefs_:function(a,b,c){var d=document.createElement("iron-iconset-svg");d.name=a;a=document.createElementNS(this.SVG_NAMESPACE_,"svg");d.appendChild(a);a.appendChild(b);if(c)for(var e in c)d[e]=c[e];document.body.appendChild(d);return d},
getLink_:function(a){return(a=(a=a.closest("iron-dropdown"))&&a.positionTarget)&&"ytd-positioning-target"==a.is?a.link:this.get("data.navigationEndpoint.commandMetadata.webCommandMetadata.url",a&&a.closest("[lockup]"))},
handleSignalActionOpenInNewTab_:function(a,b){(a=this.getLink_(b))&&window.open(a,"_blank")},
handleSignalActionCopyLinkAddress_:function(a,b){if(b=new cx(this.getLink_(b)).toString()){a=document.createElement("textarea");var c=document.location.href;c instanceof cx||(c=px(c));b instanceof cx||(b=px(b));b=c.resolve(b);a.value=b;document.body.appendChild(a);a.select();document.execCommand("copy");document.body.removeChild(a)}},
onYtSignalActionConfirmNextUpNextEdu_:function(){this.sendAction("yt-close-popup-action",["yt-bubble-hint-renderer"]);lW.getInstance().dismissEdu()},
onWindowResized_:function(){this.sendAction("yt-close-popup-action",["yt-tooltip-renderer"]);A("kevlar_snap_state_refresh")&&cW.getInstance().setWidth(document.body.clientWidth)},
observeGuideVisibility_:function(){if(A("kevlar_snap_state_refresh")){var a=cW.getInstance(),b=this.miniGuideVisible_;a.guidePersistentAndVisible_=this.guidePersistentAndVisible;a.miniGuideVisible_=b;WBa(a)}},
handleEduDismissAction_:function(a){a&&a.eduDismissAction&&(this.sendAction("yt-close-popup-action",["yt-bubble-hint-renderer"]),$V.getInstance().dismissEdu(a.eduDismissAction.key))},
handleEduImpressionAction_:function(a){a&&a.eduImpressionAction&&$V.getInstance().recordEduImpression(a.eduImpressionAction.key)},
onYtSignalActionConfirmMentionsEdu_:function(){this.sendAction("yt-close-popup-action",["yt-bubble-hint-renderer"]);eW.getInstance().dismissEdu()},
onYtSignalActionRecordMentionsEduImpression_:function(){eW.getInstance().recordEduImpression()},
onYtdPageManagerAttached_:function(a){"page-manager"==Polymer.dom(a).rootTarget.id&&this.pageManagerAttachedPromise_.resolve()},
updateIconSet_:function(){var a=Polymer.dom(this).querySelector("#masthead"),b=Polymer.dom(a),c=b.querySelector("g#yt-logo");c&&(a=document.createElementNS(this.SVG_NAMESPACE_,"defs"),a.appendChild(c.cloneNode(!0)),(b=b.querySelector("g#yt-logo-red"))&&a.appendChild(b.cloneNode(!0)),this.initIconDefs_("yt-logos-ext",a))},
updateMastheadData_:function(){var a=Polymer.dom(this).querySelector("#masthead");Polymer.RenderStatus.afterNextRender(this,function(){a.data=this.topbarData_})},
loadDesktopData_:function(a,b){setTimeout(function(){var e="adl";b&&b.filler&&(e="afl");rq(e)},0);
this.loadData(a,b);var c=b&&b.page,d=this.$["page-manager"];se("ENABLE_SELECTIVE_REGISTRATION")?ip.getInstance().parkOrScheduleJob(d.lazyPrepareCriticalPages.bind(d,c,a),10,"eor"):d.lazyPrepareCriticalPages(c,a);b&&"watch"==b.page&&(this.isWatchPage=!0);this.isWatchPage&&A("fill_web_player_context_config")&&(a=this.get("playerResponse",b))&&(a=a.playerConfig,a=!!a&&!!a.webPlayerContextConfig,c=this.get("args.player_response",z("FILLER_DATA",{}).player))&&(c=JSON.parse(c).playerConfig,c=!!c&&!!c.webPlayerContextConfig,
a!=c&&(d=Error("WebPlayerContextConfig presence mismatch."),d.params="response: "+a+", blank: "+c,xe(d)))},
initialLoad_:function(){if(window.getPageData){var a=window.getPageData();window.getPageData=null;this.loadDesktopData_(a.endpoint,a.data)}else window.loadDataHook=this.loadDesktopData_.bind(this)},
computeTopbarData_:function(a){return a?a.response?this.get("topbar.desktopTopbarRenderer",a.response):null:null},
reset_:function(){var a=Oya();a?this.forcedTheme_=a:(this.forcedTheme_=null,a=nS());this.toggleDarkThemeAttribute_("USER_INTERFACE_THEME_DARK"==a);this.setMastheadTheme_()},
onSetTheaterModeEnabled_:function(a,b){this.isTheaterModeSession_=b.enabled;this.setTheaterModeStyles_(b.enabled)},
setTheaterModeStyles_:function(){this.setMastheadTheme_()},
onDarkModeToggledAction_:function(){var a=mi(ni(5,window.location.href));Pya(a)?iS(eS.getInstance(),165,!hS(eS.getInstance(),165)):(A("kevlar_legacy_browsers")&&A("polymer2_not_shady_build")&&(mS(),window.location.reload()),a=qi(window.location.href),this.$.historyManager.replaceUrl(Fi(a,"theme")),a=this.isAppDarkTheme_(),this.toggleDarkThemeAttribute_(!a),this.setMastheadTheme_(),Polymer.updateStyles(),mS())},
onThemeAction_:function(a){switch(a){case"USER_INTERFACE_THEME_DARK":this.onDarkThemeAction_();break;case"USER_INTERFACE_THEME_LIGHT":this.onLightThemeAction_();break;default:throw Error("Invalid theme.");}},
onDarkThemeAction_:function(){this.toggleDarkThemeAttribute_(!0);this.setDocumentBackgroundColor_(this.DARKMODE_DOCUMENT_BACKGROUND_COLOR);this.setSwatch(this.THEATER_MODE_BASE_COLOR);Polymer.updateStyles()},
onLightThemeAction_:function(){this.isTheaterMode_()?(this.setSwatch(this.DEFAULT_MODE_BASE_COLOR),this.querySelector("#masthead").setSwatch(this.THEATER_MODE_BASE_COLOR)):this.setSwatch(this.DEFAULT_MODE_BASE_COLOR);this.toggleDarkThemeAttribute_(!1);this.setDocumentBackgroundColor_(this.DEFAULT_DOCUMENT_BACKGROUND_COLOR);Polymer.updateStyles()},
onYtSignalActionToggleRestrictedModeOnAction_:function(){this.setRestrictedMode_(!0)},
onYtSignalActionToggleRestrictedModeOffAction_:function(){this.setRestrictedMode_(!1)},
onYtSignalActionTogglePolymerOffAction_:function(){var a=eS.getInstance();iS(0,157,!1);iS(0,158,!0);a.save();window.location.reload()},
onPlayerFullscreen_:function(a){uS();this.playerFullscreen_=a},
setRestrictedMode_:function(a){var b=eS.getInstance();iS(0,58,a);b.save();this.getInterface(D2).reload()},
onPageChanged_:function(a){this.isWatchPage="ytd-watch-flexy"==a.detail.newPageType||"ytd-watch-fixie"==a.detail.newPageType;a.detail.oldPageType&&this.reset_();this.isFullWindowSession_&&this.setFullscreen_()},
onSetCookieCommand_:function(a){a=a.setCookieCommand;var b=eS.getInstance();a&&La(a.value)&&a.flagNum&&(iS(0,a.flagNum,a.value),b.save())},
onGuideToggleTap_:function(){this.fire("yt-guide-toggle")},
onGuideToggleHover_:function(){this.fire("yt-guide-hover")},
toggleDarkThemeAttribute_:function(a){a?document.documentElement.setAttribute("dark",!0):document.documentElement.removeAttribute("dark")},
isTheaterMode_:function(){return this.isWatchPage&&this.isTheaterModeSession_},
isAppDarkTheme_:function(){return document.documentElement.hasAttribute("dark")},
setMastheadTheme_:function(){var a=this.queryEffectiveChildren("#masthead");a&&(a.dark=a.isDarkThemeForced||this.isTheaterMode_()||this.isAppDarkTheme_(),a.isDarkThemeForced=!1)},
onRequestPanelModeChange_:function(a,b){this.hideHeaderShadow="seamed"!=b.mode},
onGuideOpenButtonHover_:function(){var a=this;U$(T$.getInstance()).then(function(){a.renderGuide=!0})},
onDrawerIronSelect_:function(a){"guide"==Polymer.dom(a).rootTarget.id&&this.processDrawerIronSelect_()},
processDrawerIronSelect_:function(){this.markDirty();var a="closed",b=this.$.guide;b.opened&&(this.renderGuide=!0,b.persistent||(a="opened"));this.fire("yt-autonav-pause-guide-"+a)},
onAddElementToApp_:function(a){Polymer.dom(this.root).appendChild(a.detail)},
onThrottledScroll_:function(){this.scrollAtTop_=0>=this.getInterface(vV).getCurrentPage().getScrollTop();this.mastheadHidden_=this.canHideMasthead_()},
canHideMasthead_:function(){return this.scrollAtTop_&&this.fullscreen_},
setFullscreen_:function(){var a=A("kevlar_fullerscreen_root_only_killswitch")?!!uS():!!uS()&&uS()==document.documentElement;a=this.isWatchPage&&(a||this.isFullWindowSession_);this.fullscreen_!=a&&((this.fullscreen_=a)&&this.sendOptionalAction("yt-close-all-popups-action"),this.toggleFullscreenStyles_(this.fullscreen_),this.sendAction("yt-fullscreen-change-action",[this.fullscreen_]))},
updateMastheadCssHeight_:function(){var a=this.mastheadHeight_;this.fullscreen_&&(a=0);this.updateStyles({"--ytd-masthead-height":a+"px"})},
toggleFullscreenStyles_:function(a){var b=this.getInterface(vV).getCurrentPage();a?(document.body.classList.add("no-scroll"),b.pageScrollElement=this,this.scrolling_=!0,this.listen(this,"scroll","onScroll_"),b.setScrollTop(0),this.updateStyles({"--ytd-app-fullerscreen-scrollbar-width":zDa()+"px"})):(document.body.classList.remove("no-scroll"),b.pageScrollElement=null,this.scrolling_=!1,this.unlisten(this,"scroll","onScroll_"));this.mastheadHidden_=a;this.updateMastheadCssHeight_()},
onScroll_:function(){this.markDirty();this.scrollThrottle_.fire()},
onYtMastheadHeightChanged_:function(a,b){this.mastheadHeight_=b.height;this.updateMastheadCssHeight_()},
onYtNavigateAction:function(a){a=this.get("navigateAction.endpoint",a);this.fire("yt-navigate",{endpoint:a})},
setDocumentBackgroundColor_:function(a){document.documentElement.style.backgroundColor=a},
onYtRegisterCreateFamilyDialog_:function(){if(!this.hasCreateFamilyDialog_){var a=document.createElement("yt-create-family-dialog");Polymer.dom(this.root).appendChild(a);this.hasCreateFamilyDialog_=!0}},
onYtSignalActionEnableChromeNotifications_:function(){fEa(!0)},
onFocusSearchBox_:function(){var a=this.querySelector("ytd-searchbox");a&&a.focus()},
onOpenHotkeyDialog_:function(){this.topbarData_.hotkeyDialog&&this.openPopup({openPopupAction:{popupType:"DIALOG",popup:{hotkeyDialogRenderer:this.topbarData_.hotkeyDialog.hotkeyDialogRenderer}}})},
onYtSignalActionShowKeyboardShortcutDialog_:function(){this.sendAction("yt-close-popup-action",["ytd-multi-page-menu-renderer"]);this.onOpenHotkeyDialog_()},
handleRegisterUserTangoInvalidationCommand_:function(a){if(!A("alt_desktop_tango_dark_launch_drop_action")){var b=document.createElement("yt-invalidation-continuation");b.tangoConfiguration=IIa;b.isReusable=!0;b.invalidationTag="yt-share";if(a=this.get("registerUserTangoInvalidationCommand.continuations.0.invalidationContinuationData",a))b.data=a,Polymer.dom(this.root).appendChild(b)}},
handleUserInvalidationEvent_:function(){this.sendOptionalAction("yt-broadcast-user-invalidation-action")},
handleUserInvalidationEventWithPayload_:function(a){a.detail.hasOwnProperty("conversationHighPriorityNotificationContentRenderer")?this.sendServiceRequestAction([{getConversationHighPriorityNotificationCommand:{conversationHighPriorityNotificationSupportedRenderer:{conversationHighPriorityNotificationContentRenderer:a.detail.conversationHighPriorityNotificationContentRenderer}}}]):this.sendOptionalAction("yt-broadcast-user-invalidation-action",[a.detail])},
handleHighPriorityNotificationFilled_:function(a){var b=xW.getInstance();if(a.hasOwnProperty("showHighPriorityNotificationCommand")&&a.showHighPriorityNotificationCommand.hasOwnProperty("conversationHighPriorityNotificationSupportedRenderer")){var c=a.showHighPriorityNotificationCommand.conversationHighPriorityNotificationSupportedRenderer.conversationHighPriorityNotificationContentRenderer,d=$U.getInstance().triggerOptionalAction("yt-opened-conversation-id-action");if(0==d.length||0<d.length&&c.conversationId!=
d[0])a=a.showHighPriorityNotificationCommand.conversationHighPriorityNotificationSupportedRenderer,b.highPriorityNotificationDisplayed_?b.highPriorityNotifications_.push(a):(b.highPriorityNotificationDisplayed_=!0,qCa(b,a))}},
highPriorityNotificationClosed_:function(){var a=xW.getInstance();if(0<a.highPriorityNotifications_.length){var b=a.highPriorityNotifications_[0];a.highPriorityNotifications_.splice(0,1);qCa(a,b)}else a.highPriorityNotificationDisplayed_=!1,$U.getInstance().triggerAction("yt-close-popup-action",["ytd-conversation-high-priority-notification-content-renderer"])},
handleGetSharedConversationEndpoint_:function(a){this.sendServiceRequestAction([a])},
handleOpenChatMoleWrapperAction_:function(a){a.openChatMoleWrapperAction.command.getSharedConversationEndpoint&&this.sendServiceRequestAction([a.openChatMoleWrapperAction.command])},
handleSendShareToContactsEndpoint_:function(a){this.sendServiceRequestAction([a])},
onYtEndpointChangeHandler:function(a,b){var c=eX.getInstance();c.pendingPrefetchJob_&&(b=!(!b||"1"!=b.autonav),c.pendingPrefetchJob_.resolve(a&&a.watchEndpoint?QW(a,b):""),c.pendingPrefetchJob_=null);this.sendAction("yt-pause-active-page-context");this.sendAction("ytd-log-youthere-nav");this.sendAction("yt-prepare-page-dispose")},
handleClearUrlParamCommand_:function(a){if(a.clearUrlParamCommand&&a.clearUrlParamCommand.paramKeys){var b=a.clearUrlParamCommand.paramKeys;a=px(window.location.href);b=k(b);for(var c=b.next();!c.done;c=b.next())a.removeParameter(c.value);window.history.replaceState(window.history.state,document.title,a.toString())}},
onYtCommandExecutorCommand_:function(a,b){a.commandExecutorCommand.commands&&this.sendInnerTubeActions(a.commandExecutorCommand.commands,b)},
sendColdLoadRequestStreamz_:function(){new R$().increment(z("COLD_LOADED_PAGE","null"))},
onYtSignalActionSkipNavigation_:function(){var a=this.getInterface(vV).getCurrentPage();wm(a)},
onEntitiesUpdated:function(a){a.mutations&&this.store.dispatch(kFa({type:"ENTITY_LOADED",payload:a.mutations}))}})}).call(this);
if(ytcsi){ytcsi.tick("rsef_dpj")}
|